TLTan LeAI, cloud & automation for legacy systems · CalgaryLet’s talk
← All notes

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

#StageAgent roleHands offThe rule I keep
1PlanProject managerintent.mdOne measurable outcome. The problem comes from real sources: tickets, logs, users.
2DesignUI/UX designerspec.mdRequirements and design in one file. Accessibility and phone widths are part of the spec.
3BuildSoftware engineerplan.md, codePlan first, a human approves it, then code. Make it work, then right, then fast.
4TestQA / test engineerevals, CI resultsA test that never ran is not a result. Every red test gets one verdict.
5DeployDevOps / releasereviewed PR, tagDeploy a tag, never HEAD. Health check and rollback path before anything goes out.
6MaintainSRE / operationsnew intent.mdDetect, 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:

  1. Approving plan.md before any code is written.
  2. Anything irreversible: schema or data changes go out as reviewed SQL scripts that I run myself, dev first, then prod.
  3. The production deploy gate.
  4. 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 stageWhat I actually use
PlanA 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
TestUnit suite green, plus a golden-path run in a real browser against the quickstart’s expected numbers
DeployDeploy checklist: scripts before code, dev before prod
MaintainPost-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.md automatically, so Maintain feeds Plan without a person copying text between tools.