Spec-Driven Development Integration
After Phase 3 (Planning) produces API contracts and a coding sequence, this skill generates a specs/ directory compatible with /orchestrate and /implement workflows.
When to Use
Invoke after Phase 3 approval when the user wants to:
- Hand off implementation to
/orchestratefor parallel execution - Generate a structured spec for
/implementto follow - Create a standalone design document for external teams
Output Structure
Generate specs/[project-name]/ with:
specs/[project-name]/
├── design.md # Architecture overview + key decisions
├── api-contracts.md # Copy of 03-api-planning/api-contracts.md
├── modules.md # Module list with file ownership
├── implementation-order.md # From coding-sequence.md
└── constraints.md # Non-standard paths, API quirks, env vars
design.md Template
# [Project Name] - Design Specification
## Overview
[One paragraph from Phase 1 vision statement]
## Architecture
[Pattern chosen in Phase 2 with rationale]
## Modules
| Module | Purpose | Owner | Files |
|--------|---------|-------|-------|
| [name] | [purpose] | [agent/unassigned] | [file paths] |
## Key Decisions
| ID | Decision | Rationale | Source |
|----|----------|-----------|--------|
| D001 | [decision] | [why] | [URL] |
## Constraints
- [Non-standard paths]
- [API quirks]
- [Required environment variables]
modules.md Template
# Module Ownership
> ONE FILE = ONE OWNER. No shared ownership.
| File Path | Module | Owner | Status |
|-----------|--------|-------|--------|
| src/auth/middleware.ts | Auth | unassigned | pending |
| src/users/controller.ts | Users | unassigned | pending |
Generation Steps
- Read
01-discovery/outline-v1.mdfor vision - Read
01-discovery/decisions-log.mdfor key decisions - Read
02-structure/module-hierarchy.mdfor module list - Read
03-api-planning/api-contracts.mdfor API specs - Read
03-api-planning/coding-sequence.mdfor implementation order - Read
00-project-state.jsonfor critical details - Generate all spec files
Compatibility
The generated specs are compatible with:
/orchestrate- readsmodules.mdfor file ownership,implementation-order.mdfor sequencing/implement- readsdesign.mdfor architecture context,api-contracts.mdfor endpoints- External teams - standalone documentation that doesn't require framework-dev plugin