SDD Lifecycle — Conventions & Rules
Every agent in the AOI ecosystem follows these lifecycle rules. This skill is the single source of truth for SDD mechanics — it describes HOW the lifecycle works, not what any specific agent does.
Task Numbering (TASK-YYYY-NNN)
Every task gets a unique ID: TASK-{year}-{sequential}
.tasks/{feature-name}/TASK-2026-001/
├── proposal.md # Explore phase output
├── spec.md # Specify phase output
├── design.md # Plan phase output
├── tasks.md # Task breakdown
├── implementation-plan.md # Cross-agent assignment map
├── iterations/ # Implement phase artifacts
├── verify-report.md # QA & verification output
├── archive-report.md # Closure & documentation
└── functional-docs.md # Generated user-facing docs
Phase Gates — MANDATORY
| Gate |
From → To |
Who Approves |
What Must Exist |
| Intent Gate |
Pre-Flight → Explore |
Owner |
BIC calibrated; invariants + oracle persisted as O(1) facts |
| Proposal Gate |
Explore → Specify |
Owner |
proposal.md with acceptance criteria |
| Design Gate |
Specify → Plan |
Owner |
spec.md approved, no ambiguity |
| Implementation Gate |
Plan → Implement |
Owner |
design.md + tasks.md complete |
| TDD Gate |
During Implement |
Agent |
RED (failing test) → GREEN (min code) → REFACTOR per task |
| UX Gate |
During Implement |
@ux-designer |
UI component review before any new UI |
| Invariant Gate |
During Verify |
Automatic |
Every BIC never/oracle tag asserted by a test (invariant-gate.mjs, 0 tokens) |
| Verify Gate |
Implement → Verify |
Automatic |
All tasks marked done |
| Archive Gate |
Verify → Archive |
Owner |
verify-report.md with PASS/FAIL |
Note on Design Gate: The Design Gate (Specify→Plan, Owner approval) is satisfied jointly with the Implementation Gate at the end of /sdd-ff. The Supervisor's /sdd-ff command bundles Specify → Plan → Tasks into a single workflow with one Owner approval checkpoint, which serves as both the Design Gate and Implementation Gate. This is a deliberate optimization, not a violation.
Entrada al ciclo
/sdd-frame cuando la intención llega en lenguaje natural y hay que destilar invariantes;
/sdd-new cuando el requerimiento ya está acotado. Detalle en la skill sdd-entry.
Handling Bugs, Adjustments & Definition Gaps
No todo problema requiere un BIC nuevo ni una tarea /sdd-new. El diagnóstico detallado de
los tres escenarios vive en @triage-specialist, que carga exactamente cuando hace falta.
Lo que se necesita en cualquier fase es saber a dónde enrutar:
Decision Rule
- Broken behavior against existing rules? ➔
@triage-specialist (diagnosis & TDD fix).
- Need to add or modify a business rule/invariant? ➔
/sdd-frame (calibrate intent in natural language).
- Parameter, static copy, or trivial tweak? ➔ Direct fix with test / ICM Fact (zero overhead).
Rules ALL Agents Must Follow
Before Starting Any Phase
- Recall ICM context for the phase:
icm_memory_recall(query: "pending tasks", topic: "sdd-{WORKSPACE}")
- Check feedback for past mistakes:
icm_feedback_search(query: "{phase}")
- Read the constitution:
.specify/memory/constitution.md
During Work
- Every 3-5 tool calls or sub-tasks → store a checkpoint in ICM
- Architecture decisions → BOTH
icm_memory_store (episodic) AND icm_memoir_add_concept (graph)
- Errors encountered →
icm_feedback_record immediately
After Completing a Phase
icm_memory_store(topic: "sdd-{WORKSPACE}-{FEATURE}-TASK-YYYY-NNN", importance: "high")
- If topic has 7+ entries →
icm_memory_consolidate(topic) immediately
Scaffold Mirror Rule
Any change to agents, skills, instructions, or prompts in .github/ MUST be mirrored to scaffold/.github/ in the same commit. The verify-report.md checks this automatically.
ICM Topics Per Phase
| Phase |
Topic |
What to Store |
| Pre-Flight |
— |
Zero-Task Footprint (efímero en diálogo socrático) |
| Explore |
sdd-{WS}-{FEATURE}-TASK-YYYY-NNN |
User intent, constraints, service discovery |
| Specify |
same |
Formal specs, acceptance criteria |
| Plan |
same + {WS}-architecture |
Design decisions, tradeoffs, component graph |
| Implement |
same |
Progress checkpoints, error resolutions |
| Verify |
same + {WS}-errors-resolved |
QA findings, spec drift, health audit |
| Archive |
same + {WS}-session-summaries |
Final decisions, what was excluded, closure rationale |
1---2name: sdd-lifecycle3description: Spec-Driven Development lifecycle conventions — phases, artifacts, gates, task numbering, and workflow rules shared across all SDD agents. Use when running any /sdd-* command, creating tasks, or routing work through SDD phases.4---56# SDD Lifecycle — Conventions & Rules78Every agent in the AOI ecosystem follows these lifecycle rules. This skill is the single source of truth for SDD mechanics — it describes HOW the lifecycle works, not what any specific agent does.910## Task Numbering (TASK-YYYY-NNN)1112Every task gets a unique ID: `TASK-{year}-{sequential}`1314```15.tasks/{feature-name}/TASK-2026-001/16├── proposal.md # Explore phase output17├── spec.md # Specify phase output18├── design.md # Plan phase output19├── tasks.md # Task breakdown20├── implementation-plan.md # Cross-agent assignment map21├── iterations/ # Implement phase artifacts22├── verify-report.md # QA & verification output23├── archive-report.md # Closure & documentation24└── functional-docs.md # Generated user-facing docs25```2627## Phase Gates — MANDATORY2829| Gate | From → To | Who Approves | What Must Exist |30| ------------------- | -------------------- | ------------ | --------------------------------------------------------- |31| Intent Gate | Pre-Flight → Explore | Owner | BIC calibrated; invariants + oracle persisted as O(1) facts |32| Proposal Gate | Explore → Specify | Owner | `proposal.md` with acceptance criteria |33| Design Gate | Specify → Plan | Owner | `spec.md` approved, no ambiguity |34| Implementation Gate | Plan → Implement | Owner | `design.md` + `tasks.md` complete |35| TDD Gate | During Implement | Agent | RED (failing test) → GREEN (min code) → REFACTOR per task |36| UX Gate | During Implement | @ux-designer | UI component review before any new UI |37| Invariant Gate | During Verify | Automatic | Every BIC `never`/`oracle` tag asserted by a test (`invariant-gate.mjs`, 0 tokens) |38| Verify Gate | Implement → Verify | Automatic | All tasks marked done |39| Archive Gate | Verify → Archive | Owner | `verify-report.md` with PASS/FAIL |4041> **Note on Design Gate**: The Design Gate (Specify→Plan, Owner approval) is satisfied jointly with the Implementation Gate at the end of `/sdd-ff`. The Supervisor's `/sdd-ff` command bundles Specify → Plan → Tasks into a single workflow with one Owner approval checkpoint, which serves as both the Design Gate and Implementation Gate. This is a deliberate optimization, not a violation.4243## Entrada al ciclo4445`/sdd-frame` cuando la intención llega en lenguaje natural y hay que destilar invariantes;46`/sdd-new` cuando el requerimiento ya está acotado. Detalle en la skill `sdd-entry`.4748## Handling Bugs, Adjustments & Definition Gaps4950No todo problema requiere un BIC nuevo ni una tarea `/sdd-new`. El diagnóstico detallado de51los tres escenarios vive en `@triage-specialist`, que carga exactamente cuando hace falta.52Lo que se necesita en cualquier fase es saber a dónde enrutar:5354### Decision Rule55- *Broken behavior against existing rules?* ➔ `@triage-specialist` (diagnosis & TDD fix).56- *Need to add or modify a business rule/invariant?* ➔ `/sdd-frame` (calibrate intent in natural language).57- *Parameter, static copy, or trivial tweak?* ➔ Direct fix with test / ICM Fact (zero overhead).5859## Rules ALL Agents Must Follow6061### Before Starting Any Phase62631. Recall ICM context for the phase: `icm_memory_recall(query: "pending tasks", topic: "sdd-{WORKSPACE}")`642. Check feedback for past mistakes: `icm_feedback_search(query: "{phase}")`653. Read the constitution: `.specify/memory/constitution.md`6667### During Work6869- Every 3-5 tool calls or sub-tasks → store a checkpoint in ICM70- Architecture decisions → BOTH `icm_memory_store` (episodic) AND `icm_memoir_add_concept` (graph)71- Errors encountered → `icm_feedback_record` immediately7273### After Completing a Phase7475- `icm_memory_store(topic: "sdd-{WORKSPACE}-{FEATURE}-TASK-YYYY-NNN", importance: "high")`76- If topic has 7+ entries → `icm_memory_consolidate(topic)` immediately7778## Scaffold Mirror Rule7980Any change to agents, skills, instructions, or prompts in `.github/` MUST be mirrored to `scaffold/.github/` in the same commit. The `verify-report.md` checks this automatically.8182## ICM Topics Per Phase8384| Phase | Topic | What to Store |85| ---------- | ---------------------------------- | ----------------------------------------------------- |86| Pre-Flight | — | Zero-Task Footprint (efímero en diálogo socrático) |87| Explore | `sdd-{WS}-{FEATURE}-TASK-YYYY-NNN` | User intent, constraints, service discovery |88| Specify | same | Formal specs, acceptance criteria |89| Plan | same + `{WS}-architecture` | Design decisions, tradeoffs, component graph |90| Implement | same | Progress checkpoints, error resolutions |91| Verify | same + `{WS}-errors-resolved` | QA findings, spec drift, health audit |92| Archive | same + `{WS}-session-summaries` | Final decisions, what was excluded, closure rationale |