A code generation workflow that creates clean and maintainable code
October 2026, by Maarten Nieber
Resources and conclusion

Resources to get you started

mn-prompts: a repo with prompts and example code that explains to AI how to apply my favourite composable solutions. It teaches the AI to create focussed feature-packages and files. You can adapt this resource so that it uses your own favourite solutions and patterns.

sunya: a tool for converting Python-based scenarios into markdown documents.

Real cases

The todo app in this post is fictional, but the workflow was used to build two real projects: groupy (a tool that refactors a Python code-base in stages, with the help of Claude) and jazzoo (a task-runner in the spirit of just and make, whose tasks are real functions).

A design document and the test plan that was derived from it (groupy):

  • design.md: milestone MS-11, in which the developer restricts the refactoring to a part of the code-base;
  • test_plan.md: the test plan for MS-11, with the code units that each batch exercises.

A workflow-test in which the test-env replaces Claude by fake policies that run scripted answers (groupy):

A workflow-test in which the test-env puts a fake docker executable on the PATH (jazzoo):

Scenarios, and the Markdown documents that sunya generates from them:

Conclusion

I’m excited that AI code generation will take care of most problems that have been troubling software development. We will have fewer bugs, security issues, and code smells. Our attention will shift to formulating our requirements and (for now, though maybe not too much longer) to the high-level architectural ideas that will support the implementation of those requirements. Sadly, the art of tackling implementation challenges will become a thing of the past, but as problem solvers, I’m sure we will find other types of problems to work on.