@nahisaho/musubix-mcp-server 1.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.
- package/bin/musubix-mcp.js +73 -0
- package/dist/__tests__/index.test.d.ts +2 -0
- package/dist/__tests__/index.test.d.ts.map +1 -0
- package/dist/__tests__/index.test.js +44 -0
- package/dist/__tests__/index.test.js.map +1 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/platform/adapter.d.ts +136 -0
- package/dist/platform/adapter.d.ts.map +1 -0
- package/dist/platform/adapter.js +370 -0
- package/dist/platform/adapter.js.map +1 -0
- package/dist/platform/index.d.ts +8 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +8 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/prompts/index.d.ts +8 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +8 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/sdd-prompts.d.ts +45 -0
- package/dist/prompts/sdd-prompts.d.ts.map +1 -0
- package/dist/prompts/sdd-prompts.js +445 -0
- package/dist/prompts/sdd-prompts.js.map +1 -0
- package/dist/resources/index.d.ts +8 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +8 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/sdd-resources.d.ts +57 -0
- package/dist/resources/sdd-resources.d.ts.map +1 -0
- package/dist/resources/sdd-resources.js +629 -0
- package/dist/resources/sdd-resources.js.map +1 -0
- package/dist/server.d.ts +201 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +435 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +8 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/sdd-tools.d.ts +57 -0
- package/dist/tools/sdd-tools.d.ts.map +1 -0
- package/dist/tools/sdd-tools.js +450 -0
- package/dist/tools/sdd-tools.js.map +1 -0
- package/dist/types.d.ts +207 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +20 -0
- package/dist/types.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools Definitions
|
|
3
|
+
*
|
|
4
|
+
* Tool definitions for MUSUBIX MCP Server
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module tools
|
|
8
|
+
*
|
|
9
|
+
* @see REQ-INT-102 - MCP Server
|
|
10
|
+
* @see REQ-CORE-101 - SDD Workflow
|
|
11
|
+
*/
|
|
12
|
+
import type { ToolDefinition } from '../types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Create requirements document tool
|
|
15
|
+
*/
|
|
16
|
+
export declare const createRequirementsTool: ToolDefinition;
|
|
17
|
+
/**
|
|
18
|
+
* Validate requirements tool
|
|
19
|
+
*/
|
|
20
|
+
export declare const validateRequirementsTool: ToolDefinition;
|
|
21
|
+
/**
|
|
22
|
+
* Create design document tool
|
|
23
|
+
*/
|
|
24
|
+
export declare const createDesignTool: ToolDefinition;
|
|
25
|
+
/**
|
|
26
|
+
* Validate design tool
|
|
27
|
+
*/
|
|
28
|
+
export declare const validateDesignTool: ToolDefinition;
|
|
29
|
+
/**
|
|
30
|
+
* Create tasks tool
|
|
31
|
+
*/
|
|
32
|
+
export declare const createTasksTool: ToolDefinition;
|
|
33
|
+
/**
|
|
34
|
+
* Query knowledge graph tool
|
|
35
|
+
*/
|
|
36
|
+
export declare const queryKnowledgeTool: ToolDefinition;
|
|
37
|
+
/**
|
|
38
|
+
* Update knowledge tool
|
|
39
|
+
*/
|
|
40
|
+
export declare const updateKnowledgeTool: ToolDefinition;
|
|
41
|
+
/**
|
|
42
|
+
* Constitutional validation tool
|
|
43
|
+
*/
|
|
44
|
+
export declare const validateConstitutionTool: ToolDefinition;
|
|
45
|
+
/**
|
|
46
|
+
* Traceability validation tool
|
|
47
|
+
*/
|
|
48
|
+
export declare const validateTraceabilityTool: ToolDefinition;
|
|
49
|
+
/**
|
|
50
|
+
* All SDD tools
|
|
51
|
+
*/
|
|
52
|
+
export declare const sddTools: ToolDefinition[];
|
|
53
|
+
/**
|
|
54
|
+
* Get all SDD tool definitions
|
|
55
|
+
*/
|
|
56
|
+
export declare function getSddTools(): ToolDefinition[];
|
|
57
|
+
//# sourceMappingURL=sdd-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdd-tools.d.ts","sourceRoot":"","sources":["../../src/tools/sdd-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,aAAa,CAAC;AAmC3E;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,cA0CpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,cAgCtC,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAyC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAsChC,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,cAuC7B,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cA0ChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,cAuDjC,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,cA0CtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,cAgCtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,cAAc,EAepC,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,IAAI,cAAc,EAAE,CAE9C"}
|
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools Definitions
|
|
3
|
+
*
|
|
4
|
+
* Tool definitions for MUSUBIX MCP Server
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module tools
|
|
8
|
+
*
|
|
9
|
+
* @see REQ-INT-102 - MCP Server
|
|
10
|
+
* @see REQ-CORE-101 - SDD Workflow
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Create text content helper
|
|
14
|
+
*/
|
|
15
|
+
function text(content) {
|
|
16
|
+
return { type: 'text', text: content };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Success result helper
|
|
20
|
+
*/
|
|
21
|
+
function success(content) {
|
|
22
|
+
const textContent = typeof content === 'string'
|
|
23
|
+
? content
|
|
24
|
+
: JSON.stringify(content, null, 2);
|
|
25
|
+
return {
|
|
26
|
+
content: [text(textContent)],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Error result helper
|
|
31
|
+
*/
|
|
32
|
+
function error(message) {
|
|
33
|
+
return {
|
|
34
|
+
content: [text(`Error: ${message}`)],
|
|
35
|
+
isError: true,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
// ============================================================
|
|
39
|
+
// Requirements Phase Tools
|
|
40
|
+
// ============================================================
|
|
41
|
+
/**
|
|
42
|
+
* Create requirements document tool
|
|
43
|
+
*/
|
|
44
|
+
export const createRequirementsTool = {
|
|
45
|
+
name: 'sdd_create_requirements',
|
|
46
|
+
description: 'Create a new EARS-format requirements document',
|
|
47
|
+
inputSchema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
projectName: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'Name of the project',
|
|
53
|
+
},
|
|
54
|
+
featureName: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Name of the feature to document requirements for',
|
|
57
|
+
},
|
|
58
|
+
description: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Brief description of the feature',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
required: ['projectName', 'featureName'],
|
|
64
|
+
},
|
|
65
|
+
handler: async (args) => {
|
|
66
|
+
try {
|
|
67
|
+
const { projectName, featureName, description } = args;
|
|
68
|
+
// Placeholder: actual implementation will use YATA
|
|
69
|
+
return success({
|
|
70
|
+
action: 'create_requirements',
|
|
71
|
+
projectName,
|
|
72
|
+
featureName,
|
|
73
|
+
description,
|
|
74
|
+
status: 'template_created',
|
|
75
|
+
message: `Requirements document template created for ${featureName}`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Validate requirements tool
|
|
85
|
+
*/
|
|
86
|
+
export const validateRequirementsTool = {
|
|
87
|
+
name: 'sdd_validate_requirements',
|
|
88
|
+
description: 'Validate requirements against EARS patterns and constitution',
|
|
89
|
+
inputSchema: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
properties: {
|
|
92
|
+
documentPath: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
description: 'Path to the requirements document',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
required: ['documentPath'],
|
|
98
|
+
},
|
|
99
|
+
handler: async (args) => {
|
|
100
|
+
try {
|
|
101
|
+
const { documentPath } = args;
|
|
102
|
+
// Placeholder: actual implementation will parse and validate
|
|
103
|
+
return success({
|
|
104
|
+
action: 'validate_requirements',
|
|
105
|
+
documentPath,
|
|
106
|
+
status: 'validated',
|
|
107
|
+
issues: [],
|
|
108
|
+
coverage: {
|
|
109
|
+
earsPatterns: '100%',
|
|
110
|
+
constitutionalCompliance: '100%',
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
// ============================================================
|
|
120
|
+
// Design Phase Tools
|
|
121
|
+
// ============================================================
|
|
122
|
+
/**
|
|
123
|
+
* Create design document tool
|
|
124
|
+
*/
|
|
125
|
+
export const createDesignTool = {
|
|
126
|
+
name: 'sdd_create_design',
|
|
127
|
+
description: 'Create a C4 model design document',
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
projectName: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Name of the project',
|
|
134
|
+
},
|
|
135
|
+
featureName: {
|
|
136
|
+
type: 'string',
|
|
137
|
+
description: 'Name of the feature to design',
|
|
138
|
+
},
|
|
139
|
+
requirementsPath: {
|
|
140
|
+
type: 'string',
|
|
141
|
+
description: 'Path to the requirements document',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
required: ['projectName', 'featureName'],
|
|
145
|
+
},
|
|
146
|
+
handler: async (args) => {
|
|
147
|
+
try {
|
|
148
|
+
const { projectName, featureName, requirementsPath } = args;
|
|
149
|
+
return success({
|
|
150
|
+
action: 'create_design',
|
|
151
|
+
projectName,
|
|
152
|
+
featureName,
|
|
153
|
+
requirementsPath,
|
|
154
|
+
status: 'template_created',
|
|
155
|
+
sections: ['Context', 'Container', 'Component', 'ADR'],
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Validate design tool
|
|
165
|
+
*/
|
|
166
|
+
export const validateDesignTool = {
|
|
167
|
+
name: 'sdd_validate_design',
|
|
168
|
+
description: 'Validate design against requirements traceability',
|
|
169
|
+
inputSchema: {
|
|
170
|
+
type: 'object',
|
|
171
|
+
properties: {
|
|
172
|
+
designPath: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
description: 'Path to the design document',
|
|
175
|
+
},
|
|
176
|
+
requirementsPath: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
description: 'Path to the requirements document',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
required: ['designPath'],
|
|
182
|
+
},
|
|
183
|
+
handler: async (args) => {
|
|
184
|
+
try {
|
|
185
|
+
const { designPath, requirementsPath } = args;
|
|
186
|
+
return success({
|
|
187
|
+
action: 'validate_design',
|
|
188
|
+
designPath,
|
|
189
|
+
requirementsPath,
|
|
190
|
+
status: 'validated',
|
|
191
|
+
traceability: {
|
|
192
|
+
coverage: '100%',
|
|
193
|
+
unmappedRequirements: [],
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
catch (e) {
|
|
198
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
// ============================================================
|
|
203
|
+
// Task Phase Tools
|
|
204
|
+
// ============================================================
|
|
205
|
+
/**
|
|
206
|
+
* Create tasks tool
|
|
207
|
+
*/
|
|
208
|
+
export const createTasksTool = {
|
|
209
|
+
name: 'sdd_create_tasks',
|
|
210
|
+
description: 'Create implementation tasks from design',
|
|
211
|
+
inputSchema: {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: {
|
|
214
|
+
designPath: {
|
|
215
|
+
type: 'string',
|
|
216
|
+
description: 'Path to the design document',
|
|
217
|
+
},
|
|
218
|
+
sprintDuration: {
|
|
219
|
+
type: 'number',
|
|
220
|
+
description: 'Sprint duration in days',
|
|
221
|
+
default: 5,
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
required: ['designPath'],
|
|
225
|
+
},
|
|
226
|
+
handler: async (args) => {
|
|
227
|
+
try {
|
|
228
|
+
const { designPath, sprintDuration } = args;
|
|
229
|
+
return success({
|
|
230
|
+
action: 'create_tasks',
|
|
231
|
+
designPath,
|
|
232
|
+
sprintDuration: sprintDuration ?? 5,
|
|
233
|
+
status: 'tasks_generated',
|
|
234
|
+
summary: {
|
|
235
|
+
totalTasks: 0,
|
|
236
|
+
totalSprints: 0,
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
catch (e) {
|
|
241
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
// ============================================================
|
|
246
|
+
// Knowledge Graph Tools
|
|
247
|
+
// ============================================================
|
|
248
|
+
/**
|
|
249
|
+
* Query knowledge graph tool
|
|
250
|
+
*/
|
|
251
|
+
export const queryKnowledgeTool = {
|
|
252
|
+
name: 'sdd_query_knowledge',
|
|
253
|
+
description: 'Query the YATA knowledge graph for project information',
|
|
254
|
+
inputSchema: {
|
|
255
|
+
type: 'object',
|
|
256
|
+
properties: {
|
|
257
|
+
query: {
|
|
258
|
+
type: 'string',
|
|
259
|
+
description: 'Natural language query',
|
|
260
|
+
},
|
|
261
|
+
nodeType: {
|
|
262
|
+
type: 'string',
|
|
263
|
+
description: 'Filter by node type (requirement, design, task, etc.)',
|
|
264
|
+
},
|
|
265
|
+
limit: {
|
|
266
|
+
type: 'number',
|
|
267
|
+
description: 'Maximum number of results',
|
|
268
|
+
default: 10,
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
required: ['query'],
|
|
272
|
+
},
|
|
273
|
+
handler: async (args) => {
|
|
274
|
+
try {
|
|
275
|
+
const { query, nodeType, limit } = args;
|
|
276
|
+
return success({
|
|
277
|
+
action: 'query_knowledge',
|
|
278
|
+
query,
|
|
279
|
+
nodeType,
|
|
280
|
+
limit: limit ?? 10,
|
|
281
|
+
results: [],
|
|
282
|
+
message: 'Knowledge graph query requires YATA connection',
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
catch (e) {
|
|
286
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Update knowledge tool
|
|
292
|
+
*/
|
|
293
|
+
export const updateKnowledgeTool = {
|
|
294
|
+
name: 'sdd_update_knowledge',
|
|
295
|
+
description: 'Update the knowledge graph with new information',
|
|
296
|
+
inputSchema: {
|
|
297
|
+
type: 'object',
|
|
298
|
+
properties: {
|
|
299
|
+
nodeType: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
description: 'Type of node to create/update',
|
|
302
|
+
enum: ['requirement', 'design', 'task', 'decision', 'constraint'],
|
|
303
|
+
},
|
|
304
|
+
nodeId: {
|
|
305
|
+
type: 'string',
|
|
306
|
+
description: 'ID of the node (for updates)',
|
|
307
|
+
},
|
|
308
|
+
properties: {
|
|
309
|
+
type: 'object',
|
|
310
|
+
description: 'Node properties',
|
|
311
|
+
},
|
|
312
|
+
relations: {
|
|
313
|
+
type: 'array',
|
|
314
|
+
description: 'Relations to other nodes',
|
|
315
|
+
items: {
|
|
316
|
+
type: 'object',
|
|
317
|
+
properties: {
|
|
318
|
+
type: { type: 'string' },
|
|
319
|
+
targetId: { type: 'string' },
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
required: ['nodeType', 'properties'],
|
|
325
|
+
},
|
|
326
|
+
handler: async (args) => {
|
|
327
|
+
try {
|
|
328
|
+
const { nodeType, nodeId, properties, relations } = args;
|
|
329
|
+
return success({
|
|
330
|
+
action: 'update_knowledge',
|
|
331
|
+
nodeType,
|
|
332
|
+
nodeId,
|
|
333
|
+
properties,
|
|
334
|
+
relations,
|
|
335
|
+
status: 'pending',
|
|
336
|
+
message: 'Knowledge graph update requires YATA connection',
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
catch (e) {
|
|
340
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
};
|
|
344
|
+
// ============================================================
|
|
345
|
+
// Validation Tools
|
|
346
|
+
// ============================================================
|
|
347
|
+
/**
|
|
348
|
+
* Constitutional validation tool
|
|
349
|
+
*/
|
|
350
|
+
export const validateConstitutionTool = {
|
|
351
|
+
name: 'sdd_validate_constitution',
|
|
352
|
+
description: 'Validate against the 9 Constitutional Articles',
|
|
353
|
+
inputSchema: {
|
|
354
|
+
type: 'object',
|
|
355
|
+
properties: {
|
|
356
|
+
documentPath: {
|
|
357
|
+
type: 'string',
|
|
358
|
+
description: 'Path to the document to validate',
|
|
359
|
+
},
|
|
360
|
+
articles: {
|
|
361
|
+
type: 'array',
|
|
362
|
+
description: 'Specific articles to check (1-9)',
|
|
363
|
+
items: { type: 'number' },
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
required: ['documentPath'],
|
|
367
|
+
},
|
|
368
|
+
handler: async (args) => {
|
|
369
|
+
try {
|
|
370
|
+
const { documentPath, articles } = args;
|
|
371
|
+
const allArticles = articles ?? [1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
372
|
+
return success({
|
|
373
|
+
action: 'validate_constitution',
|
|
374
|
+
documentPath,
|
|
375
|
+
articlesChecked: allArticles,
|
|
376
|
+
results: allArticles.map((num) => ({
|
|
377
|
+
article: num,
|
|
378
|
+
compliant: true,
|
|
379
|
+
findings: [],
|
|
380
|
+
})),
|
|
381
|
+
overallCompliance: true,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
catch (e) {
|
|
385
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* Traceability validation tool
|
|
391
|
+
*/
|
|
392
|
+
export const validateTraceabilityTool = {
|
|
393
|
+
name: 'sdd_validate_traceability',
|
|
394
|
+
description: 'Validate requirement-design-task traceability',
|
|
395
|
+
inputSchema: {
|
|
396
|
+
type: 'object',
|
|
397
|
+
properties: {
|
|
398
|
+
projectPath: {
|
|
399
|
+
type: 'string',
|
|
400
|
+
description: 'Path to the project root',
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
required: ['projectPath'],
|
|
404
|
+
},
|
|
405
|
+
handler: async (args) => {
|
|
406
|
+
try {
|
|
407
|
+
const { projectPath } = args;
|
|
408
|
+
return success({
|
|
409
|
+
action: 'validate_traceability',
|
|
410
|
+
projectPath,
|
|
411
|
+
status: 'validated',
|
|
412
|
+
matrix: {
|
|
413
|
+
requirements: 0,
|
|
414
|
+
designs: 0,
|
|
415
|
+
tasks: 0,
|
|
416
|
+
coverage: '0%',
|
|
417
|
+
},
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
catch (e) {
|
|
421
|
+
return error(e instanceof Error ? e.message : String(e));
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* All SDD tools
|
|
427
|
+
*/
|
|
428
|
+
export const sddTools = [
|
|
429
|
+
// Requirements
|
|
430
|
+
createRequirementsTool,
|
|
431
|
+
validateRequirementsTool,
|
|
432
|
+
// Design
|
|
433
|
+
createDesignTool,
|
|
434
|
+
validateDesignTool,
|
|
435
|
+
// Tasks
|
|
436
|
+
createTasksTool,
|
|
437
|
+
// Knowledge
|
|
438
|
+
queryKnowledgeTool,
|
|
439
|
+
updateKnowledgeTool,
|
|
440
|
+
// Validation
|
|
441
|
+
validateConstitutionTool,
|
|
442
|
+
validateTraceabilityTool,
|
|
443
|
+
];
|
|
444
|
+
/**
|
|
445
|
+
* Get all SDD tool definitions
|
|
446
|
+
*/
|
|
447
|
+
export function getSddTools() {
|
|
448
|
+
return sddTools;
|
|
449
|
+
}
|
|
450
|
+
//# sourceMappingURL=sdd-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdd-tools.js","sourceRoot":"","sources":["../../src/tools/sdd-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;GAEG;AACH,SAAS,IAAI,CAAC,OAAe;IAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACzC,CAAC;AAED;;GAEG;A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