sequenzia/agent-alchemy/analyze-spec
Claude Code and agent skill by sequenzia/agent-alchemy
- community
Checking that the SKILL.md file is still in the repository.
Analyze an existing spec for inconsistencies, missing information, ambiguities, and structure issues. Use when user says "analyze spec", "review spec", "spec quality check", "validate requirements", "audit spec", or "check spec quality".
Install
npx vskill@latest install sequenzia/agent-alchemy/analyze-specSKILL.md
The same SKILL.md was published earlier as sequenzia/agent-alchemy/analyze-spec.
Spec Analysis Skill
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.
Load Reference Skills
For task creation from findings (Step 8), load the Tasks reference:
Workflow
Step 1: Validate File
Verify the spec file exists at the provided path. If not found:
- Check if user provided relative path and try common locations
- Use Glob to search for similar filenames
- Ask user for correct path if needed
Step 2: Read Spec Content
Read the entire spec file using the Read tool.
Step 3: Detect Depth Level
Analyze the spec content to detect its depth level:
Full-Tech Indicators (check first):
- Contains
API Specificationssection OR### 7.4 APIor similar - Contains API endpoint definitions (
POST /api/,GET /api/, etc.) - Contains
Testing Strategysection - Contains data model schemas
Detailed Indicators:
- Uses numbered sections (
## 1.,### 2.1) - Contains
Technical Architecturesection - Contains user stories (
**US-001**:or similar format) - Contains acceptance criteria
High-Level Indicators:
- Contains feature table with Priority column
- Executive summary focus
- No user stories or acceptance criteria
- Shorter document (~50-100 lines)
Detection Priority:
- If Full-Tech indicators found → Full-Tech
- Else if Detailed indicators found → Detailed
- Else if High-Level indicators found → High-Level
- Default → Detailed
Step 4: Check Settings
Check for settings at .claude/agent-alchemy.local.md to get:
- Author name (if configured)
- Any custom preferences
Step 5: Determine Report Paths
The analysis outputs should be saved in the same directory as the spec:
- Spec:
specs/SPEC-User-Auth.md - Report:
specs/SPEC-User-Auth.analysis.md - HTML Review:
specs/SPEC-User-Auth.analysis.html
Extract the spec filename and construct both output paths.
Step 6: Launch Analyzer Agent
Launch the Spec Analyzer Agent using the Task tool with subagent_type agent-alchemy-sdd-tools:spec-analyzer.
Provide this context in the prompt:
Step 7: Handoff Complete
Once you have launched the Analyzer Agent, your role is mostly complete. The agent will handle:
- Loading analysis criteria for the depth level
- Performing comprehensive analysis
- Generating and saving the report (.analysis.md)
- Generating the interactive HTML review (.analysis.html)
- Offering three review modes: HTML review, CLI update, or reports only
- Updating the spec with approved changes
After the analyzer agent completes its work and returns, proceed to Step 8.
Step 8: Create Fix Tasks (Optional)
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:
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
criticalorwarning - Derive
spec-nameslug from the spec filename (stripSPEC-prefix, strip.md, lowercase, hyphens) - For each qualifying finding, create a task via
TaskCreate:
- subject:
Fix: {finding title}(imperative) - description: Include finding category, severity, location (section + line), issue description, and the proposed fix as acceptance criteria
- activeForm:
Fixing {finding title} - metadata:
task_group:spec-fixes-{spec-name}priority: Map from severity —critical→critical,warning→highsource_section: Finding location referencespec_path: Path to the spec file
- After creating all tasks, display summary:
If the user selects "Skip", display:
Example Usage
This will:
- Read the spec at the specified path
- Detect it's a Detailed-level spec
- Analyze for issues across all four categories
- Save report to
specs/SPEC-User-Authentication.analysis.md - Offer interactive resolution mode
Notes
- Always read the full spec before launching the analyzer
- Depth detection determines which criteria apply
- Report is always saved alongside the spec
- The analyzer agent handles all user interaction for resolution
Analysis Philosophy
Depth-Aware Analysis
Spec 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.
Constructive Approach
Findings should be:
- Actionable: Clear recommendation for how to fix
- Specific: Exact location and description of issue
- Prioritized: Severity indicates importance
- Helpful: Explain why this matters, not just what's wrong
Systematic Coverage
Analysis covers four distinct categories to ensure comprehensive review:
- Inconsistencies: Internal contradictions or mismatches
- Missing Information: Expected content that's absent
- Ambiguities: Unclear or vague statements
- Structure Issues: Formatting, organization, missing sections
Finding Categories
1. Inconsistencies
Issues where the spec contradicts itself or uses conflicting information.
What to Look For:
- Feature named differently in different sections
- Priority mismatches (feature marked P2 but in Phase 1)
- Metrics that don't align with stated goals
- Contradictory requirements
- Timeline/phase misalignment
Detection Strategy:
- Build glossary of feature names from first mention
- Track priority assignments
- Map goals to metrics
- Compare requirements for conflicts
2. Missing Information
Expected content that is absent based on the spec's depth level.
What to Look For:
- Required sections for depth level
- Undefined technical terms
- Features without acceptance criteria (detailed/full-tech)
- Error scenarios not addressed
- Dependencies not listed
- Incomplete personas
Detection Strategy:
- Compare against depth-level checklist
- Identify domain terms without definitions
- Check each feature for expected attributes
- Scan for external system references
3. Ambiguities
Statements that are unclear or could be interpreted multiple ways.
What to Look For:
- Vague quantifiers ("fast", "many", "scalable")
- Undefined priority language ("should" vs "must")
- Ambiguous pronouns ("it", "this", "they")
- Open-ended lists ("etc.", "and more")
- Undefined scope boundaries
Detection Strategy:
- Flag quantifiers without numbers
- Check for RFC 2119 language consistency
- Identify pronouns with unclear antecedents
- Find incomplete enumerations
4. Structure Issues
Problems with document organization, formatting, or references.
What to Look For:
- Missing required sections
- Content in wrong section
- Inconsistent formatting
- Orphaned references
- Circular dependencies
Detection Strategy:
- Verify all template sections exist
- Check content placement logic
- Validate formatting consistency
- Test all internal references
Severity Levels
Critical
Definition: Issues that would cause implementation to fail or go significantly wrong.
Assign When:
- Fundamental contradiction in requirements
- Core requirement completely undefined
- Required section missing entirely
- Circular dependencies that block implementation
- Security requirement absent (when security is mentioned)
Examples:
- "User authentication required" but no auth requirements defined
- Feature A depends on Feature B, Feature B depends on Feature A
- Full-tech spec with no API specifications
Warning
Definition: Issues that could cause confusion or implementation problems.
Assign When:
- Inconsistent naming that could cause misunderstanding
- Acceptance criteria too vague to test
- Important feature lacks error handling
- Ambiguous language for significant functionality
- Minor dependencies unlisted
Examples:
- "Search should be fast" without defining "fast"
- User story without acceptance criteria
- Integration mentioned but not in dependencies
Suggestion
Definition: Improvements that would enhance spec quality but aren't blocking.
Assign When:
- Style or clarity improvements
- Non-critical sections could be clearer
- Best practices not followed
- Minor formatting inconsistencies
- Documentation enhancements
Examples:
- User stories formatted inconsistently
- Glossary would help but isn't critical
- Additional context would be helpful
Analysis Workflow
Step 1: Read and Detect Depth
- Read the entire spec
- Detect depth level using indicators (see
references/analysis-criteria.md) - Note the detected depth for criteria selection
Step 2: Load Criteria
Load the appropriate checklist from references/analysis-criteria.md based on detected depth level.
Step 3: Systematic Scan
Analyze the spec section by section:
- Structure Scan: Verify all required sections exist
- Consistency Scan: Build glossary, track priorities, map goals to metrics
- Completeness Scan: Check each feature for expected attributes
- Clarity Scan: Flag vague language and ambiguities
Step 4: Categorize and Prioritize
For each finding:
- Assign to one of four categories
- Determine severity based on impact
- Identify specific location (section, line)
- Draft recommendation
Step 5: Generate Report
Create report using references/report-template.md:
- Fill in header information
- Calculate summary statistics
- List findings by severity
- Write overall assessment
Update Mode Workflow
When entering update mode for interactive resolution:
Finding Presentation
Present each finding with:
User Response Handling
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude/sdd-tools/skills/analyze-spec/SKILL.md
Popularity
- Repository stars
- 42
- Repository forks
- 7
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sequenzia/agent-alchemy/analyze-spec)