smart-spec-kit-mcp 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,122 @@
1
+ # Project Constitution
2
+
3
+ > This document defines the core principles and guidelines that govern all development on this project.
4
+
5
+ ## Project Information
6
+
7
+ - **Project Name**: [TO FILL: Your project name]
8
+ - **Ratification Date**: [TO FILL: YYYY-MM-DD]
9
+ - **Last Amended**: [TO FILL: YYYY-MM-DD]
10
+ - **Version**: 1.0.0
11
+
12
+ ---
13
+
14
+ ## Core Principles
15
+
16
+ ### Principle 1: [TO FILL: Principle Name]
17
+
18
+ [TO FILL: Description of this principle and what it means for the project]
19
+
20
+ **Rationale**: [TO FILL: Why this principle matters and what problems it solves]
21
+
22
+ **Examples**:
23
+ - [TO FILL: Concrete example of applying this principle]
24
+
25
+ ---
26
+
27
+ ### Principle 2: Code Quality
28
+
29
+ All code must be readable, maintainable, and follow established coding standards.
30
+
31
+ **Rationale**: Consistent, high-quality code reduces bugs, speeds up onboarding, and makes the codebase easier to maintain over time.
32
+
33
+ **Guidelines**:
34
+ - Code must pass linting without warnings
35
+ - All public functions must have documentation
36
+ - Complex logic must include explanatory comments
37
+ - Code review required for all changes
38
+
39
+ ---
40
+
41
+ ### Principle 3: Test Coverage
42
+
43
+ All features must have appropriate test coverage before being considered complete.
44
+
45
+ **Rationale**: Tests provide confidence that code works as intended and prevents regressions during future changes.
46
+
47
+ **Guidelines**:
48
+ - Unit tests for business logic (minimum 80% coverage)
49
+ - Integration tests for API endpoints
50
+ - E2E tests for critical user flows
51
+
52
+ ---
53
+
54
+ ### Principle 4: Documentation First
55
+
56
+ Features must be specified before implementation begins.
57
+
58
+ **Rationale**: Clear specifications reduce misunderstandings, prevent rework, and create a shared understanding among all stakeholders.
59
+
60
+ **Guidelines**:
61
+ - Use `/speckit.specify` before starting any new feature
62
+ - Keep specifications updated as requirements evolve
63
+ - Link implementation PRs to their specifications
64
+
65
+ ---
66
+
67
+ ### Principle 5: Security by Design
68
+
69
+ Security considerations must be part of every feature from the start.
70
+
71
+ **Rationale**: Retrofitting security is expensive and error-prone. Building it in from the start is more effective.
72
+
73
+ **Guidelines**:
74
+ - Validate all user inputs
75
+ - Use parameterized queries for database access
76
+ - Follow principle of least privilege
77
+ - Document security considerations in specifications
78
+
79
+ ---
80
+
81
+ ## Tech Stack Guidelines
82
+
83
+ ### Preferred Technologies
84
+ | Category | Technology | Notes |
85
+ |----------|------------|-------|
86
+ | Language | [TO FILL] | |
87
+ | Framework | [TO FILL] | |
88
+ | Database | [TO FILL] | |
89
+ | Testing | [TO FILL] | |
90
+
91
+ ### Code Style
92
+ - [TO FILL: Link to style guide or describe key conventions]
93
+
94
+ ### Dependencies
95
+ - Prefer well-maintained, widely-used packages
96
+ - Document the reason for adding new dependencies
97
+ - Keep dependencies updated regularly
98
+
99
+ ---
100
+
101
+ ## Governance
102
+
103
+ ### Amendment Process
104
+ 1. Propose changes via pull request to this document
105
+ 2. Changes require approval from [TO FILL: who approves]
106
+ 3. Version number updated according to semantic versioning:
107
+ - **MAJOR**: Principle removed or fundamentally changed
108
+ - **MINOR**: New principle or section added
109
+ - **PATCH**: Clarifications and wording improvements
110
+
111
+ ### Enforcement
112
+ - Code reviews should verify adherence to these principles
113
+ - Automated checks where possible (linting, test coverage)
114
+ - Regular retrospectives to assess principle effectiveness
115
+
116
+ ---
117
+
118
+ ## Version History
119
+
120
+ | Version | Date | Changes |
121
+ |---------|------|---------|
122
+ | 1.0.0 | [TO FILL] | Initial constitution |
@@ -0,0 +1,129 @@
1
+ ---
2
+ description: Identify underspecified areas in the specification and ask targeted clarification questions. Run before /speckit.plan.
3
+ ---
4
+
5
+ # /speckit.clarify - Clarify Requirements
6
+
7
+ ## User Input
8
+
9
+ ```text
10
+ $ARGUMENTS
11
+ ```
12
+
13
+ You **MUST** consider the user input before proceeding (if not empty).
14
+
15
+ ## Outline
16
+
17
+ You are clarifying underspecified areas in the specification. Follow this workflow:
18
+
19
+ ### 1. Load Specification
20
+
21
+ Find and read the specification file:
22
+ - Check `specs/` directory for recent spec files
23
+ - If user provides a spec path, use that
24
+ - If no spec found, inform user to run `/speckit.specify` first
25
+
26
+ ### 2. Analyze for Gaps
27
+
28
+ Review the specification for:
29
+
30
+ **Critical Gaps** (must clarify):
31
+ - Ambiguous scope boundaries
32
+ - Undefined user roles/permissions
33
+ - Missing error handling behavior
34
+ - Unclear data validation rules
35
+ - Security requirements not addressed
36
+
37
+ **Important Gaps** (should clarify):
38
+ - Performance expectations
39
+ - Edge cases not covered
40
+ - Integration details
41
+ - UI/UX specifics
42
+
43
+ **Minor Gaps** (nice to clarify):
44
+ - Naming conventions
45
+ - Logging requirements
46
+ - Documentation needs
47
+
48
+ ### 3. Generate Questions
49
+
50
+ Create a maximum of 5 highly targeted questions:
51
+
52
+ For each question:
53
+ 1. **Question**: Clear, specific question
54
+ 2. **Context**: Why this matters for implementation
55
+ 3. **Options**: Provide 2-3 reasonable options with recommendations
56
+ 4. **Default**: Suggest a default if no answer provided
57
+
58
+ **Question Format**:
59
+ ```
60
+ ### Question {N}: {Topic}
61
+
62
+ {Question text}
63
+
64
+ **Why it matters**: {Impact on implementation}
65
+
66
+ **Options**:
67
+ | Option | Description |
68
+ |--------|-------------|
69
+ | A (Recommended) | {Description} |
70
+ | B | {Description} |
71
+ | C | {Description} |
72
+
73
+ You can reply with the option letter, "recommended", or provide your own answer.
74
+ ```
75
+
76
+ ### 4. Interactive Clarification
77
+
78
+ Present questions one at a time:
79
+ 1. Ask the question with options
80
+ 2. Wait for user response
81
+ 3. Record the answer
82
+ 4. Update the specification with the clarification
83
+
84
+ For each answer:
85
+ - If user says "yes", "recommended", or "A" → use the recommended option
86
+ - If user provides a different answer → validate it fits the context
87
+ - If user says "skip" → note as "Deferred" and continue
88
+
89
+ ### 5. Update Specification
90
+
91
+ Add a **Clarifications** section to the specification:
92
+
93
+ ```markdown
94
+ ## Clarifications
95
+
96
+ | # | Topic | Question | Answer | Date |
97
+ |---|-------|----------|--------|------|
98
+ | 1 | {Topic} | {Question summary} | {Answer} | {Date} |
99
+ ```
100
+
101
+ Also update relevant sections with the clarified information.
102
+
103
+ ### 6. Report Completion
104
+
105
+ Output:
106
+ - Number of clarifications made
107
+ - Summary of decisions
108
+ - Any deferred items
109
+ - Next step: `/speckit.plan` to create implementation plan
110
+
111
+ ## Question Generation Rules
112
+
113
+ **DO ask about**:
114
+ - Scope boundaries (what's explicitly in/out)
115
+ - User roles and their permissions
116
+ - Error states and recovery
117
+ - Data retention and privacy
118
+ - Performance requirements
119
+
120
+ **DON'T ask about**:
121
+ - Implementation details (that's for /speckit.plan)
122
+ - Obvious defaults (pagination, sorting, etc.)
123
+ - Tech stack choices (user provides in /speckit.plan)
124
+
125
+ ## Handoffs
126
+
127
+ After completing clarifications:
128
+ - **Create plan**: `/speckit.plan` - Now ready to plan implementation
129
+ - **Re-specify**: `/speckit.specify` - If major changes needed
@@ -0,0 +1,122 @@
1
+ ---
2
+ description: Execute the implementation tasks from tasks.md. Implements the feature according to the plan.
3
+ ---
4
+
5
+ # /speckit.implement - Execute Implementation
6
+
7
+ ## User Input
8
+
9
+ ```text
10
+ $ARGUMENTS
11
+ ```
12
+
13
+ You **MUST** consider the user input before proceeding (if not empty).
14
+
15
+ ## Outline
16
+
17
+ You are implementing the feature according to the task list. Follow this workflow:
18
+
19
+ ### 1. Validate Prerequisites
20
+
21
+ Check that all required files exist:
22
+ - `specs/{feature}/spec.md` - Specification
23
+ - `specs/{feature}/plan.md` - Implementation plan
24
+ - `specs/{feature}/tasks.md` - Task breakdown
25
+
26
+ If any are missing, inform user which `/speckit.*` command to run.
27
+
28
+ ### 2. Load Implementation Context
29
+
30
+ Read all design documents:
31
+ - **tasks.md**: Complete task list with execution order
32
+ - **plan.md**: Tech stack, architecture, file structure
33
+ - **data-model.md**: Entity definitions (if exists)
34
+ - **contracts/**: API specifications (if exists)
35
+ - **research.md**: Technical decisions (if exists)
36
+
37
+ ### 3. Verify Project Setup
38
+
39
+ Check or create essential project files:
40
+
41
+ **Based on tech stack, verify:**
42
+ - Package management files (`package.json`, `requirements.txt`, `*.csproj`)
43
+ - Ignore files (`.gitignore`, `.dockerignore` if Docker used)
44
+ - Linting/formatting config (`.eslintrc`, `prettier.config.js`, etc.)
45
+ - TypeScript config if applicable
46
+
47
+ **Create if missing** - only ask user if multiple valid options exist.
48
+
49
+ ### 4. Execute Tasks
50
+
51
+ Process tasks from `tasks.md` in order:
52
+
53
+ 1. **Read the task** - Understand what needs to be done
54
+ 2. **Check dependencies** - Verify prerequisite tasks are complete
55
+ 3. **Implement** - Write the code following the plan
56
+ 4. **Mark complete** - Check off the task in tasks.md
57
+
58
+ For each task:
59
+ ```
60
+ 📋 Task T{number}: {description}
61
+ 📁 File: {file_path}
62
+ ⏳ Status: In Progress...
63
+ ```
64
+
65
+ ### 5. Implementation Guidelines
66
+
67
+ **Code Quality**:
68
+ - Follow the code style specified in plan.md or project conventions
69
+ - Include appropriate comments and documentation
70
+ - Write tests if specified in the tasks
71
+ - Handle errors appropriately
72
+
73
+ **Progress Tracking**:
74
+ - Update task checkboxes as you complete them
75
+ - Note any blockers or issues encountered
76
+ - Suggest adjustments if tasks need modification
77
+
78
+ **Checkpoint Validation**:
79
+ - At each phase checkpoint, run the specified validation
80
+ - Report results before proceeding to next phase
81
+
82
+ ### 6. Handle Blockers
83
+
84
+ If a task cannot be completed:
85
+ 1. Document the blocker in the task
86
+ 2. Check if it's a dependency issue
87
+ 3. Ask user for clarification if needed
88
+ 4. Skip and continue with non-blocked tasks
89
+
90
+ ### 7. Report Progress
91
+
92
+ After each phase or upon request, report:
93
+ - Tasks completed
94
+ - Tasks remaining
95
+ - Any blockers encountered
96
+ - Code quality notes
97
+ - Next steps
98
+
99
+ ## Execution Mode Options
100
+
101
+ User can specify in `$ARGUMENTS`:
102
+
103
+ - **Full implementation**: Complete all tasks
104
+ - **Phase only**: `--phase 3` - Complete only specified phase
105
+ - **Single task**: `--task T015` - Complete only specified task
106
+ - **Dry run**: `--dry-run` - Show what would be done without making changes
107
+
108
+ ## Quality Checks
109
+
110
+ Before marking implementation complete:
111
+ - [ ] All tasks in tasks.md are checked off
112
+ - [ ] Code compiles/runs without errors
113
+ - [ ] Tests pass (if applicable)
114
+ - [ ] No TODO comments left unaddressed
115
+ - [ ] Documentation is updated
116
+
117
+ ## Handoffs
118
+
119
+ After completing implementation:
120
+ - **Test the feature** - Run tests and verify functionality
121
+ - **Create PR** - Prepare pull request with summary
122
+ - **Update spec** - Mark specification as implemented
@@ -0,0 +1,153 @@
1
+ ---
2
+ description: Initialize Spec-Kit in the current project. Creates the .spec-kit folder structure with default workflows and templates.
3
+ ---
4
+
5
+ # /speckit.init - Initialize Project
6
+
7
+ ## User Input
8
+
9
+ ```text
10
+ $ARGUMENTS
11
+ ```
12
+
13
+ ## Outline
14
+
15
+ You are initializing Spec-Kit in the current project. Follow this workflow:
16
+
17
+ ### 1. Check Existing Setup
18
+
19
+ Check if `.spec-kit/` directory already exists:
20
+ - If exists and `--force` not specified, ask user if they want to overwrite
21
+ - If `--force` specified, proceed with overwrite
22
+
23
+ ### 2. Create Directory Structure
24
+
25
+ Create the following structure:
26
+
27
+ ```
28
+ .spec-kit/
29
+ ├── workflows/ # Custom workflow definitions
30
+ ├── templates/ # Specification templates
31
+ └── memory/ # Project-specific context
32
+ └── constitution.md # Project principles
33
+
34
+ specs/ # Generated specifications go here
35
+ ```
36
+
37
+ ### 3. Copy Default Templates
38
+
39
+ Create default templates in `.spec-kit/templates/`:
40
+
41
+ **functional-spec.md** - Feature specification template
42
+ **bugfix-report.md** - Bug fix specification template
43
+ **plan-template.md** - Implementation plan template
44
+ **tasks-template.md** - Task breakdown template
45
+
46
+ ### 4. Create Constitution
47
+
48
+ Create `.spec-kit/memory/constitution.md` with project principles template:
49
+
50
+ ```markdown
51
+ # Project Constitution
52
+
53
+ ## Project Name
54
+ [TO FILL: Project name]
55
+
56
+ ## Core Principles
57
+
58
+ ### Principle 1: [TO FILL: Principle Name]
59
+ [TO FILL: Description of this principle]
60
+
61
+ **Rationale**: [TO FILL: Why this principle matters]
62
+
63
+ ### Principle 2: Code Quality
64
+ All code must pass linting and have appropriate test coverage.
65
+
66
+ **Rationale**: Maintains consistency and reduces bugs.
67
+
68
+ ### Principle 3: Documentation
69
+ All features must be documented before implementation begins.
70
+
71
+ **Rationale**: Ensures alignment and reduces rework.
72
+
73
+ ## Tech Stack Guidelines
74
+ [TO FILL: Preferred technologies, frameworks, and patterns]
75
+
76
+ ## Governance
77
+ - **Ratification Date**: [TO FILL]
78
+ - **Last Amended**: [TO FILL]
79
+ - **Version**: 1.0.0
80
+ ```
81
+
82
+ ### 5. Setup VS Code Configuration
83
+
84
+ If the project uses VS Code, suggest adding to `.vscode/settings.json`:
85
+
86
+ ```json
87
+ {
88
+ "mcp": {
89
+ "servers": {
90
+ "spec-kit": {
91
+ "command": "npx",
92
+ "args": ["-y", "spec-kit-mcp"]
93
+ }
94
+ }
95
+ }
96
+ }
97
+ ```
98
+
99
+ ### 6. Create Starter Workflow (Optional)
100
+
101
+ If user requests, create a custom workflow in `.spec-kit/workflows/`:
102
+
103
+ ```yaml
104
+ name: custom-feature
105
+ displayName: "Custom Feature Workflow"
106
+ description: "Your custom workflow for this project"
107
+ template: functional-spec.md
108
+
109
+ steps:
110
+ - id: specify
111
+ name: "Create Specification"
112
+ action: call_agent
113
+ agent: SpecAgent
114
+
115
+ - id: plan
116
+ name: "Create Plan"
117
+ action: call_agent
118
+ agent: PlanAgent
119
+
120
+ - id: implement
121
+ name: "Implement"
122
+ action: call_agent
123
+ agent: SpecAgent
124
+ ```
125
+
126
+ ### 7. Report Completion
127
+
128
+ Output:
129
+ ```
130
+ ✅ Spec-Kit initialized successfully!
131
+
132
+ Created:
133
+ 📁 .spec-kit/workflows/ - Custom workflows
134
+ 📁 .spec-kit/templates/ - Specification templates
135
+ 📁 .spec-kit/memory/ - Project context
136
+ 📁 specs/ - Specifications output
137
+
138
+ Next steps:
139
+ 1. Edit .spec-kit/memory/constitution.md with your project principles
140
+ 2. Run /speckit.specify to create your first specification
141
+ ```
142
+
143
+ ## Options
144
+
145
+ - `--force`: Overwrite existing .spec-kit directory
146
+ - `--minimal`: Create minimal structure without examples
147
+ - `--with-vscode`: Also configure VS Code MCP settings
148
+
149
+ ## Handoffs
150
+
151
+ After initialization:
152
+ - **Set principles**: Edit `.spec-kit/memory/constitution.md`
153
+ - **Create spec**: `/speckit.specify` - Start creating specifications
@@ -0,0 +1,145 @@
1
+ ---
2
+ description: Create a technical implementation plan from a specification. Specify your tech stack and architecture choices.
3
+ ---
4
+
5
+ # /speckit.plan - Create Implementation Plan
6
+
7
+ ## User Input
8
+
9
+ ```text
10
+ $ARGUMENTS
11
+ ```
12
+
13
+ You **MUST** consider the user input before proceeding (if not empty).
14
+
15
+ ## Outline
16
+
17
+ You are creating a technical implementation plan. Follow this workflow:
18
+
19
+ ### 1. Setup Check
20
+
21
+ First, locate the specification:
22
+ - Check for recent spec files in `specs/` directory
23
+ - If user provides a spec path, use that
24
+ - If no spec found, inform user to run `/speckit.specify` first
25
+
26
+ ### 2. Parse Tech Stack from Input
27
+
28
+ Extract technology choices from user input:
29
+ - **Language/Runtime**: Python, Node.js, .NET, etc.
30
+ - **Framework**: React, FastAPI, ASP.NET, etc.
31
+ - **Database**: PostgreSQL, MongoDB, etc.
32
+ - **Infrastructure**: Docker, Kubernetes, Azure, etc.
33
+ - **Other tools**: Testing frameworks, CI/CD, etc.
34
+
35
+ If tech stack not specified, ask the user to provide it.
36
+
37
+ ### 3. Load Specification
38
+
39
+ Read the specification file and extract:
40
+ - Functional requirements
41
+ - Non-functional requirements
42
+ - User stories
43
+ - Dependencies
44
+ - Constraints
45
+
46
+ ### 4. Generate Research Document (Phase 0)
47
+
48
+ Create `specs/{feature}/research.md` covering:
49
+
50
+ 1. **Tech Stack Analysis**
51
+ - Evaluate chosen technologies against requirements
52
+ - Identify potential issues or limitations
53
+ - Research latest versions and best practices
54
+
55
+ 2. **Architecture Options**
56
+ - Propose 2-3 architecture approaches
57
+ - Pros/cons for each
58
+ - Recommendation with justification
59
+
60
+ 3. **Third-Party Dependencies**
61
+ - Required libraries and packages
62
+ - Version recommendations
63
+ - License considerations
64
+
65
+ 4. **Technical Decisions Log**
66
+ - Decision records for key choices
67
+ - Alternatives considered
68
+ - Rationale for decisions
69
+
70
+ ### 5. Generate Design Documents (Phase 1)
71
+
72
+ Create these documents in `specs/{feature}/`:
73
+
74
+ **data-model.md** (if applicable):
75
+ - Entity definitions
76
+ - Relationships
77
+ - Database schema
78
+ - Sample data
79
+
80
+ **contracts/** (if applicable):
81
+ - API specifications (OpenAPI/Swagger format)
82
+ - Message formats
83
+ - Interface definitions
84
+
85
+ **quickstart.md**:
86
+ - Development environment setup
87
+ - Build and run instructions
88
+ - Integration test scenarios
89
+
90
+ ### 6. Generate Implementation Plan
91
+
92
+ Create `specs/{feature}/plan.md` with:
93
+
94
+ 1. **Summary**
95
+ - Feature overview
96
+ - Tech stack summary
97
+ - Estimated complexity
98
+
99
+ 2. **Technical Context**
100
+ - Architecture diagram (text-based)
101
+ - System components
102
+ - Integration points
103
+
104
+ 3. **Project Structure**
105
+ - Directory layout
106
+ - Key files and their purposes
107
+ - Module organization
108
+
109
+ 4. **Implementation Phases**
110
+ - Phase breakdown with dependencies
111
+ - Deliverables per phase
112
+ - Risk mitigation for each phase
113
+
114
+ 5. **Quality Gates**
115
+ - Code review requirements
116
+ - Testing requirements
117
+ - Performance benchmarks
118
+
119
+ ### 7. Report Completion
120
+
121
+ Output:
122
+ - Path to created plan files
123
+ - Summary of technical decisions
124
+ - List of any issues needing resolution
125
+ - Next step: `/speckit.tasks` to break down into actionable tasks
126
+
127
+ ## Key Rules
128
+
129
+ ### Plan Quality Checks
130
+ - Each phase should have clear entry/exit criteria
131
+ - Dependencies between phases must be explicit
132
+ - Estimates should account for testing and documentation
133
+ - Risks should have mitigation strategies
134
+
135
+ ### Architecture Principles
136
+ - Favor simplicity over complexity
137
+ - Consider maintainability and testability
138
+ - Plan for observability (logging, monitoring)
139
+ - Document security considerations
140
+
141
+ ## Handoffs
142
+
143
+ After completing the plan, suggest:
144
+ - **Generate tasks**: `/speckit.tasks` - Break plan into actionable tasks
145
+ - **Create checklist**: `/speckit.checklist` - Generate quality checklist