Сделал в компании доклад о применении ИИ в архитектуре, давайте и вам расскажу.
Фокус в использовании подхода architecture as code: абсолютно все архитектурные артефакты у нас это тексты. С обычной документацией понятно, это и так некоторый набор текстовых файлов, чаще всего в макрдауне. Для них мы применяем структурный шаблон Arc42 — список из 12 пунктов, по которым нужно распределить информацию о проектируемой системе.
Структурный шаблон, во-первых, хорошо известен нейронкам, и они сразу понимают, о чём речь. Во-вторых, можно кинуться в модель бизнес-требованиям и очень быстро создать некий первоначальный набросок, от которого вы дальше уже пляшете, уточняя по пунктам и исправляя ошибки ИИ. Ну и, в-третьих, готовая структура с ящиками, по которым нужно всё раскладывать, это гораздо лучше, чем свалка ADR'ок, как это нередко бывает в компаниях.
Со схемами и диаграммами ещё интереснее. Берём инструменты со своими DSL-языками, такие, как Structurizr и PlantUML. Вся схема или диаграмма целиком определяется текстовым файлом. Можно применять Git со всеми его преимуществами. А для нейронок это родная среда: вы, как человек, смотрите на схему глазами, но нейронка работает с её DSL-файлом. Навскидку тут прирост эффективности даже больше, чем в программировании, потому что DSL это просто синтаксис, без смыслового наполнения, человеку его можно вообще не знать. Ты пишешь промпты, а смотришь уже на картинку, сгенерированную схему, и следующим промптом указываешь, где какие правки сделать. Нейронке при этом не приходится думать про потоки, асинхронность, типы данных, она просто правит текст как текст, поскольку у DSL нет поведения.
Тут как раз наиболее видна разница между рутинной и интеллектуальной частью работы. Как именно будет выглядеть схема, продумывает архитектор. Если доверить это нейронке, даже мощной, будет полно ошибок, неоптимальностей, неучтённых нюансов среды и так далее. Но вот само по себе написание синтаксиса — имба.
#dev@clockstackwheels
https://code.tutsplus.com/tutorials/behavior-driven-development-in-python--net-26547
Behavior-Driven Development (which we will now refer to as "#BDD") follows on from the ideas and principles introduced in #Test-Driven Development. The key points of writing tests before code really apply to BDD as well. The idea is to not only test your code at the granular level with unit tests, but also test your application end to end, using acceptance tests. We will introduce this style of testing with the use of the Lettuce testing framework.
http://pythonhosted.org/behave/
behave is behaviour-driven development, Python style.
Behavior-driven development (or #BDD) is an agile software development technique that encourages collaboration between developers, #QA and non-technical or business participants in a software project. We have a page further describing this philosophy.
behave uses tests written in a natural language style, backed up by Python code.
Once you’ve installed behave, we recommend reading the
tutorial first and then
feature test setup,
behave API and
related software (things that you can combine with behave)
finally: how to use and configure the behave tool.
https://pypi.python.org/pypi/pytest-bdd
#BDD library for the py.test runner
#pytest-bdd implements a subset of Gherkin language for the automation of the project requirements testing and easier behavioral driven development.
Unlike many other BDD tools it doesn’t require a separate runner and benefits from the power and flexibility of the #pytest. It allows to unify your unit and functional #tests, easier continuous integration server configuration and maximal reuse of the tests setup.
Pytest fixtures written for the #unit_test s can be reused for the setup and actions mentioned in the feature steps with dependency injection, which allows a true BDD just-enough specification of the requirements without maintaining any context object containing the side effects of the Gherkin. imperative declarations.