smart-spec-kit-mcp 2.0.0

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 (51) hide show
  1. package/README.md +262 -0
  2. package/dist/engine/sessionManager.d.ts +137 -0
  3. package/dist/engine/sessionManager.d.ts.map +1 -0
  4. package/dist/engine/sessionManager.js +128 -0
  5. package/dist/engine/sessionManager.js.map +1 -0
  6. package/dist/engine/workflowEngine.d.ts +57 -0
  7. package/dist/engine/workflowEngine.d.ts.map +1 -0
  8. package/dist/engine/workflowEngine.js +400 -0
  9. package/dist/engine/workflowEngine.js.map +1 -0
  10. package/dist/index.d.ts +14 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +122 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/prompts/agents.d.ts +61 -0
  15. package/dist/prompts/agents.d.ts.map +1 -0
  16. package/dist/prompts/agents.js +236 -0
  17. package/dist/prompts/agents.js.map +1 -0
  18. package/dist/schemas/workflowSchema.d.ts +70 -0
  19. package/dist/schemas/workflowSchema.d.ts.map +1 -0
  20. package/dist/schemas/workflowSchema.js +42 -0
  21. package/dist/schemas/workflowSchema.js.map +1 -0
  22. package/dist/tools/agentTools.d.ts +11 -0
  23. package/dist/tools/agentTools.d.ts.map +1 -0
  24. package/dist/tools/agentTools.js +119 -0
  25. package/dist/tools/agentTools.js.map +1 -0
  26. package/dist/tools/orchestrationTools.d.ts +12 -0
  27. package/dist/tools/orchestrationTools.d.ts.map +1 -0
  28. package/dist/tools/orchestrationTools.js +375 -0
  29. package/dist/tools/orchestrationTools.js.map +1 -0
  30. package/dist/tools/workflowTools.d.ts +11 -0
  31. package/dist/tools/workflowTools.d.ts.map +1 -0
  32. package/dist/tools/workflowTools.js +236 -0
  33. package/dist/tools/workflowTools.js.map +1 -0
  34. package/dist/utils/markdownGenerator.d.ts +70 -0
  35. package/dist/utils/markdownGenerator.d.ts.map +1 -0
  36. package/dist/utils/markdownGenerator.js +206 -0
  37. package/dist/utils/markdownGenerator.js.map +1 -0
  38. package/dist/utils/vsCodeConfigGenerator.d.ts +32 -0
  39. package/dist/utils/vsCodeConfigGenerator.d.ts.map +1 -0
  40. package/dist/utils/vsCodeConfigGenerator.js +88 -0
  41. package/dist/utils/vsCodeConfigGenerator.js.map +1 -0
  42. package/dist/utils/workflowLoader.d.ts +99 -0
  43. package/dist/utils/workflowLoader.d.ts.map +1 -0
  44. package/dist/utils/workflowLoader.js +281 -0
  45. package/dist/utils/workflowLoader.js.map +1 -0
  46. package/package.json +61 -0
  47. package/templates/bugfix-report.md +184 -0
  48. package/templates/functional-spec.md +191 -0
  49. package/workflows/bugfix.yaml +99 -0
  50. package/workflows/feature-full.yaml +344 -0
  51. package/workflows/feature-standard.yaml +92 -0
@@ -0,0 +1,281 @@
1
+ /**
2
+ * Workflow Loader v2
3
+ *
4
+ * Loads workflows and templates with local override support.
5
+ *
6
+ * Resolution order:
7
+ * 1. Local project: .spec-kit/workflows/ and .spec-kit/templates/
8
+ * 2. Package defaults: /workflows and /templates
9
+ *
10
+ * This allows any project to customize workflows while using defaults.
11
+ */
12
+ import * as fs from "node:fs/promises";
13
+ import * as path from "node:path";
14
+ import yaml from "js-yaml";
15
+ import { WorkflowSchema } from "../schemas/workflowSchema.js";
16
+ // Directory names
17
+ const WORKFLOWS_DIR = "workflows";
18
+ const TEMPLATES_DIR = "templates";
19
+ const LOCAL_CONFIG_DIR = ".spec-kit";
20
+ /**
21
+ * Get the package root directory (where the npm package is installed)
22
+ */
23
+ function getPackageRoot() {
24
+ const currentDir = path.dirname(new URL(import.meta.url).pathname);
25
+ // Handle Windows paths (remove leading slash if present)
26
+ const normalizedDir = currentDir.replace(/^\/([A-Za-z]:)/, "$1");
27
+ // Go up from dist/utils/ or src/utils/ to package root
28
+ return path.resolve(normalizedDir, "..", "..");
29
+ }
30
+ /**
31
+ * Get the current working directory (user's project)
32
+ */
33
+ function getProjectRoot() {
34
+ return process.cwd();
35
+ }
36
+ /**
37
+ * Check if a file exists
38
+ */
39
+ async function fileExists(filePath) {
40
+ try {
41
+ await fs.access(filePath);
42
+ return true;
43
+ }
44
+ catch {
45
+ return false;
46
+ }
47
+ }
48
+ /**
49
+ * Get all search paths for assets (local first, then package defaults)
50
+ */
51
+ function getSearchPaths(assetType) {
52
+ const projectRoot = getProjectRoot();
53
+ const packageRoot = getPackageRoot();
54
+ const dir = assetType === "workflows" ? WORKFLOWS_DIR : TEMPLATES_DIR;
55
+ return [
56
+ // 1. Local project override: .spec-kit/workflows/ or .spec-kit/templates/
57
+ path.join(projectRoot, LOCAL_CONFIG_DIR, dir),
58
+ // 2. Local project root: workflows/ or templates/ (for dedicated spec projects)
59
+ path.join(projectRoot, dir),
60
+ // 3. Package defaults
61
+ path.join(packageRoot, dir),
62
+ ];
63
+ }
64
+ /**
65
+ * Find a file in search paths
66
+ */
67
+ async function findFile(assetType, fileName) {
68
+ const searchPaths = getSearchPaths(assetType);
69
+ for (const basePath of searchPaths) {
70
+ const filePath = path.join(basePath, fileName);
71
+ if (await fileExists(filePath)) {
72
+ return filePath;
73
+ }
74
+ }
75
+ return null;
76
+ }
77
+ /**
78
+ * List files from all search paths (local overrides + package defaults)
79
+ */
80
+ async function listFilesFromPaths(assetType, extension) {
81
+ const searchPaths = getSearchPaths(assetType);
82
+ const seen = new Set();
83
+ const results = [];
84
+ for (let i = 0; i < searchPaths.length; i++) {
85
+ const basePath = searchPaths[i];
86
+ const isLocal = i < 2; // First two paths are local
87
+ try {
88
+ const files = await fs.readdir(basePath);
89
+ for (const file of files) {
90
+ const isYaml = file.endsWith(extension) || file.endsWith(".yml");
91
+ if (isYaml) {
92
+ const name = path.basename(file, path.extname(file));
93
+ const alreadySeen = seen.has(name);
94
+ if (!alreadySeen) {
95
+ seen.add(name);
96
+ results.push({
97
+ name,
98
+ path: path.join(basePath, file),
99
+ source: isLocal ? "local" : "package",
100
+ });
101
+ }
102
+ }
103
+ }
104
+ }
105
+ catch {
106
+ // Directory doesn't exist, continue
107
+ }
108
+ }
109
+ return results;
110
+ }
111
+ /**
112
+ * List all available workflows (local + package defaults)
113
+ */
114
+ export async function listWorkflows() {
115
+ const workflows = await listFilesFromPaths("workflows", ".yaml");
116
+ return workflows.map((w) => w.name);
117
+ }
118
+ /**
119
+ * List workflows with source information
120
+ */
121
+ export async function listWorkflowsDetailed() {
122
+ return listFilesFromPaths("workflows", ".yaml");
123
+ }
124
+ /**
125
+ * Load and validate a workflow by name
126
+ */
127
+ export async function loadWorkflow(workflowName) {
128
+ // Try both .yaml and .yml extensions
129
+ let filePath = await findFile("workflows", `${workflowName}.yaml`);
130
+ if (!filePath) {
131
+ filePath = await findFile("workflows", `${workflowName}.yml`);
132
+ }
133
+ if (!filePath) {
134
+ const available = await listWorkflows();
135
+ throw new Error(`Workflow "${workflowName}" not found.\nAvailable workflows: ${available.join(", ") || "none"}\n\nTip: Create custom workflows in .spec-kit/workflows/`);
136
+ }
137
+ // Read and parse YAML
138
+ const content = await fs.readFile(filePath, "utf-8");
139
+ const rawData = yaml.load(content);
140
+ // Validate with Zod
141
+ const result = WorkflowSchema.safeParse(rawData);
142
+ if (!result.success) {
143
+ const errors = result.error.issues
144
+ .map((e) => ` - ${String(e.path.join("."))}: ${e.message}`)
145
+ .join("\n");
146
+ throw new Error(`Invalid workflow "${workflowName}":\n${errors}`);
147
+ }
148
+ return result.data;
149
+ }
150
+ /**
151
+ * Load a template file by name
152
+ */
153
+ export async function loadTemplate(templateName) {
154
+ // Add .md extension if not present
155
+ const fileName = templateName.endsWith(".md") ? templateName : `${templateName}.md`;
156
+ const filePath = await findFile("templates", fileName);
157
+ if (!filePath) {
158
+ throw new Error(`Template "${templateName}" not found.\n\nTip: Create custom templates in .spec-kit/templates/`);
159
+ }
160
+ return await fs.readFile(filePath, "utf-8");
161
+ }
162
+ /**
163
+ * List all available templates (local + package defaults)
164
+ */
165
+ export async function listTemplates() {
166
+ const templates = await listFilesFromPaths("templates", ".md");
167
+ return templates.map((t) => t.name);
168
+ }
169
+ /**
170
+ * Load a workflow with its associated template
171
+ */
172
+ export async function loadWorkflowWithTemplate(workflowName) {
173
+ const workflow = await loadWorkflow(workflowName);
174
+ const template = await loadTemplate(workflow.template);
175
+ return { workflow, template };
176
+ }
177
+ /**
178
+ * Get workflow step by ID
179
+ */
180
+ export function getWorkflowStep(workflow, stepId) {
181
+ return workflow.steps.find((step) => step.id === stepId);
182
+ }
183
+ /**
184
+ * Get the first step of a workflow
185
+ */
186
+ export function getFirstStep(workflow) {
187
+ return workflow.steps[0];
188
+ }
189
+ /**
190
+ * Get the next step in a workflow
191
+ */
192
+ export function getNextStep(workflow, currentStepId) {
193
+ const currentIndex = workflow.steps.findIndex((step) => step.id === currentStepId);
194
+ if (currentIndex === -1 || currentIndex === workflow.steps.length - 1) {
195
+ return null;
196
+ }
197
+ const currentStep = workflow.steps[currentIndex];
198
+ // Check if there's an explicit next step
199
+ if (currentStep?.next) {
200
+ return getWorkflowStep(workflow, currentStep.next);
201
+ }
202
+ // Otherwise return sequential next
203
+ return workflow.steps[currentIndex + 1];
204
+ }
205
+ /**
206
+ * Initialize local spec-kit directory with example files
207
+ */
208
+ export async function initLocalConfig() {
209
+ const projectRoot = getProjectRoot();
210
+ const localDir = path.join(projectRoot, LOCAL_CONFIG_DIR);
211
+ const workflowsDir = path.join(localDir, WORKFLOWS_DIR);
212
+ const templatesDir = path.join(localDir, TEMPLATES_DIR);
213
+ // Create directories
214
+ await fs.mkdir(workflowsDir, { recursive: true });
215
+ await fs.mkdir(templatesDir, { recursive: true });
216
+ // Create example workflow
217
+ const exampleWorkflow = `# Custom Workflow Example
218
+ # This file overrides or extends the default spec-kit workflows.
219
+ # See https://github.com/your-org/spec-kit-mcp for documentation.
220
+
221
+ name: custom-feature
222
+ displayName: "Custom Feature Workflow"
223
+ description: "Your custom workflow for this project"
224
+ template: custom-spec.md
225
+ defaultAgent: SpecAgent
226
+
227
+ steps:
228
+ - id: fetch-requirements
229
+ name: "Fetch Requirements"
230
+ action: fetch_ado
231
+ description: "Retrieve work item from Azure DevOps"
232
+ outputs:
233
+ - workitem
234
+
235
+ - id: generate-spec
236
+ name: "Generate Specification"
237
+ action: call_agent
238
+ agent: SpecAgent
239
+ description: "Generate specification document"
240
+ inputs:
241
+ source: workitem
242
+ `;
243
+ const exampleTemplate = `# {{title}}
244
+
245
+ ## Context
246
+ - **Work Item**: {{contextId}}
247
+ - **Date**: {{date}}
248
+
249
+ ## Description
250
+ {{description}}
251
+
252
+ ## Requirements
253
+ <!-- Generated requirements go here -->
254
+
255
+ ## Technical Notes
256
+ <!-- Add your stack-specific notes -->
257
+ `;
258
+ const workflowPath = path.join(workflowsDir, "custom-feature.yaml");
259
+ const templatePath = path.join(templatesDir, "custom-spec.md");
260
+ // Only create if they don't exist
261
+ if (!(await fileExists(workflowPath))) {
262
+ await fs.writeFile(workflowPath, exampleWorkflow, "utf-8");
263
+ }
264
+ if (!(await fileExists(templatePath))) {
265
+ await fs.writeFile(templatePath, exampleTemplate, "utf-8");
266
+ }
267
+ }
268
+ /**
269
+ * Get configuration info for debugging
270
+ */
271
+ export function getConfigInfo() {
272
+ return {
273
+ packageRoot: getPackageRoot(),
274
+ projectRoot: getProjectRoot(),
275
+ searchPaths: {
276
+ workflows: getSearchPaths("workflows"),
277
+ templates: getSearchPaths("templates"),
278
+ },
279
+ };
280
+ }
281
+ //# sourceMappingURL=workflowLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowLoader.js","sourceRoot":"","sources":["../../src/utils/workflowLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAiB,MAAM,8BAA8B,CAAC;AAK7E,kBAAkB;AAClB,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,MAAM,aAAa,GAA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AU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;QACtC,MAAM,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAK3B,OAAO;QACL,WAAW,EAAE,cAAc,EAAE;QAC7B,WAAW,EAAE,cAAc,EAAE;QAC7B,WAAW,EAAE;YACX,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC;YACtC,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC;SACvC;KACF,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "smart-spec-kit-mcp",
3
+ "version": "2.0.0",
4
+ "description": "AI-driven specification platform using MCP (Model Context Protocol) for VS Code & GitHub Copilot",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "spec-kit-mcp": "./dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "workflows",
13
+ "templates",
14
+ "README.md"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "build": "tsc && npm run copy-assets",
21
+ "copy-assets": "node scripts/copy-assets.js",
22
+ "dev": "tsx watch src/index.ts",
23
+ "start": "node dist/index.js",
24
+ "setup": "tsx src/utils/vsCodeConfigGenerator.ts",
25
+ "test": "tsx src/index.ts",
26
+ "prepublishOnly": "npm run build"
27
+ },
28
+ "keywords": [
29
+ "mcp",
30
+ "model-context-protocol",
31
+ "copilot",
32
+ "github-copilot",
33
+ "azure-devops",
34
+ "specifications",
35
+ "documentation",
36
+ "ai",
37
+ "workflow",
38
+ "automation"
39
+ ],
40
+ "author": "",
41
+ "license": "MIT",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/your-org/spec-kit-mcp.git"
45
+ },
46
+ "homepage": "https://github.com/your-org/spec-kit-mcp#readme",
47
+ "engines": {
48
+ "node": ">=18.0.0"
49
+ },
50
+ "dependencies": {
51
+ "@modelcontextprotocol/sdk": "^1.25.3",
52
+ "js-yaml": "^4.1.1",
53
+ "zod": "^4.3.6"
54
+ },
55
+ "devDependencies": {
56
+ "@types/js-yaml": "^4.0.9",
57
+ "@types/node": "^25.1.0",
58
+ "tsx": "^4.21.0",
59
+ "typescript": "^5.9.3"
60
+ }
61
+ }
@@ -0,0 +1,184 @@
1
+ ---
2
+ title: "[TO FILL: Bug Title]"
3
+ workitem_id: "[TO FILL]"
4
+ type: Bug Fix Report
5
+ version: "1.0"
6
+ status: Draft
7
+ author: "[TO FILL]"
8
+ created: "[TO FILL: Date]"
9
+ severity: "[TO FILL: Critical/High/Medium/Low]"
10
+ azure_devops_link: "[TO FILL: Link to ADO Bug]"
11
+ ---
12
+
13
+ # Bug Fix Report: [TO FILL: Bug Title]
14
+
15
+ ## 1. Bug Summary
16
+
17
+ | Field | Value |
18
+ |-------|-------|
19
+ | **Bug ID** | [TO FILL] |
20
+ | **Severity** | [TO FILL: Critical/High/Medium/Low] |
21
+ | **Priority** | [TO FILL: P1/P2/P3/P4] |
22
+ | **Reported By** | [TO FILL] |
23
+ | **Reported Date** | [TO FILL] |
24
+ | **Environment** | [TO FILL: Production/Staging/Dev] |
25
+ | **Affected Version** | [TO FILL] |
26
+
27
+ ---
28
+
29
+ ## 2. Problem Description
30
+
31
+ ### 2.1 Expected Behavior
32
+
33
+ [TO FILL: What should happen]
34
+
35
+ ### 2.2 Actual Behavior
36
+
37
+ [TO FILL: What actually happens]
38
+
39
+ ### 2.3 Reproduction Steps
40
+
41
+ 1. [TO FILL: Step 1]
42
+ 2. [TO FILL: Step 2]
43
+ 3. [TO FILL: Step 3]
44
+ 4. [TO FILL: Observe error]
45
+
46
+ ### 2.4 Error Details
47
+
48
+ ```
49
+ [TO FILL: Error message, stack trace, logs]
50
+ ```
51
+
52
+ ### 2.5 Screenshots/Evidence
53
+
54
+ [TO FILL: Attach or link screenshots]
55
+
56
+ ---
57
+
58
+ ## 3. Impact Assessment
59
+
60
+ ### 3.1 User Impact
61
+
62
+ | Aspect | Assessment |
63
+ |--------|------------|
64
+ | Users Affected | [TO FILL: All/Subset/Specific role] |
65
+ | Frequency | [TO FILL: Always/Sometimes/Rare] |
66
+ | Workaround Available | [TO FILL: Yes/No] |
67
+ | Business Impact | [TO FILL: Description] |
68
+
69
+ ### 3.2 Affected Components
70
+
71
+ - [ ] Frontend
72
+ - [ ] Backend API
73
+ - [ ] Database
74
+ - [ ] External Service
75
+ - [ ] Infrastructure
76
+
77
+ Component details: [TO FILL]
78
+
79
+ ---
80
+
81
+ ## 4. Root Cause Analysis
82
+
83
+ ### 4.1 Investigation Summary
84
+
85
+ [TO FILL: Summary of investigation steps taken]
86
+
87
+ ### 4.2 Root Cause
88
+
89
+ [TO FILL: Identified root cause of the bug]
90
+
91
+ ### 4.3 Why It Wasn't Caught
92
+
93
+ [TO FILL: Gap in testing/review that allowed this bug]
94
+
95
+ ---
96
+
97
+ ## 5. Fix Proposal
98
+
99
+ ### 5.1 Proposed Solution
100
+
101
+ [TO FILL: Description of the fix]
102
+
103
+ ### 5.2 Files/Components to Modify
104
+
105
+ | File/Component | Change Type | Description |
106
+ |----------------|-------------|-------------|
107
+ | [TO FILL] | Modify | [TO FILL] |
108
+ | [TO FILL] | Add | [TO FILL] |
109
+
110
+ ### 5.3 Risk Assessment
111
+
112
+ | Risk | Probability | Impact | Mitigation |
113
+ |------|-------------|--------|------------|
114
+ | Regression in X | [TO FILL] | [TO FILL] | [TO FILL] |
115
+
116
+ ### 5.4 Rollback Plan
117
+
118
+ [TO FILL: How to rollback if the fix causes issues]
119
+
120
+ ---
121
+
122
+ ## 6. Validation Checklist
123
+
124
+ ### 6.1 Security Review
125
+
126
+ - [ ] No new vulnerabilities introduced
127
+ - [ ] Input validation maintained
128
+ - [ ] No sensitive data exposure
129
+ - [ ] Auth/Authz intact
130
+
131
+ ### 6.2 Testing
132
+
133
+ - [ ] Unit test for bug scenario added
134
+ - [ ] Regression tests pass
135
+ - [ ] Manual testing completed
136
+ - [ ] Edge cases covered
137
+
138
+ ### 6.3 Code Quality
139
+
140
+ - [ ] Code review completed
141
+ - [ ] No new technical debt
142
+ - [ ] Follows coding standards
143
+ - [ ] Documentation updated
144
+
145
+ ---
146
+
147
+ ## 7. Resolution
148
+
149
+ ### 7.1 Fix Implementation
150
+
151
+ | Field | Value |
152
+ |-------|-------|
153
+ | **Fix Branch** | [TO FILL] |
154
+ | **PR Link** | [TO FILL] |
155
+ | **Deployed To** | [TO FILL] |
156
+ | **Deployed Date** | [TO FILL] |
157
+ | **Verified By** | [TO FILL] |
158
+
159
+ ### 7.2 Lessons Learned
160
+
161
+ [TO FILL: What can be improved to prevent similar bugs]
162
+
163
+ ### 7.3 Follow-up Actions
164
+
165
+ - [ ] [TO FILL: Action item 1]
166
+ - [ ] [TO FILL: Action item 2]
167
+
168
+ ---
169
+
170
+ ## 8. Approval
171
+
172
+ | Role | Name | Date | Status |
173
+ |------|------|------|--------|
174
+ | Developer | [TO FILL] | | ☐ Completed |
175
+ | Code Reviewer | [TO FILL] | | ☐ Approved |
176
+ | QA | [TO FILL] | | ☐ Verified |
177
+
178
+ ---
179
+
180
+ ## Revision History
181
+
182
+ | Version | Date | Author | Changes |
183
+ |---------|------|--------|---------|
184
+ | 1.0 | [TO FILL] | [TO FILL] | Initial report |