Spec-Kit Workflow
Last Verified: March 2026
Spec-kit is the spec-driven development pipeline used by the command-center-so repository. All features, bug fixes, and significant refactors follow this pipeline before any implementation work begins. The pipeline enforces measurable acceptance criteria, code-cited evidence, and user-authorized closure.
The authoritative source for all conventions is the project constitution at .specify/memory/constitution.md (currently v1.4.0).
Pipeline Phases
Each phase produces one or more artifacts in .specify/specs/{id}-{slug}/ and is invoked via a slash command or Cursor skill.
| Phase | Command | Purpose | Primary Output |
|---|
| Constitution | /speckit.constitution | Establish or amend governing principles | .specify/memory/constitution.md |
| Specify | /speckit.specify | Define the problem, current state, and acceptance criteria | spec.md |
| Clarify | /speckit.clarify | Resolve ambiguities with code-cited evidence (11-category taxonomy) | clarifications.md |
| Plan | /speckit.plan | Design phased implementation with AC mapping and research | plan.md, research.md, data-model.md |
| Tasks | /speckit.tasks | Break plan into numbered, dependency-ordered tasks | tasks.md |
| Implement | /speckit.implement | Execute tasks with checklist gates and phased context re-reading | Code changes, verification-results.md |
Every code claim in a spec must cite an exact file path and line number verified by reading the actual source. A task is not done until its verify step passes and the user authorizes closure.
Directory Structure
Top-Level .specify/ Layout
.specify/
├── specs/ # Feature specifications (one directory per spec)
├── templates/ # Artifact templates (spec, plan, tasks, checklist)
├── memory/ # Project constitution and persistent context
└── queue/ # Portfolio queue items and session briefs
└── done/ # Archived queue files for completed specs
Per-Spec Directory
Each spec lives in .specify/specs/{id}-{slug}/ where {id} is a 3-digit zero-padded sequential number and {slug} is kebab-case:
.specify/specs/125-speckit-visual-diagrams/
├── spec.md # Feature specification (required)
├── clarifications.md # Resolved ambiguities (required)
├── plan.md # Implementation plan (required)
├── tasks.md # Task breakdown (required)
├── research.md # Phase 0 research output
├── data-model.md # Entity/schema design
├── verification-results.md # Post-implementation AC evidence
├── contracts/ # API contracts
├── checklists/ # Quality validation checklists
├── diagrams/ # Mermaid .mmd visual diagrams
└── evidence/ # Validation reports, screenshots
Artifact Requirements
Every spec must produce the required artifacts before implementation begins.
| Artifact | Location | Required |
|---|
spec.md | .specify/specs/{id}-{slug}/spec.md | Yes |
clarifications.md | .specify/specs/{id}-{slug}/clarifications.md | Yes |
plan.md | .specify/specs/{id}-{slug}/plan.md | Yes |
tasks.md | .specify/specs/{id}-{slug}/tasks.md | Yes |
verification-results.md | .specify/specs/{id}-{slug}/verification-results.md | Post-implementation |
diagrams/ | .specify/specs/{id}-{slug}/diagrams/*.mmd | Conditional |
diagrams/ is generated when the plan has 3+ phases with multi-system scope (architecture diagram), or when tasks has 5+ tasks with dependencies (task dependency and key dependency diagrams). See the Visual Diagrams section below.
ID Conventions
Spec IDs
3-digit zero-padded, sequential: 010, 011, …, 125, 126. Duplicate ID prefixes are prohibited; if a collision is discovered, the newer spec must be renumbered.
Task IDs
Prefix S{specId}-T with zero-padded 3-digit task numbers. Example: S125-T001, S125-T002. Tasks are sequential across all phases within a spec.
Status Lifecycle
| Status | Meaning |
|---|
| DRAFT | spec.md exists, open questions remain |
| SPECIFIED | All clarifications resolved, clarifications.md complete |
| PLANNED | plan.md written with phased approach |
| TASKED | tasks.md created with dependency graph |
| IN PROGRESS | Implementation actively underway |
| IMPLEMENTED | All tasks done, all ACs verified, awaiting user sign-off |
| DONE | User has explicitly approved closure |
No spec may skip from DRAFT to IMPLEMENTED. Each phase produces its artifact.
Visual Diagrams Convention
Spec 125 added persistent Mermaid diagram generation to the pipeline. Diagrams are conditionally generated based on spec complexity.
When Diagrams Are Generated
| Diagram Type | Trigger | Output Files |
|---|
| Architecture diagram | Plan has 3+ phases with multi-system scope | diagrams/architecture.mmd |
| Task dependency diagram | Tasks has 5+ tasks with inter-task dependencies | diagrams/task-dependencies.mmd |
| Key dependency diagram | Tasks has 5+ tasks with dependencies | diagrams/key-dependencies.mmd |
All .mmd files must include the dark theme directive as the first line:
%%{init: {'theme': 'dark'}}%%
Diagrams are also embedded inline in the parent markdown (plan.md or tasks.md) as fenced Mermaid code blocks. The inline version is the canonical source; the .mmd file is an extracted copy.
Autopilot Integration
Autopilot Gate 3 (post-plan) and Gate 4 (post-tasks) log a soft warning when qualifying specs lack expected diagrams. This is non-blocking.
Autopilot Mode
The full pipeline can be executed automatically using /speckit.autopilot, which chains all phases in a single session: specify, clarify, plan, tasks, analyze, implement. All existing phase rules and artifact requirements still apply.
Gate Configuration
| Gate | Step | Default Mode |
|---|
| Gate 1 | post-specify | PAUSE |
| Gate 2 | post-clarify | PAUSE |
| Gate 3 | post-plan | AUTO |
| Gate 4 | post-tasks | PAUSE |
| Gate 5 | post-analyze | AUTO (always PAUSE on CRITICAL) |
Override flags:
--no-gates — All gates run in AUTO mode
--pause-at <step> — Add a PAUSE at a specific gate
--skip-clarify — Remove the clarify phase and Gate 2
--from <step> — Resume from a specific phase (specify, clarify, plan, tasks, analyze, implement)
--agent-mode — Fully autonomous execution (all gates AUTO, quality signals still halt)
Quality Signal Auto-Pause
The pipeline scans each artifact for quality signals that indicate unresolved issues. Auto-pause fires regardless of --no-gates or --agent-mode:
- Canonical marker:
[NEEDS CLARIFICATION] (bracket-uppercase)
- Scanner regex:
/\[needs[\s._-]*clarification\]/i (catches common variants)
- Additional signals:
**Unresolved** items in clarifications.md, unmapped ACs in plan.md or tasks.md
Spec-Hash Integrity
Every generated artifact includes a spec-hash field (first 8 hex characters of SHA-256 of spec.md at generation time). On resume with --from, each prerequisite artifact’s hash is compared against the current spec.md. A hash mismatch warns in user-mode and auto-halts in agent-mode.
Pipeline Artifacts
Autopilot produces two additional tracking files:
pipeline-state.md — Phase statuses, timestamps, and gate results
pipeline-report.md — AC-by-AC scorecard with evidence (written on completion or halt)
Additional Commands
The pipeline includes optional enhancement commands not required by the standard workflow but recommended for high-priority (P0/P1) specs:
| Command | Purpose |
|---|
/speckit.analyze | Cross-artifact consistency analysis (read-only). Detects gaps, duplications, and inconsistencies. |
/speckit.checklist | Generate quality checklists that validate requirements completeness (“unit tests for English”). |
/speckit.taskstoissues | Convert tasks from tasks.md into GitHub issues for project tracking. |
Closure Hard Gates
A spec must not be marked DONE until all of the following are true:
- Every task in
tasks.md is marked [x] Done with date
- Every AC in
spec.md maps to a PASS in verification-results.md
npm run lint exits 0 with no new errors
npx tsc --noEmit exits 0
npm test passes (all existing + new tests)
- Automated validation evidence in
pipeline-report.md with all ACs at PASS, confirmed by recorded UI/UX demo testing; or user has explicitly approved
- If autopilot was used,
pipeline-state.md shows all gates PASS
Queue Management
The portfolio queue lives at .specify/queue/README.md. It tracks every spec with status, priority, milestone, and linkage to spec artifacts. After completing all tasks for a spec, the implementer updates the queue entry to IMPLEMENTED. Only the user may advance status to DONE.
When a spec reaches DONE, its queue file is moved from .specify/queue/ to .specify/queue/done/. The queue README row is updated to reflect DONE status. Spec artifacts in .specify/specs/{id}-{slug}/ remain in place as the permanent record.
Templates
Artifact templates are maintained in .specify/templates/:
| Template | Purpose |
|---|
spec-template.md | User stories, acceptance scenarios, functional requirements |
plan-template.md | Technical context, constitution check, project structure, phased design |
tasks-template.md | Task breakdown format, dependency diagram section, MVP strategy |
checklist-template.md | Quality validation checklist format |
constitution-template.md | Constitution amendment format |
The spec-kit workflow is available through Cursor skills in ~/.cursor/skills/. Each phase has both a base skill and an enhanced speckit-* variant:
| Skill | Description |
|---|
specify / speckit-specify | Create feature specifications from natural language |
clarify / speckit-clarify | Structured clarification with 11-category ambiguity taxonomy |
plan / speckit-plan | Implementation planning with research phase and constitution check (+ architecture diagram for multi-system specs) |
tasks / speckit-tasks | Dependency-ordered task breakdown with parallel markers (+ dependency diagram when 5+ tasks) |
implement / speckit-implement | Execute tasks with checklist gates and phased re-reading |
speckit-analyze | Cross-artifact consistency analysis (read-only) |
speckit-autopilot | Full pipeline orchestration (specify through implement) |
speckit-checklist | Requirements quality validation checklists |
speckit-constitution | Manage project constitution with semantic versioning |
speckit-taskstoissues | Convert tasks to GitHub issues |