spec-kit-analyze
Original:🇺🇸 English
Translated
2 scripts
Use when `spec.md`, `plan.md`, and `tasks.md` exist and you need a read-only Spec Kit audit for consistency, requirement-to-task coverage, ambiguity, duplication, or constitution conflicts before implementation.
24installs
Sourceahgraber/skills
Added on
NPX Install
npx skill4agent add ahgraber/skills spec-kit-analyzeTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Spec Kit Analyze
Run a non-destructive cross-artifact quality audit before implementation.
When to Use
- exists and you want a pre-implementation consistency check across spec/plan/tasks.
tasks.md - You suspect coverage gaps, requirement drift, ambiguous language, or contradictory artifacts.
- You need a constitution-alignment gate without editing artifacts yet.
When Not to Use
- Any prerequisite artifact is missing (,
spec-kit-specify, orspec-kit-planfirst).spec-kit-tasks - You need targeted remediation edits now ().
spec-kit-reconcile - You are executing implementation work ().
spec-kit-implement
Router Fit
- Primary route from after
spec-kit.spec-kit-tasks - Read-only quality gate before .
spec-kit-implement - Default handoff to when findings require coordinated artifact updates.
spec-kit-reconcile
Critical Constraints
- Strictly read-only: do not modify files.
- Treat as authoritative; any MUST-level conflict is
memory/constitution.md.CRITICAL
Preconditions
- Run from repository root (or a subdirectory inside it).
- Active feature context resolves to one feature directory with ,
spec.md, andplan.md.tasks.md
Workflow
-
Resolve artifact paths and enforce prerequisite gate:
- Run exactly once.
scripts/check-prerequisites.sh --json --require-tasks --include-tasks - Parse:
FEATURE_DIRAVAILABLE_DOCS
- Derive:
SPEC = FEATURE_DIR/spec.mdPLAN = FEATURE_DIR/plan.mdTASKS = FEATURE_DIR/tasks.md
- If any required artifact is missing, stop and route to the owning sibling skill.
- Run
-
Load focused sections from:
- : requirements, stories, acceptance criteria, edge cases.
spec.md - : architecture/stack decisions, phases, constraints.
plan.md - : task IDs, phase grouping,
tasks.mdmarkers, referenced paths.[P] - : principle names and normative MUST/SHOULD statements.
memory/constitution.md
-
Build internal maps:
- Requirement inventory (functional + non-functional) with stable keys.
- Story/action inventory with acceptance-test intent.
- Task-to-requirement/story coverage mapping.
- Constitution obligations relevant to spec/plan/tasks scope.
-
Detect and classify issues:
- Duplication: overlapping or near-duplicate requirements.
- Ambiguity/placeholders: vague quality terms, TODO/TKTK/placeholder tokens.
- Underspecification: requirements lacking measurable outcomes or clear objects.
- Constitution conflicts: violations against MUST principles ().
CRITICAL - Coverage gaps: requirements without tasks and tasks without mapped requirement/story.
- Cross-artifact inconsistency: terminology drift, entity mismatch, ordering contradictions.
- Cap findings at 50 rows; summarize overflow counts by category.
-
Assign severity and output a compact report with stable IDs, coverage table, and metrics.
- : constitution MUST violations, missing core coverage that blocks baseline behavior.
CRITICAL - : conflicting/duplicate requirements, untestable or high-risk ambiguity.
HIGH - : terminology drift, non-functional coverage gaps, underspecified edge cases.
MEDIUM - : wording/style cleanup without execution impact.
LOW
-
Recommend next actions:
- If /
CRITICALfindings require cross-artifact edits, blockHIGHand route tospec-kit-implementwith a concise gap summary.spec-kit-reconcile - If only one artifact needs focused updates, route to its owner skill (,
spec-kit-specify, orspec-kit-plan).spec-kit-tasks - Otherwise provide prioritized improvements and whether implementation can proceed.
- If
-
Offer follow-up only:
- Ask whether to run using top findings as the gap report.
spec-kit-reconcile - Do not apply any edits in this skill.
- Ask whether to run
Output
- Markdown report only (no file writes) containing:
- Findings table:
ID | Category | Severity | Location(s) | Summary | Recommendation - Requirement coverage table:
Requirement Key | Has Task? | Task IDs | Notes - Constitution alignment issues (if any)
- Unmapped tasks (if any)
- Metrics:
- Total requirements
- Total tasks
- Coverage percentage
- Ambiguity count
- Duplication count
- Critical issues count
- Next-step routing recommendation
- Findings table:
References
references/command-analyze.mdscripts/check-prerequisites.shhttps://github.com/github/spec-kit/blob/9111699cd27879e3e6301651a03e502ecb6dd65d/templates/commands/analyze.md