| name | spec-extend |
| description | Spec lifecycle management skill. Handles spec creation, revision, and deprecation. Tracks version, linked PRs/commits, and status transitions. |
Spec Extend
When to Use
Invoke when ANY of these are true:
- A PRD needs revision and the spec should be updated in sync
- Requirements change during implementation
- Implementing a follow-up to an existing feature
- A spec needs to be created from scratch (without PRD)
- A feature is being deprecated and spec should be archived
- Need to trace spec to implementation (link PRs/commits)
Purpose
This skill manages the entire spec lifecycle:
- Creation — Create new specs from templates or PRDs
- Revision — Update specs when requirements change
- Deprecation — Archive specs when features are retired
- Tracking — Maintain version, status, and implementation links
Trigger Scenarios
Spec Creation
When: Starting a new feature without going through full PRD process.
Process:
- Copy
.pi/specs/template.md to .pi/specs/<feature>.md
- Fill in all sections with feature-specific content
- Set frontmatter:
version: 1.0.0, status: draft
- Link to PRD if one exists
Spec Revision
When: Requirements change, PRD updated, or implementation discovery requires adjustment.
Process:
- Read existing spec at
.pi/specs/<feature>.md
- Identify delta from PRD or previous version
- Update spec sections with changes
- Bump version according to semantic versioning:
- Patch (1.0.0 → 1.0.1): Clarification, typo fix
- Minor (1.0.0 → 1.1.0): New non-breaking requirement
- Major (1.0.0 → 2.0.0): Breaking change, major refactor
- Update
updated date in frontmatter
- Add entry to Revision History
- Update TODOs with new tasks or changes
- Link to code (PRs/commits) if implementation started
Spec Deprecation
When: Feature is retired or replaced by new spec.
Process:
- Read existing spec
- Update frontmatter:
status: deprecated
- Add deprecation note to spec body
- Move to
.pi/specs/archive/<feature>-deprecated.md
- If replaced by new spec, add reference to replacement
- Update Revision History with deprecation entry
Spec Status States
| State | Description | Allowed Transitions |
|---|
draft | Spec is being written, not yet approved | → approved |
approved | Spec is approved, ready for implementation | → in-progress |
in-progress | Implementation has started | → implemented, → approved (iteration) |
implemented | Feature is complete, spec reflects shipped state | → deprecated |
deprecated | Feature is retired, spec is archived | (terminal state) |
Version Tracking
Each spec tracks in frontmatter:
version: 1.0.0
status: draft
created: 2026-06-01
updated: 2026-06-01
linked_prd: ...
linked_prs: []
linked_commits: []
Updating Linked PRs/Commits
After implementation tasks complete:
- Add PR numbers to
linked_prs array
- Add commit hashes to
linked_commits array
- Update TODOs section to mark tasks complete
- Bump version if changes were substantive
Task Flow
Phase 1: Assess Current State
Phase 2: Execute Operation
For Creation:
For Revision:
For Deprecation:
Phase 3: Link to Implementation
Phase 4: Quality Check
Spec Template Sections
When creating or revising specs, ensure these sections are present:
Mandatory
- Context — Why this feature exists, background, constraints
- Objectives — Clear, measurable goals
- Verification Strategy — How to verify implementation
- Task Flow — Implementation task breakdown
- TODOs — Living task list
- Commit Strategy — How to commit changes
- Success Criteria — Observable completion criteria
Optional (include as needed)
- Related Documents
- Test Coverage Requirements
- Dependencies
- Revision History
Integration with the Plan
Plan → Spec Flow
When a feature is being planned (via interview, deferring to the project's planning convention):
- The plan is synthesized (groundwork default:
.groundwork/plans/<feature>.md)
- This skill creates the spec at
.pi/specs/<feature>.md
- Spec frontmatter links to the plan:
linked_plan: .groundwork/plans/<feature>.md
- Spec Context section references the plan's Overview / Acceptance Criteria
Spec Revision → Plan Revision
When spec revision reveals the plan needs updating:
- Update spec first (this skill)
- Update the plan in place, noting the rationale for the change
- Re-run
vertical-slice if the change affects scope or slice boundaries
Integration with Auto-Learning
After spec operations complete:
- If spec revision revealed new pattern → add to
docs/learnings.md
- If spec revision involved architectural choice → add to
docs/decisions.md
- Include spec version and operation type in learning/decision entry
File Locations
| File | Purpose |
|---|
.pi/specs/README.md | Spec system documentation |
.pi/specs/template.md | Spec template |
.pi/specs/CONSTITUTION.md | Governance principles |
.pi/specs/<feature>.md | Feature specs |
.pi/specs/archive/ | Deprecated specs |
.pi/docs/learnings.md | Auto-captured learnings |
.pi/docs/decisions.md | Auto-captured decisions |
Rules
- NEVER commit specs to git — specs are working documents
- ALWAYS update version when modifying a spec
- ALWAYS update
updated date when modifying a spec
- ALWAYS add to Revision History when modifying a spec
- ALWAYS link to PRD if one exists for the feature
- ALWAYS track linked PRs/commits as implementation progresses
- NEVER deprecate without replacement (unless feature is truly retired)
- Archive deprecated specs — don't delete them
Output
After spec operation completes, use question tool to present result:
question: "Spec operation completed."
details:
- Operation: [created/revised/deprecated]
- Spec: .pi/specs/<feature>.md
- Version: [new version]
- Status: [new status]
- Next step: [review / implement / archive]
options:
- "Review the spec"
- "Proceed to implementation"
- "Make changes"
Quick Reference Commands
Create Spec from Template
cp .pi/specs/template.md .pi/specs/<feature>.md
Revise Spec
cat .pi/specs/<feature>.md
Deprecate Spec
mv .pi/specs/<feature>.md .pi/specs/archive/<feature>-deprecated.md
Link PR to Spec
linked_prs:
- "#123"
- "#124"
Link Commit to Spec
linked_commits:
- "abc123d"
- "def456e"