Analyzes spec files for inconsistencies, missing information, ambiguities, and structure issues. Detects depth level (full-tech, detailed, high-level) and generates markdown/HTML reports.
npx claudepluginhub sequenzia/agent-alchemy --plugin agent-alchemy-sdd-toolsThis skill is limited to using the following tools:
You are initiating the spec analysis workflow. This process will analyze an existing spec for quality issues, optionally guide the user through resolving them interactively, and optionally create fix tasks from approved findings.
Reviews spec.md files for completeness, clarity, implementability, testability, and structure. Identifies ambiguities, gaps, and missing sections before implementation.
Reviews PRDs and specs for completeness, ambiguities, edge cases, acceptance criteria quality. Structures findings by severity and offers direct fixes.
Performs read-only cross-artifact consistency analysis across spec.md, plan.md, tasks.md detecting duplications, ambiguities, coverage gaps, constitution violations with severity ratings before implementation.
Share bugs, ideas, or general feedback.
You are initiating the spec analysis workflow. This process will analyze an existing spec for quality issues, optionally guide the user through resolving them interactively, and optionally create fix tasks from approved findings.
For task creation from findings (Step 8), load the Tasks reference:
Read ${CLAUDE_PLUGIN_ROOT}/../claude-tools/skills/claude-code-tasks/SKILL.md
Verify the spec file exists at the provided path. If not found:
Read the entire spec file using the Read tool.
Analyze the spec content to detect its depth level:
Full-Tech Indicators (check first):
API Specifications section OR ### 7.4 API or similarPOST /api/, GET /api/, etc.)Testing Strategy sectionDetailed Indicators:
## 1., ### 2.1)Technical Architecture section**US-001**: or similar format)High-Level Indicators:
Detection Priority:
Check for settings at .claude/agent-alchemy.local.md to get:
The analysis outputs should be saved in the same directory as the spec:
specs/SPEC-User-Auth.mdspecs/SPEC-User-Auth.analysis.mdspecs/SPEC-User-Auth.analysis.htmlExtract the spec filename and construct both output paths.
Launch the Spec Analyzer Agent using the Task tool with subagent_type agent-alchemy-sdd-tools:spec-analyzer.
Provide this context in the prompt:
Analyze the spec at: {spec_path}
Spec Content:
{full_spec_content}
Detected Depth Level: {depth_level}
Report Output Path: {report_path}
HTML Review Path: {html_review_path}
HTML Template Path: skills/analyze-spec/templates/review-template.html
Author: {author_from_settings or "Not specified"}
Instructions:
1. Load the analysis skill, reference files, and HTML review guide
2. Perform systematic analysis based on the depth level
3. Generate the analysis report (.analysis.md)
4. Generate the interactive HTML review (.analysis.html)
5. Present findings summary
6. Ask user to choose review mode (HTML review, CLI update, or reports only)
7. Handle chosen mode accordingly
8. Update report with final resolution status
Once you have launched the Analyzer Agent, your role is mostly complete. The agent will handle:
After the analyzer agent completes its work and returns, proceed to Step 8.
After the analyzer agent has finished the review session and returned, check if there are approved findings that could be turned into tasks. This connects analysis output to the SDD task pipeline.
Use AskUserQuestion to offer task creation:
questions:
- header: "Fix Tasks"
question: "Would you like to create tasks from the analysis findings? This connects them to the SDD pipeline for tracking and execution."
options:
- label: "Create fix tasks (Recommended)"
description: "Create tasks from critical and warning findings for tracking via /run-tasks"
- label: "Skip"
description: "Analysis is complete, no tasks needed"
multiSelect: false
If the user selects "Create fix tasks":
Read the analysis report at {report_path} to get the final findings with resolution status
Filter to findings that were not resolved and not skipped (still pending) with severity critical or warning
Derive spec-name slug from the spec filename (strip SPEC- prefix, strip .md, lowercase, hyphens)
For each qualifying finding, create a task via TaskCreate:
Fix: {finding title} (imperative)Fixing {finding title}task_group: spec-fixes-{spec-name}priority: Map from severity — critical → critical, warning → highsource_section: Finding location referencespec_path: Path to the spec fileAfter creating all tasks, display summary:
Created {N} fix tasks from {M} unresolved findings.
Task group: spec-fixes-{spec-name}
Run `/run-tasks --task-group spec-fixes-{spec-name}` to execute.
If the user selects "Skip", display:
Analysis complete. Reports saved to:
- {report_path}
- {html_review_path}
/agent-alchemy-sdd:analyze-spec specs/SPEC-User-Authentication.md
This will:
specs/SPEC-User-Authentication.analysis.mdSpec analysis must respect the intended depth level of the document. A high-level spec should not be flagged for missing API specifications, just as a full-tech spec should be scrutinized for technical completeness.
Key Principle: Only flag what's expected at the document's depth level.
Findings should be:
Analysis covers four distinct categories to ensure comprehensive review:
Issues where the spec contradicts itself or uses conflicting information.
What to Look For:
Detection Strategy:
Expected content that is absent based on the spec's depth level.
What to Look For:
Detection Strategy:
Statements that are unclear or could be interpreted multiple ways.
What to Look For:
Detection Strategy:
Problems with document organization, formatting, or references.
What to Look For:
Detection Strategy:
Definition: Issues that would cause implementation to fail or go significantly wrong.
Assign When:
Examples:
Definition: Issues that could cause confusion or implementation problems.
Assign When:
Examples:
Definition: Improvements that would enhance spec quality but aren't blocking.
Assign When:
Examples:
references/analysis-criteria.md)Load the appropriate checklist from references/analysis-criteria.md based on detected depth level.
Analyze the spec section by section:
For each finding:
Create report using references/report-template.md:
When entering update mode for interactive resolution:
Present each finding with:
FINDING X/Y (N resolved, M skipped)
Category: {category}
Severity: {severity}
Location: {section, line}
CURRENT:
{Quoted text from spec}
ISSUE:
{Clear explanation of the problem}
PROPOSED:
{Suggested fix text}
[Apply] [Modify] [Skip]
Apply:
Modify:
Skip:
After all findings processed:
references/analysis-criteria.md - Depth-specific checklists and detection algorithmsreferences/report-template.md - Standard report formatreferences/common-issues.md - Issue pattern library with examplesreferences/html-review-guide.md - HTML review generation instructions and data schemastemplates/review-template.html - Self-contained interactive HTML review template