A stage-gate pipeline for building software with AI agents. Every stage has a clear entry, a clear exit, and a gate question that must be answered before advancing.
Structure creates momentum. Every stage has a clear exit. The documentation isn't bureaucracy -- it's breadcrumbs for when you get lost.
The goal: make building repeatable, teachable, and finishable.
Gate: One sentence defines the problem and who it's for.
Checkpoint: "What's the one-liner?"
Gate: V1 boundaries are explicit. Max 5 core features. "Not yet" list defined.
Checkpoint: "What are we NOT building?"
Agent-Native Addition:
- Identify which features will have agent capabilities
- For agent features, define: What outcomes should agents achieve?
Gate: Stack chosen, components mapped, data flow clear. All user flows identified and mapped.
Checkpoint: "Draw me the boxes and arrows." + "Are all user flows identified and mapped?"
Agent-Native Addition:
- Design tool architecture (atomic primitives, not bundled)
- Define entity list for CRUD audit
- Choose file vs. database for agent-generated content
Gate: Scaffolding, database, auth, deployment pipeline all running.
Checkpoint: "Can we deploy an empty shell?"
Gate: Build vertical slices. One complete feature at a time. No half-builds.
Checkpoint: "Does this feature work completely, right now?"
Agent-Native Addition (per feature):
- CRUD Complete: Can agent Create, Read, Update, Delete this entity?
- Completion Signals: Does tool return
shouldContinue? - Approval Flow: What stakes/reversibility? (see matrix below)
Approval Flow Matrix:
| Stakes | Reversibility | Pattern | Example |
|---|---|---|---|
| Low | Easy | Auto-apply | Organize files |
| Low | Hard | Quick confirm | Publish to feed |
| High | Easy | Suggest + apply | Code changes |
| High | Hard | Explicit approval | Send email, delete |
Gate: All blocks connected. Data flows between components.
Checkpoint: "Do all the pieces talk to each other?"
Agent-Native Addition:
- Agent-to-UI events standardized
- Tools can compose (agent can combine primitives for new outcomes)
- No silent agent actions -- all visible in UI
Gate: Full test pyramid implemented and passing. No skipped tests. Coverage thresholds met.
Checkpoint: "Are all tests green and is coverage sufficient?"
Required test types:
| Test Type | Purpose | When Written |
|---|---|---|
| Unit Tests | Individual functions/components | During Stage 5 |
| Integration Tests | Components work together, API contracts | During Stage 6 |
| E2E Tests | Full user flows in browser | Before exiting Stage 7 |
Agent-Native Addition:
- Parity tests: For each UI action, test agent can achieve same outcome
- CRUD tests: Every entity has Create/Read/Update/Delete agent tests
- Completion signal tests: Verify tools return proper signals
Gate: Error handling, loading states, empty states, edge cases covered.
Checkpoint: "What breaks if I do something stupid?"
Gate: Docs, marketing, onboarding, analytics in place.
Checkpoint: "Could a stranger use this without asking me questions?"
Gate: Production deploy. Real users.
Checkpoint: "Is it live and are people using it?"
Gate: Feedback loop active.
Checkpoint: "What did we learn?"
Agent-Native Addition (Latent Demand Discovery):
- Log agent requests that succeed (what's working)
- Log agent requests that fail (reveals capability gaps)
- Pattern emerging? -> Add domain tool or prompt
- Pattern failing? -> Add missing primitive
- Do NOT proceed to next stage without explicit sign-off
- Ask the checkpoint question before advancing
- Wait for user confirmation
User can skip/combine stages by stating a reason. Log override in PIPELINE_STATUS.md.
Every project using the pipeline should have a PIPELINE_STATUS.md in the repo root. Update it when:
- Entering a new stage
- Completing a checkpoint
- Using an override
- Making key decisions
- Create PIPELINE_STATUS.md
- Create BUILDING.md with pipeline explanation
- Start at Stage 1
- Do not write code until Stage 4 (Foundation Pour)
- Check PIPELINE_STATUS.md for current stage
- If no status file exists, assess and create one
- Resume from current stage with full rigor
{project}/stage-{N}-{stage-name}
Examples:
myapp/stage-4-foundationmyapp/stage-5-auth-feature
Before starting ANY stage work:
- Ensure you're on
mainwith latest changes - Create the stage branch
- Log branch creation in PIPELINE_STATUS.md
Before advancing to next stage:
- Verify: All stage work is complete and tested
- Merge: Create PR and merge to
main - Cleanup: Delete the feature branch (local AND remote)
- Confirm: No stale branches remain
- Create: New branch for next stage
- Leave merged branches lying around
- Accumulate 5+ feature branches without cleanup
- Work directly on
mainfor anything beyond hotfixes - Forget to delete remote branches after merge
When the user says:
- "pipeline status" -> Report current stage and next checkpoint
- "checkpoint cleared" -> Advance to next stage
- "skip to [stage]" -> Require reason, log override, proceed
- "parity check" -> Audit agent capability completeness
- "crud audit" -> Check all entities have full CRUD agent access