smart-spec-kit-mcp 2.0.1 → 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.
Files changed (28) hide show
  1. package/README.md +65 -70
  2. package/dist/tools/orchestrationTools.d.ts.map +1 -1
  3. package/dist/tools/orchestrationTools.js +72 -30
  4. package/dist/tools/orchestrationTools.js.map +1 -1
  5. package/dist/utils/starterKitInstaller.d.ts +44 -0
  6. package/dist/utils/starterKitInstaller.d.ts.map +1 -0
  7. package/dist/utils/starterKitInstaller.js +264 -0
  8. package/dist/utils/starterKitInstaller.js.map +1 -0
  9. package/package.json +2 -2
  10. package/starter-kit/memory/constitution.md +122 -0
  11. package/starter-kit/prompts/speckit.clarify.md +129 -0
  12. package/starter-kit/prompts/speckit.implement.md +122 -0
  13. package/starter-kit/prompts/speckit.init.md +153 -0
  14. package/starter-kit/prompts/speckit.plan.md +145 -0
  15. package/starter-kit/prompts/speckit.specify.md +123 -0
  16. package/starter-kit/prompts/speckit.tasks.md +137 -0
  17. package/starter-kit/templates/bugfix-report.md +127 -0
  18. package/starter-kit/templates/functional-spec.md +144 -0
  19. package/starter-kit/templates/plan-template.md +126 -0
  20. package/starter-kit/templates/tasks-template.md +153 -0
  21. package/.github/copilot/prompts/spec-kit-abort.prompt.md +0 -22
  22. package/.github/copilot/prompts/spec-kit-config.prompt.md +0 -20
  23. package/.github/copilot/prompts/spec-kit-continue.prompt.md +0 -25
  24. package/.github/copilot/prompts/spec-kit-init.prompt.md +0 -19
  25. package/.github/copilot/prompts/spec-kit-list.prompt.md +0 -19
  26. package/.github/copilot/prompts/spec-kit-ping.prompt.md +0 -17
  27. package/.github/copilot/prompts/spec-kit-start.prompt.md +0 -30
  28. package/.github/copilot/prompts/spec-kit-status.prompt.md +0 -21
@@ -0,0 +1,264 @@
1
+ /**
2
+ * Starter Kit Installer
3
+ *
4
+ * Handles the installation of Spec-Kit starter kit into user projects.
5
+ * Copies prompts to .github/prompts/ and templates to .spec-kit/
6
+ */
7
+ import * as fs from "node:fs/promises";
8
+ import * as path from "node:path";
9
+ // Directory constants
10
+ const GITHUB_PROMPTS_DIR = ".github/prompts";
11
+ const SPEC_KIT_DIR = ".spec-kit";
12
+ const TEMPLATES_DIR = "templates";
13
+ const MEMORY_DIR = "memory";
14
+ const SPECS_DIR = "specs";
15
+ /**
16
+ * Get the package root directory (where the npm package is installed)
17
+ */
18
+ function getPackageRoot() {
19
+ const currentDir = path.dirname(new URL(import.meta.url).pathname);
20
+ // Handle Windows paths (remove leading slash if present)
21
+ const normalizedDir = currentDir.replace(/^\/([A-Za-z]:)/, "$1");
22
+ // Go up from dist/utils/ or src/utils/ to package root
23
+ return path.resolve(normalizedDir, "..", "..");
24
+ }
25
+ /**
26
+ * Check if a file or directory exists
27
+ */
28
+ async function exists(filePath) {
29
+ try {
30
+ await fs.access(filePath);
31
+ return true;
32
+ }
33
+ catch {
34
+ return false;
35
+ }
36
+ }
37
+ /**
38
+ * Copy a directory recursively
39
+ */
40
+ async function copyDir(src, dest) {
41
+ await fs.mkdir(dest, { recursive: true });
42
+ const entries = await fs.readdir(src, { withFileTypes: true });
43
+ for (const entry of entries) {
44
+ const srcPath = path.join(src, entry.name);
45
+ const destPath = path.join(dest, entry.name);
46
+ if (entry.isDirectory()) {
47
+ await copyDir(srcPath, destPath);
48
+ }
49
+ else {
50
+ await fs.copyFile(srcPath, destPath);
51
+ }
52
+ }
53
+ }
54
+ /**
55
+ * Copy a file if the source exists
56
+ */
57
+ async function copyFileIfExists(src, dest) {
58
+ if (await exists(src)) {
59
+ await fs.mkdir(path.dirname(dest), { recursive: true });
60
+ await fs.copyFile(src, dest);
61
+ return true;
62
+ }
63
+ return false;
64
+ }
65
+ /**
66
+ * Install the Spec-Kit starter kit into a project
67
+ */
68
+ export async function installStarterKit(projectPath, options = {}) {
69
+ const result = {
70
+ success: true,
71
+ created: [],
72
+ skipped: [],
73
+ errors: [],
74
+ vsCodeConfig: "",
75
+ };
76
+ const packageRoot = getPackageRoot();
77
+ const starterKitPath = path.join(packageRoot, "starter-kit");
78
+ // 1. Install prompts to .github/prompts/
79
+ if (!options.skipPrompts) {
80
+ const promptsSrc = path.join(starterKitPath, "prompts");
81
+ const promptsDest = path.join(projectPath, GITHUB_PROMPTS_DIR);
82
+ if (await exists(promptsSrc)) {
83
+ const promptsExist = await exists(promptsDest);
84
+ if (promptsExist && !options.force) {
85
+ result.skipped.push(GITHUB_PROMPTS_DIR);
86
+ }
87
+ else {
88
+ try {
89
+ await copyDir(promptsSrc, promptsDest);
90
+ result.created.push(GITHUB_PROMPTS_DIR);
91
+ }
92
+ catch (error) {
93
+ result.errors.push(`Failed to copy prompts: ${error}`);
94
+ result.success = false;
95
+ }
96
+ }
97
+ }
98
+ else {
99
+ result.errors.push(`Prompts source not found: ${promptsSrc}`);
100
+ }
101
+ }
102
+ // 2. Install templates to .spec-kit/templates/
103
+ if (!options.skipTemplates) {
104
+ const templatesSrc = path.join(starterKitPath, "templates");
105
+ const templatesDest = path.join(projectPath, SPEC_KIT_DIR, TEMPLATES_DIR);
106
+ if (await exists(templatesSrc)) {
107
+ const templatesExist = await exists(templatesDest);
108
+ if (templatesExist && !options.force) {
109
+ result.skipped.push(`${SPEC_KIT_DIR}/${TEMPLATES_DIR}`);
110
+ }
111
+ else {
112
+ try {
113
+ await copyDir(templatesSrc, templatesDest);
114
+ result.created.push(`${SPEC_KIT_DIR}/${TEMPLATES_DIR}`);
115
+ }
116
+ catch (error) {
117
+ result.errors.push(`Failed to copy templates: ${error}`);
118
+ result.success = false;
119
+ }
120
+ }
121
+ }
122
+ else {
123
+ result.errors.push(`Templates source not found: ${templatesSrc}`);
124
+ }
125
+ }
126
+ // 3. Install memory/constitution.md to .spec-kit/memory/
127
+ if (!options.skipMemory) {
128
+ const memorySrc = path.join(starterKitPath, "memory");
129
+ const memoryDest = path.join(projectPath, SPEC_KIT_DIR, MEMORY_DIR);
130
+ if (await exists(memorySrc)) {
131
+ const memoryExists = await exists(memoryDest);
132
+ if (memoryExists && !options.force) {
133
+ result.skipped.push(`${SPEC_KIT_DIR}/${MEMORY_DIR}`);
134
+ }
135
+ else {
136
+ try {
137
+ await copyDir(memorySrc, memoryDest);
138
+ result.created.push(`${SPEC_KIT_DIR}/${MEMORY_DIR}`);
139
+ }
140
+ catch (error) {
141
+ result.errors.push(`Failed to copy memory: ${error}`);
142
+ result.success = false;
143
+ }
144
+ }
145
+ }
146
+ }
147
+ // 4. Create specs/ directory
148
+ const specsDir = path.join(projectPath, SPECS_DIR);
149
+ if (!(await exists(specsDir))) {
150
+ try {
151
+ await fs.mkdir(specsDir, { recursive: true });
152
+ // Create a .gitkeep file to preserve the directory
153
+ await fs.writeFile(path.join(specsDir, ".gitkeep"), "");
154
+ result.created.push(SPECS_DIR);
155
+ }
156
+ catch (error) {
157
+ result.errors.push(`Failed to create specs directory: ${error}`);
158
+ }
159
+ }
160
+ // 5. Generate VS Code MCP configuration
161
+ if (!options.skipVsCode) {
162
+ result.vsCodeConfig = generateVsCodeConfig();
163
+ }
164
+ return result;
165
+ }
166
+ /**
167
+ * Generate VS Code MCP configuration for settings.json
168
+ */
169
+ export function generateVsCodeConfig() {
170
+ return JSON.stringify({
171
+ "mcp": {
172
+ "servers": {
173
+ "spec-kit": {
174
+ "command": "npx",
175
+ "args": ["-y", "spec-kit-mcp"]
176
+ }
177
+ }
178
+ }
179
+ }, null, 2);
180
+ }
181
+ /**
182
+ * Generate human-readable installation report
183
+ */
184
+ export function formatInstallReport(result, projectPath) {
185
+ let report = "";
186
+ if (result.success) {
187
+ report += "# ✅ Spec-Kit Starter Kit Installed!\n\n";
188
+ }
189
+ else {
190
+ report += "# ⚠️ Spec-Kit Installation Completed with Errors\n\n";
191
+ }
192
+ if (result.created.length > 0) {
193
+ report += "## Created\n\n";
194
+ for (const item of result.created) {
195
+ report += `- 📁 \`${item}\`\n`;
196
+ }
197
+ report += "\n";
198
+ }
199
+ if (result.skipped.length > 0) {
200
+ report += "## Skipped (already exist, use --force to overwrite)\n\n";
201
+ for (const item of result.skipped) {
202
+ report += `- ⏭️ \`${item}\`\n`;
203
+ }
204
+ report += "\n";
205
+ }
206
+ if (result.errors.length > 0) {
207
+ report += "## Errors\n\n";
208
+ for (const error of result.errors) {
209
+ report += `- ❌ ${error}\n`;
210
+ }
211
+ report += "\n";
212
+ }
213
+ report += "## Project Structure\n\n";
214
+ report += "```\n";
215
+ report += `${path.basename(projectPath)}/\n`;
216
+ report += "├── .github/\n";
217
+ report += "│ └── prompts/ # Slash commands for Copilot\n";
218
+ report += "│ ├── speckit.init.md\n";
219
+ report += "│ ├── speckit.specify.md\n";
220
+ report += "│ ├── speckit.clarify.md\n";
221
+ report += "│ ├── speckit.plan.md\n";
222
+ report += "│ ├── speckit.tasks.md\n";
223
+ report += "│ └── speckit.implement.md\n";
224
+ report += "├── .spec-kit/\n";
225
+ report += "│ ├── templates/ # Specification templates\n";
226
+ report += "│ └── memory/ # Project context\n";
227
+ report += "│ └── constitution.md # Project principles\n";
228
+ report += "└── specs/ # Generated specifications\n";
229
+ report += "```\n\n";
230
+ report += "## VS Code Configuration\n\n";
231
+ report += "Add this to your `.vscode/settings.json` to enable MCP tools:\n\n";
232
+ report += "```json\n";
233
+ report += result.vsCodeConfig;
234
+ report += "\n```\n\n";
235
+ report += "## Next Steps\n\n";
236
+ report += "1. **Edit your constitution**: `.spec-kit/memory/constitution.md`\n";
237
+ report += "2. **Use slash commands** in Copilot Chat:\n";
238
+ report += " - `/speckit.specify` - Create a specification\n";
239
+ report += " - `/speckit.plan` - Create implementation plan\n";
240
+ report += " - `/speckit.tasks` - Generate task breakdown\n";
241
+ report += " - `/speckit.implement` - Start implementation\n\n";
242
+ report += "## Available Commands\n\n";
243
+ report += "| Command | Description |\n";
244
+ report += "|---------|-------------|\n";
245
+ report += "| `/speckit.init` | Initialize Spec-Kit in a project |\n";
246
+ report += "| `/speckit.specify` | Create specification from requirements |\n";
247
+ report += "| `/speckit.clarify` | Clarify ambiguous requirements |\n";
248
+ report += "| `/speckit.plan` | Create technical implementation plan |\n";
249
+ report += "| `/speckit.tasks` | Generate task breakdown |\n";
250
+ report += "| `/speckit.implement` | Execute implementation tasks |\n";
251
+ return report;
252
+ }
253
+ /**
254
+ * Check if a project already has Spec-Kit installed
255
+ */
256
+ export async function isSpecKitInstalled(projectPath) {
257
+ return {
258
+ hasPrompts: await exists(path.join(projectPath, GITHUB_PROMPTS_DIR)),
259
+ hasTemplates: await exists(path.join(projectPath, SPEC_KIT_DIR, TEMPLATES_DIR)),
260
+ hasMemory: await exists(path.join(projectPath, SPEC_KIT_DIR, MEMORY_DIR)),
261
+ hasSpecs: await exists(path.join(projectPath, SPECS_DIR)),
262
+ };
263
+ }
264
+ //# sourceMappingURL=starterKitInstaller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"starterKitInstaller.js","sourceRoot":"","sources":["../../src/utils/starterKitInstaller.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,sBAAsB;AACtB,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAC7C,MAAM,YAAY,GAAG,WAAW,CAAC;AACjC,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAC5B,MAAM,SAAS,GAAG,OAAO,CAAC;AAE1B;;GAEG;AACH,SAAS,cAAc;IACrB,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnE,yDAAyD;IACzD,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACjE,uDAAuD;IACvD,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;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CAAC;IACzD,MAAM,IAAI,oDAAoD,CAAC;IAC/D,MAAM,IAAI,qDAAqD,CAAC;IAChE,MAAM,IAAI,mDAAmD,CAAC;IAC9D,MAAM,IAAI,sDAAsD,CAAC;IAEjE,MAAM,IAAI,2BAA2B,CAAC;IACtC,MAAM,IAAI,6BAA6B,CAAC;IACxC,MAAM,IAAI,6BAA6B,CAAC;IACxC,MAAM,IAAI,0DAA0D,CAAC;IACrE,MAAM,IAAI,mEAAmE,CAAC;IAC9E,MAAM,IAAI,2DAA2D,CAAC;IACtE,MAAM,IAAI,8DAA8D,CAAC;IACzE,MAAM,IAAI,kDAAkD,CAAC;IAC7D,MAAM,IAAI,2DAA2D,CAAC;IAEtE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,WAAmB;IAM1D,OAAO;QACL,UAAU,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QACpE,YAAY,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;QAC/E,SAAS,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;QACzE,QAAQ,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;KAC1D,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-spec-kit-mcp",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "AI-driven specification platform using MCP (Model Context Protocol) for VS Code & GitHub Copilot",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "dist",
13
13
  "workflows",
14
14
  "templates",
15
- ".github/copilot/prompts",
15
+ "starter-kit",
16
16
  "README.md"
17
17
  ],
18
18
  "publishConfig": {
@@ -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