Development Lifecycle
The Full Cycle
Section titled “The Full Cycle”Every non-trivial task follows this lifecycle:
OBSERVE → ROUTE → SHAPE → BUILD → PROVE → SHIP| Phase | What happens | Forgeplan commands |
|---|---|---|
| Observe | Understand current state | forgeplan health, memory_recall |
| Route | Determine depth + pipeline | forgeplan route "task" |
| Shape | Create artifacts, fill requirements | forgeplan new prd, forgeplan validate |
| Build | Implement + test | cargo test, pytest, pnpm test |
| Prove | Create evidence, score | forgeplan new evidence, forgeplan score |
| Ship | Activate, commit, PR, merge | forgeplan activate, gh pr create |
Phase 0: Observe
Section titled “Phase 0: Observe”Before doing anything — understand what’s happening:
# 1. Restore context from memorymemory_recall("project name")
# 2. Check project healthforgeplan health# → Shows: blind spots, orphans, stale artifacts
# 3. Check current tasks# Orchestra: mcp__orch__query_entities(status: "in_progress")# Or: check TODO.mdRule: if health shows blind spots or orphans — fix them FIRST, before starting new work.
Phase 1: Route
Section titled “Phase 1: Route”Determine the right level of rigor:
forgeplan route "add payment processing"# → Depth: Deep# → Pipeline: PRD → Spec → RFC → ADR# → Confidence: 92%| Depth | What to do | Time |
|---|---|---|
| Tactical | Just code, no artifacts | Minutes |
| Standard | PRD → RFC → code → evidence | Hours |
| Deep | PRD → Spec → RFC → ADR → code → evidence | Days |
| Critical | Epic → PRD[] → Spec[] → RFC[] → ADR[] | Weeks |
Tactical = skip to Build. Everything else = continue to Shape.
Phase 2: Shape
Section titled “Phase 2: Shape”Create the right artifacts and fill them:
# Create artifactforgeplan new prd "Payment Processing"
# Fill MUST sections: Problem, Goals, Non-Goals, Target Users, FR# Each FR: "[Actor] can [capability]" — no tech names
# Validateforgeplan validate PRD-001# → PASS (0 MUST errors)ADI Reasoning (Standard+)
Section titled “ADI Reasoning (Standard+)”Before coding — reason through alternatives:
forgeplan reason PRD-001# → 3+ hypotheses# → Predictions for each# → Evidence checkIf all hypotheses converge → code with confidence. If competing approaches → discuss with team before coding.
Deep/Critical: ADI is MANDATORY. Skipping it is a methodology violation.
Phase 3: Build
Section titled “Phase 3: Build”Implement the solution:
# 1. Create branchgit checkout dev && git pull origin devgit checkout -b feat/payment-processing
# 2. Code# - Test every new public function IMMEDIATELY# - Don't move to next function without test
# 3. Format + lintcargo fmt && cargo fmt -- --check # Rustruff format && ruff check # Pythonpnpm exec tsc --noEmit # TypeScript
# 4. Testcargo test # Rustpytest # Pythonpnpm test # TypeScriptAudit (Standard+)
Section titled “Audit (Standard+)”# Run multi-expert audit (4 agents: logic, architecture, security, tests)/audit
# Fix all HIGH/CRITICAL findings# Then RE-RUN tests after fixes — don't trust previous runPhase 4: Prove
Section titled “Phase 4: Prove”Create evidence that the solution works:
# Create evidence packforgeplan new evidence "Payment: 15 tests pass, Stripe benchmark 200ms"
# Add structured fields to body (REQUIRED):# verdict: supports# congruence_level: 3# evidence_type: test
# Link to decisionforgeplan link EVID-001 PRD-001 --relation informs
# Check scoreforgeplan score PRD-001# → R_eff = 1.00Phase 5: Ship
Section titled “Phase 5: Ship”Activate the artifact and create PR:
# 1. Review + activateforgeplan review PRD-001forgeplan activate PRD-001
# 2. Push + PRgit push origin feat/payment-processinggh pr create --base dev --title "[PRD-001] Payment Processing"
# 3. After merge — syncgit checkout dev && git pull origin dev
# 4. Save to memorymemory_retain("Payment processing: implemented, 15 tests, R_eff=1.00")
# 5. Update progress# - RFC checkboxes: [x]# - TODO.md: move to DonePipeline Types
Section titled “Pipeline Types”Greenfield (new module from scratch)
Section titled “Greenfield (new module from scratch)”Research → PRD → Spec → RFC → ADR → Build → Audit → EvidenceEverything is unknown. Need all artifacts. Start with Research.
Brownfield (existing code)
Section titled “Brownfield (existing code)”Explore → Identify → { feature: PRD → RFC → Build bug: Problem → Fix refactor: Audit → Problem → RFC → Build migration: Research → ADR → RFC → Build}Code already exists. Start with Explore (understand what’s there).
New bounded context → Greenfield pipelineExisting module → Brownfield pipelineChoose pipeline by context, not by project.
Forge-Cycle Command
Section titled “Forge-Cycle Command”The /forge-cycle command runs all phases automatically:
/forge-cycle PRD-001
Phase 0: OBSERVE → forgeplan healthPhase 1: ROUTE → forgeplan routePhase 2: SPRINT → /sprint (plan waves)Phase 3: BUILD → /team-up (implement)Phase 4: AUDIT → /audit (adversarial review)Phase 5: FIXES → fix HIGH/CRITICALPhase 6: EVIDENCE → forgeplan new evidence + scorePhase 7: COMMIT → git commit + PRPhase 8: NEXT → forgeplan health → next taskScope Lock
Section titled “Scope Lock”| Session type | Do | Don’t |
|---|---|---|
| Tactical (concrete task) | Code, test, commit | Don’t drift into planning |
| Strategic (research, planning) | Research, create artifacts | Don’t start coding |
If you notice scope drift → bookmark progress → start a new session of the right type.
Checklist: Is the Work Done?
Section titled “Checklist: Is the Work Done?”- Artifact filled (MUST sections)
- Validation PASS
- ADI reasoning done (Standard+)
- Code implemented
- Tests pass
- Format + lint clean
- Audit: 0 HIGH/CRITICAL
- Evidence created with structured fields
- R_eff > 0
- Artifact activated
- PR created and merged
- Progress updated (RFC checkboxes, TODO.md)
- Memory retained (if significant)