一键导入
speckit-analyze
Perform a non-destructive cross-artifact consistency, quality analysis, and validation across spec.md, plan.md, and open beads (via br/bv).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Perform a non-destructive cross-artifact consistency, quality analysis, and validation across spec.md, plan.md, and open beads (via br/bv).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create or update the feature specification from a natural language feature description.
Execute the implementation plan by processing and executing all tasks via the Beads issue tracker (br/bv)
Generate a custom checklist for the current feature based on user requirements.
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
Execute the implementation planning workflow using the plan template to generate design artifacts.
Create or update the feature specification from a natural language feature description.
| name | speckit-analyze |
| description | Perform a non-destructive cross-artifact consistency, quality analysis, and validation across spec.md, plan.md, and open beads (via br/bv). |
| compatibility | Requires spec-kit project structure with .specify/ directory and Beads issue tracker |
| metadata | {"author":"github-spec-kit","source":"templates/commands/analyze.md"} |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Check for extension hooks (before analysis):
.specify/extensions.yml exists in the project root.hooks.before_analyze keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: true):
## Extension Hooks
**Optional Pre-Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Pre-Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
Wait for the result of the hook command before proceeding to the Goal.
.specify/extensions.yml does not exist, skip silentlyAct as the ultimate Validation Gate before execution. Identify inconsistencies, duplications, ambiguities, and underspecified items across core artifacts (spec.md, plan.md) and Open Beads. Perform rigorous Reality Check, Feasibility Verification, and Bead Graph Health analysis using bv tools, ensuring the work shape is approved and testable.
STRICTLY READ-ONLY: Do not modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).
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 beads—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 once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
br list --status=open --jsonbv --robot-insights and bv --robot-suggestAbort with an error message if any required file is missing (instruct the user to run missing prerequisite command). 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 Open Beads (br and bv):
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.)bv --robot-insights for cyclic dependencies (Cycles must be fixed).bv --robot-suggest for duplicates, missing deps.bv --robot-priority for priority misalignment.NO spike result (should return to planning).Use this heuristic to prioritize findings:
bv.Output a Markdown report (no file writes) with the following structure:
Mode Fit: PASS/FAIL | Repo Fit: PASS/FAIL | Assumptions: PASS/FAIL | Smaller Path: PASS/FAIL | Proof Surface: PASS/FAIL Decision: Proceed | Revise Planning | Run Spike First | Collapse Mode Evidence: [Concrete file/command/runtime evidence. Fail if evidence is only "this should work", "likely", or model knowledge.]
(Required if assumptions remain or high-risk feature. Decisions: READY, READY WITH CONSTRAINTS, NOT READY - RUN SPIKE, NOT READY - RETURN TO PLANNING)
| Part / Assumption | Risk | Proof Required | Evidence | Result |
|---|
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|---|---|---|---|---|---|
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
| (Generate stable IDs. Limit to top findings). |
Beads reviewed:
bv --robot-insights]bv --robot-priority]At end of report, output a concise Next Actions block:
/speckit.implement (e.g., returning to planning, running spikes, fixing circular dependencies via br dep remove).br update or br dep add to correct bead dependencies and scopes".Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
After reporting, check if .specify/extensions.yml exists in the project root.
hooks.after_analyze keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: true):
## Extension Hooks
**Optional Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
.specify/extensions.yml does not exist, skip silently$ARGUMENTS