A comprehensive spec-driven development framework that enforces structured, iterative software development through AI-assisted workflows. Originally developed for Windsurf, but adaptable to other AI coding assistants like AWS Q CLI, Claude Code, and Cursor.
This framework implements a phased approach to software development:
- Requirements Phase - Define user stories and system requirements
- Design Phase - Create architecture and technical specifications
- Tasks Phase - Break down implementation into manageable, testable tasks
- Execution Phase - Implement tasks with continuous spec validation
ai_spec-driven-design/
├── generic/ # Platform-agnostic templates
│ ├── rules/
│ │ └── enforce-spect.md # Core steering rules for any AI assistant
│ └── commands/ # Generic workflow templates
│ ├── spec-init.md # Initialize new spec-driven project
│ ├── spec-init-jira.md # Initialize with Jira integration
│ ├── spec-update.md # Update existing specifications
│ └── spec-execute-task.md # Execute specific implementation tasks
├── windsurf/ # Windsurf-specific integrations
│ ├── rules/
│ │ └── enforce-spect.md # Windsurf-specific steering rules
│ └── workflows/ # Windsurf workflow commands
│ ├── spec-init.md # Initialize new spec-driven project
│ ├── spec-init-jira.md # Initialize with Jira integration
│ ├── spec-update.md # Update existing specifications
│ └── spec-execute-task.md # Execute specific implementation tasks
├── claude-code/ # Claude Code integrations
│ ├── commands/ # Custom commands
│ │ ├── spec-init.md # /spec-init command
│ │ ├── spec-init-jira.md # /spec-init-jira command
│ │ ├── spec-update.md # /spec-update command
│ │ └── spec-execute-task.md # /spec-execute-task command
│ └── rules/
│ └── spec-driven-development.md # Spec-driven development rules
├── codex/ # Codex integrations
│ ├── commands/ # Markdown command definitions
│ │ ├── spec-init.md # Initialize new spec-driven project
│ │ ├── spec-init-jira.md # Initialize with Jira integration
│ │ ├── spec-update.md # Update existing specifications
│ │ └── spec-execute-task.md # Execute specific implementation tasks
│ └── rules/
│ └── spec-driven-development.md # Spec-driven development rules
├── aws-q-cli/ # AWS Q CLI integrations
│ ├── rules/ # Context rules for profiles/global
│ │ └── spec-driven-development.md
│ └── profiles/
│ └── setup-instructions.md # Profile configuration guide
├── copilot-vscode/ # GitHub Copilot for VSCode integrations
│ ├── rules/
│ │ └── spec-driven-development.instructions.md
│ └── commands/ # Prompt files for chat commands
│ ├── spec-init.prompt.md # Initialize new spec-driven project
│ ├── spec-init-jira.prompt.md # Initialize with Jira integration
│ ├── spec-update.prompt.md # Update existing specifications
│ └── spec-execute-task.prompt.md # Execute specific implementation tasks
├── opencode/ # OpenCode integrations
│ ├── rules/
│ │ └── spec-driven-development.md
│ └── commands/ # Terminal command templates
│ ├── spec-init.md # Initialize new spec-driven project
│ ├── spec-init-jira.md # Initialize with Jira integration
│ ├── spec-update.md # Update existing specifications
│ └── spec-execute-task.md # Execute specific implementation tasks
├── kiro/ # Kiro integrations
│ ├── rules/
│ │ └── spec-driven-development.md
│ └── commands/ # Agent and hook templates
│ ├── spec-init.md # Initialize new spec-driven project
│ ├── spec-init-jira.md # Initialize with Jira integration
│ ├── spec-update.md # Update existing specifications
│ └── spec-execute-task.md # Execute specific implementation tasks
└── codex/ # Codex integrations
├── commands/ # Markdown command definitions
│ ├── spec-init.md # Initialize new spec-driven project
│ ├── spec-init-jira.md # Initialize with Jira integration
│ ├── spec-update.md # Update existing specifications
│ └── spec-execute-task.md # Execute specific implementation tasks
└── rules/
└── spec-driven-development.md # Spec-driven development rules
-
Install Rules:
# Copy rules to your project's Windsurf configuration cp windsurf/rules/enforce-spect.md .windsurf/rules/ -
Install Workflows:
# Copy all workflow commands cp windsurf/workflows/*.md .windsurf/workflows/
-
Verify Installation:
- Rules should appear in
.windsurf/rules/enforce-spect.md - Workflows should appear in
.windsurf/workflows/spec-*.md
- Rules should appear in
-
Install Slash Commands:
# Copy commands to your Claude Code settings # (Adjust path based on your Claude Code configuration) cp claude-code/commands/*.md ~/.claude/commands/
-
Install Project Rules:
# Copy rules to your project root and customize as needed cp claude-code/rules/spec-driven-development.md ./CLAUDE.md -
Verify Installation:
- Commands should be available:
/spec-init,/spec-init-jira,/spec-update,/spec-execute-task - Project rules should be active via
CLAUDE.mdin your project root
- Commands should be available:
-
Install Generic Rules:
# Create rules directory if it doesn't exist mkdir -p .ai-assistant/rules/ # Copy generic rules cp generic/rules/enforce-spect.md .ai-assistant/rules/
-
Install Generic Commands:
# Copy generic workflow templates cp generic/commands/*.md .ai-assistant/workflows/
-
Setup Global Context (applies to all projects):
q chat > /context add --global aws-q-cli/rules/spec-driven-development.md -
Setup Project Profile (recommended):
q chat > /profile create spec-driven-dev > /context add aws-q-cli/rules/spec-driven-development.md > /profile set spec-driven-dev
-
Project-Specific Rules (optional):
# In your project directory mkdir -p .amazonq/rules cp aws-q-cli/rules/spec-driven-development.md .amazonq/rules/ -
Verify Setup:
q chat > /context show # Should display spec-driven rules > /profile # Should show your profiles
Project-Specific Setup (Recommended)
-
Deploy Instructions File:
# Copy custom instructions to your project's .github directory mkdir -p .github/instructions cp copilot-vscode/rules/spec-driven-development.instructions.md .github/instructions/spec-driven-development.instructions.md- This file provides persistent rules that apply to all Copilot Chat interactions in the workspace
- VS Code will automatically load instructions from
.github/instructions/when present
-
Deploy Prompt Files (Workspace Commands):
# Copy prompt files to your project's .github/prompts directory mkdir -p .github/prompts cp copilot-vscode/commands/*.prompt.md .github/prompts/
- Prompts are stored in the workspace
.github/prompts/folder (not user home directory) - After copying, reload VS Code: Command Palette → Developer: Reload Window
- Prompts will appear as slash commands when you type
/in Copilot Chat
- Prompts are stored in the workspace
-
Verify Installation:
# Confirm files are in place ls -la .github/instructions/ ls -la .github/prompts/- Open Copilot Chat and type
/to see the four prompts:/spec-init,/spec-init-jira,/spec-execute-task,/spec-update - Check the Output panel (View → Output → "GitHub Copilot") for any loading or parse errors
- Open Copilot Chat and type
-
Usage:
- Initialize a new spec: Type
/spec-initin chat and follow the phased workflow (requirements → design → tasks) - Initialize from JIRA: Type
/spec-init-jiraand provide a JIRA ticket ID - Execute a task: Type
/spec-execute-taskand specify the spec path and task ID - Update a spec: Type
/spec-updateto revise existing specifications
- Initialize a new spec: Type
Optional: User-Level Setup (Cross-Workspace Prompts)
If you want prompts available across all your workspaces (not just this project):
# User prompts go in VS Code profile, not home ~/.github directory
# Macros VS Code profile location:
mkdir -p ~/.config/Code/User/globalStorage/github.copilot/prompts
cp copilot-vscode/commands/*.prompt.md ~/.config/Code/User/globalStorage/github.copilot/prompts/- Note: Workspace prompts (in
.github/prompts/) take priority and are recommended for team consistency
Claude Code and Copilot integrations include rule files that, if copied directly to a project's primary rule file, will overwrite that file (for example copying claude-code/rules/spec-driven-development.md to ./CLAUDE.md). To avoid accidental overwrites and to make project rules easier to manage, choose one of the two patterns below.
Claude Code
-
Option A — Keep a separate rules directory (recommended):
- Copy the rules into a project rules directory and reference it from your
CLAUDE.md(link or include). - Example commands:
mkdir -p .claude/rules cp claude-code/rules/spec-driven-development.md .claude/rules/spec-driven-development.md
- In
CLAUDE.mdpoint to the file (as a link or an include depending on your toolchain):[Project rules](./.claude/rules/spec-driven-development.md)
- Copy the rules into a project rules directory and reference it from your
-
Option B — Append the rule into
CLAUDE.md(if you want a single-file approach):- This preserves existing
CLAUDE.mdcontent and adds the rules at the end:cat claude-code/rules/spec-driven-development.md >> ./CLAUDE.md
- This preserves existing
GitHub Copilot (instructions file)
-
The same two approaches apply for Copilot instructions, using
copilot-instructions.mdas your project instruction file. -
Option A — Separate project rules directory:
mkdir -p .copilot/rules cp copilot-vscode/rules/spec-driven-development.instructions.md .copilot/rules/spec-driven-development.instructions.md
- Then reference or link the file from
copilot-instructions.md:[Project rules](./.copilot/rules/spec-driven-development.instructions.md)
- Then reference or link the file from
-
Option B — Append the rule into
copilot-instructions.md:cat copilot-vscode/rules/spec-driven-development.instructions.md >> ./copilot-instructions.md
Note: VS Code Copilot also supports workspace-level instructions in .github/instructions/. If you intend these rules to be loaded by Copilot Chat for the entire workspace, consider the .github/instructions/ location instead of a project copilot-instructions.md file.
Codex
Codex prompts are commonly installed globally and rules can be either global or project-scoped. Keep in mind that copying templates directly to a primary rule file will overwrite it — prefer the two patterns above to avoid accidental data loss.
- Global prompts location (common):
~/.codex/prompts - Rule locations (choose one):
- Global rules:
~/.codex/rules - Project rules:
.codex/rules
- Global rules:
Examples
-
Install templates as global prompts and rules:
mkdir -p ~/.codex/prompts ~/.codex/rules cp path/to/your/templates/*.md ~/.codex/prompts/ cp path/to/your/rules/*.md ~/.codex/rules/
-
Install templates for a single project (project-scoped rules):
mkdir -p .codex/rules cp path/to/repo/rules/spec-driven-development.md .codex/rules/
-
Reference vs append (project rule file):
- Reference (keeps a single canonical rule file and avoids overwriting):
[Project rules](./.codex/rules/spec-driven-development.md)
- Append (merge contents into a single file):
cat .codex/rules/spec-driven-development.md >> ./CODEX_RULES.md
- Reference (keeps a single canonical rule file and avoids overwriting):
Choose the approach that fits your team's workflow: separate rule files are easier to maintain and update independently, while appending produces a single-file artifact that some assistants may prefer to read directly.
-
Install Rules:
# Copy rules to OpenCode configuration cp opencode/rules/spec-driven-development.md ~/.opencode/rules/
-
Project-Specific Configuration:
# In your project directory cp opencode/rules/spec-driven-development.md .opencode/rules.md -
Verify Installation:
- OpenCode should load steering rules on startup
- Multi-session support should be available
-
Install Steering Rules:
# Copy rules to Kiro configuration cp kiro/rules/spec-driven-development.md .kiro/steering/ -
Setup Agent Hooks (optional):
# Configure automated spec validation cp kiro/commands/spec-execute-task.md .kiro/hooks/ -
Verify Installation:
- Steering rules should be active in Kiro IDE/CLI
- Agent hooks should trigger on configured events
-
Install Project Rules:
# Copy rules to your project's Codex configuration mkdir -p .codex/rules cp codex/rules/spec-driven-development.md .codex/rules/ -
Install Commands:
# Copy markdown command definitions to your Codex configuration mkdir -p .codex/commands cp codex/commands/*.md .codex/commands/
-
Verify Installation:
- Rules should be in
.codex/rules/spec-driven-development.md - Markdown command files should be in
.codex/commands/ - Commands should be available in Codex interface
- Rules should be in
-
Adaptation Guide:
- Cursor: Create Cursor Rules for workflow guidance (custom commands not yet supported)
- Other Tools: Adapt the markdown templates to your platform's format
-
Customization:
- Edit the generic rules to match your platform's capabilities
- Add platform-specific guidance where needed
- Test with your AI assistant's workflow system
- Initialize a New Project: Use the
/spec-initworkflow to create initial specifications - Execute Tasks: Use
/spec-execute-taskto implement specific features - Update Specifications: Use
/spec-updatewhen requirements or design changes
- Initialize a New Project: Run
/spec-initto create initial specifications - Execute Tasks: Run
/spec-execute-task spec-path:/spec/feature-name/ task-id:1.1to implement features - Update Specifications: Run
/spec-updatewhen requirements or design changes
Note: The slash commands are helpful tools, but standard prompting will also follow these rules when CLAUDE.md is present in your project. You don't need to use the commands exclusively.
- Setup Project Rules: Copy
generic/rules/enforce-spect.mdcontent into Cursor Rules - Initialize Projects: Use Agent Mode with natural language prompts following the phased approach
- Execute Tasks: Reference specifications in chat and use Agent Mode for autonomous implementation
- Setup Profile: Create and switch to
spec-driven-devprofile with rules loaded - Initialize Projects: Use natural language: "Initialize spec-driven project for [feature]"
- Execute Tasks: Reference specifications: "Execute task 1.1 from /spec/[feature]/tasks.md"
- Context Persistence: Use
q chat --resumeto maintain conversation context
- Setup Instructions: Copy rules to
.github/instructions/spec-driven-development.instructions.md - Setup Prompts: Copy prompt files to
.github/prompts/and enable prompt files in settings - Initialize Projects: Type
/spec-initin chat for phased development - Execute Tasks: Use
/spec-execute-taskwith spec path and task ID - Update Specifications: Use
/spec-updatefor iterative spec refinement
- Setup Rules: Configure rules in OpenCode configuration
- Initialize Projects: Use terminal prompts for multi-session spec development
- Execute Tasks: Use terminal-based prompts for accurate code generation
- Parallel Development: Use multi-session support for complex workflows
- Setup Steering Rules: Configure rules in Kiro project configuration
- Initialize Projects: Use autopilot mode for autonomous spec generation
- Execute Tasks: Configure agent hooks for automated task execution
- Advanced Features: Leverage multimodal chat and MCP integrations
- Follow the phased approach: requirements → design → tasks → execution
- Each task references and validates against specifications
- Maintains traceability throughout development
- Spec Adherence: All code generation validates against written specifications
- Phased Approval: Explicit approval required before proceeding to next phase
- Incremental Development: Tasks broken into manageable, testable chunks
- Research Integration: In-thread research with source citation
- Security Focus: Prioritizes secure coding practices and best practices
1. Run spec-init → Creates /spec/{feature}/requirements.md
2. Review/approve requirements → Proceed to design phase
3. Generate design.md → Architecture and technical decisions
4. Review/approve design → Proceed to tasks phase
5. Generate tasks.md → Numbered implementation checklist
6. Execute tasks → Use spec-execute-task for each item
1. Run /spec-init → Creates /spec/{feature}/requirements.md
2. Review/approve requirements → Proceed to design phase
3. Generate design.md → Architecture and technical decisions
4. Review/approve design → Proceed to tasks phase
5. Generate tasks.md → Numbered implementation checklist
6. Execute tasks → Use /spec-execute-task or standard prompting for each item
1. Setup Cursor Rules with spec-driven guidelines
2. Use Agent Mode: "Initialize spec for [feature]" → Creates /spec/{feature}/requirements.md
3. Review/approve requirements → Proceed to design phase
4. Generate design.md → Architecture and technical decisions
5. Review/approve design → Proceed to tasks phase
6. Generate tasks.md → Numbered implementation checklist
7. Execute tasks → Use Agent Mode referencing specifications
1. Setup profile: q chat > /profile set spec-driven-dev
2. Initialize project: "Initialize spec-driven project for [feature]" → Creates /spec/{feature}/requirements.md
3. Review/approve requirements → Proceed to design phase
4. Generate design.md → Architecture and technical decisions
5. Review/approve design → Proceed to tasks phase
6. Generate tasks.md → Numbered implementation checklist
7. Execute tasks → "Execute task 1.1 from /spec/[feature]/tasks.md"
1. Setup custom instructions in .github/instructions/spec-driven-development.instructions.md
2. Enable prompt files in VS Code settings
3. Use chat: "/spec-init" → Creates /spec/{feature}/requirements.md
4. Review/approve requirements → Proceed to design phase
5. Generate design.md → Architecture and technical decisions
6. Review/approve design → Proceed to tasks phase
7. Generate tasks.md → Numbered implementation checklist
8. Execute tasks → Use "/spec-execute-task /spec/{feature}/ 1.1" for each item
1. Configure rules in OpenCode configuration
2. Start terminal session with OpenCode
3. Initialize spec: Use terminal prompt for [feature] → Creates /spec/{feature}/requirements.md
4. Review/approve requirements → Proceed to design phase
5. Generate design.md → Architecture and technical decisions
6. Review/approve design → Proceed to tasks phase
7. Generate tasks.md → Numbered implementation checklist
8. Execute tasks → Use multi-session support for parallel development
1. Setup steering rules in Kiro configuration
2. Use autopilot: "Initialize spec for [feature]" → Creates /spec/{feature}/requirements.md
3. Review/approve requirements → Proceed to design phase
4. Generate design.md → Architecture and technical decisions
5. Review/approve design → Proceed to tasks phase
6. Generate tasks.md → Numbered implementation checklist
7. Execute tasks → Configure agent hooks for automated execution
8. Use multimodal chat for UI design and complex requirements
1. Setup rules in .codex/rules/spec-driven-development.md
2. Load markdown commands into Codex configuration (.codex/commands/)
3. Initialize spec: Use spec-init command → Creates /spec/{feature}/requirements.md
4. Review/approve requirements → Proceed to design phase
5. Generate design.md → Architecture and technical decisions
6. Review/approve design → Proceed to tasks phase
7. Generate tasks.md → Numbered implementation checklist
8. Execute tasks → Use spec-execute-task command for each item
Notes:
- Claude Code: With
CLAUDE.mdin your project, automatically follows spec-driven rules in all interactions - Cursor: Agent Mode provides autonomous workflow execution with specification validation
- AWS Q CLI: Profiles and context rules provide persistent spec-driven guidance across all conversations
- GitHub Copilot for VSCode: Path-specific instructions in
.github/instructions/and prompt files in.github/prompts/provide consistent spec-driven behavior - GitHub Copilot CLI: Steering rules and slash commands enable advanced spec-driven workflows
- OpenCode: Multi-session support and provider flexibility optimize terminal-based spec development
- Kiro: Autopilot mode and agent hooks provide autonomous spec-driven development with advanced features
- Codex: Markdown command definitions and rules in
.codex/provide structured spec-driven workflows
- Path-specific instructions: Use
.github/instructions/*.instructions.mdfiles for component-specific guidance - Prompt files: Access standardized workflows via
/command-namein chat - Coding agent integration: Use coding agent for complex multi-step implementations
- Inline vs chat workflows: Use inline chat for quick edits, full chat for complex spec development
- Custom agents: Configure specialized agents for different task types
- MCP integrations: Use
/mcp addfor external tool integrations (JIRA, documentation, etc.) - Session management: Use
--resumeand--continuefor persistent development sessions - Trusted directories: Use
/add-dirto include additional context directories
- Multi-session development: Run parallel sessions for different spec phases
- Provider flexibility: Switch between Claude, OpenAI, and local models per task
- Session sharing: Share session links for collaborative spec development
- Terminal optimization: Native TUI interface for efficient terminal-based development
- Agent hooks automation: Configure hooks to trigger on file save, commit, or other events
- Multimodal inputs: Use images for UI design, diagrams for architecture discussions
- MCP server integration: Connect to databases, APIs, and documentation sources
- Autopilot complex tasks: Let Kiro autonomously handle multi-step implementations
- Consistency: Standardized approach across all development phases
- Traceability: Clear links from requirements to implementation
- Quality: Built-in validation and review checkpoints
- Documentation: Specifications serve as living documentation
- Adaptability: Framework works with multiple AI coding platforms
This framework is designed to be extended and customized. Feel free to:
- Add new command templates for specific use cases
- Adapt rules for different development methodologies
- Create platform-specific integrations
When contributing new platform integrations, please test with the actual tools:
GitHub Copilot for VSCode:
- Test path-specific instructions loading from
.github/instructions/*.instructions.md - Verify prompt files work via
/command-namein chat - Test coding agent integration for complex tasks
- Ensure prompt files are properly formatted with YAML frontmatter
OpenCode:
- Test multi-session functionality
- Verify terminal-based code generation accuracy
- Test provider switching (Claude, OpenAI, local models)
Kiro:
- Test autopilot mode for complex task execution
- Verify agent hooks configuration and triggering
- Test multimodal input capabilities
- Validate MCP server integrations
- Directory structure created (rules/ and commands/)
- Rule file uses proper naming convention (.instructions.md for Copilot, .md for others)
- Command templates created with platform-specific features
- Prompt files created for Copilot platforms (.prompt.md with YAML frontmatter)
- README installation section added with correct paths
- README usage examples included
- Workflow examples documented
- Platform tested with actual tool (if available)
This project is licensed under the MIT License - see the LICENSE file for details.