An AI-native SDLC: six agents, six handoffs, one loop
Plan, Design, Build, Test, Deploy, Maintain, with one agent role per stage and a written artifact at every handoff. How the loop works and how I run it on real projects.
Use at workPart of how I build real systems.
The classic software lifecycle assumes people do every step. When an agent writes most of the code, the risk moves: the work is fast, but decisions get lost in a chat window and nobody can say what the agent was asked to build. This loop fixes that by giving every stage one role and one written artifact. The next stage starts from the file, not from memory.
The loop
flowchart TD
P[1 · Plan<br/>intent.md] --> D[2 · Design<br/>spec.md]
D --> B[3 · Build<br/>plan.md + code]
B --> T[4 · Test<br/>evals + CI]
T --> R[5 · Deploy<br/>PR review + tag]
R --> M[6 · Maintain<br/>observe + operate]
M -->|incident or gap| P
The last arrow is the point. An incident is not the end of the story. It becomes a new intent.md, and the loop starts again at Plan.
Stages, roles and artifacts
| # | Stage | Agent role | Hands off | The rule I keep |
|---|---|---|---|---|
| 1 | Plan | Project manager | intent.md | One measurable outcome. The problem comes from real sources: tickets, logs, users. |
| 2 | Design | UI/UX designer | spec.md | Requirements and design in one file. Accessibility and phone widths are part of the spec. |
| 3 | Build | Software engineer | plan.md, code | Plan first, a human approves it, then code. Make it work, then right, then fast. |
| 4 | Test | QA / test engineer | evals, CI results | A test that never ran is not a result. Every red test gets one verdict. |
| 5 | Deploy | DevOps / release | reviewed PR, tag | Deploy a tag, never HEAD. Health check and rollback path before anything goes out. |
| 6 | Maintain | SRE / operations | new intent.md | Detect, investigate, recover, blameless. Every incident produces a new intent. |
Each role is a definition file the agent loads (in Claude Code, .claude/agents/<role>.md), so the same rules apply every session.
What each handoff must answer
- intent.md: what problem, for whom, and what number tells us it is solved. A good one lists three or more possible solutions, so the first idea does not win by default.
- spec.md: what the user can do, what success looks like, edge cases, what is out of scope, and the assumptions. Assumptions are bets; each one gets the question “what if this is 10x bigger?”
- plan.md: files to touch, data changes, order of work, and which steps need a human.
- Test verdict: pass, or for each failure: real bug, flaky test, or wrong test.
- Release note: the tag, what scripts ran before and after, and how to roll back.
Where a human stays in the loop
The agent does most of the writing. I own four decisions:
- Approving
plan.mdbefore any code is written. - Anything irreversible: schema or data changes go out as reviewed SQL scripts that I run myself, dev first, then prod.
- The production deploy gate.
- Reading the post-deploy telemetry and deciding what becomes the next intent.
How I run it
My day-to-day version is built on Spec Kit and Claude Code. The mapping is close:
| Loop stage | What I actually use |
|---|---|
| Plan | A short intent written from the ticket or incident, plus the project constitution |
| Design | /specify, then /clarify whenever an assumption involves volume, timing or another system |
| Build | /plan with the constitution check as a gate, /tasks, /analyze, /implement on a numbered branch |
| Test | Unit suite green, plus a golden-path run in a real browser against the quickstart’s expected numbers |
| Deploy | Deploy checklist: scripts before code, dev before prod |
| Maintain | Post-deploy review from real logs; fixes go on normal branches, new features re-enter at Plan |
Lesson. The stage I had not planned for was the last one. On the domain research platform, the spec said a drop day moved “a few thousand” names; production moved about 93,000 and the nightly job timed out. The review after the deploy is where the spec got corrected. The full story is in Two Features, Two Days.
When not to use the full loop
- Hotfixes. Six stages for a one-line fix is ceremony. Use a normal branch and PR, with the same project rules still in force.
- Throwaway prototypes. Write the intent, skip the rest, and delete the prototype when it has answered its question.
- When nobody reads the artifacts. Generated documents that no one reviews are paperwork. The reading is the real work.
Open questions I’m still working on
- How much of Test can run without me: evals that fail the build when output quality drops, not only when code breaks.
- Turning alerts into a draft
intent.mdautomatically, so Maintain feeds Plan without a person copying text between tools.