fraim-framework 2.0.55 → 2.0.57
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/CHANGELOG.md +10 -0
- package/dist/src/cli/commands/init-project.js +10 -4
- package/dist/src/cli/setup/mcp-config-generator.js +23 -15
- package/dist/src/local-mcp-server/stdio-server.js +207 -0
- package/dist/src/utils/validate-workflows.js +101 -0
- package/dist/src/utils/workflow-parser.js +81 -0
- package/package.json +16 -11
- package/registry/scripts/pdf-styles.css +172 -0
- package/registry/scripts/prep-issue.sh +46 -4
- package/registry/scripts/profile-server.ts +131 -130
- package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
- package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
- package/registry/stubs/workflows/product-building/design.md +1 -1
- package/registry/stubs/workflows/product-building/implement.md +1 -1
- package/Claude.md +0 -1
- package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
- package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
- package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
- package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
- package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
- package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
- package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
- package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
- package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
- package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
- package/dist/registry/ai-manager-rules/retrospective.md +0 -116
- package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
- package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
- package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
- package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
- package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
- package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
- package/dist/registry/providers/ado.json +0 -19
- package/dist/registry/providers/github.json +0 -19
- package/dist/registry/scripts/cleanup-branch.js +0 -287
- package/dist/registry/scripts/evaluate-code-quality.js +0 -66
- package/dist/registry/scripts/exec-with-timeout.js +0 -142
- package/dist/registry/scripts/generate-engagement-emails.js +0 -705
- package/dist/registry/scripts/newsletter-helpers.js +0 -671
- package/dist/registry/scripts/profile-server.js +0 -388
- package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
- package/dist/registry/scripts/send-newsletter-simple.js +0 -85
- package/dist/registry/scripts/send-thank-you-emails.js +0 -54
- package/dist/registry/scripts/validate-openapi-limits.js +0 -311
- package/dist/registry/scripts/validate-test-coverage.js +0 -262
- package/dist/registry/scripts/verify-test-coverage.js +0 -66
- package/dist/scripts/build-stub-registry.js +0 -108
- package/dist/src/ai-manager/ai-manager.js +0 -482
- package/dist/src/ai-manager/phase-flow.js +0 -357
- package/dist/src/ai-manager/types.js +0 -5
- package/dist/src/fraim-mcp-server.js +0 -1885
- package/dist/tests/debug-tools.js +0 -80
- package/dist/tests/shared-server-utils.js +0 -57
- package/dist/tests/test-add-ide.js +0 -283
- package/dist/tests/test-ai-coach-edge-cases.js +0 -420
- package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
- package/dist/tests/test-ai-coach-performance.js +0 -328
- package/dist/tests/test-ai-coach-phase-content.js +0 -264
- package/dist/tests/test-ai-coach-workflows.js +0 -514
- package/dist/tests/test-cli.js +0 -228
- package/dist/tests/test-client-scripts-validation.js +0 -167
- package/dist/tests/test-complete-setup-flow.js +0 -110
- package/dist/tests/test-config-system.js +0 -279
- package/dist/tests/test-debug-session.js +0 -134
- package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
- package/dist/tests/test-enhanced-session-init.js +0 -188
- package/dist/tests/test-first-run-journey.js +0 -368
- package/dist/tests/test-fraim-issues.js +0 -59
- package/dist/tests/test-genericization.js +0 -44
- package/dist/tests/test-hybrid-script-execution.js +0 -340
- package/dist/tests/test-ide-detector.js +0 -46
- package/dist/tests/test-improved-setup.js +0 -121
- package/dist/tests/test-mcp-config-generator.js +0 -99
- package/dist/tests/test-mcp-connection.js +0 -107
- package/dist/tests/test-mcp-issue-integration.js +0 -156
- package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
- package/dist/tests/test-mcp-shared-server.js +0 -308
- package/dist/tests/test-mcp-template-processing.js +0 -160
- package/dist/tests/test-modular-issue-tracking.js +0 -165
- package/dist/tests/test-node-compatibility.js +0 -95
- package/dist/tests/test-npm-install.js +0 -68
- package/dist/tests/test-package-size.js +0 -108
- package/dist/tests/test-pr-review-workflow.js +0 -307
- package/dist/tests/test-prep-issue.js +0 -129
- package/dist/tests/test-productivity-integration.js +0 -157
- package/dist/tests/test-script-location-independence.js +0 -198
- package/dist/tests/test-script-sync.js +0 -557
- package/dist/tests/test-server-utils.js +0 -32
- package/dist/tests/test-session-rehydration.js +0 -148
- package/dist/tests/test-setup-integration.js +0 -98
- package/dist/tests/test-setup-scenarios.js +0 -322
- package/dist/tests/test-standalone.js +0 -143
- package/dist/tests/test-stub-registry.js +0 -136
- package/dist/tests/test-sync-stubs.js +0 -143
- package/dist/tests/test-sync-version-update.js +0 -93
- package/dist/tests/test-telemetry.js +0 -193
- package/dist/tests/test-token-validator.js +0 -30
- package/dist/tests/test-user-journey.js +0 -236
- package/dist/tests/test-users-to-target-workflow.js +0 -253
- package/dist/tests/test-utils.js +0 -109
- package/dist/tests/test-wizard.js +0 -71
- package/dist/tests/test-workflow-discovery.js +0 -242
- package/labels.json +0 -52
- package/registry/agent-guardrails.md +0 -63
- package/registry/fraim.md +0 -48
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-customer-profiling.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-survey-scoping.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-platform-discovery.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-survey-build-linkedin.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-prospect-qualification.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-survey-build-reddit.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-inventory-compilation.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-survey-build-x.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase5-survey-build-facebook.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase6-survey-build-custom.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase7-survey-dispatch.md +0 -11
- package/registry/stubs/workflows/customer-development/templates/customer-persona-template.md +0 -11
- package/registry/stubs/workflows/customer-development/templates/search-strategy-template.md +0 -11
- package/setup.js +0 -171
- package/tsconfig.json +0 -23
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Tests for AI Coach MCP integration
|
|
4
|
-
* Tests the seekCoachingOnNextStep MCP tool and server integration
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const node_test_1 = require("node:test");
|
|
11
|
-
const node_assert_1 = __importDefault(require("node:assert"));
|
|
12
|
-
const shared_server_utils_js_1 = require("./shared-server-utils.js");
|
|
13
|
-
(0, node_test_1.describe)('AI Coach MCP Integration', () => {
|
|
14
|
-
(0, node_test_1.before)(async () => {
|
|
15
|
-
// Wait for the test server to be ready
|
|
16
|
-
await (0, shared_server_utils_js_1.waitForServer)();
|
|
17
|
-
});
|
|
18
|
-
(0, node_test_1.describe)('MCP Tool Registration', () => {
|
|
19
|
-
(0, node_test_1.it)('should register seekCoachingOnNextStep tool', async () => {
|
|
20
|
-
const axios = require('axios');
|
|
21
|
-
// Test MCP tools/list endpoint
|
|
22
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
23
|
-
jsonrpc: '2.0',
|
|
24
|
-
id: 1,
|
|
25
|
-
method: 'tools/list'
|
|
26
|
-
});
|
|
27
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
28
|
-
node_assert_1.default.ok(response.data.result);
|
|
29
|
-
node_assert_1.default.ok(Array.isArray(response.data.result.tools));
|
|
30
|
-
// Find the seekCoachingOnNextStep tool
|
|
31
|
-
const coachingTool = response.data.result.tools.find((tool) => tool.name === 'seekCoachingOnNextStep');
|
|
32
|
-
node_assert_1.default.ok(coachingTool, 'seekCoachingOnNextStep tool should be registered');
|
|
33
|
-
node_assert_1.default.ok(coachingTool.description, 'Tool should have description');
|
|
34
|
-
node_assert_1.default.ok(coachingTool.inputSchema, 'Tool should have input schema');
|
|
35
|
-
});
|
|
36
|
-
(0, node_test_1.it)('should have correct tool schema for seekCoachingOnNextStep', async () => {
|
|
37
|
-
const axios = require('axios');
|
|
38
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
39
|
-
jsonrpc: '2.0',
|
|
40
|
-
id: 1,
|
|
41
|
-
method: 'tools/list'
|
|
42
|
-
});
|
|
43
|
-
const coachingTool = response.data.result.tools.find((tool) => tool.name === 'seekCoachingOnNextStep');
|
|
44
|
-
const schema = coachingTool.inputSchema;
|
|
45
|
-
node_assert_1.default.ok(schema.properties, 'Tool schema should have properties');
|
|
46
|
-
// Check required properties
|
|
47
|
-
const requiredProps = ['workflowType', 'issueNumber', 'currentPhase', 'status'];
|
|
48
|
-
for (const prop of requiredProps) {
|
|
49
|
-
node_assert_1.default.ok(schema.properties[prop], `Tool schema should have ${prop} property`);
|
|
50
|
-
}
|
|
51
|
-
// Check optional properties
|
|
52
|
-
const optionalProps = ['evidence', 'findings'];
|
|
53
|
-
for (const prop of optionalProps) {
|
|
54
|
-
node_assert_1.default.ok(schema.properties[prop], `Tool schema should have ${prop} property`);
|
|
55
|
-
}
|
|
56
|
-
// Check that required properties are marked as required
|
|
57
|
-
node_assert_1.default.ok(schema.required, 'Tool schema should have required array');
|
|
58
|
-
for (const prop of requiredProps) {
|
|
59
|
-
node_assert_1.default.ok(schema.required.includes(prop), `${prop} should be required`);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
(0, node_test_1.describe)('MCP Tool Execution', () => {
|
|
64
|
-
(0, node_test_1.it)('should execute seekCoachingOnNextStep for spec workflow starting phase', async () => {
|
|
65
|
-
const axios = require('axios');
|
|
66
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
67
|
-
jsonrpc: '2.0',
|
|
68
|
-
id: 1,
|
|
69
|
-
method: 'tools/call',
|
|
70
|
-
params: {
|
|
71
|
-
name: 'seekCoachingOnNextStep',
|
|
72
|
-
arguments: {
|
|
73
|
-
workflowType: 'spec',
|
|
74
|
-
issueNumber: '123',
|
|
75
|
-
currentPhase: 'spec-spec',
|
|
76
|
-
status: 'starting',
|
|
77
|
-
evidence: { issueType: 'feature' }
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
82
|
-
node_assert_1.default.ok(response.data.result);
|
|
83
|
-
node_assert_1.default.ok(response.data.result.content);
|
|
84
|
-
node_assert_1.default.ok(Array.isArray(response.data.result.content));
|
|
85
|
-
const content = response.data.result.content[0];
|
|
86
|
-
node_assert_1.default.strictEqual(content.type, 'text');
|
|
87
|
-
node_assert_1.default.ok(content.text.includes('Phase:'), 'Response should contain phase instructions');
|
|
88
|
-
node_assert_1.default.ok(content.text.includes('INTENT'), 'Response should contain INTENT section');
|
|
89
|
-
});
|
|
90
|
-
(0, node_test_1.it)('should execute seekCoachingOnNextStep for implement workflow starting phase', async () => {
|
|
91
|
-
const axios = require('axios');
|
|
92
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
93
|
-
jsonrpc: '2.0',
|
|
94
|
-
id: 1,
|
|
95
|
-
method: 'tools/call',
|
|
96
|
-
params: {
|
|
97
|
-
name: 'seekCoachingOnNextStep',
|
|
98
|
-
arguments: {
|
|
99
|
-
workflowType: 'implement',
|
|
100
|
-
issueNumber: '456',
|
|
101
|
-
currentPhase: 'implement-scoping',
|
|
102
|
-
status: 'starting',
|
|
103
|
-
evidence: { issueType: 'bug' }
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
108
|
-
node_assert_1.default.ok(response.data.result);
|
|
109
|
-
const content = response.data.result.content[0];
|
|
110
|
-
node_assert_1.default.ok(content.text.includes('Phase:'), 'Response should contain phase instructions');
|
|
111
|
-
node_assert_1.default.ok(content.text.includes('INTENT'), 'Response should contain INTENT section');
|
|
112
|
-
});
|
|
113
|
-
(0, node_test_1.it)('should execute seekCoachingOnNextStep for design workflow starting phase', async () => {
|
|
114
|
-
const axios = require('axios');
|
|
115
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
116
|
-
jsonrpc: '2.0',
|
|
117
|
-
id: 1,
|
|
118
|
-
method: 'tools/call',
|
|
119
|
-
params: {
|
|
120
|
-
name: 'seekCoachingOnNextStep',
|
|
121
|
-
arguments: {
|
|
122
|
-
workflowType: 'design',
|
|
123
|
-
issueNumber: '789',
|
|
124
|
-
currentPhase: 'design-design',
|
|
125
|
-
status: 'starting',
|
|
126
|
-
evidence: { issueType: 'feature' }
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
131
|
-
node_assert_1.default.ok(response.data.result);
|
|
132
|
-
const content = response.data.result.content[0];
|
|
133
|
-
node_assert_1.default.ok(content.text.includes('Phase:'), 'Response should contain phase instructions');
|
|
134
|
-
node_assert_1.default.ok(content.text.includes('INTENT'), 'Response should contain INTENT section');
|
|
135
|
-
});
|
|
136
|
-
(0, node_test_1.it)('should handle phase completion and provide next phase', async () => {
|
|
137
|
-
const axios = require('axios');
|
|
138
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
139
|
-
jsonrpc: '2.0',
|
|
140
|
-
id: 1,
|
|
141
|
-
method: 'tools/call',
|
|
142
|
-
params: {
|
|
143
|
-
name: 'seekCoachingOnNextStep',
|
|
144
|
-
arguments: {
|
|
145
|
-
workflowType: 'spec',
|
|
146
|
-
issueNumber: '123',
|
|
147
|
-
currentPhase: 'spec-spec',
|
|
148
|
-
status: 'complete',
|
|
149
|
-
evidence: {
|
|
150
|
-
issueType: 'feature',
|
|
151
|
-
specComplete: true,
|
|
152
|
-
specDocument: 'docs/feature specs/123-test-feature.md'
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
158
|
-
const content = response.data.result.content[0];
|
|
159
|
-
node_assert_1.default.ok(content.text.includes('Phase Complete!'), 'Should indicate phase completion');
|
|
160
|
-
node_assert_1.default.ok(content.text.includes('Next Phase: spec-competitor-analysis'), 'Should provide next phase');
|
|
161
|
-
});
|
|
162
|
-
(0, node_test_1.it)('should handle incomplete phase with help message', async () => {
|
|
163
|
-
const axios = require('axios');
|
|
164
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
165
|
-
jsonrpc: '2.0',
|
|
166
|
-
id: 1,
|
|
167
|
-
method: 'tools/call',
|
|
168
|
-
params: {
|
|
169
|
-
name: 'seekCoachingOnNextStep',
|
|
170
|
-
arguments: {
|
|
171
|
-
workflowType: 'implement',
|
|
172
|
-
issueNumber: '456',
|
|
173
|
-
currentPhase: 'implement-code',
|
|
174
|
-
status: 'incomplete',
|
|
175
|
-
evidence: { issueType: 'bug' },
|
|
176
|
-
findings: {
|
|
177
|
-
uncertainties: ['Tests are failing', 'Build errors']
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
183
|
-
const content = response.data.result.content[0];
|
|
184
|
-
node_assert_1.default.ok(content.text.includes('🤝 AI Coach Assistance'), 'Should show assistance header');
|
|
185
|
-
node_assert_1.default.ok(content.text.includes('Tests are failing'), 'Should include uncertainties');
|
|
186
|
-
node_assert_1.default.ok(content.text.includes('Build errors'), 'Should include all uncertainties');
|
|
187
|
-
});
|
|
188
|
-
(0, node_test_1.it)('should handle finalize phase completion', async () => {
|
|
189
|
-
const axios = require('axios');
|
|
190
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
191
|
-
jsonrpc: '2.0',
|
|
192
|
-
id: 1,
|
|
193
|
-
method: 'tools/call',
|
|
194
|
-
params: {
|
|
195
|
-
name: 'seekCoachingOnNextStep',
|
|
196
|
-
arguments: {
|
|
197
|
-
workflowType: 'spec',
|
|
198
|
-
issueNumber: '123',
|
|
199
|
-
currentPhase: 'retrospective',
|
|
200
|
-
status: 'complete',
|
|
201
|
-
evidence: {
|
|
202
|
-
issueType: 'feature',
|
|
203
|
-
retrospectiveComplete: true
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
209
|
-
const content = response.data.result.content[0];
|
|
210
|
-
node_assert_1.default.ok(content.text.includes('Spec Complete!'), 'Should show workflow completion');
|
|
211
|
-
node_assert_1.default.ok(content.text.includes('Congratulations!'), 'Should include congratulations');
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
(0, node_test_1.describe)('MCP Error Handling', () => {
|
|
215
|
-
(0, node_test_1.it)('should return error for invalid workflow type', async () => {
|
|
216
|
-
const axios = require('axios');
|
|
217
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
218
|
-
jsonrpc: '2.0',
|
|
219
|
-
id: 1,
|
|
220
|
-
method: 'tools/call',
|
|
221
|
-
params: {
|
|
222
|
-
name: 'seekCoachingOnNextStep',
|
|
223
|
-
arguments: {
|
|
224
|
-
workflowType: 'invalid',
|
|
225
|
-
issueNumber: '123',
|
|
226
|
-
currentPhase: 'some-phase',
|
|
227
|
-
status: 'starting'
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
232
|
-
node_assert_1.default.ok(response.data.error ||
|
|
233
|
-
(response.data.result && response.data.result.isError), 'Should return error for invalid workflow type');
|
|
234
|
-
});
|
|
235
|
-
(0, node_test_1.it)('should return error for invalid phase', async () => {
|
|
236
|
-
const axios = require('axios');
|
|
237
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
238
|
-
jsonrpc: '2.0',
|
|
239
|
-
id: 1,
|
|
240
|
-
method: 'tools/call',
|
|
241
|
-
params: {
|
|
242
|
-
name: 'seekCoachingOnNextStep',
|
|
243
|
-
arguments: {
|
|
244
|
-
workflowType: 'spec',
|
|
245
|
-
issueNumber: '123',
|
|
246
|
-
currentPhase: 'implement-scoping', // Wrong phase for spec workflow
|
|
247
|
-
status: 'starting',
|
|
248
|
-
evidence: { issueType: 'feature' }
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
253
|
-
node_assert_1.default.ok(response.data.error ||
|
|
254
|
-
(response.data.result && response.data.result.isError), 'Should return error for invalid phase');
|
|
255
|
-
});
|
|
256
|
-
(0, node_test_1.it)('should handle missing required parameters', async () => {
|
|
257
|
-
const axios = require('axios');
|
|
258
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
259
|
-
jsonrpc: '2.0',
|
|
260
|
-
id: 1,
|
|
261
|
-
method: 'tools/call',
|
|
262
|
-
params: {
|
|
263
|
-
name: 'seekCoachingOnNextStep',
|
|
264
|
-
arguments: {
|
|
265
|
-
workflowType: 'spec',
|
|
266
|
-
// Missing issueNumber, currentPhase, status
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
271
|
-
node_assert_1.default.ok(response.data.error ||
|
|
272
|
-
(response.data.result && response.data.result.isError), 'Should return error for missing required parameters');
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
(0, node_test_1.describe)('MCP Response Format', () => {
|
|
276
|
-
(0, node_test_1.it)('should return properly formatted MCP response', async () => {
|
|
277
|
-
const axios = require('axios');
|
|
278
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
279
|
-
jsonrpc: '2.0',
|
|
280
|
-
id: 1,
|
|
281
|
-
method: 'tools/call',
|
|
282
|
-
params: {
|
|
283
|
-
name: 'seekCoachingOnNextStep',
|
|
284
|
-
arguments: {
|
|
285
|
-
workflowType: 'spec',
|
|
286
|
-
issueNumber: '123',
|
|
287
|
-
currentPhase: 'spec-spec',
|
|
288
|
-
status: 'starting',
|
|
289
|
-
evidence: { issueType: 'feature' }
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
294
|
-
node_assert_1.default.strictEqual(response.data.jsonrpc, '2.0');
|
|
295
|
-
node_assert_1.default.strictEqual(response.data.id, 1);
|
|
296
|
-
node_assert_1.default.ok(response.data.result);
|
|
297
|
-
const result = response.data.result;
|
|
298
|
-
node_assert_1.default.ok(result.content);
|
|
299
|
-
node_assert_1.default.ok(Array.isArray(result.content));
|
|
300
|
-
node_assert_1.default.strictEqual(result.content.length, 1);
|
|
301
|
-
const content = result.content[0];
|
|
302
|
-
node_assert_1.default.strictEqual(content.type, 'text');
|
|
303
|
-
node_assert_1.default.ok(typeof content.text === 'string');
|
|
304
|
-
node_assert_1.default.ok(content.text.length > 0);
|
|
305
|
-
});
|
|
306
|
-
(0, node_test_1.it)('should include metadata in response when appropriate', async () => {
|
|
307
|
-
const axios = require('axios');
|
|
308
|
-
const response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
309
|
-
jsonrpc: '2.0',
|
|
310
|
-
id: 1,
|
|
311
|
-
method: 'tools/call',
|
|
312
|
-
params: {
|
|
313
|
-
name: 'seekCoachingOnNextStep',
|
|
314
|
-
arguments: {
|
|
315
|
-
workflowType: 'spec',
|
|
316
|
-
issueNumber: '123',
|
|
317
|
-
currentPhase: 'spec-spec',
|
|
318
|
-
status: 'complete',
|
|
319
|
-
evidence: { issueType: 'feature', specComplete: true }
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
324
|
-
const content = response.data.result.content[0];
|
|
325
|
-
// Should include both completion message and next phase instructions
|
|
326
|
-
node_assert_1.default.ok(content.text.includes('Phase Complete!'), 'Should include completion message');
|
|
327
|
-
node_assert_1.default.ok(content.text.includes('Next Phase:'), 'Should include next phase info');
|
|
328
|
-
node_assert_1.default.ok(content.text.length > 1000, 'Should include substantial content');
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
(0, node_test_1.describe)('Workflow Integration Tests', () => {
|
|
332
|
-
(0, node_test_1.it)('should support complete spec workflow via MCP', async () => {
|
|
333
|
-
const axios = require('axios');
|
|
334
|
-
// Start spec phase
|
|
335
|
-
let response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
336
|
-
jsonrpc: '2.0',
|
|
337
|
-
id: 1,
|
|
338
|
-
method: 'tools/call',
|
|
339
|
-
params: {
|
|
340
|
-
name: 'seekCoachingOnNextStep',
|
|
341
|
-
arguments: {
|
|
342
|
-
workflowType: 'spec',
|
|
343
|
-
issueNumber: '999',
|
|
344
|
-
currentPhase: 'spec-spec',
|
|
345
|
-
status: 'starting',
|
|
346
|
-
evidence: { issueType: 'feature' }
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
351
|
-
let content = response.data.result.content[0];
|
|
352
|
-
node_assert_1.default.ok(content.text.includes('Phase: Spec-Spec'), 'Should start with spec phase');
|
|
353
|
-
// Complete spec phase
|
|
354
|
-
response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
355
|
-
jsonrpc: '2.0',
|
|
356
|
-
id: 2,
|
|
357
|
-
method: 'tools/call',
|
|
358
|
-
params: {
|
|
359
|
-
name: 'seekCoachingOnNextStep',
|
|
360
|
-
arguments: {
|
|
361
|
-
workflowType: 'spec',
|
|
362
|
-
issueNumber: '999',
|
|
363
|
-
currentPhase: 'spec-spec',
|
|
364
|
-
status: 'complete',
|
|
365
|
-
evidence: { issueType: 'feature', specComplete: true }
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
370
|
-
content = response.data.result.content[0];
|
|
371
|
-
node_assert_1.default.ok(content.text.includes('Next Phase: spec-competitor-analysis'), 'Should transition to review');
|
|
372
|
-
// Complete review phase
|
|
373
|
-
response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
374
|
-
jsonrpc: '2.0',
|
|
375
|
-
id: 3,
|
|
376
|
-
method: 'tools/call',
|
|
377
|
-
params: {
|
|
378
|
-
name: 'seekCoachingOnNextStep',
|
|
379
|
-
arguments: {
|
|
380
|
-
workflowType: 'spec',
|
|
381
|
-
issueNumber: '999',
|
|
382
|
-
currentPhase: 'spec-completeness-review',
|
|
383
|
-
status: 'complete',
|
|
384
|
-
evidence: { issueType: 'feature', reviewComplete: true }
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
389
|
-
content = response.data.result.content[0];
|
|
390
|
-
node_assert_1.default.ok(content.text.includes('Next Phase: submit-pr'), 'Should transition to submit-pr');
|
|
391
|
-
// Complete submit-pr
|
|
392
|
-
response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
393
|
-
jsonrpc: '2.0',
|
|
394
|
-
id: 4,
|
|
395
|
-
method: 'tools/call',
|
|
396
|
-
params: {
|
|
397
|
-
name: 'seekCoachingOnNextStep',
|
|
398
|
-
arguments: {
|
|
399
|
-
workflowType: 'spec',
|
|
400
|
-
issueNumber: '999',
|
|
401
|
-
currentPhase: 'submit-pr',
|
|
402
|
-
status: 'complete',
|
|
403
|
-
evidence: { issueType: 'feature', prSubmitted: true }
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
408
|
-
content = response.data.result.content[0];
|
|
409
|
-
node_assert_1.default.ok(content.text.includes('Next Phase: wait-for-pr-review'), 'Should transition to wait-for-pr-review');
|
|
410
|
-
// Complete wait-for-pr-review
|
|
411
|
-
response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
412
|
-
jsonrpc: '2.0',
|
|
413
|
-
id: 5,
|
|
414
|
-
method: 'tools/call',
|
|
415
|
-
params: {
|
|
416
|
-
name: 'seekCoachingOnNextStep',
|
|
417
|
-
arguments: {
|
|
418
|
-
workflowType: 'spec',
|
|
419
|
-
issueNumber: '999',
|
|
420
|
-
currentPhase: 'wait-for-pr-review',
|
|
421
|
-
status: 'complete',
|
|
422
|
-
evidence: { issueType: 'feature', prApproved: true }
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
427
|
-
content = response.data.result.content[0];
|
|
428
|
-
node_assert_1.default.ok(content.text.includes('Next Phase: retrospective'), 'Should transition to retrospective');
|
|
429
|
-
// Complete retrospective
|
|
430
|
-
response = await axios.post((0, shared_server_utils_js_1.getMcpEndpoint)(), {
|
|
431
|
-
jsonrpc: '2.0',
|
|
432
|
-
id: 6,
|
|
433
|
-
method: 'tools/call',
|
|
434
|
-
params: {
|
|
435
|
-
name: 'seekCoachingOnNextStep',
|
|
436
|
-
arguments: {
|
|
437
|
-
workflowType: 'spec',
|
|
438
|
-
issueNumber: '999',
|
|
439
|
-
currentPhase: 'retrospective',
|
|
440
|
-
status: 'complete',
|
|
441
|
-
evidence: { issueType: 'feature', retrospectiveComplete: true }
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
node_assert_1.default.strictEqual(response.status, 200);
|
|
446
|
-
content = response.data.result.content[0];
|
|
447
|
-
node_assert_1.default.ok(content.text.includes('Spec Complete!'), 'Should show completion');
|
|
448
|
-
});
|
|
449
|
-
});
|
|
450
|
-
});
|