Spec Management Skill
CRITICAL: The description field above controls when Claude auto-loads this skill.
Overview
Provides comprehensive specification management capabilities including spec creation, status tracking, validation, searching, and template-based documentation. Manages feature specifications in the specs/ directory with consistent numbering, metadata, and status tracking.
Instructions
Creating New Specifications
- Use
scripts/create-spec.sh <spec-name> [description] to create new numbered specs
- Automatically assigns next available spec number (e.g., 001-feature-name.md)
- Generates spec with complete frontmatter and all sections
- Initializes status as "draft" with creation timestamp
- Creates organized directory structure if needed
Listing Specifications
- Use
scripts/list-specs.sh [--status STATUS] [--format FORMAT] to list all specs
- Displays specs with number, title, status, priority, and last modified date
- Filter by status: draft, in-progress, review, approved, implemented, rejected
- Output formats: table (default), json, markdown, csv
- Sorted by spec number with color-coded status indicators
Validating Specifications
- Use
scripts/validate-spec.sh <spec-file> to check spec completeness
- Validates frontmatter: title, status, priority, owner, tags
- Checks required sections: Problem, Solution, Requirements, Tasks, Success Criteria
- Verifies task breakdown format and numbering
- Generates validation report with warnings and errors
Updating Spec Status
- Use
scripts/update-status.sh <spec-file> <new-status> to change spec status
- Valid statuses: draft, in-progress, review, approved, implemented, rejected
- Updates status timestamp and maintains status history
- Optionally adds status change comment
- Validates status transition rules
Searching Specifications
- Use
scripts/search-specs.sh <query> [--section SECTION] to search spec content
- Searches across all specs or within specific sections
- Supports regex patterns and multi-word queries
- Displays matches with context and spec location
- Filter by tags, status, or priority
Available Scripts
- create-spec.sh: Create new numbered specification with template
- list-specs.sh: List all specifications with filtering and formatting
- validate-spec.sh: Validate spec completeness and format
- update-status.sh: Update specification status with history tracking
- search-specs.sh: Search specification content with context
Templates
- spec-template.md: Complete specification template with all standard sections
- spec-metadata.yaml: Frontmatter template with all metadata fields
- task-breakdown-template.md: Task list format with subtasks and estimates
- requirements-template.md: Requirements documentation format (functional, non-functional, constraints)
- success-criteria-template.md: Success metrics and acceptance criteria format
Examples
See examples/ directory for detailed usage examples:
example-spec-simple.md - Simple feature specification with basic sections
example-spec-complex.md - Complex feature with detailed technical design
example-spec-ai-feature.md - AI/ML feature specification with model details
example-validation-report.md - Example validation output with errors and warnings
example-spec-list.md - Example list command output in different formats
Specification Structure
Required Frontmatter
---
spec-id: 001
title: Feature Name
status: draft
priority: medium
owner: team-name
created: 2025-01-15
updated: 2025-01-15
tags: [category, feature-type]
---
Required Sections
- Problem Statement - What problem are we solving?
- Proposed Solution - How will we solve it?
- Requirements - Functional, non-functional, constraints
- Technical Design - Architecture, components, data models
- Task Breakdown - Numbered tasks with estimates
- Success Criteria - Measurable outcomes and acceptance criteria
- Dependencies - External dependencies and blockers
- Timeline - Estimated schedule and milestones
- Risks - Potential risks and mitigation strategies
Status Workflow
draft ā in-progress ā review ā approved ā implemented
ā
rejected
Validation Rules
Frontmatter Validation
- Spec ID must be numeric and unique
- Status must be valid enum value
- Priority must be: low, medium, high, critical
- Owner must be specified
- Created and updated dates must be valid ISO dates
- Tags must be non-empty array
Content Validation
- All required sections must be present
- Each section must have content (not empty)
- Task breakdown must have numbered tasks
- Requirements must be categorized
- Success criteria must be measurable
Warnings
- Long spec (>1000 lines) may need splitting
- Missing optional sections (e.g., Alternatives Considered)
- Outdated spec (not updated in >30 days)
- Tasks without estimates
- Vague success criteria
Directory Structure
Phase-Nested Structure (Recommended)
Specs are organized in phase directories based on dependencies:
specs/
āāā phase-0/ # Features with no dependencies
ā āāā F001-core-data/
ā ā āāā spec.md
ā ā āāā tasks.md
ā āāā F002-base-api/
āāā phase-1/ # Features depending on Phase 0
ā āāā F003-user-auth/
ā āāā F004-chat-system/
āāā phase-2/ # Features depending on Phase 1
ā āāā F005-analytics/
āāā infrastructure/ # Infrastructure specs (not phased)
āāā 001-database/
Phase Calculation
Phase is calculated automatically based on dependencies:
- Phase 0: No dependencies (foundation features)
- Phase N: max(dependency phases) + 1
Example: F003 depends on F001 (phase 0) and F002 (phase 0) ā F003 is Phase 1
Naming Convention
- Format:
F{XXX}-{feature-slug}/
- Numbering: Zero-padded 3-digit IDs (F001, F002, ..., F050, F100)
- Slug: kebab-case, 2-4 words max
- Numbers are never reused. Deleted specs leave gaps in numbering.
Legacy Flat Structure
For backward compatibility, the system also supports:
specs/
āāā features/
ā āāā 001-feature-name/
ā āāā 002-another-feature/
āāā infrastructure/
āāā 001-component/
The system checks phase-nested first, then falls back to legacy structure.
Integration
This skill is used by:
planning:create-spec command - Create new feature specifications
planning:review-specs command - Review and validate all specs
planning:track-progress command - Track feature implementation progress
- All development agents - Reference specs for implementation guidance
- Project management tools - Export spec data for tracking
Best Practices
- Keep specs focused - One feature per spec
- Update status regularly - Reflect current development state
- Link related specs - Reference dependencies between specs
- Include examples - Add code samples and mockups
- Review before approval - Validate with team before implementation
- Archive old specs - Move implemented specs to archive/
- Use consistent tags - Maintain tag taxonomy for filtering
- Write measurable criteria - Success criteria must be testable
Purpose: Comprehensive specification management for feature documentation
Used by: Planning agents, development teams, project managers