name: Spec Management description: Templates, scripts, and examples for managing feature specifications in specs/ directory. Use when creating feature specs, listing specifications, validating spec completeness, updating spec status, searching spec content, organizing project requirements, tracking feature development, managing technical documentation, or when user mentions spec management, feature specifications, requirements docs, spec validation, or specification organization. allowed-tools:
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 sectionsexample-spec-complex.md- Complex feature with detailed technical designexample-spec-ai-feature.md- AI/ML feature specification with model detailsexample-validation-report.md- Example validation output with errors and warningsexample-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-speccommand - Create new feature specificationsplanning:review-specscommand - Review and validate all specsplanning:track-progresscommand - 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
API Documentation Generator
Documentation
Automatically generates OpenAPI/Swagger API documentation.
Technical Writer
Documentation
Writes clear technical documentation following top style guides.
Technical Documentation Architect
Documentation
Creates comprehensive technical documentation from existing codebases. Analyzes architecture, design patterns, and implementation details to produce detailed technical manuals and ebooks.