smart-spec-kit-mcp 2.0.3 → 2.0.5
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.
- package/README.md +128 -60
- package/dist/cli.js +75 -35
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/promptTools.d.ts +12 -0
- package/dist/tools/promptTools.d.ts.map +1 -0
- package/dist/tools/promptTools.js +524 -0
- package/dist/tools/promptTools.js.map +1 -0
- package/dist/utils/starterKitInstaller.d.ts +2 -1
- package/dist/utils/starterKitInstaller.d.ts.map +1 -1
- package/dist/utils/starterKitInstaller.js +51 -29
- package/dist/utils/starterKitInstaller.js.map +1 -1
- package/docs/DOCUMENTATION.md +379 -0
- package/docs/PACKAGING.md +323 -0
- package/package.json +6 -5
- package/starter-kit/copilot-instructions.md +96 -0
- package/starter-kit/prompts/clarify.md +73 -0
- package/starter-kit/prompts/implement.md +79 -0
- package/starter-kit/prompts/plan.md +69 -0
- package/starter-kit/prompts/specify.md +74 -0
- package/starter-kit/prompts/tasks.md +76 -0
- package/starter-kit/prompts/speckit.clarify.md +0 -129
- package/starter-kit/prompts/speckit.implement.md +0 -122
- package/starter-kit/prompts/speckit.init.md +0 -153
- package/starter-kit/prompts/speckit.plan.md +0 -145
- package/starter-kit/prompts/speckit.specify.md +0 -123
- package/starter-kit/prompts/speckit.tasks.md +0 -137
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt Tools for Spec-Kit
|
|
3
|
+
*
|
|
4
|
+
* MCP tools that load and execute prompt-as-code files from .spec-kit/prompts/
|
|
5
|
+
* These tools are callable via natural language in Copilot Chat.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from "node:fs/promises";
|
|
8
|
+
import * as path from "node:path";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
// Schema for prompt tool arguments
|
|
11
|
+
const SpecifyArgsSchema = z.object({
|
|
12
|
+
requirements: z.string().describe("The requirements to specify. Can be an Azure DevOps work item ID (e.g., #12345) or a feature description."),
|
|
13
|
+
contextId: z.string().optional().describe("Optional context ID for the specification (used for filename)."),
|
|
14
|
+
});
|
|
15
|
+
const PlanArgsSchema = z.object({
|
|
16
|
+
specPath: z.string().optional().describe("Path to the specification file. If not provided, will look for the most recent spec."),
|
|
17
|
+
});
|
|
18
|
+
const TasksArgsSchema = z.object({
|
|
19
|
+
planPath: z.string().optional().describe("Path to the plan file. If not provided, will look for the most recent plan."),
|
|
20
|
+
});
|
|
21
|
+
const ImplementArgsSchema = z.object({
|
|
22
|
+
taskId: z.string().optional().describe("Optional specific task ID to implement. If not provided, implements the next pending task."),
|
|
23
|
+
});
|
|
24
|
+
const ClarifyArgsSchema = z.object({
|
|
25
|
+
specPath: z.string().optional().describe("Path to the specification file to clarify."),
|
|
26
|
+
questions: z.string().optional().describe("Specific questions or areas to clarify."),
|
|
27
|
+
});
|
|
28
|
+
const HelpArgsSchema = z.object({
|
|
29
|
+
topic: z.string().optional().describe("The topic to get help on. Examples: 'workflows', 'templates', 'prompts', 'customization', 'troubleshooting'."),
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Load documentation from package
|
|
33
|
+
*/
|
|
34
|
+
async function loadDocumentation() {
|
|
35
|
+
const currentDir = path.dirname(new URL(import.meta.url).pathname);
|
|
36
|
+
const normalizedDir = currentDir.replace(/^\/([A-Za-z]:)/, "$1");
|
|
37
|
+
const packageRoot = path.resolve(normalizedDir, "..", "..");
|
|
38
|
+
const docPath = path.join(packageRoot, "docs", "DOCUMENTATION.md");
|
|
39
|
+
try {
|
|
40
|
+
return await fs.readFile(docPath, "utf-8");
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return getBuiltInDocumentation();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Built-in documentation fallback
|
|
48
|
+
*/
|
|
49
|
+
function getBuiltInDocumentation() {
|
|
50
|
+
return `# Spec-Kit Help
|
|
51
|
+
|
|
52
|
+
## Available Commands
|
|
53
|
+
|
|
54
|
+
| Command | Description |
|
|
55
|
+
|---------|-------------|
|
|
56
|
+
| \`speckit: spec\` | Create a functional specification |
|
|
57
|
+
| \`speckit: plan\` | Create an implementation plan |
|
|
58
|
+
| \`speckit: tasks\` | Generate task breakdown |
|
|
59
|
+
| \`speckit: implement\` | Implement tasks |
|
|
60
|
+
| \`speckit: clarify\` | Clarify requirements |
|
|
61
|
+
| \`speckit: help\` | Get help on Spec-Kit |
|
|
62
|
+
|
|
63
|
+
## Project Structure
|
|
64
|
+
|
|
65
|
+
\`\`\`
|
|
66
|
+
.spec-kit/
|
|
67
|
+
├── prompts/ # Prompt-as-Code files
|
|
68
|
+
├── templates/ # Document templates
|
|
69
|
+
├── memory/ # Project constitution
|
|
70
|
+
└── workflows/ # YAML workflows
|
|
71
|
+
specs/ # Generated specifications
|
|
72
|
+
\`\`\`
|
|
73
|
+
|
|
74
|
+
## Customization
|
|
75
|
+
|
|
76
|
+
### Modify Prompts
|
|
77
|
+
Edit files in \`.spec-kit/prompts/\` to change command behavior.
|
|
78
|
+
|
|
79
|
+
### Edit Templates
|
|
80
|
+
Modify \`.spec-kit/templates/\` for custom document formats.
|
|
81
|
+
|
|
82
|
+
### Create Workflows
|
|
83
|
+
Add YAML files to \`.spec-kit/workflows/\` for custom processes.
|
|
84
|
+
|
|
85
|
+
### Update Constitution
|
|
86
|
+
Edit \`.spec-kit/memory/constitution.md\` with your project principles.
|
|
87
|
+
|
|
88
|
+
## Troubleshooting
|
|
89
|
+
|
|
90
|
+
1. Reload VS Code: Ctrl+Shift+P → "Developer: Reload Window"
|
|
91
|
+
2. Check MCP config in .vscode/settings.json
|
|
92
|
+
3. Run \`npx smart-spec-kit-mcp setup\` to reinstall
|
|
93
|
+
`;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Load a prompt file from .spec-kit/prompts/
|
|
97
|
+
*/
|
|
98
|
+
async function loadPrompt(projectPath, promptName) {
|
|
99
|
+
const promptPath = path.join(projectPath, ".spec-kit", "prompts", `${promptName}.md`);
|
|
100
|
+
try {
|
|
101
|
+
const content = await fs.readFile(promptPath, "utf-8");
|
|
102
|
+
return content;
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
// Try loading from package defaults
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Load project constitution from .spec-kit/memory/constitution.md
|
|
111
|
+
*/
|
|
112
|
+
async function loadConstitution(projectPath) {
|
|
113
|
+
const constitutionPath = path.join(projectPath, ".spec-kit", "memory", "constitution.md");
|
|
114
|
+
try {
|
|
115
|
+
const content = await fs.readFile(constitutionPath, "utf-8");
|
|
116
|
+
return content;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Load a template from .spec-kit/templates/
|
|
124
|
+
*/
|
|
125
|
+
async function loadTemplate(projectPath, templateName) {
|
|
126
|
+
const templatePath = path.join(projectPath, ".spec-kit", "templates", `${templateName}.md`);
|
|
127
|
+
try {
|
|
128
|
+
const content = await fs.readFile(templatePath, "utf-8");
|
|
129
|
+
return content;
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Find the most recent file matching a pattern in specs/
|
|
137
|
+
*/
|
|
138
|
+
async function findRecentSpec(projectPath, pattern) {
|
|
139
|
+
const specsDir = path.join(projectPath, "specs");
|
|
140
|
+
try {
|
|
141
|
+
const files = await fs.readdir(specsDir);
|
|
142
|
+
const matchingFiles = files.filter(f => f.includes(pattern) && f.endsWith(".md"));
|
|
143
|
+
if (matchingFiles.length === 0)
|
|
144
|
+
return null;
|
|
145
|
+
// Sort by modification time, most recent first
|
|
146
|
+
const filesWithStats = await Promise.all(matchingFiles.map(async (file) => {
|
|
147
|
+
const filePath = path.join(specsDir, file);
|
|
148
|
+
const stats = await fs.stat(filePath);
|
|
149
|
+
return { file, mtime: stats.mtime };
|
|
150
|
+
}));
|
|
151
|
+
filesWithStats.sort((a, b) => b.mtime.getTime() - a.mtime.getTime());
|
|
152
|
+
const mostRecent = filesWithStats[0];
|
|
153
|
+
if (!mostRecent)
|
|
154
|
+
return null;
|
|
155
|
+
return path.join(specsDir, mostRecent.file);
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Check if spec-kit is properly set up in the project
|
|
163
|
+
*/
|
|
164
|
+
async function checkSetup(projectPath) {
|
|
165
|
+
const checks = [
|
|
166
|
+
{ path: path.join(projectPath, ".spec-kit", "prompts"), name: ".spec-kit/prompts" },
|
|
167
|
+
{ path: path.join(projectPath, ".spec-kit", "templates"), name: ".spec-kit/templates" },
|
|
168
|
+
{ path: path.join(projectPath, ".spec-kit", "memory", "constitution.md"), name: ".spec-kit/memory/constitution.md" },
|
|
169
|
+
];
|
|
170
|
+
const missing = [];
|
|
171
|
+
for (const check of checks) {
|
|
172
|
+
try {
|
|
173
|
+
await fs.access(check.path);
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
missing.push(check.name);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return { ok: missing.length === 0, missing };
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Build the full context for a prompt execution
|
|
183
|
+
*/
|
|
184
|
+
async function buildPromptContext(projectPath, promptName, userInput, additionalContext) {
|
|
185
|
+
const parts = [];
|
|
186
|
+
// 1. Load the prompt instructions
|
|
187
|
+
const prompt = await loadPrompt(projectPath, promptName);
|
|
188
|
+
if (prompt) {
|
|
189
|
+
parts.push("## Prompt Instructions\n\n" + prompt);
|
|
190
|
+
}
|
|
191
|
+
// 2. Load project constitution
|
|
192
|
+
const constitution = await loadConstitution(projectPath);
|
|
193
|
+
if (constitution) {
|
|
194
|
+
parts.push("## Project Constitution\n\n" + constitution);
|
|
195
|
+
}
|
|
196
|
+
// 3. Add user input
|
|
197
|
+
parts.push("## User Input\n\n" + userInput);
|
|
198
|
+
// 4. Add additional context if provided
|
|
199
|
+
if (additionalContext) {
|
|
200
|
+
for (const [key, value] of Object.entries(additionalContext)) {
|
|
201
|
+
parts.push(`## ${key}\n\n${value}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return parts.join("\n\n---\n\n");
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Register prompt tools with the MCP server
|
|
208
|
+
*/
|
|
209
|
+
export function registerPromptTools(server) {
|
|
210
|
+
// speckit_specify - Create a functional specification
|
|
211
|
+
server.tool("speckit_specify", "Create a functional specification from requirements or an Azure DevOps work item. Use this when the user wants to create a spec, document requirements, or says 'speckit: spec', 'speckit: specify', or 'créer une spec'.", SpecifyArgsSchema.shape, async ({ requirements, contextId }) => {
|
|
212
|
+
const projectPath = process.cwd();
|
|
213
|
+
// Check setup
|
|
214
|
+
const setup = await checkSetup(projectPath);
|
|
215
|
+
if (!setup.ok) {
|
|
216
|
+
return {
|
|
217
|
+
content: [{
|
|
218
|
+
type: "text",
|
|
219
|
+
text: `## ⚠️ Spec-Kit Setup Required\n\nMissing: ${setup.missing.join(", ")}\n\nRun \`npx smart-spec-kit-mcp setup\` to initialize Spec-Kit in this project.`,
|
|
220
|
+
}],
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
// Load template
|
|
224
|
+
const template = await loadTemplate(projectPath, "functional-spec");
|
|
225
|
+
// Build context
|
|
226
|
+
const context = await buildPromptContext(projectPath, "specify", requirements, {
|
|
227
|
+
"Template": template || "No template found",
|
|
228
|
+
"Context ID": contextId || "auto-generated",
|
|
229
|
+
});
|
|
230
|
+
return {
|
|
231
|
+
content: [{
|
|
232
|
+
type: "text",
|
|
233
|
+
text: `## 📋 Specification Creation
|
|
234
|
+
|
|
235
|
+
**Requirements:** ${requirements}
|
|
236
|
+
${contextId ? `**Context ID:** ${contextId}` : ""}
|
|
237
|
+
|
|
238
|
+
${context}
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Copilot Instructions
|
|
243
|
+
|
|
244
|
+
Based on the prompt instructions and project constitution above:
|
|
245
|
+
1. Analyze the provided requirements
|
|
246
|
+
2. Fill in the functional specification template
|
|
247
|
+
3. Save the specification to \`specs/${contextId || "feature"}-spec.md\`
|
|
248
|
+
4. Report what was created and suggest next steps (speckit_plan)`,
|
|
249
|
+
}],
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
// speckit_plan - Create an implementation plan
|
|
253
|
+
server.tool("speckit_plan", "Create a technical implementation plan from a specification. Use this when the user wants to plan implementation, or says 'speckit: plan', 'planifier', or 'créer un plan'.", PlanArgsSchema.shape, async ({ specPath }) => {
|
|
254
|
+
const projectPath = process.cwd();
|
|
255
|
+
// Check setup
|
|
256
|
+
const setup = await checkSetup(projectPath);
|
|
257
|
+
if (!setup.ok) {
|
|
258
|
+
return {
|
|
259
|
+
content: [{
|
|
260
|
+
type: "text",
|
|
261
|
+
text: `## ⚠️ Spec-Kit Setup Required\n\nMissing: ${setup.missing.join(", ")}\n\nRun \`npx smart-spec-kit-mcp setup\` to initialize Spec-Kit in this project.`,
|
|
262
|
+
}],
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
// Find specification
|
|
266
|
+
let specContent = "";
|
|
267
|
+
const resolvedSpecPath = specPath || await findRecentSpec(projectPath, "spec");
|
|
268
|
+
if (resolvedSpecPath) {
|
|
269
|
+
try {
|
|
270
|
+
specContent = await fs.readFile(resolvedSpecPath, "utf-8");
|
|
271
|
+
}
|
|
272
|
+
catch {
|
|
273
|
+
specContent = "Could not load specification file.";
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
// Load template
|
|
277
|
+
const template = await loadTemplate(projectPath, "plan-template");
|
|
278
|
+
// Build context
|
|
279
|
+
const context = await buildPromptContext(projectPath, "plan", specContent, {
|
|
280
|
+
"Specification Path": resolvedSpecPath || "Not found",
|
|
281
|
+
"Template": template || "No template found",
|
|
282
|
+
});
|
|
283
|
+
return {
|
|
284
|
+
content: [{
|
|
285
|
+
type: "text",
|
|
286
|
+
text: `## 📐 Implementation Plan Creation
|
|
287
|
+
|
|
288
|
+
${resolvedSpecPath ? `**Specification:** ${resolvedSpecPath}` : "**Warning:** No specification found. Please run speckit_specify first."}
|
|
289
|
+
|
|
290
|
+
${context}
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Copilot Instructions
|
|
295
|
+
|
|
296
|
+
Based on the prompt instructions, specification, and project constitution:
|
|
297
|
+
1. Analyze the specification
|
|
298
|
+
2. Create a technical implementation plan
|
|
299
|
+
3. Break down into phases and milestones
|
|
300
|
+
4. Save to \`specs/plan.md\`
|
|
301
|
+
5. Suggest next step (speckit_tasks)`,
|
|
302
|
+
}],
|
|
303
|
+
};
|
|
304
|
+
});
|
|
305
|
+
// speckit_tasks - Generate task breakdown
|
|
306
|
+
server.tool("speckit_tasks", "Generate a detailed task breakdown from a plan. Use this when the user wants to create tasks, or says 'speckit: tasks', 'générer les tâches', or 'créer les tâches'.", TasksArgsSchema.shape, async ({ planPath }) => {
|
|
307
|
+
const projectPath = process.cwd();
|
|
308
|
+
// Check setup
|
|
309
|
+
const setup = await checkSetup(projectPath);
|
|
310
|
+
if (!setup.ok) {
|
|
311
|
+
return {
|
|
312
|
+
content: [{
|
|
313
|
+
type: "text",
|
|
314
|
+
text: `## ⚠️ Spec-Kit Setup Required\n\nMissing: ${setup.missing.join(", ")}\n\nRun \`npx smart-spec-kit-mcp setup\` to initialize Spec-Kit in this project.`,
|
|
315
|
+
}],
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
// Find plan
|
|
319
|
+
let planContent = "";
|
|
320
|
+
const resolvedPlanPath = planPath || await findRecentSpec(projectPath, "plan");
|
|
321
|
+
if (resolvedPlanPath) {
|
|
322
|
+
try {
|
|
323
|
+
planContent = await fs.readFile(resolvedPlanPath, "utf-8");
|
|
324
|
+
}
|
|
325
|
+
catch {
|
|
326
|
+
planContent = "Could not load plan file.";
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
// Load template
|
|
330
|
+
const template = await loadTemplate(projectPath, "tasks-template");
|
|
331
|
+
// Build context
|
|
332
|
+
const context = await buildPromptContext(projectPath, "tasks", planContent, {
|
|
333
|
+
"Plan Path": resolvedPlanPath || "Not found",
|
|
334
|
+
"Template": template || "No template found",
|
|
335
|
+
});
|
|
336
|
+
return {
|
|
337
|
+
content: [{
|
|
338
|
+
type: "text",
|
|
339
|
+
text: `## 📝 Task Breakdown Creation
|
|
340
|
+
|
|
341
|
+
${resolvedPlanPath ? `**Plan:** ${resolvedPlanPath}` : "**Warning:** No plan found. Please run speckit_plan first."}
|
|
342
|
+
|
|
343
|
+
${context}
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Copilot Instructions
|
|
348
|
+
|
|
349
|
+
Based on the prompt instructions, plan, and project constitution:
|
|
350
|
+
1. Analyze the implementation plan
|
|
351
|
+
2. Create atomic, actionable tasks
|
|
352
|
+
3. Add acceptance criteria to each task
|
|
353
|
+
4. Save to \`specs/tasks.md\`
|
|
354
|
+
5. Suggest next step (speckit_implement)`,
|
|
355
|
+
}],
|
|
356
|
+
};
|
|
357
|
+
});
|
|
358
|
+
// speckit_implement - Start implementation
|
|
359
|
+
server.tool("speckit_implement", "Implement tasks from the task breakdown. Use this when the user wants to start coding, or says 'speckit: implement', 'implémenter', or 'coder'.", ImplementArgsSchema.shape, async ({ taskId }) => {
|
|
360
|
+
const projectPath = process.cwd();
|
|
361
|
+
// Check setup
|
|
362
|
+
const setup = await checkSetup(projectPath);
|
|
363
|
+
if (!setup.ok) {
|
|
364
|
+
return {
|
|
365
|
+
content: [{
|
|
366
|
+
type: "text",
|
|
367
|
+
text: `## ⚠️ Spec-Kit Setup Required\n\nMissing: ${setup.missing.join(", ")}\n\nRun \`npx smart-spec-kit-mcp setup\` to initialize Spec-Kit in this project.`,
|
|
368
|
+
}],
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
// Find tasks
|
|
372
|
+
const tasksPath = await findRecentSpec(projectPath, "tasks");
|
|
373
|
+
let tasksContent = "";
|
|
374
|
+
if (tasksPath) {
|
|
375
|
+
try {
|
|
376
|
+
tasksContent = await fs.readFile(tasksPath, "utf-8");
|
|
377
|
+
}
|
|
378
|
+
catch {
|
|
379
|
+
tasksContent = "Could not load tasks file.";
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
// Find spec for context
|
|
383
|
+
const specPath = await findRecentSpec(projectPath, "spec");
|
|
384
|
+
let specContent = "";
|
|
385
|
+
if (specPath) {
|
|
386
|
+
try {
|
|
387
|
+
specContent = await fs.readFile(specPath, "utf-8");
|
|
388
|
+
}
|
|
389
|
+
catch {
|
|
390
|
+
specContent = "";
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
// Build context
|
|
394
|
+
const context = await buildPromptContext(projectPath, "implement", tasksContent, {
|
|
395
|
+
"Task ID": taskId || "Next pending task",
|
|
396
|
+
"Specification": specContent || "Not loaded",
|
|
397
|
+
});
|
|
398
|
+
return {
|
|
399
|
+
content: [{
|
|
400
|
+
type: "text",
|
|
401
|
+
text: `## 🚀 Implementation
|
|
402
|
+
|
|
403
|
+
${tasksPath ? `**Tasks:** ${tasksPath}` : "**Warning:** No tasks found. Please run speckit_tasks first."}
|
|
404
|
+
${taskId ? `**Target Task:** ${taskId}` : "**Target:** Next pending task"}
|
|
405
|
+
|
|
406
|
+
${context}
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Copilot Instructions
|
|
411
|
+
|
|
412
|
+
Based on the prompt instructions, tasks, specification, and project constitution:
|
|
413
|
+
1. Find the ${taskId ? `task ${taskId}` : "next pending task"}
|
|
414
|
+
2. Implement the code following project conventions
|
|
415
|
+
3. Mark the task as completed in tasks.md
|
|
416
|
+
4. Report what was implemented
|
|
417
|
+
5. Ask if user wants to continue with next task`,
|
|
418
|
+
}],
|
|
419
|
+
};
|
|
420
|
+
});
|
|
421
|
+
// speckit_clarify - Clarify requirements
|
|
422
|
+
server.tool("speckit_clarify", "Clarify ambiguous requirements in a specification. Use this when the user wants to clarify, or says 'speckit: clarify', 'clarifier', or 'préciser'.", ClarifyArgsSchema.shape, async ({ specPath, questions }) => {
|
|
423
|
+
const projectPath = process.cwd();
|
|
424
|
+
// Check setup
|
|
425
|
+
const setup = await checkSetup(projectPath);
|
|
426
|
+
if (!setup.ok) {
|
|
427
|
+
return {
|
|
428
|
+
content: [{
|
|
429
|
+
type: "text",
|
|
430
|
+
text: `## ⚠️ Spec-Kit Setup Required\n\nMissing: ${setup.missing.join(", ")}\n\nRun \`npx smart-spec-kit-mcp setup\` to initialize Spec-Kit in this project.`,
|
|
431
|
+
}],
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
// Find specification
|
|
435
|
+
let specContent = "";
|
|
436
|
+
const resolvedSpecPath = specPath || await findRecentSpec(projectPath, "spec");
|
|
437
|
+
if (resolvedSpecPath) {
|
|
438
|
+
try {
|
|
439
|
+
specContent = await fs.readFile(resolvedSpecPath, "utf-8");
|
|
440
|
+
}
|
|
441
|
+
catch {
|
|
442
|
+
specContent = "Could not load specification file.";
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
// Build context
|
|
446
|
+
const context = await buildPromptContext(projectPath, "clarify", specContent, {
|
|
447
|
+
"Questions": questions || "Find all [NEEDS CLARIFICATION] markers",
|
|
448
|
+
});
|
|
449
|
+
return {
|
|
450
|
+
content: [{
|
|
451
|
+
type: "text",
|
|
452
|
+
text: `## 🔍 Requirements Clarification
|
|
453
|
+
|
|
454
|
+
${resolvedSpecPath ? `**Specification:** ${resolvedSpecPath}` : "**Warning:** No specification found."}
|
|
455
|
+
|
|
456
|
+
${context}
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## Copilot Instructions
|
|
461
|
+
|
|
462
|
+
Based on the prompt instructions and specification:
|
|
463
|
+
1. Find all [NEEDS CLARIFICATION] markers
|
|
464
|
+
2. Ask targeted questions for each ambiguity
|
|
465
|
+
3. Update the specification with clarified requirements
|
|
466
|
+
4. Save the updated spec
|
|
467
|
+
5. Suggest next step if all clarifications resolved`,
|
|
468
|
+
}],
|
|
469
|
+
};
|
|
470
|
+
});
|
|
471
|
+
// speckit_help - Get help and documentation
|
|
472
|
+
server.tool("speckit_help", "Get help on how to use Spec-Kit, customize it, create workflows, or troubleshoot issues. Use this when the user asks 'speckit: help', 'aide sur speckit', or has questions about Spec-Kit.", HelpArgsSchema.shape, async ({ topic }) => {
|
|
473
|
+
const documentation = await loadDocumentation();
|
|
474
|
+
// Extract relevant section if topic is provided
|
|
475
|
+
let relevantDoc = documentation;
|
|
476
|
+
if (topic) {
|
|
477
|
+
const topicLower = topic.toLowerCase();
|
|
478
|
+
const sections = documentation.split(/^## /gm);
|
|
479
|
+
const relevantSections = sections.filter(section => {
|
|
480
|
+
const sectionLower = section.toLowerCase();
|
|
481
|
+
return sectionLower.includes(topicLower) ||
|
|
482
|
+
(topicLower.includes("workflow") && sectionLower.includes("workflow")) ||
|
|
483
|
+
(topicLower.includes("template") && sectionLower.includes("template")) ||
|
|
484
|
+
(topicLower.includes("prompt") && sectionLower.includes("prompt")) ||
|
|
485
|
+
(topicLower.includes("custom") && sectionLower.includes("custom")) ||
|
|
486
|
+
(topicLower.includes("trouble") && sectionLower.includes("trouble")) ||
|
|
487
|
+
(topicLower.includes("agent") && sectionLower.includes("agent")) ||
|
|
488
|
+
(topicLower.includes("command") && sectionLower.includes("command")) ||
|
|
489
|
+
(topicLower.includes("tool") && sectionLower.includes("tool"));
|
|
490
|
+
});
|
|
491
|
+
if (relevantSections.length > 0) {
|
|
492
|
+
relevantDoc = relevantSections.map(s => "## " + s).join("\n");
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return {
|
|
496
|
+
content: [{
|
|
497
|
+
type: "text",
|
|
498
|
+
text: `## ❓ Spec-Kit Help
|
|
499
|
+
|
|
500
|
+
${topic ? `**Topic:** ${topic}` : "**General Help**"}
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
${relevantDoc}
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## Need More Help?
|
|
509
|
+
|
|
510
|
+
- **Commands**: \`speckit: help commands\`
|
|
511
|
+
- **Customization**: \`speckit: help customization\`
|
|
512
|
+
- **Workflows**: \`speckit: help workflows\`
|
|
513
|
+
- **Templates**: \`speckit: help templates\`
|
|
514
|
+
- **Troubleshooting**: \`speckit: help troubleshooting\`
|
|
515
|
+
|
|
516
|
+
You can also ask specific questions like:
|
|
517
|
+
- "speckit: help comment créer un nouveau workflow ?"
|
|
518
|
+
- "speckit: help how to customize templates?"
|
|
519
|
+
- "speckit: help quels agents sont disponibles ?"`,
|
|
520
|
+
}],
|
|
521
|
+
};
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
//# sourceMappingURL=promptTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptTools.js","sourceRoot":"","sources":["../../src/tools/promptTools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,mCAAmC;AACnC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2GAA2G,CAAC;IAC9I,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CA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AAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBAClE,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACpE,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAChE,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACpE,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YACnE,CAAC,CAAC,CAAC;YAEH,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChC,WAAW,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE;;EAEd,KAAK,CAAC,CAAC,CAAC,cAAc,KAAK,EAAE,CAAC,CAAC,CAAC,kBAAkB;;;;EAIlD,WAAW;;;;;;;;;;;;;;;kDAeqC;iBACzC,CAAC;SACH,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Starter Kit Installer
|
|
3
3
|
*
|
|
4
4
|
* Handles the installation of Spec-Kit starter kit into user projects.
|
|
5
|
-
* Copies prompts to .
|
|
5
|
+
* Copies prompts to .spec-kit/prompts/ and copilot-instructions.md to .github/
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* Installation result
|
|
@@ -37,6 +37,7 @@ export declare function formatInstallReport(result: InstallResult, projectPath:
|
|
|
37
37
|
*/
|
|
38
38
|
export declare function isSpecKitInstalled(projectPath: string): Promise<{
|
|
39
39
|
hasPrompts: boolean;
|
|
40
|
+
hasInstructions: boolean;
|
|
40
41
|
hasTemplates: boolean;
|
|
41
42
|
hasMemory: boolean;
|
|
42
43
|
hasSpecs: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"starterKitInstaller.d.ts","sourceRoot":"","sources":["../../src/utils/starterKitInstaller.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"starterKitInstaller.d.ts","sourceRoot":"","sources":["../../src/utils/starterKitInstaller.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,GACL,OAAO,CAAC,aAAa,CAAC,CA0HxB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CA2EtF;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IACrE,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC,CAQD"}
|