@h2nguyen/arc42-node-mcp-server 1.0.3 → 2.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/CHANGELOG.md +41 -0
- package/README.md +222 -11
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +28 -72
- package/dist/server.js.map +1 -1
- package/dist/templates/index.d.ts +46 -1
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +63 -896
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/locales/cz/index.d.ts +9 -0
- package/dist/templates/locales/cz/index.d.ts.map +1 -0
- package/dist/templates/locales/cz/index.js +29 -0
- package/dist/templates/locales/cz/index.js.map +1 -0
- package/dist/templates/locales/cz/sections.d.ts +10 -0
- package/dist/templates/locales/cz/sections.d.ts.map +1 -0
- package/dist/templates/locales/cz/sections.js +39 -0
- package/dist/templates/locales/cz/sections.js.map +1 -0
- package/dist/templates/locales/cz/templates.d.ts +9 -0
- package/dist/templates/locales/cz/templates.d.ts.map +1 -0
- package/dist/templates/locales/cz/templates.js +274 -0
- package/dist/templates/locales/cz/templates.js.map +1 -0
- package/dist/templates/locales/de/index.d.ts +26 -0
- package/dist/templates/locales/de/index.d.ts.map +1 -0
- package/dist/templates/locales/de/index.js +53 -0
- package/dist/templates/locales/de/index.js.map +1 -0
- package/dist/templates/locales/de/sections.d.ts +28 -0
- package/dist/templates/locales/de/sections.d.ts.map +1 -0
- package/dist/templates/locales/de/sections.js +57 -0
- package/dist/templates/locales/de/sections.js.map +1 -0
- package/dist/templates/locales/de/templates.d.ts +22 -0
- package/dist/templates/locales/de/templates.d.ts.map +1 -0
- package/dist/templates/locales/de/templates.js +1060 -0
- package/dist/templates/locales/de/templates.js.map +1 -0
- package/dist/templates/locales/en/index.d.ts +26 -0
- package/dist/templates/locales/en/index.d.ts.map +1 -0
- package/dist/templates/locales/en/index.js +53 -0
- package/dist/templates/locales/en/index.js.map +1 -0
- package/dist/templates/locales/en/sections.d.ts +25 -0
- package/dist/templates/locales/en/sections.d.ts.map +1 -0
- package/dist/templates/locales/en/sections.js +54 -0
- package/dist/templates/locales/en/sections.js.map +1 -0
- package/dist/templates/locales/en/templates.d.ts +22 -0
- package/dist/templates/locales/en/templates.d.ts.map +1 -0
- package/dist/templates/locales/en/templates.js +1060 -0
- package/dist/templates/locales/en/templates.js.map +1 -0
- package/dist/templates/locales/es/index.d.ts +26 -0
- package/dist/templates/locales/es/index.d.ts.map +1 -0
- package/dist/templates/locales/es/index.js +53 -0
- package/dist/templates/locales/es/index.js.map +1 -0
- package/dist/templates/locales/es/sections.d.ts +28 -0
- package/dist/templates/locales/es/sections.d.ts.map +1 -0
- package/dist/templates/locales/es/sections.js +57 -0
- package/dist/templates/locales/es/sections.js.map +1 -0
- package/dist/templates/locales/es/templates.d.ts +22 -0
- package/dist/templates/locales/es/templates.d.ts.map +1 -0
- package/dist/templates/locales/es/templates.js +1060 -0
- package/dist/templates/locales/es/templates.js.map +1 -0
- package/dist/templates/locales/fr/index.d.ts +26 -0
- package/dist/templates/locales/fr/index.d.ts.map +1 -0
- package/dist/templates/locales/fr/index.js +53 -0
- package/dist/templates/locales/fr/index.js.map +1 -0
- package/dist/templates/locales/fr/sections.d.ts +28 -0
- package/dist/templates/locales/fr/sections.d.ts.map +1 -0
- package/dist/templates/locales/fr/sections.js +57 -0
- package/dist/templates/locales/fr/sections.js.map +1 -0
- package/dist/templates/locales/fr/templates.d.ts +22 -0
- package/dist/templates/locales/fr/templates.d.ts.map +1 -0
- package/dist/templates/locales/fr/templates.js +1060 -0
- package/dist/templates/locales/fr/templates.js.map +1 -0
- package/dist/templates/locales/index.d.ts +67 -0
- package/dist/templates/locales/index.d.ts.map +1 -0
- package/dist/templates/locales/index.js +100 -0
- package/dist/templates/locales/index.js.map +1 -0
- package/dist/templates/locales/it/index.d.ts +26 -0
- package/dist/templates/locales/it/index.d.ts.map +1 -0
- package/dist/templates/locales/it/index.js +53 -0
- package/dist/templates/locales/it/index.js.map +1 -0
- package/dist/templates/locales/it/sections.d.ts +28 -0
- package/dist/templates/locales/it/sections.d.ts.map +1 -0
- package/dist/templates/locales/it/sections.js +57 -0
- package/dist/templates/locales/it/sections.js.map +1 -0
- package/dist/templates/locales/it/templates.d.ts +22 -0
- package/dist/templates/locales/it/templates.d.ts.map +1 -0
- package/dist/templates/locales/it/templates.js +1060 -0
- package/dist/templates/locales/it/templates.js.map +1 -0
- package/dist/templates/locales/language-factory.d.ts +97 -0
- package/dist/templates/locales/language-factory.d.ts.map +1 -0
- package/dist/templates/locales/language-factory.js +126 -0
- package/dist/templates/locales/language-factory.js.map +1 -0
- package/dist/templates/locales/language-registry.d.ts +114 -0
- package/dist/templates/locales/language-registry.d.ts.map +1 -0
- package/dist/templates/locales/language-registry.js +146 -0
- package/dist/templates/locales/language-registry.js.map +1 -0
- package/dist/templates/locales/language-strategy.d.ts +126 -0
- package/dist/templates/locales/language-strategy.d.ts.map +1 -0
- package/dist/templates/locales/language-strategy.js +46 -0
- package/dist/templates/locales/language-strategy.js.map +1 -0
- package/dist/templates/locales/nl/index.d.ts +26 -0
- package/dist/templates/locales/nl/index.d.ts.map +1 -0
- package/dist/templates/locales/nl/index.js +53 -0
- package/dist/templates/locales/nl/index.js.map +1 -0
- package/dist/templates/locales/nl/sections.d.ts +28 -0
- package/dist/templates/locales/nl/sections.d.ts.map +1 -0
- package/dist/templates/locales/nl/sections.js +57 -0
- package/dist/templates/locales/nl/sections.js.map +1 -0
- package/dist/templates/locales/nl/templates.d.ts +22 -0
- package/dist/templates/locales/nl/templates.d.ts.map +1 -0
- package/dist/templates/locales/nl/templates.js +1060 -0
- package/dist/templates/locales/nl/templates.js.map +1 -0
- package/dist/templates/locales/pt/index.d.ts +26 -0
- package/dist/templates/locales/pt/index.d.ts.map +1 -0
- package/dist/templates/locales/pt/index.js +53 -0
- package/dist/templates/locales/pt/index.js.map +1 -0
- package/dist/templates/locales/pt/sections.d.ts +28 -0
- package/dist/templates/locales/pt/sections.d.ts.map +1 -0
- package/dist/templates/locales/pt/sections.js +57 -0
- package/dist/templates/locales/pt/sections.js.map +1 -0
- package/dist/templates/locales/pt/templates.d.ts +22 -0
- package/dist/templates/locales/pt/templates.d.ts.map +1 -0
- package/dist/templates/locales/pt/templates.js +1060 -0
- package/dist/templates/locales/pt/templates.js.map +1 -0
- package/dist/templates/locales/ru/index.d.ts +15 -0
- package/dist/templates/locales/ru/index.d.ts.map +1 -0
- package/dist/templates/locales/ru/index.js +41 -0
- package/dist/templates/locales/ru/index.js.map +1 -0
- package/dist/templates/locales/ru/sections.d.ts +28 -0
- package/dist/templates/locales/ru/sections.d.ts.map +1 -0
- package/dist/templates/locales/ru/sections.js +57 -0
- package/dist/templates/locales/ru/sections.js.map +1 -0
- package/dist/templates/locales/ru/templates.d.ts +22 -0
- package/dist/templates/locales/ru/templates.d.ts.map +1 -0
- package/dist/templates/locales/ru/templates.js +664 -0
- package/dist/templates/locales/ru/templates.js.map +1 -0
- package/dist/templates/locales/template-provider.d.ts +122 -0
- package/dist/templates/locales/template-provider.d.ts.map +1 -0
- package/dist/templates/locales/template-provider.js +173 -0
- package/dist/templates/locales/template-provider.js.map +1 -0
- package/dist/templates/locales/ukr/index.d.ts +9 -0
- package/dist/templates/locales/ukr/index.d.ts.map +1 -0
- package/dist/templates/locales/ukr/index.js +29 -0
- package/dist/templates/locales/ukr/index.js.map +1 -0
- package/dist/templates/locales/ukr/sections.d.ts +10 -0
- package/dist/templates/locales/ukr/sections.d.ts.map +1 -0
- package/dist/templates/locales/ukr/sections.js +39 -0
- package/dist/templates/locales/ukr/sections.js.map +1 -0
- package/dist/templates/locales/ukr/templates.d.ts +9 -0
- package/dist/templates/locales/ukr/templates.d.ts.map +1 -0
- package/dist/templates/locales/ukr/templates.js +242 -0
- package/dist/templates/locales/ukr/templates.js.map +1 -0
- package/dist/templates/locales/zh/index.d.ts +9 -0
- package/dist/templates/locales/zh/index.d.ts.map +1 -0
- package/dist/templates/locales/zh/index.js +29 -0
- package/dist/templates/locales/zh/index.js.map +1 -0
- package/dist/templates/locales/zh/sections.d.ts +10 -0
- package/dist/templates/locales/zh/sections.d.ts.map +1 -0
- package/dist/templates/locales/zh/sections.js +39 -0
- package/dist/templates/locales/zh/sections.js.map +1 -0
- package/dist/templates/locales/zh/templates.d.ts +9 -0
- package/dist/templates/locales/zh/templates.d.ts.map +1 -0
- package/dist/templates/locales/zh/templates.js +260 -0
- package/dist/templates/locales/zh/templates.js.map +1 -0
- package/dist/tools/arc42-init.d.ts +8 -2
- package/dist/tools/arc42-init.d.ts.map +1 -1
- package/dist/tools/arc42-init.js +67 -97
- package/dist/tools/arc42-init.js.map +1 -1
- package/dist/tools/arc42-status.d.ts +5 -2
- package/dist/tools/arc42-status.d.ts.map +1 -1
- package/dist/tools/arc42-status.js +47 -18
- package/dist/tools/arc42-status.js.map +1 -1
- package/dist/tools/arc42-workflow-guide.d.ts +6 -3
- package/dist/tools/arc42-workflow-guide.d.ts.map +1 -1
- package/dist/tools/arc42-workflow-guide.js +42 -276
- package/dist/tools/arc42-workflow-guide.js.map +1 -1
- package/dist/tools/generate-template.d.ts +7 -3
- package/dist/tools/generate-template.d.ts.map +1 -1
- package/dist/tools/generate-template.js +44 -35
- package/dist/tools/generate-template.js.map +1 -1
- package/dist/tools/get-section.d.ts +7 -3
- package/dist/tools/get-section.d.ts.map +1 -1
- package/dist/tools/get-section.js +38 -38
- package/dist/tools/get-section.js.map +1 -1
- package/dist/tools/index.d.ts +6 -5
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +14 -20
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/update-section.d.ts +9 -3
- package/dist/tools/update-section.d.ts.map +1 -1
- package/dist/tools/update-section.js +12 -44
- package/dist/tools/update-section.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../src/templates/locales/ukr/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,UAAU,WAAW,CAAC,OAAqB;IAC/C,MAAM,SAAS,GAAuC;QACpD,2BAA2B,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBtC;QACG,6BAA6B,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;CAaxC;QACG,sBAAsB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;CAejC;QACG,sBAAsB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;CAejC;QACG,wBAAwB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;CAWnC;QACG,iBAAiB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;CAc5B;QACG,oBAAoB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;CAW/B;QACG,aAAa,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;CAYxB;QACG,2BAA2B,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;CActC;QACG,yBAAyB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;CAkBpC;QACG,oBAAoB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;CAa/B;QACG,aAAa,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;CAaxB;KACE,CAAC;IACF,OAAO,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,WAAoB;IACnD,MAAM,IAAI,GAAG,WAAW,IAAI,QAAQ,CAAC;IACrC,OAAO,KAAK,IAAI;;mDAEiC,IAAI;;;;;;;;;;;;;CAatD,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chinese Language Strategy
|
|
3
|
+
* @module templates/locales/zh
|
|
4
|
+
*/
|
|
5
|
+
import type { LanguageStrategy } from '../language-strategy.js';
|
|
6
|
+
export declare const chineseStrategy: LanguageStrategy;
|
|
7
|
+
export { getSectionTitle, getSectionDescription } from './sections.js';
|
|
8
|
+
export { getTemplate, getWorkflowGuide, getReadmeContent } from './templates.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/locales/zh/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAoC,MAAM,yBAAyB,CAAC;AAIlG,eAAO,MAAM,eAAe,EAAE,gBAwB7B,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chinese Language Strategy
|
|
3
|
+
* @module templates/locales/zh
|
|
4
|
+
*/
|
|
5
|
+
import { getSectionTitle, getSectionDescription } from './sections.js';
|
|
6
|
+
import { getTemplate, getWorkflowGuide, getReadmeContent } from './templates.js';
|
|
7
|
+
export const chineseStrategy = {
|
|
8
|
+
code: 'ZH',
|
|
9
|
+
name: 'Chinese',
|
|
10
|
+
nativeName: '中文',
|
|
11
|
+
getSectionTitle(section) {
|
|
12
|
+
return { title: getSectionTitle(section), section };
|
|
13
|
+
},
|
|
14
|
+
getSectionDescription(section) {
|
|
15
|
+
return { description: getSectionDescription(section), section };
|
|
16
|
+
},
|
|
17
|
+
getTemplate(section) {
|
|
18
|
+
return getTemplate(section);
|
|
19
|
+
},
|
|
20
|
+
getWorkflowGuide() {
|
|
21
|
+
return getWorkflowGuide();
|
|
22
|
+
},
|
|
23
|
+
getReadmeContent(projectName) {
|
|
24
|
+
return getReadmeContent(projectName);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export { getSectionTitle, getSectionDescription } from './sections.js';
|
|
28
|
+
export { getTemplate, getWorkflowGuide, getReadmeContent } from './templates.js';
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/templates/locales/zh/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEjF,MAAM,CAAC,MAAM,eAAe,GAAqB;IAC/C,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,IAAI;IAEhB,eAAe,CAAC,OAAqB;QACnC,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACtD,CAAC;IAED,qBAAqB,CAAC,OAAqB;QACzC,OAAO,EAAE,WAAW,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IAClE,CAAC;IAED,WAAW,CAAC,OAAqB;QAC/B,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,gBAAgB;QACd,OAAO,gBAAgB,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAC,WAAoB;QACnC,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;CACF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chinese Section Titles and Descriptions
|
|
3
|
+
* @module templates/locales/zh/sections
|
|
4
|
+
*/
|
|
5
|
+
import type { Arc42Section } from '../../../types.js';
|
|
6
|
+
export declare const SECTION_TITLES: Record<Arc42Section, string>;
|
|
7
|
+
export declare const SECTION_DESCRIPTIONS: Record<Arc42Section, string>;
|
|
8
|
+
export declare function getSectionTitle(section: Arc42Section): string;
|
|
9
|
+
export declare function getSectionDescription(section: Arc42Section): string;
|
|
10
|
+
//# sourceMappingURL=sections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../../src/templates/locales/zh/sections.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAavD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAa7D,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAE7D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAEnE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chinese Section Titles and Descriptions
|
|
3
|
+
* @module templates/locales/zh/sections
|
|
4
|
+
*/
|
|
5
|
+
export const SECTION_TITLES = {
|
|
6
|
+
'01_introduction_and_goals': '简介和目标',
|
|
7
|
+
'02_architecture_constraints': '架构约束',
|
|
8
|
+
'03_context_and_scope': '上下文和范围',
|
|
9
|
+
'04_solution_strategy': '解决方案策略',
|
|
10
|
+
'05_building_block_view': '构建块视图',
|
|
11
|
+
'06_runtime_view': '运行时视图',
|
|
12
|
+
'07_deployment_view': '部署视图',
|
|
13
|
+
'08_concepts': '横切概念',
|
|
14
|
+
'09_architecture_decisions': '架构决策',
|
|
15
|
+
'10_quality_requirements': '质量要求',
|
|
16
|
+
'11_technical_risks': '风险和技术债务',
|
|
17
|
+
'12_glossary': '术语表'
|
|
18
|
+
};
|
|
19
|
+
export const SECTION_DESCRIPTIONS = {
|
|
20
|
+
'01_introduction_and_goals': '任务陈述、质量目标和利益相关者',
|
|
21
|
+
'02_architecture_constraints': '技术和组织约束',
|
|
22
|
+
'03_context_and_scope': '业务和技术上下文、外部接口',
|
|
23
|
+
'04_solution_strategy': '基本决策和解决方案策略',
|
|
24
|
+
'05_building_block_view': '系统的静态分解',
|
|
25
|
+
'06_runtime_view': '动态行为和重要场景',
|
|
26
|
+
'07_deployment_view': '基础设施和部署',
|
|
27
|
+
'08_concepts': '横切规则和解决方案方法',
|
|
28
|
+
'09_architecture_decisions': '重要的、昂贵的、关键的或有风险的决策',
|
|
29
|
+
'10_quality_requirements': '质量树和质量场景',
|
|
30
|
+
'11_technical_risks': '已知问题、风险和技术债务',
|
|
31
|
+
'12_glossary': '重要的业务和技术术语'
|
|
32
|
+
};
|
|
33
|
+
export function getSectionTitle(section) {
|
|
34
|
+
return SECTION_TITLES[section];
|
|
35
|
+
}
|
|
36
|
+
export function getSectionDescription(section) {
|
|
37
|
+
return SECTION_DESCRIPTIONS[section];
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=sections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sections.js","sourceRoot":"","sources":["../../../../src/templates/locales/zh/sections.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAiC;IAC1D,2BAA2B,EAAE,OAAO;IACpC,6BAA6B,EAAE,MAAM;IACrC,sBAAsB,EAAE,QAAQ;IAChC,sBAAsB,EAAE,QAAQ;IAChC,wBAAwB,EAAE,OAAO;IACjC,iBAAiB,EAAE,OAAO;IAC1B,oBAAoB,EAAE,MAAM;IAC5B,aAAa,EAAE,MAAM;IACrB,2BAA2B,EAAE,MAAM;IACnC,yBAAyB,EAAE,MAAM;IACjC,oBAAoB,EAAE,SAAS;IAC/B,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAiC;IAChE,2BAA2B,EAAE,iBAAiB;IAC9C,6BAA6B,EAAE,SAAS;IACxC,sBAAsB,EAAE,eAAe;IACvC,sBAAsB,EAAE,aAAa;IACrC,wBAAwB,EAAE,SAAS;IACnC,iBAAiB,EAAE,WAAW;IAC9B,oBAAoB,EAAE,SAAS;IAC/B,aAAa,EAAE,aAAa;IAC5B,2BAA2B,EAAE,oBAAoB;IACjD,yBAAyB,EAAE,UAAU;IACrC,oBAAoB,EAAE,cAAc;IACpC,aAAa,EAAE,YAAY;CAC5B,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,OAAqB;IACnD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAqB;IACzD,OAAO,oBAAoB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chinese Templates
|
|
3
|
+
* @module templates/locales/zh/templates
|
|
4
|
+
*/
|
|
5
|
+
import type { Arc42Section } from '../../../types.js';
|
|
6
|
+
export declare function getTemplate(section: Arc42Section): string;
|
|
7
|
+
export declare function getWorkflowGuide(): string;
|
|
8
|
+
export declare function getReadmeContent(projectName?: string): string;
|
|
9
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../src/templates/locales/zh/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAgNzD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CA0BzC;AAED,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAkB7D"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chinese Templates
|
|
3
|
+
* @module templates/locales/zh/templates
|
|
4
|
+
*/
|
|
5
|
+
export function getTemplate(section) {
|
|
6
|
+
const templates = {
|
|
7
|
+
'01_introduction_and_goals': () => `# 1. 简介和目标
|
|
8
|
+
|
|
9
|
+
## 需求概述
|
|
10
|
+
|
|
11
|
+
**目的**: 描述架构师和开发团队必须考虑的相关需求和驱动力。
|
|
12
|
+
|
|
13
|
+
### 关键需求
|
|
14
|
+
|
|
15
|
+
| ID | 需求 | 优先级 |
|
|
16
|
+
|----|------|--------|
|
|
17
|
+
| REQ-1 | [简短描述] | 高 |
|
|
18
|
+
| REQ-2 | [简短描述] | 中 |
|
|
19
|
+
|
|
20
|
+
## 质量目标
|
|
21
|
+
|
|
22
|
+
| 优先级 | 质量目标 | 动机 |
|
|
23
|
+
|--------|----------|------|
|
|
24
|
+
| 1 | [例如:性能] | [为什么这很关键] |
|
|
25
|
+
| 2 | [例如:安全性] | [为什么这很关键] |
|
|
26
|
+
|
|
27
|
+
## 利益相关者
|
|
28
|
+
|
|
29
|
+
| 角色/姓名 | 联系方式 | 期望 |
|
|
30
|
+
|-----------|----------|------|
|
|
31
|
+
| 产品负责人 | [姓名/邮箱] | [对架构的期望] |
|
|
32
|
+
| 开发团队 | [团队名称] | [需要了解的内容] |
|
|
33
|
+
`,
|
|
34
|
+
'02_architecture_constraints': () => `# 2. 架构约束
|
|
35
|
+
|
|
36
|
+
## 技术约束
|
|
37
|
+
|
|
38
|
+
| 约束 | 背景/动机 |
|
|
39
|
+
|------|-----------|
|
|
40
|
+
| [例如:云平台] | [为什么存在这个约束] |
|
|
41
|
+
|
|
42
|
+
## 组织约束
|
|
43
|
+
|
|
44
|
+
| 约束 | 背景/动机 |
|
|
45
|
+
|------|-----------|
|
|
46
|
+
| [例如:团队结构] | [这如何影响架构] |
|
|
47
|
+
|
|
48
|
+
## 惯例
|
|
49
|
+
|
|
50
|
+
- [例如:微服务架构模式]
|
|
51
|
+
- [例如:RESTful API 设计]
|
|
52
|
+
`,
|
|
53
|
+
'03_context_and_scope': () => `# 3. 上下文和范围
|
|
54
|
+
|
|
55
|
+
## 业务上下文
|
|
56
|
+
|
|
57
|
+
### 上下文图
|
|
58
|
+
|
|
59
|
+
\`\`\`
|
|
60
|
+
[创建一个显示您的系统和外部系统/用户的图表]
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
### 外部接口
|
|
64
|
+
|
|
65
|
+
| 外部实体 | 接口 | 目的 |
|
|
66
|
+
|----------|------|------|
|
|
67
|
+
| [外部系统1] | [API/协议] | [交换什么数据/功能] |
|
|
68
|
+
|
|
69
|
+
## 技术上下文
|
|
70
|
+
|
|
71
|
+
| 接口 | 技术 | 协议 | 格式 |
|
|
72
|
+
|------|------|------|------|
|
|
73
|
+
| [API 1] | [REST API] | [HTTPS] | [JSON] |
|
|
74
|
+
`,
|
|
75
|
+
'04_solution_strategy': () => `# 4. 解决方案策略
|
|
76
|
+
|
|
77
|
+
## 关键决策
|
|
78
|
+
|
|
79
|
+
### 架构模式
|
|
80
|
+
|
|
81
|
+
| 模式 | 动机 | 后果 |
|
|
82
|
+
|------|------|------|
|
|
83
|
+
| [例如:微服务] | [为什么选择这种模式] | [优点和权衡] |
|
|
84
|
+
|
|
85
|
+
### 技术决策
|
|
86
|
+
|
|
87
|
+
| 组件 | 技术 | 原因 |
|
|
88
|
+
|------|------|------|
|
|
89
|
+
| 后端 | [例如:Node.js] | [为什么选择] |
|
|
90
|
+
| 前端 | [例如:React] | [原因] |
|
|
91
|
+
`,
|
|
92
|
+
'05_building_block_view': () => `# 5. 构建块视图
|
|
93
|
+
|
|
94
|
+
## 第1层:系统上下文
|
|
95
|
+
|
|
96
|
+
\`\`\`
|
|
97
|
+
[显示主要构建块的组件图]
|
|
98
|
+
\`\`\`
|
|
99
|
+
|
|
100
|
+
| 组件 | 职责 |
|
|
101
|
+
|------|------|
|
|
102
|
+
| [组件1] | [它做什么] |
|
|
103
|
+
| [组件2] | [它做什么] |
|
|
104
|
+
`,
|
|
105
|
+
'06_runtime_view': () => `# 6. 运行时视图
|
|
106
|
+
|
|
107
|
+
## 关键场景
|
|
108
|
+
|
|
109
|
+
### 场景1:[名称]
|
|
110
|
+
|
|
111
|
+
**描述**: [在这个场景中发生了什么]
|
|
112
|
+
|
|
113
|
+
\`\`\`mermaid
|
|
114
|
+
sequenceDiagram
|
|
115
|
+
participant 用户
|
|
116
|
+
participant 前端
|
|
117
|
+
participant API
|
|
118
|
+
participant 数据库
|
|
119
|
+
\`\`\`
|
|
120
|
+
`,
|
|
121
|
+
'07_deployment_view': () => `# 7. 部署视图
|
|
122
|
+
|
|
123
|
+
## 基础设施概述
|
|
124
|
+
|
|
125
|
+
\`\`\`
|
|
126
|
+
[显示服务器、容器、网络的图表]
|
|
127
|
+
\`\`\`
|
|
128
|
+
|
|
129
|
+
| 组件 | 技术 | 配置 |
|
|
130
|
+
|------|------|------|
|
|
131
|
+
| [应用服务器] | [AWS ECS] | [规格] |
|
|
132
|
+
`,
|
|
133
|
+
'08_concepts': () => `# 8. 横切概念
|
|
134
|
+
|
|
135
|
+
## 领域模型
|
|
136
|
+
|
|
137
|
+
| 实体 | 职责 | 关系 |
|
|
138
|
+
|------|------|------|
|
|
139
|
+
| [实体1] | [目的] | [相关实体] |
|
|
140
|
+
|
|
141
|
+
## 安全
|
|
142
|
+
|
|
143
|
+
### 认证
|
|
144
|
+
- 方法:[JWT, OAuth2等]
|
|
145
|
+
|
|
146
|
+
### 授权
|
|
147
|
+
- 模型:[RBAC, ABAC等]
|
|
148
|
+
`,
|
|
149
|
+
'09_architecture_decisions': () => `# 9. 架构决策
|
|
150
|
+
|
|
151
|
+
### ADR-001: [决策标题]
|
|
152
|
+
|
|
153
|
+
**日期**: [YYYY-MM-DD]
|
|
154
|
+
**状态**: [提议 | 接受 | 废弃]
|
|
155
|
+
|
|
156
|
+
**上下文**: [问题描述]
|
|
157
|
+
|
|
158
|
+
**决策**: [我们决定做什么]
|
|
159
|
+
|
|
160
|
+
**后果**:
|
|
161
|
+
- 正面:[优点1]
|
|
162
|
+
- 负面:[权衡1]
|
|
163
|
+
`,
|
|
164
|
+
'10_quality_requirements': () => `# 10. 质量要求
|
|
165
|
+
|
|
166
|
+
## 质量树
|
|
167
|
+
|
|
168
|
+
\`\`\`
|
|
169
|
+
质量
|
|
170
|
+
├── 性能
|
|
171
|
+
├── 安全性
|
|
172
|
+
├── 可靠性
|
|
173
|
+
└── 可维护性
|
|
174
|
+
\`\`\`
|
|
175
|
+
|
|
176
|
+
## 质量场景
|
|
177
|
+
|
|
178
|
+
| 方面 | 描述 |
|
|
179
|
+
|------|------|
|
|
180
|
+
| 场景 | 用户在正常负载下请求数据 |
|
|
181
|
+
| 度量 | 95th百分位响应时间 < 200ms |
|
|
182
|
+
`,
|
|
183
|
+
'11_technical_risks': () => `# 11. 风险和技术债务
|
|
184
|
+
|
|
185
|
+
## 风险
|
|
186
|
+
|
|
187
|
+
| 风险 | 概率 | 影响 | 状态 |
|
|
188
|
+
|------|------|------|------|
|
|
189
|
+
| [风险1] | [高/中/低] | [高/中/低] | [开放/缓解] |
|
|
190
|
+
|
|
191
|
+
## 技术债务
|
|
192
|
+
|
|
193
|
+
| 项目 | 类型 | 影响 | 优先级 |
|
|
194
|
+
|------|------|------|--------|
|
|
195
|
+
| [债务1] | [代码/架构] | [高/中/低] | [1-5] |
|
|
196
|
+
`,
|
|
197
|
+
'12_glossary': () => `# 12. 术语表
|
|
198
|
+
|
|
199
|
+
## 业务术语
|
|
200
|
+
|
|
201
|
+
| 术语 | 定义 |
|
|
202
|
+
|------|------|
|
|
203
|
+
| [业务术语1] | [清晰、简洁的定义] |
|
|
204
|
+
|
|
205
|
+
## 技术术语
|
|
206
|
+
|
|
207
|
+
| 术语 | 定义 | 同义词 |
|
|
208
|
+
|------|------|--------|
|
|
209
|
+
| [技术术语1] | [定义] | [替代名称] |
|
|
210
|
+
`
|
|
211
|
+
};
|
|
212
|
+
return templates[section]();
|
|
213
|
+
}
|
|
214
|
+
export function getWorkflowGuide() {
|
|
215
|
+
return `# arc42架构文档工作流指南
|
|
216
|
+
|
|
217
|
+
## 概述
|
|
218
|
+
|
|
219
|
+
本指南将帮助您使用arc42模板记录软件架构。
|
|
220
|
+
|
|
221
|
+
## arc42的12个部分
|
|
222
|
+
|
|
223
|
+
1. **简介和目标** - 定义您要构建什么以及为什么
|
|
224
|
+
2. **架构约束** - 您不能做什么?
|
|
225
|
+
3. **上下文和范围** - 什么在内部,什么在外部?
|
|
226
|
+
4. **解决方案策略** - 高层方法
|
|
227
|
+
5. **构建块视图** - 静态结构
|
|
228
|
+
6. **运行时视图** - 动态行为
|
|
229
|
+
7. **部署视图** - 基础设施
|
|
230
|
+
8. **横切概念** - 整个系统中使用的模式
|
|
231
|
+
9. **架构决策** - 重要决策
|
|
232
|
+
10. **质量要求** - 质量场景
|
|
233
|
+
11. **风险和技术债务** - 什么可能出错?
|
|
234
|
+
12. **术语表** - 定义术语
|
|
235
|
+
|
|
236
|
+
## 资源
|
|
237
|
+
|
|
238
|
+
- [arc42网站](https://arc42.org/)
|
|
239
|
+
`;
|
|
240
|
+
}
|
|
241
|
+
export function getReadmeContent(projectName) {
|
|
242
|
+
const name = projectName || '项目';
|
|
243
|
+
return `# ${name} - 架构文档
|
|
244
|
+
|
|
245
|
+
本目录包含${name}的架构文档,基于arc42模板。
|
|
246
|
+
|
|
247
|
+
## 结构
|
|
248
|
+
|
|
249
|
+
- \`sections/\` - 单独的部分markdown文件(12个部分)
|
|
250
|
+
- \`images/\` - 图表和图像
|
|
251
|
+
- \`config.yaml\` - 配置
|
|
252
|
+
|
|
253
|
+
## 入门
|
|
254
|
+
|
|
255
|
+
1. 从第1部分开始:简介和目标
|
|
256
|
+
2. 迭代地处理各个部分
|
|
257
|
+
3. 使用图表来说明概念
|
|
258
|
+
`;
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../src/templates/locales/zh/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,UAAU,WAAW,CAAC,OAAqB;IAC/C,MAAM,SAAS,GAAuC;QACpD,2BAA2B,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtC;QACG,6BAA6B,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;CAkBxC;QACG,sBAAsB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;CAqBjC;QACG,sBAAsB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;CAgBjC;QACG,wBAAwB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;CAYnC;QACG,iBAAiB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;CAe5B;QACG,oBAAoB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;CAW/B;QACG,aAAa,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;CAexB;QACG,2BAA2B,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;CActC;QACG,yBAAyB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;CAkBpC;QACG,oBAAoB,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;CAa/B;QACG,aAAa,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;CAaxB;KACE,CAAC;IACF,OAAO,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,WAAoB;IACnD,MAAM,IAAI,GAAG,WAAW,IAAI,IAAI,CAAC;IACjC,OAAO,KAAK,IAAI;;OAEX,IAAI;;;;;;;;;;;;;CAaV,CAAC;AACF,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { ToolContext, ToolResponse } from '../types.js';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const arc42InitInputSchema: {
|
|
4
|
+
projectName: z.ZodString;
|
|
5
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
targetFolder: z.ZodOptional<z.ZodString>;
|
|
7
|
+
language: z.ZodDefault<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
|
|
8
|
+
};
|
|
9
|
+
export declare const arc42InitDescription = "Initialize arc42 documentation workspace for a project.\n\nThis tool creates the complete directory structure and template files for arc42 architecture documentation. It sets up all 12 sections with templates, configuration files, and a main documentation file.\n\nUse this tool once at the beginning of your architecture documentation journey.\n\nYou can optionally specify a targetFolder to create the documentation in a specific directory instead of the default workspace.";
|
|
4
10
|
export declare function arc42InitHandler(args: Record<string, unknown>, context: ToolContext): Promise<ToolResponse>;
|
|
5
11
|
//# sourceMappingURL=arc42-init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arc42-init.d.ts","sourceRoot":"","sources":["../../src/tools/arc42-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"arc42-init.d.ts","sourceRoot":"","sources":["../../src/tools/arc42-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAyC,MAAM,aAAa,CAAC;AAgB/F,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,geAM+F,CAAC;AAEjI,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,YAAY,CAAC,CA8IvB"}
|
package/dist/tools/arc42-init.js
CHANGED
|
@@ -1,47 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { resolveWorkspaceRoot, getErrorMessage } from '../types.js';
|
|
2
|
-
import { ARC42_REFERENCE, getArc42ReferenceConfig } from '../templates/index.js';
|
|
3
|
+
import { ARC42_REFERENCE, getArc42ReferenceConfig, templateProvider, SUPPORTED_LANGUAGE_CODES, isLanguageCode, normalizeLanguageCode } from '../templates/index.js';
|
|
3
4
|
import { mkdir, writeFile } from 'fs/promises';
|
|
4
5
|
import { existsSync } from 'fs';
|
|
5
6
|
import { join } from 'path';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
// Zod schema as the SINGLE SOURCE OF TRUTH for tool input
|
|
8
|
+
const languageValues = SUPPORTED_LANGUAGE_CODES;
|
|
9
|
+
export const arc42InitInputSchema = {
|
|
10
|
+
projectName: z.string().describe('Name of the project being documented'),
|
|
11
|
+
force: z.boolean().optional().describe('Force re-initialization even if workspace exists'),
|
|
12
|
+
targetFolder: z.string().optional().describe('Optional: Absolute path to the target folder where arc42-docs will be created. If not provided, uses the default workspace configured at server startup.'),
|
|
13
|
+
language: z.enum(languageValues).optional().default('EN').describe('Language code for the documentation templates. Supported: EN (English), DE (German), ES (Spanish), FR (French), IT (Italian), NL (Dutch), PT (Portuguese), RU (Russian), CZ (Czech), UKR (Ukrainian), ZH (Chinese). Defaults to EN.')
|
|
14
|
+
};
|
|
15
|
+
export const arc42InitDescription = `Initialize arc42 documentation workspace for a project.
|
|
9
16
|
|
|
10
17
|
This tool creates the complete directory structure and template files for arc42 architecture documentation. It sets up all 12 sections with templates, configuration files, and a main documentation file.
|
|
11
18
|
|
|
12
19
|
Use this tool once at the beginning of your architecture documentation journey.
|
|
13
20
|
|
|
14
|
-
You can optionally specify a targetFolder to create the documentation in a specific directory instead of the default workspace
|
|
15
|
-
inputSchema: {
|
|
16
|
-
type: 'object',
|
|
17
|
-
properties: {
|
|
18
|
-
projectName: {
|
|
19
|
-
type: 'string',
|
|
20
|
-
description: 'Name of the project being documented'
|
|
21
|
-
},
|
|
22
|
-
force: {
|
|
23
|
-
type: 'boolean',
|
|
24
|
-
description: 'Force re-initialization even if workspace exists',
|
|
25
|
-
default: false
|
|
26
|
-
},
|
|
27
|
-
targetFolder: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
description: 'Optional: Absolute path to the target folder where arc42-docs will be created. If not provided, uses the default workspace configured at server startup.'
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
required: ['projectName']
|
|
33
|
-
}
|
|
34
|
-
};
|
|
21
|
+
You can optionally specify a targetFolder to create the documentation in a specific directory instead of the default workspace.`;
|
|
35
22
|
export async function arc42InitHandler(args, context) {
|
|
36
23
|
const projectNameArg = args.projectName;
|
|
37
24
|
const force = args.force ?? false;
|
|
38
25
|
const targetFolder = args.targetFolder;
|
|
26
|
+
const languageArg = args.language ?? 'EN';
|
|
39
27
|
if (typeof projectNameArg !== 'string' || !projectNameArg) {
|
|
40
28
|
return {
|
|
41
29
|
success: false,
|
|
42
30
|
message: 'Project name is required'
|
|
43
31
|
};
|
|
44
32
|
}
|
|
33
|
+
// Validate and normalize language code
|
|
34
|
+
let language;
|
|
35
|
+
try {
|
|
36
|
+
const normalizedLanguage = normalizeLanguageCode(languageArg);
|
|
37
|
+
if (!isLanguageCode(normalizedLanguage)) {
|
|
38
|
+
return {
|
|
39
|
+
success: false,
|
|
40
|
+
message: `Unsupported language code: ${languageArg}. Supported languages: ${SUPPORTED_LANGUAGE_CODES.join(', ')}`
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
language = normalizedLanguage;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return {
|
|
47
|
+
success: false,
|
|
48
|
+
message: `Invalid language code: ${languageArg}. Supported languages: ${SUPPORTED_LANGUAGE_CODES.join(', ')}`
|
|
49
|
+
};
|
|
50
|
+
}
|
|
45
51
|
// Now TypeScript knows projectName is a string
|
|
46
52
|
const projectName = projectNameArg;
|
|
47
53
|
// Resolve workspace root - use targetFolder if provided, otherwise use context default
|
|
@@ -65,7 +71,7 @@ export async function arc42InitHandler(args, context) {
|
|
|
65
71
|
version: '1.0.0',
|
|
66
72
|
created: new Date().toISOString(),
|
|
67
73
|
format: 'markdown',
|
|
68
|
-
language:
|
|
74
|
+
language: language,
|
|
69
75
|
// Include arc42 template reference info
|
|
70
76
|
...arc42Ref
|
|
71
77
|
};
|
|
@@ -74,7 +80,7 @@ projectName: ${projectName}
|
|
|
74
80
|
version: ${config.version}
|
|
75
81
|
created: ${config.created}
|
|
76
82
|
format: ${config.format}
|
|
77
|
-
language: ${
|
|
83
|
+
language: ${language}
|
|
78
84
|
|
|
79
85
|
# arc42 Template Reference
|
|
80
86
|
# This documents which version of the arc42 template this documentation is based on.
|
|
@@ -83,10 +89,10 @@ arc42_template_version: ${ARC42_REFERENCE.version}
|
|
|
83
89
|
arc42_template_date: ${ARC42_REFERENCE.date}
|
|
84
90
|
arc42_template_commit: ${ARC42_REFERENCE.commitSha}
|
|
85
91
|
`);
|
|
86
|
-
// Create README
|
|
87
|
-
await writeFile(join(workspaceRoot, 'README.md'), getReadmeContent(projectName));
|
|
88
|
-
// Create main template file
|
|
89
|
-
await writeFile(join(workspaceRoot, 'arc42-
|
|
92
|
+
// Create README with localized content
|
|
93
|
+
await writeFile(join(workspaceRoot, 'README.md'), templateProvider.getReadmeContent(language, projectName));
|
|
94
|
+
// Create main template file with localized section titles
|
|
95
|
+
await writeFile(join(workspaceRoot, 'arc42-documentation.md'), getMainTemplateContent(projectName, language));
|
|
90
96
|
// Create section files (we'll create empty templates for now)
|
|
91
97
|
const sections = [
|
|
92
98
|
'01_introduction_and_goals',
|
|
@@ -103,14 +109,17 @@ arc42_template_commit: ${ARC42_REFERENCE.commitSha}
|
|
|
103
109
|
'12_glossary'
|
|
104
110
|
];
|
|
105
111
|
for (const section of sections) {
|
|
106
|
-
|
|
112
|
+
// Get localized section metadata
|
|
113
|
+
const metadata = templateProvider.getSectionMetadata(section, language);
|
|
114
|
+
await writeFile(join(workspaceRoot, 'sections', `${section}.md`), `# ${metadata.title}\n\n<!-- ${metadata.description} -->\n`);
|
|
107
115
|
}
|
|
108
116
|
return {
|
|
109
117
|
success: true,
|
|
110
|
-
message: `arc42 workspace initialized successfully for project: ${projectName}`,
|
|
118
|
+
message: `arc42 workspace initialized successfully for project: ${projectName} (language: ${language})`,
|
|
111
119
|
data: {
|
|
112
120
|
workspaceRoot,
|
|
113
121
|
projectName,
|
|
122
|
+
language,
|
|
114
123
|
sectionsCreated: sections.length,
|
|
115
124
|
config
|
|
116
125
|
},
|
|
@@ -129,61 +138,33 @@ arc42_template_commit: ${ARC42_REFERENCE.commitSha}
|
|
|
129
138
|
};
|
|
130
139
|
}
|
|
131
140
|
}
|
|
132
|
-
function
|
|
133
|
-
return `# ${projectName} - Architecture Documentation
|
|
134
|
-
|
|
135
|
-
This directory contains the architecture documentation for ${projectName}, following the arc42 template.
|
|
136
|
-
|
|
137
|
-
## Structure
|
|
138
|
-
|
|
139
|
-
- \`sections/\` - Individual section markdown files (12 sections)
|
|
140
|
-
- \`images/\` - Diagrams and images
|
|
141
|
-
- \`arc42-template.md\` - Main combined documentation
|
|
142
|
-
- \`config.yaml\` - Configuration
|
|
143
|
-
|
|
144
|
-
## The 12 arc42 Sections
|
|
145
|
-
|
|
146
|
-
1. **Introduction and Goals** - Requirements, quality goals, stakeholders
|
|
147
|
-
2. **Architecture Constraints** - Technical and organizational constraints
|
|
148
|
-
3. **Context and Scope** - Business and technical context
|
|
149
|
-
4. **Solution Strategy** - Fundamental decisions and strategies
|
|
150
|
-
5. **Building Block View** - Static decomposition
|
|
151
|
-
6. **Runtime View** - Dynamic behavior
|
|
152
|
-
7. **Deployment View** - Infrastructure and deployment
|
|
153
|
-
8. **Cross-cutting Concepts** - Overall regulations and approaches
|
|
154
|
-
9. **Architecture Decisions** - Important decisions (ADRs)
|
|
155
|
-
10. **Quality Requirements** - Quality tree and scenarios
|
|
156
|
-
11. **Risks and Technical Debt** - Known problems and risks
|
|
157
|
-
12. **Glossary** - Important terms
|
|
158
|
-
|
|
159
|
-
## Getting Started
|
|
160
|
-
|
|
161
|
-
1. Start with Section 1: Introduction and Goals
|
|
162
|
-
2. Work through sections iteratively
|
|
163
|
-
3. Use diagrams to illustrate concepts
|
|
164
|
-
4. Keep it focused on decisions, not implementation details
|
|
165
|
-
|
|
166
|
-
## Generating Documentation
|
|
167
|
-
|
|
168
|
-
Use the MCP tools to:
|
|
169
|
-
- Check status: \`arc42-status\`
|
|
170
|
-
- Generate templates: \`generate-template\`
|
|
171
|
-
- Update sections: \`update-section\`
|
|
172
|
-
|
|
173
|
-
## Resources
|
|
174
|
-
|
|
175
|
-
- [arc42 Website](https://arc42.org/)
|
|
176
|
-
- [arc42 Documentation](https://docs.arc42.org/)
|
|
177
|
-
- [arc42 Examples](https://arc42.org/examples)
|
|
178
|
-
`;
|
|
179
|
-
}
|
|
180
|
-
function getMainTemplateContent(projectName) {
|
|
141
|
+
function getMainTemplateContent(projectName, language) {
|
|
181
142
|
const date = new Date().toISOString().split('T')[0];
|
|
143
|
+
// Get localized section titles for table of contents
|
|
144
|
+
const sections = [
|
|
145
|
+
'01_introduction_and_goals',
|
|
146
|
+
'02_architecture_constraints',
|
|
147
|
+
'03_context_and_scope',
|
|
148
|
+
'04_solution_strategy',
|
|
149
|
+
'05_building_block_view',
|
|
150
|
+
'06_runtime_view',
|
|
151
|
+
'07_deployment_view',
|
|
152
|
+
'08_concepts',
|
|
153
|
+
'09_architecture_decisions',
|
|
154
|
+
'10_quality_requirements',
|
|
155
|
+
'11_technical_risks',
|
|
156
|
+
'12_glossary'
|
|
157
|
+
];
|
|
158
|
+
const tocEntries = sections.map((section, index) => {
|
|
159
|
+
const metadata = templateProvider.getSectionMetadata(section, language);
|
|
160
|
+
return `${index + 1}. [${metadata.title}](sections/${section}.md)`;
|
|
161
|
+
}).join('\n');
|
|
182
162
|
return `# ${projectName} - Architecture Documentation
|
|
183
163
|
|
|
184
|
-
**Version**: 1.0.0
|
|
185
|
-
**Date**: ${date}
|
|
164
|
+
**Version**: 1.0.0
|
|
165
|
+
**Date**: ${date}
|
|
186
166
|
**Status**: Draft
|
|
167
|
+
**Language**: ${language}
|
|
187
168
|
|
|
188
169
|
---
|
|
189
170
|
|
|
@@ -191,18 +172,7 @@ This document describes the architecture of ${projectName} following the arc42 t
|
|
|
191
172
|
|
|
192
173
|
## Table of Contents
|
|
193
174
|
|
|
194
|
-
|
|
195
|
-
2. [Architecture Constraints](sections/02_architecture_constraints.md)
|
|
196
|
-
3. [Context and Scope](sections/03_context_and_scope.md)
|
|
197
|
-
4. [Solution Strategy](sections/04_solution_strategy.md)
|
|
198
|
-
5. [Building Block View](sections/05_building_block_view.md)
|
|
199
|
-
6. [Runtime View](sections/06_runtime_view.md)
|
|
200
|
-
7. [Deployment View](sections/07_deployment_view.md)
|
|
201
|
-
8. [Cross-cutting Concepts](sections/08_concepts.md)
|
|
202
|
-
9. [Architecture Decisions](sections/09_architecture_decisions.md)
|
|
203
|
-
10. [Quality Requirements](sections/10_quality_requirements.md)
|
|
204
|
-
11. [Risks and Technical Debt](sections/11_technical_risks.md)
|
|
205
|
-
12. [Glossary](sections/12_glossary.md)
|
|
175
|
+
${tocEntries}
|
|
206
176
|
|
|
207
177
|
---
|
|
208
178
|
|
|
@@ -210,7 +180,7 @@ This document describes the architecture of ${projectName} following the arc42 t
|
|
|
210
180
|
|
|
211
181
|
arc42, the template for documentation of software and system architectures, was created by Dr. Gernot Starke and Dr. Peter Hruschka.
|
|
212
182
|
|
|
213
|
-
**Template Reference**: arc42 v${ARC42_REFERENCE.version} (${ARC42_REFERENCE.date})
|
|
183
|
+
**Template Reference**: arc42 v${ARC42_REFERENCE.version} (${ARC42_REFERENCE.date})
|
|
214
184
|
**Source**: [${ARC42_REFERENCE.sourceRepo}](${ARC42_REFERENCE.sourceRepo})
|
|
215
185
|
|
|
216
186
|
© We acknowledge that this document uses material from the arc42 architecture template, https://arc42.org. Created by Dr. Gernot Starke, Dr. Peter Hruschka and contributors.
|