speckit-analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
{what this skill teaches agents}
Add boolean configuration flags to the update-config CLI command using TryParseRequiredBoolean() for argument parsing and GetOrCreateObject() for JSON section navigation, following the three-step flow and nesting conventions established across PRs #85, #86, and #92. WHEN: adding a new --flag to update-config, nesting a config value under a JSON section, or writing unit tests for CLI config flag parsing.
Resolve configuration file paths in CLI commands using the same shared pipeline as the doctor/diagnostics so all commands target the same effective config file. WHEN: adding a new CLI command that reads or writes config, debugging a command that mutates a different config file than doctor reports, or implementing config-aware CLI behavior in a multi-location config environment.
Implement discovery-source attribution tracking for MCP tool enumeration by creating a dedicated tracker interface with first-writer-wins semantics, recording at discovery call sites (not in the doctor/reporter), and wiring both in-process and OOP paths to agree on provenance. WHEN: the doctor or a reporting surface infers tool source heuristically, adding source attribution to a new discovery path, or aligning in-process and OOP discovery provenance.
Implement OAuth 2.1 + Entra ID authentication for an MCP server using a lightweight AS metadata proxy — handling RFC 9728 protected resource metadata, RFC 8414 AS metadata, and a /register endpoint that eliminates client_id prompts for all MCP clients. WHEN: adding OAuth to an MCP server, MCP clients ask users to paste a client_id, authorization redirects go to the wrong endpoint, or debugging Entra DCR limitations.
Publish .NET NuGet packages to GitHub Packages using GitHub PAT authentication — covering gh auth token retrieval, write:packages scope verification, dotnet pack/push workflow, and owner resolution from git remote. WHEN: publishing a NuGet package to GitHub Packages, debugging 401 on dotnet nuget push, adding a GitHub Packages NuGet source, or resolving write:packages scope errors.
| name | speckit-analyze |
| description | Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation. |
| argument-hint | Optional focus areas for analysis |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"templates/commands/analyze.md"} |
| user-invocable | true |
| disable-model-invocation | true |
$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.
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 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/powershell/check-prerequisites.ps1 -Json -RequireTasks -IncludeTasks once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
Abort 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 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.implementAsk the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
$ARGUMENTS