@mycodemap/mycodemap 0.4.1 → 0.5.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/CHANGELOG.md +100 -0
- package/README.md +307 -243
- package/dist/ai/claude.d.ts +38 -0
- package/dist/ai/claude.d.ts.map +1 -0
- package/dist/ai/claude.js +169 -0
- package/dist/ai/claude.js.map +1 -0
- package/dist/ai/codex.d.ts +38 -0
- package/dist/ai/codex.d.ts.map +1 -0
- package/dist/ai/codex.js +169 -0
- package/dist/ai/codex.js.map +1 -0
- package/dist/ai/factory.d.ts +48 -0
- package/dist/ai/factory.d.ts.map +1 -0
- package/dist/ai/factory.js +95 -0
- package/dist/ai/factory.js.map +1 -0
- package/dist/ai/index.d.ts +12 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +29 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/provider.d.ts +70 -0
- package/dist/ai/provider.d.ts.map +1 -0
- package/dist/ai/provider.js +31 -0
- package/dist/ai/provider.js.map +1 -0
- package/dist/ai/subagent-caller.d.ts +90 -0
- package/dist/ai/subagent-caller.d.ts.map +1 -0
- package/dist/ai/subagent-caller.js +280 -0
- package/dist/ai/subagent-caller.js.map +1 -0
- package/dist/ai/types.d.ts +70 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/ai/types.js +5 -0
- package/dist/ai/types.js.map +1 -0
- package/dist/cli/commands/analyze-options.d.ts +36 -0
- package/dist/cli/commands/analyze-options.d.ts.map +1 -0
- package/dist/cli/commands/analyze-options.js +147 -0
- package/dist/cli/commands/analyze-options.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +93 -4
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +592 -176
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/ci.d.ts +47 -1
- package/dist/cli/commands/ci.d.ts.map +1 -1
- package/dist/cli/commands/ci.js +208 -1
- package/dist/cli/commands/ci.js.map +1 -1
- package/dist/cli/commands/design.d.ts +47 -0
- package/dist/cli/commands/design.d.ts.map +1 -0
- package/dist/cli/commands/design.js +268 -0
- package/dist/cli/commands/design.js.map +1 -0
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +2 -2
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/generate.d.ts +8 -2
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +151 -22
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +2 -13
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/server.d.ts.map +1 -1
- package/dist/cli/commands/server.js +2 -5
- package/dist/cli/commands/server.js.map +1 -1
- package/dist/cli/commands/ship/checker.d.ts.map +1 -1
- package/dist/cli/commands/ship/checker.js +0 -3
- package/dist/cli/commands/ship/checker.js.map +1 -1
- package/dist/cli/commands/ship/pipeline.d.ts.map +1 -1
- package/dist/cli/commands/ship/pipeline.js +8 -1
- package/dist/cli/commands/ship/pipeline.js.map +1 -1
- package/dist/cli/commands/ship/publisher.d.ts +9 -1
- package/dist/cli/commands/ship/publisher.d.ts.map +1 -1
- package/dist/cli/commands/ship/publisher.js +149 -6
- package/dist/cli/commands/ship/publisher.js.map +1 -1
- package/dist/cli/commands/ship/rules/quality-rules.d.ts +0 -1
- package/dist/cli/commands/ship/rules/quality-rules.d.ts.map +1 -1
- package/dist/cli/commands/ship/rules/quality-rules.js +4 -76
- package/dist/cli/commands/ship/rules/quality-rules.js.map +1 -1
- package/dist/cli/commands/workflow.js +4 -4
- package/dist/cli/commands/workflow.js.map +1 -1
- package/dist/cli/config-loader.d.ts +31 -0
- package/dist/cli/config-loader.d.ts.map +1 -0
- package/dist/cli/config-loader.js +235 -0
- package/dist/cli/config-loader.js.map +1 -0
- package/dist/cli/design-contract-loader.d.ts +15 -0
- package/dist/cli/design-contract-loader.d.ts.map +1 -0
- package/dist/cli/design-contract-loader.js +175 -0
- package/dist/cli/design-contract-loader.js.map +1 -0
- package/dist/cli/design-contract-schema.d.ts +11 -0
- package/dist/cli/design-contract-schema.d.ts.map +1 -0
- package/dist/cli/design-contract-schema.js +75 -0
- package/dist/cli/design-contract-schema.js.map +1 -0
- package/dist/cli/design-handoff-builder.d.ts +15 -0
- package/dist/cli/design-handoff-builder.d.ts.map +1 -0
- package/dist/cli/design-handoff-builder.js +345 -0
- package/dist/cli/design-handoff-builder.js.map +1 -0
- package/dist/cli/design-scope-resolver.d.ts +8 -0
- package/dist/cli/design-scope-resolver.d.ts.map +1 -0
- package/dist/cli/design-scope-resolver.js +712 -0
- package/dist/cli/design-scope-resolver.js.map +1 -0
- package/dist/cli/design-verification-builder.d.ts +8 -0
- package/dist/cli/design-verification-builder.d.ts.map +1 -0
- package/dist/cli/design-verification-builder.js +369 -0
- package/dist/cli/design-verification-builder.js.map +1 -0
- package/dist/cli/index.js +20 -63
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/removed-commands.d.ts +9 -0
- package/dist/cli/removed-commands.d.ts.map +1 -0
- package/dist/cli/removed-commands.js +48 -0
- package/dist/cli/removed-commands.js.map +1 -0
- package/dist/cli/storage-runtime.d.ts +8 -0
- package/dist/cli/storage-runtime.d.ts.map +1 -0
- package/dist/cli/storage-runtime.js +14 -0
- package/dist/cli/storage-runtime.js.map +1 -0
- package/dist/cli/tree-sitter-check.d.ts.map +1 -1
- package/dist/cli/tree-sitter-check.js +0 -1
- package/dist/cli/tree-sitter-check.js.map +1 -1
- package/dist/cli-new/commands/export.d.ts.map +1 -1
- package/dist/cli-new/commands/export.js +2 -2
- package/dist/cli-new/commands/export.js.map +1 -1
- package/dist/cli-new/commands/query.d.ts.map +1 -1
- package/dist/cli-new/commands/query.js +5 -4
- package/dist/cli-new/commands/query.js.map +1 -1
- package/dist/cli-new/commands/server.d.ts.map +1 -1
- package/dist/cli-new/commands/server.js +2 -6
- package/dist/cli-new/commands/server.js.map +1 -1
- package/dist/cli-new/index.d.ts.map +1 -1
- package/dist/cli-new/index.js +0 -2
- package/dist/cli-new/index.js.map +1 -1
- package/dist/core/analyzer.d.ts.map +1 -1
- package/dist/core/analyzer.js +7 -39
- package/dist/core/analyzer.js.map +1 -1
- package/dist/core/file-discovery.d.ts +17 -0
- package/dist/core/file-discovery.d.ts.map +1 -0
- package/dist/core/file-discovery.js +75 -0
- package/dist/core/file-discovery.js.map +1 -0
- package/dist/core/global-index.d.ts +5 -0
- package/dist/core/global-index.d.ts.map +1 -1
- package/dist/core/global-index.js +71 -21
- package/dist/core/global-index.js.map +1 -1
- package/dist/generator/ai-overview.d.ts +51 -0
- package/dist/generator/ai-overview.d.ts.map +1 -0
- package/dist/generator/ai-overview.js +160 -0
- package/dist/generator/ai-overview.js.map +1 -0
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +8 -0
- package/dist/generator/index.js.map +1 -1
- package/dist/infrastructure/parser/implementations/GoParser.d.ts +2 -5
- package/dist/infrastructure/parser/implementations/GoParser.d.ts.map +1 -1
- package/dist/infrastructure/parser/implementations/GoParser.js +2 -5
- package/dist/infrastructure/parser/implementations/GoParser.js.map +1 -1
- package/dist/infrastructure/parser/implementations/PythonParser.d.ts +1 -5
- package/dist/infrastructure/parser/implementations/PythonParser.d.ts.map +1 -1
- package/dist/infrastructure/parser/implementations/PythonParser.js +1 -5
- package/dist/infrastructure/parser/implementations/PythonParser.js.map +1 -1
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts +1 -5
- package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts.map +1 -1
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js +1 -5
- package/dist/infrastructure/parser/implementations/TypeScriptParser.js.map +1 -1
- package/dist/infrastructure/storage/StorageFactory.d.ts +12 -6
- package/dist/infrastructure/storage/StorageFactory.d.ts.map +1 -1
- package/dist/infrastructure/storage/StorageFactory.js +59 -43
- package/dist/infrastructure/storage/StorageFactory.js.map +1 -1
- package/dist/infrastructure/storage/adapters/FileSystemStorage.d.ts.map +1 -1
- package/dist/infrastructure/storage/adapters/FileSystemStorage.js +24 -137
- package/dist/infrastructure/storage/adapters/FileSystemStorage.js.map +1 -1
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.d.ts +10 -18
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.d.ts.map +1 -1
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.js +103 -146
- package/dist/infrastructure/storage/adapters/KuzuDBStorage.js.map +1 -1
- package/dist/infrastructure/storage/adapters/MemoryStorage.d.ts +0 -1
- package/dist/infrastructure/storage/adapters/MemoryStorage.d.ts.map +1 -1
- package/dist/infrastructure/storage/adapters/MemoryStorage.js +16 -136
- package/dist/infrastructure/storage/adapters/MemoryStorage.js.map +1 -1
- package/dist/infrastructure/storage/adapters/Neo4jStorage.d.ts +9 -17
- package/dist/infrastructure/storage/adapters/Neo4jStorage.d.ts.map +1 -1
- package/dist/infrastructure/storage/adapters/Neo4jStorage.js +78 -138
- package/dist/infrastructure/storage/adapters/Neo4jStorage.js.map +1 -1
- package/dist/infrastructure/storage/graph-helpers.d.ts +16 -0
- package/dist/infrastructure/storage/graph-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/graph-helpers.js +161 -0
- package/dist/infrastructure/storage/graph-helpers.js.map +1 -0
- package/dist/infrastructure/storage/index.d.ts.map +1 -1
- package/dist/interface/config/index.d.ts +10 -1
- package/dist/interface/config/index.d.ts.map +1 -1
- package/dist/interface/types/design-contract.d.ts +68 -0
- package/dist/interface/types/design-contract.d.ts.map +1 -0
- package/dist/interface/types/design-contract.js +7 -0
- package/dist/interface/types/design-contract.js.map +1 -0
- package/dist/interface/types/design-handoff.d.ts +68 -0
- package/dist/interface/types/design-handoff.d.ts.map +1 -0
- package/dist/interface/types/design-handoff.js +4 -0
- package/dist/interface/types/design-handoff.js.map +1 -0
- package/dist/interface/types/design-mapping.d.ts +51 -0
- package/dist/interface/types/design-mapping.d.ts.map +1 -0
- package/dist/interface/types/design-mapping.js +4 -0
- package/dist/interface/types/design-mapping.js.map +1 -0
- package/dist/interface/types/design-verification.d.ts +49 -0
- package/dist/interface/types/design-verification.d.ts.map +1 -0
- package/dist/interface/types/design-verification.js +4 -0
- package/dist/interface/types/design-verification.js.map +1 -0
- package/dist/interface/types/index.d.ts +17 -0
- package/dist/interface/types/index.d.ts.map +1 -1
- package/dist/interface/types/storage.d.ts +1 -4
- package/dist/interface/types/storage.d.ts.map +1 -1
- package/dist/orchestrator/ai-feed-generator.d.ts +210 -0
- package/dist/orchestrator/ai-feed-generator.d.ts.map +1 -0
- package/dist/orchestrator/ai-feed-generator.js +377 -0
- package/dist/orchestrator/ai-feed-generator.js.map +1 -0
- package/dist/orchestrator/confidence.d.ts +9 -9
- package/dist/orchestrator/confidence.d.ts.map +1 -1
- package/dist/orchestrator/confidence.js +44 -67
- package/dist/orchestrator/confidence.js.map +1 -1
- package/dist/orchestrator/file-header-scanner.d.ts.map +1 -1
- package/dist/orchestrator/file-header-scanner.js +22 -31
- package/dist/orchestrator/file-header-scanner.js.map +1 -1
- package/dist/orchestrator/intent-router.d.ts +2 -11
- package/dist/orchestrator/intent-router.d.ts.map +1 -1
- package/dist/orchestrator/intent-router.js +58 -49
- package/dist/orchestrator/intent-router.js.map +1 -1
- package/dist/orchestrator/tool-orchestrator.d.ts.map +1 -1
- package/dist/orchestrator/tool-orchestrator.js +6 -4
- package/dist/orchestrator/tool-orchestrator.js.map +1 -1
- package/dist/orchestrator/types.d.ts +113 -2
- package/dist/orchestrator/types.d.ts.map +1 -1
- package/dist/orchestrator/types.js +29 -0
- package/dist/orchestrator/types.js.map +1 -1
- package/dist/orchestrator/workflow/config.d.ts +4 -12
- package/dist/orchestrator/workflow/config.d.ts.map +1 -1
- package/dist/orchestrator/workflow/config.js +4 -6
- package/dist/orchestrator/workflow/config.js.map +1 -1
- package/dist/orchestrator/workflow/git-analyzer.d.ts.map +1 -1
- package/dist/orchestrator/workflow/git-analyzer.js +9 -19
- package/dist/orchestrator/workflow/git-analyzer.js.map +1 -1
- package/dist/orchestrator/workflow/phase-inheritance.d.ts.map +1 -1
- package/dist/orchestrator/workflow/phase-inheritance.js +14 -23
- package/dist/orchestrator/workflow/phase-inheritance.js.map +1 -1
- package/dist/orchestrator/workflow/result-fusion.d.ts.map +1 -1
- package/dist/orchestrator/workflow/result-fusion.js +9 -11
- package/dist/orchestrator/workflow/result-fusion.js.map +1 -1
- package/dist/orchestrator/workflow/templates.d.ts +4 -1
- package/dist/orchestrator/workflow/templates.d.ts.map +1 -1
- package/dist/orchestrator/workflow/templates.js +49 -207
- package/dist/orchestrator/workflow/templates.js.map +1 -1
- package/dist/orchestrator/workflow/test-linker.d.ts.map +1 -1
- package/dist/orchestrator/workflow/test-linker.js +12 -24
- package/dist/orchestrator/workflow/test-linker.js.map +1 -1
- package/dist/orchestrator/workflow/types.d.ts +11 -8
- package/dist/orchestrator/workflow/types.d.ts.map +1 -1
- package/dist/orchestrator/workflow/types.js +8 -1
- package/dist/orchestrator/workflow/types.js.map +1 -1
- package/dist/orchestrator/workflow/visualizer.d.ts.map +1 -1
- package/dist/orchestrator/workflow/visualizer.js +7 -9
- package/dist/orchestrator/workflow/visualizer.js.map +1 -1
- package/dist/orchestrator/workflow/workflow-context.d.ts.map +1 -1
- package/dist/orchestrator/workflow/workflow-context.js +3 -5
- package/dist/orchestrator/workflow/workflow-context.js.map +1 -1
- package/dist/orchestrator/workflow/workflow-orchestrator.d.ts +0 -4
- package/dist/orchestrator/workflow/workflow-orchestrator.d.ts.map +1 -1
- package/dist/orchestrator/workflow/workflow-orchestrator.js +7 -99
- package/dist/orchestrator/workflow/workflow-orchestrator.js.map +1 -1
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +2 -2
- package/dist/parser/index.js.map +1 -1
- package/dist/plugins/index.d.ts +5 -3
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +19 -8
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/plugin-loader.d.ts +21 -6
- package/dist/plugins/plugin-loader.d.ts.map +1 -1
- package/dist/plugins/plugin-loader.js +170 -54
- package/dist/plugins/plugin-loader.js.map +1 -1
- package/dist/plugins/plugin-registry.d.ts +7 -4
- package/dist/plugins/plugin-registry.d.ts.map +1 -1
- package/dist/plugins/plugin-registry.js +62 -14
- package/dist/plugins/plugin-registry.js.map +1 -1
- package/dist/plugins/types.d.ts +16 -6
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/plugins/types.js +2 -0
- package/dist/plugins/types.js.map +1 -1
- package/dist/server/handlers/AnalysisHandler.d.ts +16 -2
- package/dist/server/handlers/AnalysisHandler.d.ts.map +1 -1
- package/dist/server/handlers/AnalysisHandler.js +31 -47
- package/dist/server/handlers/AnalysisHandler.js.map +1 -1
- package/dist/server/routes/api.d.ts.map +1 -1
- package/dist/server/routes/api.js +31 -12
- package/dist/server/routes/api.js.map +1 -1
- package/docs/AI_ASSISTANT_SETUP.md +3 -1
- package/docs/SETUP_GUIDE.md +41 -17
- package/docs/ai-guide/COMMANDS.md +179 -102
- package/docs/ai-guide/INTEGRATION.md +23 -21
- package/docs/ai-guide/OUTPUT.md +621 -10
- package/docs/ai-guide/PATTERNS.md +77 -18
- package/docs/ai-guide/PROMPTS.md +24 -18
- package/docs/ai-guide/QUICKSTART.md +35 -19
- package/docs/ai-guide/README.md +22 -4
- package/docs/archive/test-report-symbol-search.md +384 -0
- package/docs/archive/test-scenario-4-complexity-analysis.md +460 -0
- package/docs/archive/test_report_scenario5.md +615 -0
- package/docs/archive/test_scenario_3_impact_analysis_report.md +520 -0
- package/docs/product-specs/DESIGN_CONTRACT_TEMPLATE.md +79 -0
- package/docs/product-specs/MVP3-ARCHITECTURE-COMPARISON.md +159 -434
- package/docs/product-specs/MVP3-ARCHITECTURE-REDESIGN-PRD.md +169 -261
- package/docs/product-specs/MVP3-ARCHITECTURE-REDESIGN-TECH-PRD.md +201 -1259
- package/docs/product-specs/README.md +9 -1
- package/docs/rules/architecture-guardrails.md +1 -2
- package/docs/rules/engineering-with-codex-openai.md +20 -10
- package/docs/rules/validation.md +29 -4
- package/mycodemap.config.schema.json +76 -5
- package/package.json +1 -1
- package/scripts/experiments/arcadedb-http-smoke.mjs +90 -0
- package/scripts/sync-analyze-docs.js +500 -0
- package/scripts/validate-ai-docs.js +54 -1
- package/scripts/validate-docs.js +992 -25
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// [META] since:2026-03-25 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Centralize design-contract path and section schema so CLI commands and tests share one truth
|
|
3
|
+
export const DEFAULT_DESIGN_CONTRACT_PATH = 'mycodemap.design.md';
|
|
4
|
+
export const REQUIRED_DESIGN_CONTRACT_SECTIONS = [
|
|
5
|
+
'goal',
|
|
6
|
+
'constraints',
|
|
7
|
+
'acceptanceCriteria',
|
|
8
|
+
'nonGoals',
|
|
9
|
+
];
|
|
10
|
+
export const OPTIONAL_DESIGN_CONTRACT_SECTIONS = [
|
|
11
|
+
'context',
|
|
12
|
+
'openQuestions',
|
|
13
|
+
'notes',
|
|
14
|
+
];
|
|
15
|
+
export const DESIGN_CONTRACT_SECTION_IDS = [
|
|
16
|
+
...REQUIRED_DESIGN_CONTRACT_SECTIONS,
|
|
17
|
+
...OPTIONAL_DESIGN_CONTRACT_SECTIONS,
|
|
18
|
+
];
|
|
19
|
+
export const DESIGN_CONTRACT_SECTION_LABELS = {
|
|
20
|
+
goal: 'Goal',
|
|
21
|
+
constraints: 'Constraints',
|
|
22
|
+
acceptanceCriteria: 'Acceptance Criteria',
|
|
23
|
+
nonGoals: 'Non-Goals',
|
|
24
|
+
context: 'Context',
|
|
25
|
+
openQuestions: 'Open Questions',
|
|
26
|
+
notes: 'Notes',
|
|
27
|
+
};
|
|
28
|
+
export const DESIGN_CONTRACT_SECTION_ALIASES = {
|
|
29
|
+
goal: ['goal', 'goals', 'objective', 'objectives'],
|
|
30
|
+
constraints: ['constraints', 'constraint', 'limits', 'limitations', 'guardrails'],
|
|
31
|
+
acceptanceCriteria: [
|
|
32
|
+
'acceptance criteria',
|
|
33
|
+
'acceptance criterion',
|
|
34
|
+
'success criteria',
|
|
35
|
+
'acceptance',
|
|
36
|
+
],
|
|
37
|
+
nonGoals: [
|
|
38
|
+
'non-goals',
|
|
39
|
+
'non goals',
|
|
40
|
+
'non-goal',
|
|
41
|
+
'non goal',
|
|
42
|
+
'exclusions',
|
|
43
|
+
'exclusion',
|
|
44
|
+
'out of scope',
|
|
45
|
+
],
|
|
46
|
+
context: ['context', 'background'],
|
|
47
|
+
openQuestions: ['open questions', 'open question', 'questions'],
|
|
48
|
+
notes: ['notes', 'note'],
|
|
49
|
+
};
|
|
50
|
+
const REQUIRED_DESIGN_CONTRACT_SECTION_SET = new Set(REQUIRED_DESIGN_CONTRACT_SECTIONS);
|
|
51
|
+
function normalizeHeadingToken(heading) {
|
|
52
|
+
return heading
|
|
53
|
+
.trim()
|
|
54
|
+
.toLowerCase()
|
|
55
|
+
.replace(/[::]+$/u, '')
|
|
56
|
+
.replace(/[-_]+/gu, ' ')
|
|
57
|
+
.replace(/\s+/gu, ' ');
|
|
58
|
+
}
|
|
59
|
+
export function isRequiredDesignContractSection(sectionId) {
|
|
60
|
+
return REQUIRED_DESIGN_CONTRACT_SECTION_SET.has(sectionId);
|
|
61
|
+
}
|
|
62
|
+
export function normalizeDesignContractHeading(heading) {
|
|
63
|
+
const normalizedHeading = normalizeHeadingToken(heading);
|
|
64
|
+
for (const sectionId of DESIGN_CONTRACT_SECTION_IDS) {
|
|
65
|
+
const aliases = DESIGN_CONTRACT_SECTION_ALIASES[sectionId];
|
|
66
|
+
if (aliases.some((alias) => normalizeHeadingToken(alias) === normalizedHeading)) {
|
|
67
|
+
return sectionId;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
export function getCanonicalDesignContractHeading(sectionId) {
|
|
73
|
+
return DESIGN_CONTRACT_SECTION_LABELS[sectionId];
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=design-contract-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-contract-schema.js","sourceRoot":"","sources":["../../src/cli/design-contract-schema.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,qGAAqG;AAOrG,MAAM,CAAC,MAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAElE,MAAM,CAAC,MAAM,iCAAiC,GAA+C;IAC3F,MAAM;IACN,aAAa;IACb,oBAAoB;IACpB,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAGxC;IACJ,SAAS;IACT,eAAe;IACf,OAAO;CACR,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAuC;IAC7E,GAAG,iCAAiC;IACpC,GAAG,iCAAiC;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAsD;IAC/F,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,aAAa;IAC1B,kBAAkB,EAAE,qBAAqB;IACzC,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,gBAAgB;IAC/B,KAAK,EAAE,OAAO;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAiE;IAC3G,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC;IAClD,WAAW,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,CAAC;IACjF,kBAAkB,EAAE;QAClB,qBAAqB;QACrB,sBAAsB;QACtB,kBAAkB;QAClB,YAAY;KACb;IACD,QAAQ,EAAE;QACR,WAAW;QACX,WAAW;QACX,UAAU;QACV,UAAU;QACV,YAAY;QACZ,WAAW;QACX,cAAc;KACf;IACD,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;IAClC,aAAa,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,WAAW,CAAC;IAC/D,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,oCAAoC,GAAG,IAAI,GAAG,CAClD,iCAAiC,CAClC,CAAC;AAEF,SAAS,qBAAqB,CAAC,OAAe;IAC5C,OAAO,OAAO;SACX,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;SACtB,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,SAAkC;IAElC,OAAO,oCAAoC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,OAAe;IAEf,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAEzD,KAAK,MAAM,SAAS,IAAI,2BAA2B,EAAE,CAAC;QACpD,MAAM,OAAO,GAAG,+BAA+B,CAAC,SAAS,CAAC,CAAC;QAC3D,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC,EAAE,CAAC;YAChF,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,SAAkC;IAElC,OAAO,8BAA8B,CAAC,SAAS,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DesignHandoffArtifacts, DesignHandoffResult } from '../interface/types/index.js';
|
|
2
|
+
export interface ResolveDesignHandoffArtifactsOptions {
|
|
3
|
+
filePath: string;
|
|
4
|
+
outputDir?: string;
|
|
5
|
+
rootDir?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface BuildDesignHandoffOptions {
|
|
8
|
+
filePath?: string;
|
|
9
|
+
outputDir?: string;
|
|
10
|
+
rootDir?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveDesignHandoffArtifacts(options: ResolveDesignHandoffArtifactsOptions): DesignHandoffArtifacts;
|
|
13
|
+
export declare function buildDesignHandoff(options?: BuildDesignHandoffOptions): Promise<DesignHandoffResult>;
|
|
14
|
+
export declare function renderDesignHandoffMarkdown(result: DesignHandoffResult): string;
|
|
15
|
+
//# sourceMappingURL=design-handoff-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-handoff-builder.d.ts","sourceRoot":"","sources":["../../src/cli/design-handoff-builder.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAKV,sBAAsB,EAKtB,mBAAmB,EAIpB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,oCAAoC;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA2SD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,oCAAoC,GAC5C,sBAAsB,CAYxB;AAED,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAmE9B;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CA+C/E"}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
// [META] since:2026-03-25 | owner:cli-team | stable:false
|
|
2
|
+
// [WHY] Build canonical design handoff artifacts from validated design contracts and design-to-code mapping truth
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { cwd } from 'node:process';
|
|
5
|
+
import { hasBlockingDesignContractDiagnostics, loadDesignContract } from './design-contract-loader.js';
|
|
6
|
+
import { resolveOutputDir } from './paths.js';
|
|
7
|
+
import { resolveDesignScope } from './design-scope-resolver.js';
|
|
8
|
+
const REQUIRED_APPROVAL_SECTIONS = [
|
|
9
|
+
'goal',
|
|
10
|
+
'constraints',
|
|
11
|
+
'acceptanceCriteria',
|
|
12
|
+
'nonGoals',
|
|
13
|
+
];
|
|
14
|
+
function uniq(items) {
|
|
15
|
+
return Array.from(new Set(items));
|
|
16
|
+
}
|
|
17
|
+
function normalizeItemText(line) {
|
|
18
|
+
return line
|
|
19
|
+
.trim()
|
|
20
|
+
.replace(/^[-*+]\s+\[[ xX]\]\s*/u, '')
|
|
21
|
+
.replace(/^[-*+]\s+/u, '')
|
|
22
|
+
.replace(/^\d+\.\s+/u, '')
|
|
23
|
+
.trim();
|
|
24
|
+
}
|
|
25
|
+
function toSectionItems(section) {
|
|
26
|
+
return (section?.content ?? [])
|
|
27
|
+
.map(normalizeItemText)
|
|
28
|
+
.filter((item) => item.length > 0);
|
|
29
|
+
}
|
|
30
|
+
function toHandoffStem(filePath) {
|
|
31
|
+
const baseName = path.basename(filePath);
|
|
32
|
+
if (baseName.endsWith('.design.md')) {
|
|
33
|
+
return baseName.slice(0, -'.design.md'.length);
|
|
34
|
+
}
|
|
35
|
+
return path.parse(baseName).name;
|
|
36
|
+
}
|
|
37
|
+
function toSourceRefs(items) {
|
|
38
|
+
return uniq(items).filter((item) => item.length > 0);
|
|
39
|
+
}
|
|
40
|
+
function toSectionRef(sectionId) {
|
|
41
|
+
return `design:${sectionId}`;
|
|
42
|
+
}
|
|
43
|
+
function toCandidateRef(candidatePath) {
|
|
44
|
+
return `candidate:${candidatePath}`;
|
|
45
|
+
}
|
|
46
|
+
function toDiagnosticRef(code) {
|
|
47
|
+
return `diagnostic:${code}`;
|
|
48
|
+
}
|
|
49
|
+
function describeApproval(sectionId) {
|
|
50
|
+
const labels = {
|
|
51
|
+
goal: 'Goal',
|
|
52
|
+
constraints: 'Constraints',
|
|
53
|
+
acceptanceCriteria: 'Acceptance Criteria',
|
|
54
|
+
nonGoals: 'Non-Goals',
|
|
55
|
+
context: 'Context',
|
|
56
|
+
openQuestions: 'Open Questions',
|
|
57
|
+
notes: 'Notes',
|
|
58
|
+
};
|
|
59
|
+
return `${labels[sectionId]} 已被纳入 handoff 事实输入`;
|
|
60
|
+
}
|
|
61
|
+
function createApprovedSectionItems(sections) {
|
|
62
|
+
return REQUIRED_APPROVAL_SECTIONS
|
|
63
|
+
.filter((sectionId) => sections[sectionId] !== undefined)
|
|
64
|
+
.map((sectionId) => ({
|
|
65
|
+
id: `approved-${sectionId}`,
|
|
66
|
+
status: 'approved',
|
|
67
|
+
text: describeApproval(sectionId),
|
|
68
|
+
sourceRefs: [toSectionRef(sectionId)],
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
function createAssumptions(candidates) {
|
|
72
|
+
return candidates.flatMap((candidate, candidateIndex) => candidate.unknowns.map((unknown, unknownIndex) => ({
|
|
73
|
+
id: `assumption-${candidateIndex + 1}-${unknownIndex + 1}`,
|
|
74
|
+
text: unknown,
|
|
75
|
+
sourceRefs: [toCandidateRef(candidate.path)],
|
|
76
|
+
})));
|
|
77
|
+
}
|
|
78
|
+
function createOpenQuestions(section) {
|
|
79
|
+
return toSectionItems(section).map((text, index) => ({
|
|
80
|
+
id: `open-question-${index + 1}`,
|
|
81
|
+
text,
|
|
82
|
+
sourceRefs: [toSectionRef('openQuestions')],
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
function createReviewGateApproval(assumptions, openQuestions) {
|
|
86
|
+
if (assumptions.length === 0 && openQuestions.length === 0) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
const sourceRefs = toSourceRefs([
|
|
90
|
+
...assumptions.flatMap((item) => item.sourceRefs),
|
|
91
|
+
...openQuestions.flatMap((item) => item.sourceRefs),
|
|
92
|
+
toDiagnosticRef('review-required'),
|
|
93
|
+
]);
|
|
94
|
+
return {
|
|
95
|
+
id: 'human-review-required',
|
|
96
|
+
status: 'needs-review',
|
|
97
|
+
text: '存在 assumptions 或 open questions,需人类确认后再执行。',
|
|
98
|
+
sourceRefs,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function contractDiagnosticToHandoff(diagnostic) {
|
|
102
|
+
const sourceRefs = [toDiagnosticRef(diagnostic.code)];
|
|
103
|
+
if (diagnostic.section) {
|
|
104
|
+
sourceRefs.push(toSectionRef(diagnostic.section));
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
code: diagnostic.code,
|
|
108
|
+
severity: diagnostic.severity,
|
|
109
|
+
blocker: diagnostic.severity === 'error',
|
|
110
|
+
message: diagnostic.message,
|
|
111
|
+
sourceRefs: toSourceRefs(sourceRefs),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function mappingDiagnosticToHandoff(diagnostic) {
|
|
115
|
+
const sourceRefs = [toDiagnosticRef(diagnostic.code)];
|
|
116
|
+
if (diagnostic.section) {
|
|
117
|
+
sourceRefs.push(toSectionRef(diagnostic.section));
|
|
118
|
+
}
|
|
119
|
+
if (diagnostic.candidatePaths) {
|
|
120
|
+
sourceRefs.push(...diagnostic.candidatePaths.map(toCandidateRef));
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
code: diagnostic.code,
|
|
124
|
+
severity: diagnostic.severity,
|
|
125
|
+
blocker: diagnostic.blocker,
|
|
126
|
+
message: diagnostic.message,
|
|
127
|
+
sourceRefs: toSourceRefs(sourceRefs),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function createBlockedMappingDiagnostic(diagnostics) {
|
|
131
|
+
const blockerSourceRefs = diagnostics
|
|
132
|
+
.filter((diagnostic) => diagnostic.blocker)
|
|
133
|
+
.flatMap((diagnostic) => diagnostic.sourceRefs);
|
|
134
|
+
if (blockerSourceRefs.length === 0) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
code: 'blocked-mapping',
|
|
139
|
+
severity: 'error',
|
|
140
|
+
blocker: true,
|
|
141
|
+
message: 'Handoff blocked because the design contract did not resolve a safe executable scope.',
|
|
142
|
+
sourceRefs: toSourceRefs([toDiagnosticRef('blocked-mapping'), ...blockerSourceRefs]),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function createReviewRequiredDiagnostic(approvals, assumptions, openQuestions) {
|
|
146
|
+
const sourceRefs = toSourceRefs([
|
|
147
|
+
...approvals.flatMap((item) => item.sourceRefs),
|
|
148
|
+
...assumptions.flatMap((item) => item.sourceRefs),
|
|
149
|
+
...openQuestions.flatMap((item) => item.sourceRefs),
|
|
150
|
+
toDiagnosticRef('review-required'),
|
|
151
|
+
]);
|
|
152
|
+
if (sourceRefs.length === 0) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
code: 'review-required',
|
|
157
|
+
severity: 'warning',
|
|
158
|
+
blocker: false,
|
|
159
|
+
message: 'Handoff generated successfully but still requires human review before execution.',
|
|
160
|
+
sourceRefs,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function formatRisk(candidate) {
|
|
164
|
+
const suffix = candidate.unknowns.length > 0
|
|
165
|
+
? ` (${candidate.unknowns.length} unresolved item${candidate.unknowns.length === 1 ? '' : 's'})`
|
|
166
|
+
: '';
|
|
167
|
+
return `${candidate.path}: ${candidate.risk}${suffix}`;
|
|
168
|
+
}
|
|
169
|
+
function toSupportingFiles(candidates) {
|
|
170
|
+
const touchedFiles = new Set(candidates.map((candidate) => candidate.path));
|
|
171
|
+
const testFiles = new Set(candidates.flatMap((candidate) => candidate.testImpact));
|
|
172
|
+
return uniq(candidates.flatMap((candidate) => candidate.dependencies))
|
|
173
|
+
.filter((dependency) => !touchedFiles.has(dependency))
|
|
174
|
+
.filter((dependency) => !testFiles.has(dependency));
|
|
175
|
+
}
|
|
176
|
+
function createPayload(sections, candidates, approvals, assumptions, openQuestions) {
|
|
177
|
+
return {
|
|
178
|
+
goal: toSectionItems(sections.goal),
|
|
179
|
+
constraints: toSectionItems(sections.constraints),
|
|
180
|
+
acceptanceCriteria: toSectionItems(sections.acceptanceCriteria),
|
|
181
|
+
nonGoals: toSectionItems(sections.nonGoals),
|
|
182
|
+
touchedFiles: uniq(candidates.map((candidate) => candidate.path)),
|
|
183
|
+
supportingFiles: toSupportingFiles(candidates),
|
|
184
|
+
tests: uniq(candidates.flatMap((candidate) => candidate.testImpact)),
|
|
185
|
+
risks: uniq(candidates.map(formatRisk)),
|
|
186
|
+
validationChecklist: toSectionItems(sections.acceptanceCriteria),
|
|
187
|
+
approvals: [...approvals],
|
|
188
|
+
assumptions: [...assumptions],
|
|
189
|
+
openQuestions: [...openQuestions],
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function createSummary(candidates, payload, diagnostics, requiresReview) {
|
|
193
|
+
return {
|
|
194
|
+
candidateCount: candidates.length,
|
|
195
|
+
touchedFileCount: payload.touchedFiles.length,
|
|
196
|
+
supportingFileCount: payload.supportingFiles.length,
|
|
197
|
+
testCount: payload.tests.length,
|
|
198
|
+
riskCount: payload.risks.length,
|
|
199
|
+
approvalCount: payload.approvals.length,
|
|
200
|
+
assumptionCount: payload.assumptions.length,
|
|
201
|
+
openQuestionCount: payload.openQuestions.length,
|
|
202
|
+
diagnosticCount: diagnostics.length,
|
|
203
|
+
requiresReview,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function dedupeDiagnostics(diagnostics) {
|
|
207
|
+
const seen = new Set();
|
|
208
|
+
const result = [];
|
|
209
|
+
for (const diagnostic of diagnostics) {
|
|
210
|
+
const key = [
|
|
211
|
+
diagnostic.code,
|
|
212
|
+
diagnostic.severity,
|
|
213
|
+
diagnostic.blocker ? 'blocker' : 'non-blocker',
|
|
214
|
+
diagnostic.message,
|
|
215
|
+
...diagnostic.sourceRefs,
|
|
216
|
+
].join('|');
|
|
217
|
+
if (seen.has(key)) {
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
seen.add(key);
|
|
221
|
+
result.push(diagnostic);
|
|
222
|
+
}
|
|
223
|
+
return result;
|
|
224
|
+
}
|
|
225
|
+
function renderList(items) {
|
|
226
|
+
return items.length > 0 ? items.map((item) => `- ${item}`) : ['- none'];
|
|
227
|
+
}
|
|
228
|
+
function renderTraceItems(items, formatter) {
|
|
229
|
+
return items.length > 0 ? items.map(formatter) : ['- none'];
|
|
230
|
+
}
|
|
231
|
+
export function resolveDesignHandoffArtifacts(options) {
|
|
232
|
+
const rootDir = options.rootDir ?? cwd();
|
|
233
|
+
const baseOutputDir = resolveOutputDir(options.outputDir, rootDir).outputDir;
|
|
234
|
+
const handoffOutputDir = path.join(baseOutputDir, 'handoffs');
|
|
235
|
+
const stem = toHandoffStem(options.filePath);
|
|
236
|
+
return {
|
|
237
|
+
stem,
|
|
238
|
+
outputDir: handoffOutputDir,
|
|
239
|
+
markdownPath: path.join(handoffOutputDir, `${stem}.handoff.md`),
|
|
240
|
+
jsonPath: path.join(handoffOutputDir, `${stem}.handoff.json`),
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
export async function buildDesignHandoff(options = {}) {
|
|
244
|
+
const rootDir = options.rootDir ?? cwd();
|
|
245
|
+
const loadedContract = await loadDesignContract({
|
|
246
|
+
filePath: options.filePath,
|
|
247
|
+
rootDir,
|
|
248
|
+
});
|
|
249
|
+
const mapping = await resolveDesignScope({
|
|
250
|
+
filePath: options.filePath,
|
|
251
|
+
rootDir,
|
|
252
|
+
});
|
|
253
|
+
const artifacts = resolveDesignHandoffArtifacts({
|
|
254
|
+
filePath: loadedContract.filePath,
|
|
255
|
+
outputDir: options.outputDir,
|
|
256
|
+
rootDir,
|
|
257
|
+
});
|
|
258
|
+
const contractDiagnostics = loadedContract.diagnostics.map(contractDiagnosticToHandoff);
|
|
259
|
+
const mappingDiagnostics = mapping.diagnostics.map(mappingDiagnosticToHandoff);
|
|
260
|
+
const contractBlocked = hasBlockingDesignContractDiagnostics(loadedContract.diagnostics);
|
|
261
|
+
const mappingBlocked = mapping.diagnostics.some((diagnostic) => diagnostic.blocker) || !mapping.ok;
|
|
262
|
+
const approvals = createApprovedSectionItems(loadedContract.contract.sections);
|
|
263
|
+
const assumptions = contractBlocked || mappingBlocked ? [] : createAssumptions(mapping.candidates);
|
|
264
|
+
const openQuestions = createOpenQuestions(loadedContract.contract.sections.openQuestions);
|
|
265
|
+
const reviewGate = contractBlocked || mappingBlocked
|
|
266
|
+
? undefined
|
|
267
|
+
: createReviewGateApproval(assumptions, openQuestions);
|
|
268
|
+
const payload = createPayload(loadedContract.contract.sections, contractBlocked || mappingBlocked ? [] : mapping.candidates, reviewGate ? [...approvals, reviewGate] : approvals, assumptions, openQuestions);
|
|
269
|
+
const requiresReview = !contractBlocked && !mappingBlocked
|
|
270
|
+
&& (payload.assumptions.length > 0 || payload.openQuestions.length > 0);
|
|
271
|
+
const diagnostics = dedupeDiagnostics([
|
|
272
|
+
...contractDiagnostics,
|
|
273
|
+
...mappingDiagnostics,
|
|
274
|
+
]);
|
|
275
|
+
const blockedDiagnostic = contractBlocked || mappingBlocked
|
|
276
|
+
? createBlockedMappingDiagnostic(diagnostics)
|
|
277
|
+
: undefined;
|
|
278
|
+
const reviewRequiredDiagnostic = requiresReview
|
|
279
|
+
? createReviewRequiredDiagnostic(payload.approvals, payload.assumptions, payload.openQuestions)
|
|
280
|
+
: undefined;
|
|
281
|
+
if (blockedDiagnostic) {
|
|
282
|
+
diagnostics.push(blockedDiagnostic);
|
|
283
|
+
}
|
|
284
|
+
if (reviewRequiredDiagnostic) {
|
|
285
|
+
diagnostics.push(reviewRequiredDiagnostic);
|
|
286
|
+
}
|
|
287
|
+
const ok = !contractBlocked && !mappingBlocked;
|
|
288
|
+
const readyForExecution = ok && !requiresReview;
|
|
289
|
+
return {
|
|
290
|
+
ok,
|
|
291
|
+
filePath: loadedContract.filePath,
|
|
292
|
+
outputDir: artifacts.outputDir,
|
|
293
|
+
readyForExecution,
|
|
294
|
+
artifacts,
|
|
295
|
+
summary: createSummary(mapping.candidates, payload, dedupeDiagnostics(diagnostics), requiresReview),
|
|
296
|
+
handoff: payload,
|
|
297
|
+
diagnostics: dedupeDiagnostics(diagnostics),
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
export function renderDesignHandoffMarkdown(result) {
|
|
301
|
+
const approvalLines = renderTraceItems(result.handoff.approvals, (item) => {
|
|
302
|
+
const approval = item;
|
|
303
|
+
return `- [${approval.status}] ${approval.text} (${approval.sourceRefs.join(', ')})`;
|
|
304
|
+
});
|
|
305
|
+
const assumptionLines = renderTraceItems(result.handoff.assumptions, (item) => `- ${item.text} (${item.sourceRefs.join(', ')})`);
|
|
306
|
+
const openQuestionLines = renderTraceItems(result.handoff.openQuestions, (item) => `- ${item.text} (${item.sourceRefs.join(', ')})`);
|
|
307
|
+
return [
|
|
308
|
+
`# Design Handoff: ${result.artifacts.stem}`,
|
|
309
|
+
'',
|
|
310
|
+
`Ready for execution: ${result.readyForExecution ? 'yes' : 'no'}`,
|
|
311
|
+
`Source file: ${result.filePath}`,
|
|
312
|
+
'',
|
|
313
|
+
'## Goal',
|
|
314
|
+
...renderList(result.handoff.goal),
|
|
315
|
+
'',
|
|
316
|
+
'## Scope',
|
|
317
|
+
'### Touched Files',
|
|
318
|
+
...renderList(result.handoff.touchedFiles),
|
|
319
|
+
'',
|
|
320
|
+
'### Supporting Files',
|
|
321
|
+
...renderList(result.handoff.supportingFiles),
|
|
322
|
+
'',
|
|
323
|
+
'### Tests',
|
|
324
|
+
...renderList(result.handoff.tests),
|
|
325
|
+
'',
|
|
326
|
+
'## Non-Goals',
|
|
327
|
+
...renderList(result.handoff.nonGoals),
|
|
328
|
+
'',
|
|
329
|
+
'## Risks',
|
|
330
|
+
...renderList(result.handoff.risks),
|
|
331
|
+
'',
|
|
332
|
+
'## Validation Checklist',
|
|
333
|
+
...renderList(result.handoff.validationChecklist),
|
|
334
|
+
'',
|
|
335
|
+
'## Assumptions',
|
|
336
|
+
...assumptionLines,
|
|
337
|
+
'',
|
|
338
|
+
'## Open Questions',
|
|
339
|
+
...openQuestionLines,
|
|
340
|
+
'',
|
|
341
|
+
'## Approval Gates',
|
|
342
|
+
...approvalLines,
|
|
343
|
+
].join('\n');
|
|
344
|
+
}
|
|
345
|
+
//# sourceMappingURL=design-handoff-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-handoff-builder.js","sourceRoot":"","sources":["../../src/cli/design-handoff-builder.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,kHAAkH;AAElH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,oCAAoC,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AA6BhE,MAAM,0BAA0B,GAAuC;IACrE,MAAM;IACN,aAAa;IACb,oBAAoB;IACpB,UAAU;CACX,CAAC;AAEF,SAAS,IAAI,CAAI,KAAmB;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY;IACrC,OAAO,IAAI;SACR,IAAI,EAAE;SACN,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC;SACrC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;SACzB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;SACzB,IAAI,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,cAAc,CAAC,OAA+B;IACrD,OAAO,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC;SAC5B,GAAG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AmB,CAAC;QACjD,EAAE;QACF,gBAAgB;QAChB,GAAG,eAAe;QAClB,EAAE;QACF,mBAAmB;QACnB,GAAG,iBAAiB;QACpB,EAAE;QACF,mBAAmB;QACnB,GAAG,aAAa;KACjB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DesignMappingResult } from '../interface/types/index.js';
|
|
2
|
+
interface ResolveDesignScopeOptions {
|
|
3
|
+
filePath?: string;
|
|
4
|
+
rootDir?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveDesignScope(options?: ResolveDesignScopeOptions): Promise<DesignMappingResult>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=design-scope-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-scope-resolver.d.ts","sourceRoot":"","sources":["../../src/cli/design-scope-resolver.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAUV,mBAAmB,EAEpB,MAAM,6BAA6B,CAAC;AA8CrC,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAu8BD,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAiD9B"}
|