From speckit-claude
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/speckit-claude:speckit-analyzeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```text
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (spec.md, plan.md, tasks.md) before implementation. This command MUST run only after /speckit.tasks has successfully produced a complete tasks.md.
READ-ONLY w.r.t. inputs: Do not modify spec.md, plan.md, tasks.md, constitution.md, or any other artifact under FEATURE_DIR/. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).
Exception — persisted analyze report: The skill writes a single managed file at FEATURE_DIR/.specify/analyze-report.md containing the report plus a pin block recording the spec/plan/tasks hashes the analysis was run against. The build-order scanner reads this file to detect when an analyze run has gone stale (i.e., spec/plan/tasks have changed since analyze last ran). This persistence is intentional and is the only file /speckit-analyze is permitted to write.
Constitution Authority: The project constitution (.specify/memory/constitution.md) is non-negotiable within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside /speckit.analyze.
Run .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
If any required file is missing, use AskUserQuestion to surface the error and tell the user which prerequisite skill to run manually. Do not invoke any skill automatically.
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot").
Load only the minimal necessary context from each artifact:
From spec.md:
From plan.md:
From tasks.md:
From constitution:
.specify/memory/constitution.md for principle validationCreate internal representations (do not include raw artifacts in output):
user-can-upload-file). Include only Success Criteria items that require buildable work (e.g., load-testing infrastructure, security audit tooling), and exclude post-launch outcome metrics and business KPIs (e.g., "Reduce support tickets by 50%").Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
<placeholder>, etc.)Use this heuristic to prioritize findings:
Output a Markdown report (no file writes) with the following structure:
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|---|---|---|---|---|---|
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
(Add one row per finding; generate stable IDs prefixed by category initial.)
Coverage Summary Table:
| Requirement Key | Has Task? | Task IDs | Notes |
|---|
Constitution Alignment Issues: (if any)
Unmapped Tasks: (if any)
Metrics:
At end of report, output a concise Next Actions block:
/speckit.implementUse AskUserQuestion to ask: "Would you like me to suggest concrete remediation edits for the top N issues?"
Do NOT apply remediations automatically. If CRITICAL issues exist, bias any remediation recommendations toward the most ambitious, complete, enterprise-grade resolution — never toward deferring, narrowing scope, or accepting reduced quality.
After producing the analysis report, write it to a managed file so /build-order can detect when an analyze run has gone stale. The report file lives at FEATURE_DIR/.specify/analyze-report.md and contains:
spec.md, plan.md, and tasks.md blob hashes at analysis timeRun from repo root after writing the report body. The first two lines below are illustrative — the model writes analyze-report.md directly via its file-edit tool with the same Markdown body it emitted to the user; the third line is a literal bash invocation:
mkdir -p "$FEATURE_DIR/.specify"
# (model writes $FEATURE_DIR/.specify/analyze-report.md via Write tool with the report body)
bash scripts/build-order/backfill-pins.sh --spec "$FEATURE_DIR"
The backfill helper detects .specify/analyze-report.md and pins it against the current spec.md/plan.md/tasks.md hashes. Idempotent. The persisted report serves as both the audit trail of what was found and the staleness signal for /build-order's ## Stale artifacts section.
Persist output: Ensure analyze-report.md is written to disk via the Write tool and committed (git add + git commit + git push). No report content should exist only in context.
Handoff: After persisting the report, use AskUserQuestion to say: "Analysis complete. Type /speckit-implement to begin implementation."
Do not invoke /speckit-implement yourself. The user must type the command.
spec.md, plan.md, tasks.md, constitution.md, or any artifact under FEATURE_DIR/ — analysis is strictly read-only (the only permitted write is analyze-report.md)/speckit-implement via the Skill tool or any other mechanism — the user must type the command themselves (Handoff)$ARGUMENTS
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub gratefuljinx77/speckit-claude --plugin speckit-claude