@nahisaho/musubix-core 1.0.0 → 1.0.2
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/dist/cli/commands/codegen.d.ts +125 -0
- package/dist/cli/commands/codegen.d.ts.map +1 -0
- package/dist/cli/commands/codegen.js +684 -0
- package/dist/cli/commands/codegen.js.map +1 -0
- package/dist/cli/commands/design.d.ts +158 -0
- package/dist/cli/commands/design.d.ts.map +1 -0
- package/dist/cli/commands/design.js +562 -0
- package/dist/cli/commands/design.js.map +1 -0
- package/dist/cli/commands/explain.d.ts +116 -0
- package/dist/cli/commands/explain.d.ts.map +1 -0
- package/dist/cli/commands/explain.js +419 -0
- package/dist/cli/commands/explain.js.map +1 -0
- package/dist/cli/commands/index.d.ts +13 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +31 -7
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/requirements.d.ts +103 -0
- package/dist/cli/commands/requirements.d.ts.map +1 -0
- package/dist/cli/commands/requirements.js +403 -0
- package/dist/cli/commands/requirements.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +99 -0
- package/dist/cli/commands/skills.d.ts.map +1 -0
- package/dist/cli/commands/skills.js +363 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/commands/test.d.ts +113 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js +532 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/commands/trace.d.ts +132 -0
- package/dist/cli/commands/trace.d.ts.map +1 -0
- package/dist/cli/commands/trace.js +553 -0
- package/dist/cli/commands/trace.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design Command
|
|
3
|
+
*
|
|
4
|
+
* CLI commands for design generation and validation
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module cli/commands/design
|
|
8
|
+
*
|
|
9
|
+
* @see REQ-CLI-002 - Design CLI
|
|
10
|
+
* @see REQ-DG-001 - Pattern Detection
|
|
11
|
+
* @see REQ-DG-002 - SOLID Validation
|
|
12
|
+
* @see DES-MUSUBIX-001 Section 16-C.2 - designコマンド設計
|
|
13
|
+
* @see TSK-066〜070 - Design CLI実装
|
|
14
|
+
*/
|
|
15
|
+
import { readFile, writeFile, mkdir, access } from 'fs/promises';
|
|
16
|
+
import { resolve, dirname } from 'path';
|
|
17
|
+
import { ExitCode, getGlobalOptions, outputResult } from '../base.js';
|
|
18
|
+
/**
|
|
19
|
+
* SOLID principles validation rules
|
|
20
|
+
*/
|
|
21
|
+
export const SOLID_PRINCIPLES = {
|
|
22
|
+
S: 'Single Responsibility Principle',
|
|
23
|
+
O: 'Open/Closed Principle',
|
|
24
|
+
L: 'Liskov Substitution Principle',
|
|
25
|
+
I: 'Interface Segregation Principle',
|
|
26
|
+
D: 'Dependency Inversion Principle',
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Known design patterns
|
|
30
|
+
*/
|
|
31
|
+
const KNOWN_PATTERNS = {
|
|
32
|
+
factory: {
|
|
33
|
+
name: 'Factory',
|
|
34
|
+
category: 'creational',
|
|
35
|
+
intent: 'Define an interface for creating objects without specifying concrete classes',
|
|
36
|
+
applicability: ['Object creation logic is complex', 'System needs to be independent of how objects are created'],
|
|
37
|
+
consequences: {
|
|
38
|
+
positive: ['Isolates concrete classes', 'Easy to introduce new products'],
|
|
39
|
+
negative: ['May require new subclasses for minor variations'],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
singleton: {
|
|
43
|
+
name: 'Singleton',
|
|
44
|
+
category: 'creational',
|
|
45
|
+
intent: 'Ensure a class has only one instance',
|
|
46
|
+
applicability: ['Exactly one instance is needed', 'Global access point required'],
|
|
47
|
+
consequences: {
|
|
48
|
+
positive: ['Controlled access to sole instance', 'Reduced namespace'],
|
|
49
|
+
negative: ['Difficult to test', 'Hidden dependencies'],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
observer: {
|
|
53
|
+
name: 'Observer',
|
|
54
|
+
category: 'behavioral',
|
|
55
|
+
intent: 'Define a one-to-many dependency between objects',
|
|
56
|
+
applicability: ['Changes to one object require changes to others', 'Objects should be loosely coupled'],
|
|
57
|
+
consequences: {
|
|
58
|
+
positive: ['Loose coupling', 'Broadcast communication'],
|
|
59
|
+
negative: ['Unexpected updates', 'Memory leaks if not managed'],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
strategy: {
|
|
63
|
+
name: 'Strategy',
|
|
64
|
+
category: 'behavioral',
|
|
65
|
+
intent: 'Define a family of algorithms and make them interchangeable',
|
|
66
|
+
applicability: ['Multiple algorithms exist for a task', 'Behavior varies based on context'],
|
|
67
|
+
consequences: {
|
|
68
|
+
positive: ['Algorithms can vary independently', 'Eliminates conditional statements'],
|
|
69
|
+
negative: ['Increased number of objects', 'Clients must be aware of strategies'],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
adapter: {
|
|
73
|
+
name: 'Adapter',
|
|
74
|
+
category: 'structural',
|
|
75
|
+
intent: 'Convert interface of a class into another interface clients expect',
|
|
76
|
+
applicability: ['Use existing class with incompatible interface', 'Create reusable class with unrelated classes'],
|
|
77
|
+
consequences: {
|
|
78
|
+
positive: ['Increased reusability', 'Flexibility in design'],
|
|
79
|
+
negative: ['Increased complexity', 'Performance overhead'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Register design command
|
|
85
|
+
*/
|
|
86
|
+
export function registerDesignCommand(program) {
|
|
87
|
+
const design = program
|
|
88
|
+
.command('design')
|
|
89
|
+
.description('Design generation and validation');
|
|
90
|
+
// design generate
|
|
91
|
+
design
|
|
92
|
+
.command('generate <requirements>')
|
|
93
|
+
.description('Generate design from requirements')
|
|
94
|
+
.option('-o, --output <file>', 'Output file')
|
|
95
|
+
.option('-f, --format <format>', 'Output format', 'markdown')
|
|
96
|
+
.option('-l, --level <level>', 'C4 level', 'component')
|
|
97
|
+
.action(async (requirements, options) => {
|
|
98
|
+
const globalOpts = getGlobalOptions(program);
|
|
99
|
+
try {
|
|
100
|
+
const reqPath = resolve(process.cwd(), requirements);
|
|
101
|
+
const content = await readFile(reqPath, 'utf-8');
|
|
102
|
+
// Parse requirements and generate design
|
|
103
|
+
const model = generateC4Model(content, options.level ?? 'component');
|
|
104
|
+
const patterns = detectApplicablePatterns(content);
|
|
105
|
+
const traceability = generateTraceability(content, model);
|
|
106
|
+
const result = {
|
|
107
|
+
success: true,
|
|
108
|
+
design: model,
|
|
109
|
+
patterns,
|
|
110
|
+
traceability,
|
|
111
|
+
message: `Generated ${options.level ?? 'component'} design with ${model.elements.length} elements`,
|
|
112
|
+
};
|
|
113
|
+
// Output
|
|
114
|
+
if (options.output) {
|
|
115
|
+
const outputPath = resolve(process.cwd(), options.output);
|
|
116
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
117
|
+
let outputContent;
|
|
118
|
+
if (options.format === 'mermaid') {
|
|
119
|
+
outputContent = generateMermaidDiagram(model);
|
|
120
|
+
}
|
|
121
|
+
else if (options.format === 'plantuml') {
|
|
122
|
+
outputContent = generatePlantUMLDiagram(model);
|
|
123
|
+
}
|
|
124
|
+
else if (options.format === 'json' || globalOpts.json) {
|
|
125
|
+
outputContent = JSON.stringify(result, null, 2);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
outputContent = generateMarkdownDesign(model, patterns, traceability);
|
|
129
|
+
}
|
|
130
|
+
await writeFile(outputPath, outputContent, 'utf-8');
|
|
131
|
+
if (!globalOpts.quiet) {
|
|
132
|
+
console.log(`✅ Design saved to ${outputPath}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
outputResult(result, globalOpts);
|
|
137
|
+
}
|
|
138
|
+
process.exit(ExitCode.SUCCESS);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
if (!globalOpts.quiet) {
|
|
142
|
+
console.error(`❌ Design generation failed: ${error.message}`);
|
|
143
|
+
}
|
|
144
|
+
process.exit(ExitCode.GENERAL_ERROR);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
// design patterns
|
|
148
|
+
design
|
|
149
|
+
.command('patterns <context>')
|
|
150
|
+
.description('Detect applicable design patterns')
|
|
151
|
+
.option('-p, --patterns <list>', 'Pattern categories to check', 'all')
|
|
152
|
+
.action(async (context, _options) => {
|
|
153
|
+
const globalOpts = getGlobalOptions(program);
|
|
154
|
+
try {
|
|
155
|
+
// Check if context is a file or direct text
|
|
156
|
+
let content;
|
|
157
|
+
try {
|
|
158
|
+
const contextPath = resolve(process.cwd(), context);
|
|
159
|
+
await access(contextPath);
|
|
160
|
+
content = await readFile(contextPath, 'utf-8');
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
content = context;
|
|
164
|
+
}
|
|
165
|
+
const patterns = detectApplicablePatterns(content);
|
|
166
|
+
const recommendations = generatePatternRecommendations(content, patterns);
|
|
167
|
+
const result = {
|
|
168
|
+
success: true,
|
|
169
|
+
patterns: patterns.map(p => ({
|
|
170
|
+
name: p.name,
|
|
171
|
+
category: p.category,
|
|
172
|
+
confidence: 0.8,
|
|
173
|
+
location: 'identified from context',
|
|
174
|
+
suggestion: p.intent,
|
|
175
|
+
})),
|
|
176
|
+
recommendations,
|
|
177
|
+
message: `Detected ${patterns.length} applicable patterns`,
|
|
178
|
+
};
|
|
179
|
+
outputResult(result, globalOpts);
|
|
180
|
+
process.exit(ExitCode.SUCCESS);
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
if (!globalOpts.quiet) {
|
|
184
|
+
console.error(`❌ Pattern detection failed: ${error.message}`);
|
|
185
|
+
}
|
|
186
|
+
process.exit(ExitCode.GENERAL_ERROR);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
// design validate
|
|
190
|
+
design
|
|
191
|
+
.command('validate <file>')
|
|
192
|
+
.description('Validate SOLID compliance')
|
|
193
|
+
.option('--strict', 'Enable strict mode', false)
|
|
194
|
+
.action(async (file, options) => {
|
|
195
|
+
const globalOpts = getGlobalOptions(program);
|
|
196
|
+
try {
|
|
197
|
+
const filePath = resolve(process.cwd(), file);
|
|
198
|
+
const content = await readFile(filePath, 'utf-8');
|
|
199
|
+
const { violations, gaps } = validateDesign(content, options.strict ?? false);
|
|
200
|
+
const result = {
|
|
201
|
+
success: true,
|
|
202
|
+
valid: violations.length === 0 && gaps.length === 0,
|
|
203
|
+
solidViolations: violations,
|
|
204
|
+
traceabilityGaps: gaps,
|
|
205
|
+
message: violations.length === 0
|
|
206
|
+
? '✅ Design is SOLID compliant'
|
|
207
|
+
: `❌ Found ${violations.length} SOLID violations`,
|
|
208
|
+
};
|
|
209
|
+
outputResult(result, globalOpts);
|
|
210
|
+
process.exit(violations.filter(v => v.severity === 'error').length === 0
|
|
211
|
+
? ExitCode.SUCCESS
|
|
212
|
+
: ExitCode.VALIDATION_ERROR);
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
if (!globalOpts.quiet) {
|
|
216
|
+
console.error(`❌ Validation failed: ${error.message}`);
|
|
217
|
+
}
|
|
218
|
+
process.exit(ExitCode.GENERAL_ERROR);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
// design c4
|
|
222
|
+
design
|
|
223
|
+
.command('c4 <file>')
|
|
224
|
+
.description('Generate C4 diagram')
|
|
225
|
+
.option('-l, --level <level>', 'C4 level (context|container|component|code)', 'component')
|
|
226
|
+
.option('-f, --format <format>', 'Output format (mermaid|plantuml)', 'mermaid')
|
|
227
|
+
.option('-o, --output <file>', 'Output file')
|
|
228
|
+
.action(async (file, options) => {
|
|
229
|
+
const globalOpts = getGlobalOptions(program);
|
|
230
|
+
try {
|
|
231
|
+
const filePath = resolve(process.cwd(), file);
|
|
232
|
+
const content = await readFile(filePath, 'utf-8');
|
|
233
|
+
const model = generateC4Model(content, options.level ?? 'component');
|
|
234
|
+
let diagram;
|
|
235
|
+
if (options.format === 'plantuml') {
|
|
236
|
+
diagram = generatePlantUMLDiagram(model);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
diagram = generateMermaidDiagram(model);
|
|
240
|
+
}
|
|
241
|
+
if (options.output) {
|
|
242
|
+
const outputPath = resolve(process.cwd(), options.output);
|
|
243
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
244
|
+
await writeFile(outputPath, diagram, 'utf-8');
|
|
245
|
+
if (!globalOpts.quiet) {
|
|
246
|
+
console.log(`✅ C4 diagram saved to ${outputPath}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
console.log(diagram);
|
|
251
|
+
}
|
|
252
|
+
process.exit(ExitCode.SUCCESS);
|
|
253
|
+
}
|
|
254
|
+
catch (error) {
|
|
255
|
+
if (!globalOpts.quiet) {
|
|
256
|
+
console.error(`❌ C4 generation failed: ${error.message}`);
|
|
257
|
+
}
|
|
258
|
+
process.exit(ExitCode.GENERAL_ERROR);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
// design adr
|
|
262
|
+
design
|
|
263
|
+
.command('adr <decision>')
|
|
264
|
+
.description('Generate ADR document')
|
|
265
|
+
.option('-o, --output <dir>', 'Output directory', 'docs/adr')
|
|
266
|
+
.option('--context <text>', 'Decision context')
|
|
267
|
+
.option('--status <status>', 'ADR status', 'proposed')
|
|
268
|
+
.action(async (decision, options) => {
|
|
269
|
+
const globalOpts = getGlobalOptions(program);
|
|
270
|
+
try {
|
|
271
|
+
const outputDir = resolve(process.cwd(), options.output ?? 'docs/adr');
|
|
272
|
+
await mkdir(outputDir, { recursive: true });
|
|
273
|
+
// Get next ADR number
|
|
274
|
+
const { readdir } = await import('fs/promises');
|
|
275
|
+
let files = [];
|
|
276
|
+
try {
|
|
277
|
+
files = await readdir(outputDir);
|
|
278
|
+
}
|
|
279
|
+
catch {
|
|
280
|
+
// Directory is new
|
|
281
|
+
}
|
|
282
|
+
const adrNumbers = files
|
|
283
|
+
.filter(f => f.match(/^\d{4}-/))
|
|
284
|
+
.map(f => parseInt(f.slice(0, 4), 10))
|
|
285
|
+
.filter(n => !isNaN(n));
|
|
286
|
+
const nextNumber = Math.max(0, ...adrNumbers) + 1;
|
|
287
|
+
const adr = {
|
|
288
|
+
id: `ADR-${String(nextNumber).padStart(4, '0')}`,
|
|
289
|
+
title: decision,
|
|
290
|
+
date: new Date().toISOString().split('T')[0],
|
|
291
|
+
status: options.status ?? 'proposed',
|
|
292
|
+
context: options.context ?? 'Context to be filled',
|
|
293
|
+
decision: decision,
|
|
294
|
+
consequences: ['Positive and negative consequences to be documented'],
|
|
295
|
+
relatedRequirements: [],
|
|
296
|
+
};
|
|
297
|
+
const content = generateADRMarkdown(adr);
|
|
298
|
+
const slug = decision.toLowerCase().replace(/[^a-z0-9]+/g, '-').slice(0, 50);
|
|
299
|
+
const filename = `${String(nextNumber).padStart(4, '0')}-${slug}.md`;
|
|
300
|
+
const outputPath = resolve(outputDir, filename);
|
|
301
|
+
await writeFile(outputPath, content, 'utf-8');
|
|
302
|
+
if (!globalOpts.quiet) {
|
|
303
|
+
console.log(`✅ ADR created: ${outputPath}`);
|
|
304
|
+
}
|
|
305
|
+
if (globalOpts.json) {
|
|
306
|
+
outputResult({ success: true, adr, path: outputPath }, globalOpts);
|
|
307
|
+
}
|
|
308
|
+
process.exit(ExitCode.SUCCESS);
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
if (!globalOpts.quiet) {
|
|
312
|
+
console.error(`❌ ADR generation failed: ${error.message}`);
|
|
313
|
+
}
|
|
314
|
+
process.exit(ExitCode.GENERAL_ERROR);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Generate C4 model from content
|
|
320
|
+
*/
|
|
321
|
+
function generateC4Model(content, level) {
|
|
322
|
+
const elements = [];
|
|
323
|
+
const relationships = [];
|
|
324
|
+
// Extract entities from content
|
|
325
|
+
const systemMatches = content.match(/\b(?:system|service|application|component|module)\s+["']?([A-Za-z0-9_-]+)["']?/gi) || [];
|
|
326
|
+
const actorMatches = content.match(/\b(?:user|admin|client|actor)\s+["']?([A-Za-z0-9_-]+)["']?/gi) || [];
|
|
327
|
+
const seenIds = new Set();
|
|
328
|
+
for (const match of actorMatches) {
|
|
329
|
+
const name = match.split(/\s+/).pop()?.replace(/["']/g, '') || 'Unknown';
|
|
330
|
+
const id = `person-${name.toLowerCase()}`;
|
|
331
|
+
if (!seenIds.has(id)) {
|
|
332
|
+
seenIds.add(id);
|
|
333
|
+
elements.push({
|
|
334
|
+
id,
|
|
335
|
+
name,
|
|
336
|
+
description: `${name} user/actor`,
|
|
337
|
+
type: 'person',
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
for (const match of systemMatches) {
|
|
342
|
+
const words = match.split(/\s+/);
|
|
343
|
+
const type = words[0].toLowerCase();
|
|
344
|
+
const name = words.pop()?.replace(/["']/g, '') || 'Unknown';
|
|
345
|
+
const id = `${type}-${name.toLowerCase()}`;
|
|
346
|
+
if (!seenIds.has(id)) {
|
|
347
|
+
seenIds.add(id);
|
|
348
|
+
elements.push({
|
|
349
|
+
id,
|
|
350
|
+
name,
|
|
351
|
+
description: `${name} ${type}`,
|
|
352
|
+
type: level === 'context' ? 'software_system' : level === 'container' ? 'container' : 'component',
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
// Generate relationships
|
|
357
|
+
const elementIds = elements.map(e => e.id);
|
|
358
|
+
for (let i = 0; i < elementIds.length - 1; i++) {
|
|
359
|
+
relationships.push({
|
|
360
|
+
source: elementIds[i],
|
|
361
|
+
target: elementIds[i + 1],
|
|
362
|
+
description: 'interacts with',
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
level,
|
|
367
|
+
title: `${level.charAt(0).toUpperCase() + level.slice(1)} Diagram`,
|
|
368
|
+
elements,
|
|
369
|
+
relationships,
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Detect applicable patterns
|
|
374
|
+
*/
|
|
375
|
+
function detectApplicablePatterns(content) {
|
|
376
|
+
const patterns = [];
|
|
377
|
+
const contentLower = content.toLowerCase();
|
|
378
|
+
// Pattern detection heuristics
|
|
379
|
+
if (contentLower.includes('create') || contentLower.includes('factory') || contentLower.includes('builder')) {
|
|
380
|
+
patterns.push(KNOWN_PATTERNS.factory);
|
|
381
|
+
}
|
|
382
|
+
if (contentLower.includes('single') || contentLower.includes('unique') || contentLower.includes('global')) {
|
|
383
|
+
patterns.push(KNOWN_PATTERNS.singleton);
|
|
384
|
+
}
|
|
385
|
+
if (contentLower.includes('notify') || contentLower.includes('event') || contentLower.includes('subscribe')) {
|
|
386
|
+
patterns.push(KNOWN_PATTERNS.observer);
|
|
387
|
+
}
|
|
388
|
+
if (contentLower.includes('algorithm') || contentLower.includes('strategy') || contentLower.includes('interchangeable')) {
|
|
389
|
+
patterns.push(KNOWN_PATTERNS.strategy);
|
|
390
|
+
}
|
|
391
|
+
if (contentLower.includes('adapter') || contentLower.includes('convert') || contentLower.includes('compatible')) {
|
|
392
|
+
patterns.push(KNOWN_PATTERNS.adapter);
|
|
393
|
+
}
|
|
394
|
+
return patterns;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Generate traceability
|
|
398
|
+
*/
|
|
399
|
+
function generateTraceability(content, model) {
|
|
400
|
+
const traceability = [];
|
|
401
|
+
// Extract requirement IDs
|
|
402
|
+
const reqMatches = content.match(/REQ-[A-Z]+-\d+/g) || [];
|
|
403
|
+
for (const req of reqMatches) {
|
|
404
|
+
if (model.elements.length > 0) {
|
|
405
|
+
traceability.push({
|
|
406
|
+
requirement: req,
|
|
407
|
+
designElement: model.elements[0].id,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return traceability;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Generate pattern recommendations
|
|
415
|
+
*/
|
|
416
|
+
function generatePatternRecommendations(analysisContent, patterns) {
|
|
417
|
+
const recommendations = [];
|
|
418
|
+
if (patterns.length === 0) {
|
|
419
|
+
recommendations.push('Consider applying design patterns to improve code structure');
|
|
420
|
+
}
|
|
421
|
+
for (const pattern of patterns) {
|
|
422
|
+
recommendations.push(`${pattern.name}: ${pattern.intent}`);
|
|
423
|
+
}
|
|
424
|
+
// Add content-based recommendations
|
|
425
|
+
if (analysisContent.toLowerCase().includes('complex') || analysisContent.toLowerCase().includes('multiple')) {
|
|
426
|
+
recommendations.push('Consider decomposing complex logic into smaller components');
|
|
427
|
+
}
|
|
428
|
+
return recommendations;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Validate design
|
|
432
|
+
*/
|
|
433
|
+
function validateDesign(designContent, strict) {
|
|
434
|
+
const violations = [];
|
|
435
|
+
const gaps = [];
|
|
436
|
+
// Simple heuristic validation
|
|
437
|
+
const contentLower = designContent.toLowerCase();
|
|
438
|
+
// Check for potential SRP violations
|
|
439
|
+
if (contentLower.includes('and') && designContent.match(/class\s+\w+/gi)?.length) {
|
|
440
|
+
if (strict) {
|
|
441
|
+
violations.push({
|
|
442
|
+
principle: 'S',
|
|
443
|
+
element: 'Multiple responsibilities detected',
|
|
444
|
+
message: 'Class may have multiple responsibilities',
|
|
445
|
+
severity: 'warning',
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
// Check for traceability
|
|
450
|
+
const reqMatches = designContent.match(/REQ-[A-Z]+-\d+/g) || [];
|
|
451
|
+
const desMatches = designContent.match(/DES-[A-Z]+-\d+/g) || [];
|
|
452
|
+
if (reqMatches.length > 0 && desMatches.length === 0) {
|
|
453
|
+
const firstReq = reqMatches[0];
|
|
454
|
+
if (firstReq) {
|
|
455
|
+
gaps.push({
|
|
456
|
+
requirement: firstReq,
|
|
457
|
+
message: 'No design element traceability found',
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
return { violations, gaps };
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Generate Mermaid diagram
|
|
465
|
+
*/
|
|
466
|
+
function generateMermaidDiagram(model) {
|
|
467
|
+
let diagram = `---\ntitle: ${model.title}\n---\nflowchart TD\n`;
|
|
468
|
+
for (const element of model.elements) {
|
|
469
|
+
const shape = element.type === 'person' ? '([' : element.type === 'software_system' ? '[' : '[[';
|
|
470
|
+
const closeShape = element.type === 'person' ? '])' : element.type === 'software_system' ? ']' : ']]';
|
|
471
|
+
diagram += ` ${element.id}${shape}"${element.name}"${closeShape}\n`;
|
|
472
|
+
}
|
|
473
|
+
for (const rel of model.relationships) {
|
|
474
|
+
diagram += ` ${rel.source} -->|${rel.description}| ${rel.target}\n`;
|
|
475
|
+
}
|
|
476
|
+
return diagram;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Generate PlantUML diagram
|
|
480
|
+
*/
|
|
481
|
+
function generatePlantUMLDiagram(model) {
|
|
482
|
+
let diagram = '@startuml\n';
|
|
483
|
+
diagram += `title ${model.title}\n\n`;
|
|
484
|
+
for (const element of model.elements) {
|
|
485
|
+
if (element.type === 'person') {
|
|
486
|
+
diagram += `actor "${element.name}" as ${element.id}\n`;
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
diagram += `component "${element.name}" as ${element.id}\n`;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
diagram += '\n';
|
|
493
|
+
for (const rel of model.relationships) {
|
|
494
|
+
diagram += `${rel.source} --> ${rel.target} : ${rel.description}\n`;
|
|
495
|
+
}
|
|
496
|
+
diagram += '@enduml\n';
|
|
497
|
+
return diagram;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Generate markdown design document
|
|
501
|
+
*/
|
|
502
|
+
function generateMarkdownDesign(model, patterns, traceability) {
|
|
503
|
+
let output = `# Design Document\n\n`;
|
|
504
|
+
output += `## C4 ${model.title}\n\n`;
|
|
505
|
+
output += `### Elements\n\n`;
|
|
506
|
+
output += `| ID | Name | Type | Description |\n`;
|
|
507
|
+
output += `|----|------|------|-------------|\n`;
|
|
508
|
+
for (const el of model.elements) {
|
|
509
|
+
output += `| ${el.id} | ${el.name} | ${el.type} | ${el.description} |\n`;
|
|
510
|
+
}
|
|
511
|
+
output += `\n### Relationships\n\n`;
|
|
512
|
+
output += `| Source | Target | Description |\n`;
|
|
513
|
+
output += `|--------|--------|-------------|\n`;
|
|
514
|
+
for (const rel of model.relationships) {
|
|
515
|
+
output += `| ${rel.source} | ${rel.target} | ${rel.description} |\n`;
|
|
516
|
+
}
|
|
517
|
+
if (patterns.length > 0) {
|
|
518
|
+
output += `\n## Design Patterns\n\n`;
|
|
519
|
+
for (const pattern of patterns) {
|
|
520
|
+
output += `### ${pattern.name}\n`;
|
|
521
|
+
output += `- **Category**: ${pattern.category}\n`;
|
|
522
|
+
output += `- **Intent**: ${pattern.intent}\n\n`;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
if (traceability.length > 0) {
|
|
526
|
+
output += `\n## Traceability\n\n`;
|
|
527
|
+
output += `| Requirement | Design Element |\n`;
|
|
528
|
+
output += `|-------------|----------------|\n`;
|
|
529
|
+
for (const trace of traceability) {
|
|
530
|
+
output += `| ${trace.requirement} | ${trace.designElement} |\n`;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return output;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Generate ADR markdown
|
|
537
|
+
*/
|
|
538
|
+
function generateADRMarkdown(adrDoc) {
|
|
539
|
+
return `# ${adrDoc.id}: ${adrDoc.title}
|
|
540
|
+
|
|
541
|
+
- **Date**: ${adrDoc.date}
|
|
542
|
+
- **Status**: ${adrDoc.status}
|
|
543
|
+
|
|
544
|
+
## Context
|
|
545
|
+
|
|
546
|
+
${adrDoc.context}
|
|
547
|
+
|
|
548
|
+
## Decision
|
|
549
|
+
|
|
550
|
+
${adrDoc.decision}
|
|
551
|
+
|
|
552
|
+
## Consequences
|
|
553
|
+
|
|
554
|
+
${adrDoc.consequences.map(c => `- ${c}`).join('\n')}
|
|
555
|
+
|
|
556
|
+
## Related Requirements
|
|
557
|
+
|
|
558
|
+
${adrDoc.relatedRequirements.length > 0 ? adrDoc.relatedRequirements.map(r => `- ${r}`).join('\n') : '- None'}
|
|
559
|
+
`;
|
|
560
|
+
}
|
|
561
|
+
export { generateC4Model, generateMermaidDiagram, generatePlantUMLDiagram };
|
|
562
|
+
//# sourceMappingURL=design.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.js","sourceRoot":"","sources":["../../../src/cli/commands/design.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAyHtE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,CAAC,EAAE,iCAAiC;IACpC,CAAC,EAAE,uBAAuB;IAC1B,CAAC,EAAE,+BAA+B;IAClC,CAAC,EAAE,iCAAiC;IACpC,CAAC,EAAE,gCAAgC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,cAAc,GAAkC;IACpD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,8EAA8E;QACtF,aAAa,EAAE,CAAC,kCAAkC,EAAE,2DAA2D,CAAC;QAChH,YAAY,EAAE;YACZ,QAAQ,EAAE,CAAC,2BAA2B,EAAE,gCAAgC,CAAC;YACzE,QAAQ,EAAE,C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