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,123 @@
1
+ ---
2
+ description: Create a functional specification from requirements or an Azure DevOps work item. Focus on WHAT you want to build, not the tech stack.
3
+ ---
4
+
5
+ # /speckit.specify - Create Specification
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 functional specification document. Follow this workflow:
18
+
19
+ ### 1. Setup Check
20
+
21
+ First, verify the Spec-Kit environment:
22
+ - Check if `.spec-kit/` directory exists
23
+ - If not, inform the user to run `/speckit.init` first
24
+
25
+ ### 2. Parse Requirements Source
26
+
27
+ Determine the source of requirements from user input:
28
+
29
+ **Option A: Azure DevOps Work Item**
30
+ - If input contains an ADO work item ID (e.g., "#12345", "AB#12345", "Feature 12345")
31
+ - Use the `fetch_ado_workitem` MCP tool to retrieve work item data
32
+
33
+ **Option B: Direct Description**
34
+ - If input is a feature description
35
+ - Parse the description for key concepts: actors, actions, data, constraints
36
+
37
+ ### 3. Analyze Requirements
38
+
39
+ For the provided requirements, identify:
40
+ 1. **Core user need** and business value
41
+ 2. **Explicit requirements** - what was directly stated
42
+ 3. **Implicit requirements** - reasonable inferences from context
43
+ 4. **Assumptions** - things that need validation
44
+ 5. **Risks and dependencies**
45
+ 6. **Edge cases and error scenarios**
46
+
47
+ ### 4. Generate Specification
48
+
49
+ Load the template from `.spec-kit/templates/functional-spec.md` and fill it with:
50
+
51
+ 1. **Metadata Section**
52
+ - Title, date, version, status
53
+ - Link to Azure DevOps work item (if applicable)
54
+
55
+ 2. **Overview**
56
+ - Purpose (the problem being solved)
57
+ - Scope (what's in/out)
58
+ - Background context
59
+
60
+ 3. **Requirements**
61
+ - Functional requirements with IDs and priorities (Must Have/Should Have/Could Have)
62
+ - Non-functional requirements (performance, security, etc.)
63
+ - Acceptance criteria in Given/When/Then format
64
+
65
+ 4. **User Experience**
66
+ - User personas
67
+ - User stories (As a... I want... So that...)
68
+ - User flow descriptions
69
+
70
+ 5. **Technical Considerations**
71
+ - Dependencies
72
+ - Constraints
73
+ - Data requirements
74
+
75
+ ### 5. Handle Ambiguity
76
+
77
+ For unclear aspects:
78
+ - **Make informed guesses** based on context and industry standards
79
+ - **Document assumptions** in the Assumptions section
80
+ - **Limit clarifications**: Maximum 3 `[NEEDS CLARIFICATION]` markers for critical decisions only
81
+
82
+ Only use `[NEEDS CLARIFICATION]` when:
83
+ - The choice significantly impacts feature scope or user experience
84
+ - Multiple reasonable interpretations exist with different implications
85
+ - No reasonable default exists
86
+
87
+ ### 6. Save Specification
88
+
89
+ Save the specification to:
90
+ ```
91
+ specs/{context_id}-spec.md
92
+ ```
93
+
94
+ If no context ID is provided, create a timestamped filename or ask for a feature short-name.
95
+
96
+ ### 7. Report Completion
97
+
98
+ Output:
99
+ - Path to created specification file
100
+ - Summary of requirements captured
101
+ - List of assumptions made
102
+ - Any `[NEEDS CLARIFICATION]` items that need user input
103
+ - Next step suggestion: `/speckit.plan` to create implementation plan
104
+
105
+ ## Quick Guidelines
106
+
107
+ ### Writing Style
108
+ - Use active voice and clear, concise language
109
+ - Include concrete examples for complex requirements
110
+ - Define all technical terms and acronyms
111
+ - Use tables for structured data (requirements, test cases)
112
+
113
+ ### Quality Checks
114
+ - Every requirement should be testable and unambiguous
115
+ - Each requirement should have a unique ID
116
+ - Acceptance criteria should be in Given/When/Then format
117
+ - No undefined placeholders in final output (except intentional `[NEEDS CLARIFICATION]`)
118
+
119
+ ## Handoffs
120
+
121
+ After completing the specification, suggest:
122
+ - **Clarify requirements**: `/speckit.clarify` - If there are `[NEEDS CLARIFICATION]` items
123
+ - **Create implementation plan**: `/speckit.plan` - Once specification is approved
@@ -0,0 +1,137 @@
1
+ ---
2
+ description: Generate actionable task breakdown from the implementation plan. Creates a tasks.md file with ordered, dependency-aware tasks.
3
+ ---
4
+
5
+ # /speckit.tasks - Generate Task Breakdown
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 generating an actionable task list from the implementation plan. Follow this workflow:
18
+
19
+ ### 1. Load Design Documents
20
+
21
+ Read from the feature's spec directory:
22
+ - **Required**: `plan.md` (tech stack, libraries, structure)
23
+ - **Required**: `spec.md` (user stories with priorities)
24
+ - **Optional**: `data-model.md` (entities)
25
+ - **Optional**: `contracts/` (API endpoints)
26
+ - **Optional**: `research.md` (decisions)
27
+
28
+ If required files are missing, inform user to run `/speckit.plan` first.
29
+
30
+ ### 2. Extract Implementation Context
31
+
32
+ From the documents, identify:
33
+ - User stories with their priorities (P1, P2, P3)
34
+ - Tech stack and frameworks
35
+ - Database entities and relationships
36
+ - API endpoints
37
+ - External dependencies
38
+
39
+ ### 3. Generate Task Breakdown
40
+
41
+ Create `specs/{feature}/tasks.md` with this structure:
42
+
43
+ ```markdown
44
+ # Tasks: {Feature Name}
45
+
46
+ **Input**: Design documents from `/specs/{feature}/`
47
+ **Generated**: {Date}
48
+
49
+ ## Task Format
50
+
51
+ - [ ] T### [P?] [Story?] Description - `path/to/file.ext`
52
+
53
+ Legend:
54
+ - T###: Task ID (sequential)
55
+ - [P]: Can be executed in parallel with other [P] tasks
56
+ - [Story?]: Associated user story ID (if applicable)
57
+ ```
58
+
59
+ ### 4. Phase Structure
60
+
61
+ Organize tasks into these phases:
62
+
63
+ **Phase 1: Setup (Shared Infrastructure)**
64
+ - Project initialization
65
+ - Dependency installation
66
+ - Configuration files
67
+ - Development environment setup
68
+
69
+ **Phase 2: Foundational (Blocking Prerequisites)**
70
+ - Database schema and migrations
71
+ - Base models/entities
72
+ - Authentication/authorization framework
73
+ - Core utilities and helpers
74
+ - Error handling infrastructure
75
+
76
+ ⚠️ **CRITICAL**: No user story work begins until Phase 2 is complete.
77
+
78
+ **Phase 3+: User Stories (One Phase per Story)**
79
+ For each user story in priority order:
80
+ - Tests (if requested) → Models → Services → Endpoints → Integration
81
+ - Each phase should be independently testable
82
+ - Include checkpoint validation
83
+
84
+ **Final Phase: Polish & Cross-Cutting**
85
+ - Code cleanup and refactoring
86
+ - Documentation updates
87
+ - Performance optimization
88
+ - Security hardening
89
+
90
+ ### 5. Task Generation Rules
91
+
92
+ Each task MUST:
93
+ - Be completable in 1-3 days by a single developer
94
+ - Have a clear verb + object title
95
+ - Include the file path(s) affected
96
+ - Have explicit dependencies noted
97
+
98
+ Mark with `[P]` if the task can run in parallel with others at the same level.
99
+
100
+ ### 6. Generate Dependency Graph
101
+
102
+ Add a section showing:
103
+ - Task dependencies (which tasks must complete first)
104
+ - Parallel execution opportunities
105
+ - Critical path identification
106
+
107
+ ### 7. Report Completion
108
+
109
+ Output:
110
+ - Path to generated `tasks.md`
111
+ - Total task count
112
+ - Task count per user story
113
+ - Parallel execution opportunities identified
114
+ - Suggested MVP scope (typically User Story 1 only)
115
+
116
+ ## Task Template
117
+
118
+ ```markdown
119
+ ## Phase 3: User Story 1 - {Title} (Priority: P1) 🎯 MVP
120
+
121
+ **Goal**: {User story goal}
122
+ **Independent Test**: {How to verify this story works alone}
123
+
124
+ - [ ] T010 [US-1] Create {model} entity - `src/models/{model}.ts`
125
+ - [ ] T011 [P] [US-1] Create {model} repository - `src/repositories/{model}.ts`
126
+ - [ ] T012 [P] [US-1] Create {model} service - `src/services/{model}.ts`
127
+ - [ ] T013 [US-1] Create {endpoint} API endpoint - `src/api/{endpoint}.ts`
128
+ - [ ] T014 [US-1] Add integration tests - `tests/integration/{feature}.test.ts`
129
+
130
+ **Checkpoint**: Story 1 complete - run `npm test` and verify {criteria}
131
+ ```
132
+
133
+ ## Handoffs
134
+
135
+ After completing the tasks, suggest:
136
+ - **Analyze plan**: `/speckit.analyze` - Cross-check consistency
137
+ - **Implement**: `/speckit.implement` - Start executing tasks
@@ -0,0 +1,127 @@
1
+ ---
2
+ title: "[TO FILL: Bug Title]"
3
+ workitem_id: "[TO FILL]"
4
+ type: Bugfix Report
5
+ version: "1.0"
6
+ status: Draft
7
+ author: "[TO FILL]"
8
+ created: "[TO FILL: Date]"
9
+ severity: "[Critical/High/Medium/Low]"
10
+ ---
11
+
12
+ # Bug Fix Report: [TO FILL: Bug Title]
13
+
14
+ ## 1. Bug Summary
15
+
16
+ ### 1.1 Description
17
+ [TO FILL: Clear, concise description of the bug]
18
+
19
+ ### 1.2 Impact
20
+ - **Severity**: [Critical/High/Medium/Low]
21
+ - **Affected Users**: [TO FILL: Who is affected]
22
+ - **Business Impact**: [TO FILL: How this affects the business]
23
+
24
+ ---
25
+
26
+ ## 2. Reproduction
27
+
28
+ ### 2.1 Environment
29
+ | Component | Value |
30
+ |-----------|-------|
31
+ | OS | [TO FILL] |
32
+ | Browser/Runtime | [TO FILL] |
33
+ | Version | [TO FILL] |
34
+
35
+ ### 2.2 Steps to Reproduce
36
+ 1. [TO FILL: Step 1]
37
+ 2. [TO FILL: Step 2]
38
+ 3. [TO FILL: Step 3]
39
+
40
+ ### 2.3 Expected Behavior
41
+ [TO FILL: What should happen]
42
+
43
+ ### 2.4 Actual Behavior
44
+ [TO FILL: What actually happens]
45
+
46
+ ### 2.5 Evidence
47
+ ```
48
+ [TO FILL: Error messages, logs, screenshots]
49
+ ```
50
+
51
+ ---
52
+
53
+ ## 3. Root Cause Analysis
54
+
55
+ ### 3.1 Investigation
56
+ [TO FILL: What was investigated and findings]
57
+
58
+ ### 3.2 Root Cause
59
+ [TO FILL: The underlying cause of the bug]
60
+
61
+ ### 3.3 Related Code
62
+ ```
63
+ File: [path/to/file]
64
+ Line: [line numbers]
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 4. Fix Proposal
70
+
71
+ ### 4.1 Solution
72
+ [TO FILL: Proposed fix approach]
73
+
74
+ ### 4.2 Changes Required
75
+ | File | Change |
76
+ |------|--------|
77
+ | [TO FILL] | [TO FILL] |
78
+
79
+ ### 4.3 Risks
80
+ - [TO FILL: Any risks with the proposed fix]
81
+
82
+ ---
83
+
84
+ ## 5. Testing
85
+
86
+ ### 5.1 Test Cases
87
+ | ID | Scenario | Expected Result |
88
+ |----|----------|-----------------|
89
+ | TC-001 | [TO FILL: Original bug scenario] | Bug no longer occurs |
90
+ | TC-002 | [TO FILL: Regression test] | Existing functionality intact |
91
+
92
+ ### 5.2 Verification Steps
93
+ 1. [TO FILL: How to verify the fix]
94
+ 2. [TO FILL: Regression testing steps]
95
+
96
+ ---
97
+
98
+ ## 6. Deployment
99
+
100
+ ### 6.1 Deployment Plan
101
+ - [ ] Code review completed
102
+ - [ ] Tests passing
103
+ - [ ] Staging verification
104
+ - [ ] Production deployment
105
+
106
+ ### 6.2 Rollback Plan
107
+ [TO FILL: How to rollback if issues occur]
108
+
109
+ ---
110
+
111
+ ## 7. Post-Mortem (Optional)
112
+
113
+ ### 7.1 Timeline
114
+ | Time | Event |
115
+ |------|-------|
116
+ | [TO FILL] | Bug reported |
117
+ | [TO FILL] | Investigation started |
118
+ | [TO FILL] | Root cause identified |
119
+ | [TO FILL] | Fix deployed |
120
+
121
+ ### 7.2 Lessons Learned
122
+ - [TO FILL: What can we improve to prevent similar issues]
123
+
124
+ ### 7.3 Action Items
125
+ | Item | Owner | Due Date |
126
+ |------|-------|----------|
127
+ | [TO FILL] | [TO FILL] | [TO FILL] |
@@ -0,0 +1,144 @@
1
+ ---
2
+ title: "[TO FILL: Feature Title]"
3
+ workitem_id: "[TO FILL]"
4
+ type: Functional Specification
5
+ version: "1.0"
6
+ status: Draft
7
+ author: "[TO FILL]"
8
+ created: "[TO FILL: Date]"
9
+ last_updated: "[TO FILL: Date]"
10
+ ---
11
+
12
+ # Functional Specification: [TO FILL: Feature Title]
13
+
14
+ ## 1. Overview
15
+
16
+ ### 1.1 Purpose
17
+ [TO FILL: Brief description of the feature's purpose and the problem it solves]
18
+
19
+ ### 1.2 Scope
20
+ **In Scope:**
21
+ - [TO FILL: What is included]
22
+
23
+ **Out of Scope:**
24
+ - [TO FILL: What is explicitly excluded]
25
+
26
+ ### 1.3 Background
27
+ [TO FILL: Context and history leading to this feature request]
28
+
29
+ ---
30
+
31
+ ## 2. Stakeholders
32
+
33
+ | Role | Name | Responsibility |
34
+ |------|------|----------------|
35
+ | Product Owner | [TO FILL] | Requirements validation |
36
+ | Tech Lead | [TO FILL] | Technical decisions |
37
+ | QA Lead | [TO FILL] | Test strategy |
38
+
39
+ ---
40
+
41
+ ## 3. Requirements
42
+
43
+ ### 3.1 Functional Requirements
44
+
45
+ | ID | Requirement | Priority | Source |
46
+ |----|-------------|----------|--------|
47
+ | FR-001 | [TO FILL] | Must Have | |
48
+ | FR-002 | [TO FILL] | Should Have | |
49
+ | FR-003 | [TO FILL] | Could Have | |
50
+
51
+ ### 3.2 Non-Functional Requirements
52
+
53
+ | ID | Category | Requirement | Target |
54
+ |----|----------|-------------|--------|
55
+ | NFR-001 | Performance | [TO FILL] | [TO FILL] |
56
+ | NFR-002 | Security | [TO FILL] | [TO FILL] |
57
+ | NFR-003 | Availability | [TO FILL] | [TO FILL] |
58
+
59
+ ### 3.3 Acceptance Criteria
60
+
61
+ ```gherkin
62
+ Feature: [TO FILL: Feature Name]
63
+
64
+ Scenario: [TO FILL: Main Success Scenario]
65
+ Given [TO FILL: Initial context]
66
+ When [TO FILL: Action performed]
67
+ Then [TO FILL: Expected outcome]
68
+
69
+ Scenario: [TO FILL: Alternative Scenario]
70
+ Given [TO FILL]
71
+ When [TO FILL]
72
+ Then [TO FILL]
73
+ ```
74
+
75
+ ---
76
+
77
+ ## 4. User Experience
78
+
79
+ ### 4.1 User Personas
80
+
81
+ **Persona 1: [TO FILL: Name]**
82
+ - Role: [TO FILL]
83
+ - Goals: [TO FILL]
84
+ - Pain Points: [TO FILL]
85
+
86
+ ### 4.2 User Stories
87
+
88
+ | ID | As a... | I want to... | So that... | Priority |
89
+ |----|---------|--------------|------------|----------|
90
+ | US-001 | [TO FILL] | [TO FILL] | [TO FILL] | P1 |
91
+ | US-002 | [TO FILL] | [TO FILL] | [TO FILL] | P2 |
92
+
93
+ ### 4.3 User Flow
94
+
95
+ ```
96
+ [TO FILL: Describe or link to user flow diagram]
97
+ ┌─────────┐ ┌─────────┐ ┌─────────┐
98
+ │ Step 1 │───▶│ Step 2 │───▶│ Step 3 │
99
+ └─────────┘ └─────────┘ └─────────┘
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 5. Technical Considerations
105
+
106
+ ### 5.1 Dependencies
107
+ - [TO FILL: External systems, services, or components this feature depends on]
108
+
109
+ ### 5.2 Constraints
110
+ - [TO FILL: Technical or business constraints]
111
+
112
+ ### 5.3 Data Requirements
113
+ - [TO FILL: Data entities, storage, and access patterns]
114
+
115
+ ---
116
+
117
+ ## 6. Assumptions & Risks
118
+
119
+ ### 6.1 Assumptions
120
+ | ID | Assumption | Impact if Wrong |
121
+ |----|------------|-----------------|
122
+ | A-001 | [TO FILL] | [TO FILL] |
123
+
124
+ ### 6.2 Risks
125
+ | ID | Risk | Probability | Impact | Mitigation |
126
+ |----|------|-------------|--------|------------|
127
+ | R-001 | [TO FILL] | Medium | High | [TO FILL] |
128
+
129
+ ---
130
+
131
+ ## 7. Clarifications
132
+
133
+ | # | Topic | Question | Answer | Date |
134
+ |---|-------|----------|--------|------|
135
+ | | | | | |
136
+
137
+ ---
138
+
139
+ ## 8. Approval
140
+
141
+ | Role | Name | Date | Status |
142
+ |------|------|------|--------|
143
+ | Product Owner | | | ⬜ Pending |
144
+ | Tech Lead | | | ⬜ Pending |
@@ -0,0 +1,126 @@
1
+ # Implementation Plan: [FEATURE NAME]
2
+
3
+ **Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link to spec.md]
4
+
5
+ ## Summary
6
+
7
+ [TO FILL: Brief description of the implementation approach]
8
+
9
+ ## Technical Context
10
+
11
+ ### Tech Stack
12
+ | Component | Technology | Version |
13
+ |-----------|------------|---------|
14
+ | Language | [TO FILL] | |
15
+ | Framework | [TO FILL] | |
16
+ | Database | [TO FILL] | |
17
+ | Testing | [TO FILL] | |
18
+
19
+ ### Architecture Overview
20
+
21
+ ```
22
+ [TO FILL: ASCII diagram or description of architecture]
23
+
24
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
25
+ │ Client │───▶│ API │───▶│ Database │
26
+ └─────────────┘ └─────────────┘ └─────────────┘
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Project Structure
32
+
33
+ ```text
34
+ [TO FILL: Project directory structure]
35
+
36
+ src/
37
+ ├── models/
38
+ ├── services/
39
+ ├── api/
40
+ └── utils/
41
+
42
+ tests/
43
+ ├── unit/
44
+ ├── integration/
45
+ └── e2e/
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Implementation Phases
51
+
52
+ ### Phase 0: Research & Design
53
+ **Duration**: [X days]
54
+ **Output**: research.md, data-model.md
55
+
56
+ - [ ] Validate tech stack choices
57
+ - [ ] Research key libraries/patterns
58
+ - [ ] Design data model
59
+ - [ ] Define API contracts
60
+
61
+ ### Phase 1: Foundation
62
+ **Duration**: [X days]
63
+ **Dependencies**: Phase 0
64
+
65
+ - [ ] Set up project structure
66
+ - [ ] Configure build/test pipeline
67
+ - [ ] Create base models
68
+ - [ ] Set up database schema
69
+
70
+ ### Phase 2: Core Implementation
71
+ **Duration**: [X days]
72
+ **Dependencies**: Phase 1
73
+
74
+ - [ ] Implement core services
75
+ - [ ] Create API endpoints
76
+ - [ ] Add unit tests
77
+
78
+ ### Phase 3: Integration & Polish
79
+ **Duration**: [X days]
80
+ **Dependencies**: Phase 2
81
+
82
+ - [ ] Integration testing
83
+ - [ ] Error handling improvements
84
+ - [ ] Documentation
85
+ - [ ] Performance optimization
86
+
87
+ ---
88
+
89
+ ## Quality Gates
90
+
91
+ | Gate | Criteria | Status |
92
+ |------|----------|--------|
93
+ | Code Review | All PRs reviewed | ⬜ |
94
+ | Unit Tests | >80% coverage | ⬜ |
95
+ | Integration Tests | All scenarios pass | ⬜ |
96
+ | Documentation | README updated | ⬜ |
97
+
98
+ ---
99
+
100
+ ## Risks & Mitigations
101
+
102
+ | Risk | Probability | Impact | Mitigation |
103
+ |------|-------------|--------|------------|
104
+ | [TO FILL] | Medium | High | [TO FILL] |
105
+
106
+ ---
107
+
108
+ ## Technical Decisions
109
+
110
+ | Decision | Options Considered | Choice | Rationale |
111
+ |----------|-------------------|--------|-----------|
112
+ | [TO FILL] | [TO FILL] | [TO FILL] | [TO FILL] |
113
+
114
+ ---
115
+
116
+ ## Dependencies
117
+
118
+ | Dependency | Version | Purpose | Notes |
119
+ |------------|---------|---------|-------|
120
+ | [TO FILL] | | | |
121
+
122
+ ---
123
+
124
+ ## Notes
125
+
126
+ [TO FILL: Additional implementation notes, gotchas, or considerations]