smart-spec-kit-mcp 2.2.9 → 2.3.1
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 +3 -0
- package/dist/schemas/workflowSchema.d.ts +10 -2
- package/dist/schemas/workflowSchema.d.ts.map +1 -1
- package/dist/schemas/workflowSchema.js +23 -1
- package/dist/schemas/workflowSchema.js.map +1 -1
- package/dist/tools/orchestrationTools.d.ts.map +1 -1
- package/dist/tools/orchestrationTools.js +182 -16
- package/dist/tools/orchestrationTools.js.map +1 -1
- package/dist/utils/constitutionUpdater.d.ts +25 -0
- package/dist/utils/constitutionUpdater.d.ts.map +1 -0
- package/dist/utils/constitutionUpdater.js +143 -0
- package/dist/utils/constitutionUpdater.js.map +1 -0
- package/dist/utils/initGuidedFlow.d.ts +21 -0
- package/dist/utils/initGuidedFlow.d.ts.map +1 -0
- package/dist/utils/initGuidedFlow.js +81 -0
- package/dist/utils/initGuidedFlow.js.map +1 -0
- package/dist/utils/initGuidedFlow.test.d.ts +5 -0
- package/dist/utils/initGuidedFlow.test.d.ts.map +1 -0
- package/dist/utils/initGuidedFlow.test.js +34 -0
- package/dist/utils/initGuidedFlow.test.js.map +1 -0
- package/dist/utils/initGuidedSessionStore.d.ts +34 -0
- package/dist/utils/initGuidedSessionStore.d.ts.map +1 -0
- package/dist/utils/initGuidedSessionStore.js +90 -0
- package/dist/utils/initGuidedSessionStore.js.map +1 -0
- package/dist/utils/stackDetector.d.ts +17 -0
- package/dist/utils/stackDetector.d.ts.map +1 -0
- package/dist/utils/stackDetector.js +256 -0
- package/dist/utils/stackDetector.js.map +1 -0
- package/dist/utils/stackDetector.test.d.ts +5 -0
- package/dist/utils/stackDetector.test.d.ts.map +1 -0
- package/dist/utils/stackDetector.test.js +93 -0
- package/dist/utils/stackDetector.test.js.map +1 -0
- package/dist/utils/workflowLoader.d.ts +15 -3
- package/dist/utils/workflowLoader.d.ts.map +1 -1
- package/docs/DOCUMENTATION.md +35 -0
- package/package.json +2 -2
- package/starter-kit/workflows/bugfix.yaml +41 -50
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for stack detection and constitution update.
|
|
3
|
+
*/
|
|
4
|
+
import { test } from "node:test";
|
|
5
|
+
import assert from "node:assert/strict";
|
|
6
|
+
import * as fs from "node:fs/promises";
|
|
7
|
+
import * as path from "node:path";
|
|
8
|
+
import * as os from "node:os";
|
|
9
|
+
import { detectStack } from "./stackDetector.js";
|
|
10
|
+
import { updateConstitution } from "./constitutionUpdater.js";
|
|
11
|
+
async function createTempProject() {
|
|
12
|
+
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "spec-kit-test-"));
|
|
13
|
+
return dir;
|
|
14
|
+
}
|
|
15
|
+
test("detectStack infers TypeScript + React + Jest + PostgreSQL", async () => {
|
|
16
|
+
const projectPath = await createTempProject();
|
|
17
|
+
await fs.writeFile(path.join(projectPath, "package.json"), JSON.stringify({
|
|
18
|
+
name: "demo-app",
|
|
19
|
+
dependencies: {
|
|
20
|
+
react: "18.0.0",
|
|
21
|
+
pg: "8.0.0",
|
|
22
|
+
},
|
|
23
|
+
devDependencies: {
|
|
24
|
+
typescript: "5.0.0",
|
|
25
|
+
jest: "29.0.0",
|
|
26
|
+
},
|
|
27
|
+
}, null, 2), "utf-8");
|
|
28
|
+
await fs.writeFile(path.join(projectPath, "tsconfig.json"), "{}", "utf-8");
|
|
29
|
+
const detection = await detectStack(projectPath);
|
|
30
|
+
assert.equal(detection.projectName, "demo-app");
|
|
31
|
+
assert.equal(detection.language, "TypeScript");
|
|
32
|
+
assert.equal(detection.framework, "React");
|
|
33
|
+
assert.equal(detection.testing, "Jest");
|
|
34
|
+
assert.equal(detection.database, "PostgreSQL");
|
|
35
|
+
});
|
|
36
|
+
test("updateConstitution fills tech stack placeholders", async () => {
|
|
37
|
+
const projectPath = await createTempProject();
|
|
38
|
+
const memoryDir = path.join(projectPath, ".spec-kit", "memory");
|
|
39
|
+
await fs.mkdir(memoryDir, { recursive: true });
|
|
40
|
+
const constitutionTemplate = `# Project Constitution
|
|
41
|
+
|
|
42
|
+
## Project Information
|
|
43
|
+
|
|
44
|
+
- **Project Name**: [TO FILL: Your project name]
|
|
45
|
+
- **Ratification Date**: [TO FILL: YYYY-MM-DD]
|
|
46
|
+
- **Last Amended**: [TO FILL: YYYY-MM-DD]
|
|
47
|
+
- **Version**: 1.0.0
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Tech Stack Guidelines
|
|
52
|
+
|
|
53
|
+
### Preferred Technologies
|
|
54
|
+
| Category | Technology | Notes |
|
|
55
|
+
|----------|------------|-------|
|
|
56
|
+
| Language | [TO FILL] | |
|
|
57
|
+
| Framework | [TO FILL] | |
|
|
58
|
+
| Database | [TO FILL] | |
|
|
59
|
+
| Testing | [TO FILL] | |
|
|
60
|
+
|
|
61
|
+
### Code Style
|
|
62
|
+
- [TO FILL: Link to style guide or describe key conventions]
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Version History
|
|
67
|
+
|
|
68
|
+
| Version | Date | Changes |
|
|
69
|
+
|---------|------|---------|
|
|
70
|
+
| 1.0.0 | [TO FILL] | Initial constitution |
|
|
71
|
+
`;
|
|
72
|
+
const constitutionPath = path.join(memoryDir, "constitution.md");
|
|
73
|
+
await fs.writeFile(constitutionPath, constitutionTemplate, "utf-8");
|
|
74
|
+
const update = await updateConstitution(projectPath, {
|
|
75
|
+
language: "TypeScript",
|
|
76
|
+
framework: "React",
|
|
77
|
+
database: "PostgreSQL",
|
|
78
|
+
testing: "Vitest",
|
|
79
|
+
evidence: [],
|
|
80
|
+
}, {
|
|
81
|
+
projectName: "SpecKit Demo",
|
|
82
|
+
codeStyle: "ESLint + Prettier",
|
|
83
|
+
});
|
|
84
|
+
assert.equal(update.updated, true);
|
|
85
|
+
const updated = await fs.readFile(constitutionPath, "utf-8");
|
|
86
|
+
assert.match(updated, /\*\*Project Name\*\*: SpecKit Demo/);
|
|
87
|
+
assert.match(updated, /\| Language \|\s*TypeScript\s*\|/);
|
|
88
|
+
assert.match(updated, /\| Framework \|\s*React\s*\|/);
|
|
89
|
+
assert.match(updated, /\| Database \|\s*PostgreSQL\s*\|/);
|
|
90
|
+
assert.match(updated, /\| Testing \|\s*Vitest\s*\|/);
|
|
91
|
+
assert.match(updated, /- ESLint \+ Prettier/);
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=stackDetector.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stackDetector.test.js","sourceRoot":"","sources":["../../src/utils/stackDetector.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,KAAK,UAAU,iBAAiB;IAC9B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACvE,OAAO,GAAG,CAAC;AACb,CAAC;AAED,IAAI,CAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;IAC3E,MAAM,WAAW,GAAG,MAAM,iBAAiB,EAAE,CAAC;IAE9C,MAAM,EAAE,CAAC,SAAS,CAChB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EACtC,IAAI,CAAC,SAAS,CAAC;QACb,IAAI,EAAE,UAAU;QAChB,YAAY,EAAE;YACZ,KAAK,EAAE,QAAQ;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EAAE,OAAO,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,MAAM,kBAAkB,CACrC,WAAW,EACX;QACE,QAAQ,EAAE,YAAY;QACtB,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,EAAE;KACb,EACD;QACE,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE,mBAAmB;KAC/B,CACF,CAAC;IAEF,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAE7D,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAC;IAC5D,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;IAC1D,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;IACtD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;IAC1D,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC;IACrD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC"}
|
|
@@ -51,7 +51,11 @@ export declare function getWorkflowStep(workflow: Workflow, stepId: string): {
|
|
|
51
51
|
action: "fetch_ado" | "generate_content" | "review" | "create_file" | "call_agent";
|
|
52
52
|
description: string;
|
|
53
53
|
agent?: string | undefined;
|
|
54
|
-
inputs?: Record<string, string> |
|
|
54
|
+
inputs?: Record<string, string | string[]> | {
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
required?: boolean | undefined;
|
|
58
|
+
}[] | undefined;
|
|
55
59
|
outputs?: string[] | undefined;
|
|
56
60
|
next?: string | undefined;
|
|
57
61
|
} | undefined;
|
|
@@ -64,7 +68,11 @@ export declare function getFirstStep(workflow: Workflow): {
|
|
|
64
68
|
action: "fetch_ado" | "generate_content" | "review" | "create_file" | "call_agent";
|
|
65
69
|
description: string;
|
|
66
70
|
agent?: string | undefined;
|
|
67
|
-
inputs?: Record<string, string> |
|
|
71
|
+
inputs?: Record<string, string | string[]> | {
|
|
72
|
+
name: string;
|
|
73
|
+
description?: string | undefined;
|
|
74
|
+
required?: boolean | undefined;
|
|
75
|
+
}[] | undefined;
|
|
68
76
|
outputs?: string[] | undefined;
|
|
69
77
|
next?: string | undefined;
|
|
70
78
|
} | undefined;
|
|
@@ -77,7 +85,11 @@ export declare function getNextStep(workflow: Workflow, currentStepId: string):
|
|
|
77
85
|
action: "fetch_ado" | "generate_content" | "review" | "create_file" | "call_agent";
|
|
78
86
|
description: string;
|
|
79
87
|
agent?: string | undefined;
|
|
80
|
-
inputs?: Record<string, string> |
|
|
88
|
+
inputs?: Record<string, string | string[]> | {
|
|
89
|
+
name: string;
|
|
90
|
+
description?: string | undefined;
|
|
91
|
+
required?: boolean | undefined;
|
|
92
|
+
}[] | undefined;
|
|
81
93
|
outputs?: string[] | undefined;
|
|
82
94
|
next?: string | undefined;
|
|
83
95
|
} | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflowLoader.d.ts","sourceRoot":"","sources":["../../src/utils/workflowLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7E,YAAY,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAmH7D;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAGvD;AAED;;GAEG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CACpD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,IAAI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H,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAGvD;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAKnD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;cAEjE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ;;;;;;;;;;;;;cAE9C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM;;;;;;;;;;;;;qBAepE;AAED;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAiErD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAC3D,CASA"}
|
package/docs/DOCUMENTATION.md
CHANGED
|
@@ -52,6 +52,41 @@ Spec-Kit is an MCP (Model Context Protocol) server that provides **customizable
|
|
|
52
52
|
|
|
53
53
|
> **Note**: All parameters are optional. Spec-Kit is designed to be conversational - if you don't provide information upfront, Copilot will ask for it.
|
|
54
54
|
|
|
55
|
+
### init
|
|
56
|
+
|
|
57
|
+
**Purpose**: Initialize Spec-Kit in the current project. If `guided` is not specified, Spec-Kit asks you to choose guided vs auto. Guided mode is interactive (Q/A). Auto mode fills the constitution from project detection.
|
|
58
|
+
|
|
59
|
+
**Keyword Triggers**: `speckit: init`, `init`
|
|
60
|
+
|
|
61
|
+
**Parameters** (all optional):
|
|
62
|
+
|
|
63
|
+
- `force`: Overwrite existing Spec-Kit files
|
|
64
|
+
- `guided`: Enable guided setup (detect stack and fill constitution)
|
|
65
|
+
- `session_id`: Session ID for guided mode
|
|
66
|
+
- `answer`: Answer for the current guided question
|
|
67
|
+
- `cancel`: Cancel guided session
|
|
68
|
+
- `answers`: Overrides for constitution fields
|
|
69
|
+
- `projectName`, `ratificationDate`, `lastAmended`
|
|
70
|
+
- `language`, `framework`, `database`, `testing`, `codeStyle`
|
|
71
|
+
- `approvers`
|
|
72
|
+
|
|
73
|
+
**Examples**:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
speckit: init
|
|
77
|
+
speckit: init guided=true
|
|
78
|
+
speckit: init guided=true answer="My Project"
|
|
79
|
+
speckit: init guided=true session_id=init-abc answer="auto"
|
|
80
|
+
speckit: init guided=true answers={"projectName":"Demo","language":"TypeScript","framework":"React"}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Behavior**:
|
|
84
|
+
|
|
85
|
+
1. Installs prompts, templates, memory, rules, agents, and specs folders
|
|
86
|
+
2. If `guided` is enabled, detects the stack from project files
|
|
87
|
+
3. Updates `.spec-kit/memory/constitution.md` with detected or provided values
|
|
88
|
+
4. Lists any remaining placeholders to fill
|
|
89
|
+
|
|
55
90
|
### speckit_specify
|
|
56
91
|
|
|
57
92
|
**Purpose**: Create a functional specification from requirements.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-spec-kit-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
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",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dev": "tsx watch src/index.ts",
|
|
26
26
|
"start": "node dist/index.js",
|
|
27
27
|
"setup": "tsx src/utils/vsCodeConfigGenerator.ts",
|
|
28
|
-
"test": "
|
|
28
|
+
"test": "npm run build && node --test dist/**/*.test.js",
|
|
29
29
|
"prepublishOnly": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"keywords": [
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Bugfix Workflow
|
|
2
|
-
#
|
|
2
|
+
# Structured process for bug fixes
|
|
3
3
|
|
|
4
4
|
name: bugfix
|
|
5
5
|
displayName: "Bug Fix"
|
|
6
6
|
description: "Structured workflow for analyzing, fixing, and validating bug corrections"
|
|
7
7
|
|
|
8
8
|
metadata:
|
|
9
|
-
version: "
|
|
9
|
+
version: "2.0"
|
|
10
10
|
author: "Spec-Kit"
|
|
11
11
|
tags:
|
|
12
12
|
- bugfix
|
|
@@ -17,31 +17,37 @@ template: bugfix-report.md
|
|
|
17
17
|
defaultAgent: SpecAgent
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
|
+
# Step 1: Analyze Bug
|
|
20
21
|
- id: analyze-bug
|
|
21
|
-
name: "Analyze Bug
|
|
22
|
-
action:
|
|
22
|
+
name: "1. Analyze Bug"
|
|
23
|
+
action: call_agent
|
|
24
|
+
agent: SpecAgent
|
|
23
25
|
description: |
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
26
|
+
Analyze the bug based on user description:
|
|
27
|
+
|
|
28
|
+
- Understand the symptoms
|
|
29
|
+
- Identify reproduction steps
|
|
30
|
+
- Locate affected components
|
|
31
|
+
- Determine root cause
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
Document findings clearly.
|
|
34
|
+
inputs:
|
|
35
|
+
bug_description: "Description from user"
|
|
31
36
|
outputs:
|
|
32
|
-
- bug_data
|
|
33
37
|
- root_cause_analysis
|
|
34
38
|
|
|
39
|
+
# Step 2: Plan Fix
|
|
35
40
|
- id: plan-fix
|
|
36
|
-
name: "Plan Correction"
|
|
41
|
+
name: "2. Plan Correction"
|
|
37
42
|
action: call_agent
|
|
38
43
|
agent: PlanAgent
|
|
39
44
|
description: |
|
|
40
|
-
Create a correction plan
|
|
45
|
+
Create a correction plan:
|
|
46
|
+
|
|
41
47
|
- Proposed fix approach
|
|
42
48
|
- Files/components to modify
|
|
43
49
|
- Potential side effects
|
|
44
|
-
-
|
|
50
|
+
- Test cases to verify fix
|
|
45
51
|
|
|
46
52
|
Keep the fix minimal and focused.
|
|
47
53
|
inputs:
|
|
@@ -49,51 +55,36 @@ steps:
|
|
|
49
55
|
outputs:
|
|
50
56
|
- fix_plan
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
name: "Security Validation"
|
|
54
|
-
action: review
|
|
55
|
-
agent: GovAgent
|
|
56
|
-
description: |
|
|
57
|
-
Quick security review of the proposed fix:
|
|
58
|
-
- [ ] No new vulnerabilities introduced
|
|
59
|
-
- [ ] Input validation maintained
|
|
60
|
-
- [ ] No sensitive data exposure
|
|
61
|
-
- [ ] Authentication/Authorization intact
|
|
62
|
-
inputs:
|
|
63
|
-
document: "fix_plan"
|
|
64
|
-
outputs:
|
|
65
|
-
- security_clearance
|
|
66
|
-
|
|
58
|
+
# Step 3: Implement Fix
|
|
67
59
|
- id: implement-fix
|
|
68
|
-
name: "Implement
|
|
69
|
-
action:
|
|
60
|
+
name: "3. Implement Fix"
|
|
61
|
+
action: call_agent
|
|
62
|
+
agent: SpecAgent
|
|
70
63
|
description: |
|
|
71
|
-
Implement the fix
|
|
72
|
-
1. Write the code fix
|
|
73
|
-
2. Add unit tests for the bug scenario
|
|
74
|
-
3. Add regression tests
|
|
75
|
-
4. Update documentation if needed
|
|
64
|
+
Implement the bug fix:
|
|
76
65
|
|
|
77
|
-
|
|
66
|
+
- Make minimal changes
|
|
67
|
+
- Follow project conventions
|
|
68
|
+
- Add/update tests
|
|
69
|
+
- Document the fix
|
|
78
70
|
inputs:
|
|
79
|
-
|
|
71
|
+
source: "fix_plan"
|
|
80
72
|
outputs:
|
|
81
|
-
-
|
|
82
|
-
- test_cases
|
|
73
|
+
- implementation
|
|
83
74
|
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
# Step 4: Verify
|
|
76
|
+
- id: verify-fix
|
|
77
|
+
name: "4. Verify Fix"
|
|
86
78
|
action: review
|
|
87
79
|
agent: GovAgent
|
|
88
80
|
description: |
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- [ ]
|
|
81
|
+
Verify the fix is complete:
|
|
82
|
+
|
|
83
|
+
- [ ] Bug is resolved
|
|
84
|
+
- [ ] No regressions introduced
|
|
92
85
|
- [ ] Tests pass
|
|
93
|
-
- [ ]
|
|
94
|
-
- [ ] Documentation updated
|
|
86
|
+
- [ ] No security issues
|
|
95
87
|
inputs:
|
|
96
|
-
|
|
97
|
-
tests: "test_cases"
|
|
88
|
+
source: "implementation"
|
|
98
89
|
outputs:
|
|
99
|
-
-
|
|
90
|
+
- verification_report
|