I just stumbled onto this workflow for reducing cognitive debt when coding with AI agents. It’s a variation of Simon WIllinson’s pattern of linear walkthroughs.
- Take a piece of software that I vibe coded.
- Ask the agent to create a markdown file with an annotation of the first N lines (say 100). I ask it to follow this example on how I structure annotated code.
- Read that section and understand it.
- Almost always, I propose refactoring what I read, since current LLMs are such litterbugs. So I ask the agent to refactor the code and update the markdown file.
- Repeat the process until the end of the file.
My hope is that by doing this, I can take vibe coded software and turn it something approximating the quality of something I would have written completely by hand, but in a fraction of the time.
I’m trying it out in vibey.