Back to articles
Self-Refining Agents in Spec-Driven Development
How-ToTools

Self-Refining Agents in Spec-Driven Development

via Dev.toChris

I’ve been experimenting with a spec-driven workflow, and I accidentally discovered something I didn’t expect: the agent started reviewing and improving its own work. What I discovered is not new in terms of agentic AI; it's the point of agentic AI, but how I stumbled across it in my test was interesting nonetheless. The Basic Idea I created a spec.prompt.md file. This prompt accepts a ticket number and the pasted contents of the technical specifications. Then I run a command like: /spec <ticket-number> <pasted-contents> Originally, each time I ran /spec , it would overwrite everything and start from scratch. That worked, but it didn’t allow me to iterate or compare changes between passes. So I added two modes: -o = overwrite -i = iterate The Iterate Model When I run: /spec -i 1234 <contents> It creates a folder structure like this: /specs/1234/ p01/ spec.md plan.md implementation.md files... p02/ spec.md plan.md implementation.md files... p03/ ... The original intent was to provide mys

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles