Chapter 15 of 22 · about 1 min
15. Step 7: analyze (optional but recommended)
What it is
It's a read-only consistency check across spec.md, plan.md and tasks.md, measured against the constitution. You created these documents at different times, and maybe edited some by hand, so they can drift apart. analyze finds where they disagree.
How to run it
/speckit-analyzeWhat it looks for
- Coverage gaps: a requirement (e.g.
FR-004) with no task that implements it - Conflicts: the spec says "case-insensitive email" but the plan says "exact match"
- Ambiguity: words like "fast" or "secure" with no measurable definition
- Duplication: the same requirement stated twice in different ways
- Constitution violations: these are always treated as CRITICAL
- Orphan tasks: tasks that don't map to any requirement
What the report looks like
- A findings table: ID, category, severity (CRITICAL / HIGH / MEDIUM / LOW), location, summary, recommendation
- A coverage summary: each requirement, whether it has tasks (yes/no), and which ones
- Next actions: e.g. "No critical blockers; fix HIGH/MEDIUM before implementing"
Learning aid · IllustrationAn example report, illustrated
analyze never edits files. You decide what to fix, then run analyze again.
| ID | Category | Severity | Location | Summary | Fix at the source |
|---|---|---|---|---|---|
A1 | Coverage gap | —not set in this example | spec.md · tasks.md | FR-004 has no task that implements it | → tasks.md (edit or regenerate) |
A2 | Conflict | —not set in this example | spec.md · plan.md | spec says "case-insensitive email", plan says "exact match" | → plan.md (design problem) |
A3 | Ambiguity | —not set in this example | spec.md | "fast" with no measurable definition | → spec.md or clarify |
A4 | Constitution violation | ▲ CRITICAL | plan.md | a plan step that logs plain-text passwords (illustrative) breaks "never store or log plain-text passwords" | → plan.md (design problem) |
A5 | Orphan task | —not set in this example | tasks.md | a task that maps to no requirement (illustrative) | → tasks.md |
It never edits files
You decide what to fix, and fix it at the source:
- requirement problem → edit
spec.md(orclarify) - design problem → edit
plan.md(or re-runplan) - missing task → edit or regenerate
tasks.md
Then run analyze again until it's clean enough.
Optional reviewCheck yourself