@h2nguyen/arc42-node-mcp-server 1.0.2 → 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 +46 -0
- package/README.md +222 -11
- package/dist/index.js +0 -0
- 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 +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,52 @@ All notable changes to the arc42 MCP Server will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.0] - 2026-02-14
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Multi-Language Template Support**: Documentation templates now available in 11 languages
|
|
12
|
+
- Supported languages: EN (English), DE (German), ES (Spanish), FR (French), IT (Italian), NL (Dutch), PT (Portuguese), RU (Russian), CZ (Czech), UKR (Ukrainian), ZH (Chinese)
|
|
13
|
+
- Language parameter added to `arc42-init`, `generate-template`, and `arc42-workflow-guide` tools
|
|
14
|
+
- Language configuration stored in `config.yaml` for project-level default
|
|
15
|
+
- Localized section titles, descriptions, and template content
|
|
16
|
+
- Localized README content when initializing workspace
|
|
17
|
+
- Localized workflow guides for each language
|
|
18
|
+
- **Spec Driven Development (SDD) Development Support**: Added steering documents and templates for structured development workflow
|
|
19
|
+
- Product, requirements, and design documentation templates
|
|
20
|
+
- Tasks document template for step-by-step feature development
|
|
21
|
+
- Custom templates feature with user-templates directory for overrides
|
|
22
|
+
- Coding best practices focused on S.O.L.I.D & DRY principles, TDD, and design patterns
|
|
23
|
+
- **Documentation Quality Assurance**: Enhanced README with new sections
|
|
24
|
+
- Star History chart for tracking repository growth
|
|
25
|
+
- Spec Driven Development methodology details
|
|
26
|
+
- Integration with [@pimzino/spec-workflow-mcp](https://github.com/Pimzino/spec-workflow-mcp) for structured workflow
|
|
27
|
+
- Integration with [dacli](https://github.com/docToolchain/dacli) for reviewing and validating architecture documentation
|
|
28
|
+
- Added dependency `chokidar` for file system watching in development
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- **Breaking**: Renamed `arc42-template.md` to `arc42-documentation.md` for clarity (the file contains actual documentation, not a template)
|
|
32
|
+
- `arc42-init` now accepts optional `language` parameter (defaults to EN)
|
|
33
|
+
- `generate-template` now accepts optional `language` parameter (defaults to EN)
|
|
34
|
+
- `arc42-workflow-guide` now accepts optional `language` parameter (defaults to EN)
|
|
35
|
+
- `arc42-status` now displays configured language and available languages
|
|
36
|
+
- `get-section` now displays localized section metadata based on config.yaml language
|
|
37
|
+
- Switched Docker base image from `node:24-slim` to `node:24-alpine` for better resource optimization
|
|
38
|
+
- Improved test coverage thresholds: Statements (80%), Branches (75%), Functions (90%), Lines (80%)
|
|
39
|
+
|
|
40
|
+
### Architecture
|
|
41
|
+
- Added Strategy Pattern for language implementations (`LanguageStrategy` interface)
|
|
42
|
+
- Added Registry Pattern for language storage (`LanguageRegistry` class)
|
|
43
|
+
- Added Factory Pattern for language creation (`LanguageFactory` class)
|
|
44
|
+
- Added Facade Pattern for simplified access (`LocalizedTemplateProvider` class)
|
|
45
|
+
- All 11 languages follow S.O.L.I.D principles with LSP-compliant substitutability
|
|
46
|
+
- Parameterized tests for all language strategies ensuring interface compliance
|
|
47
|
+
- Verified LSP compliance and TDD patterns in language strategy implementations
|
|
48
|
+
|
|
49
|
+
## [1.0.3] - 2026-02-12
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
- Updated the build script to set execute permissions on dist/index.js
|
|
53
|
+
|
|
8
54
|
## [1.0.2] - 2026-02-11
|
|
9
55
|
|
|
10
56
|
### Changed
|
package/README.md
CHANGED
|
@@ -13,12 +13,13 @@ A Model Context Protocol (MCP) server that helps you create comprehensive archit
|
|
|
13
13
|
<!-- TOC -->
|
|
14
14
|
* [📋 What is arc42?](#-what-is-arc42)
|
|
15
15
|
* [arc42 Template Reference](#arc42-template-reference)
|
|
16
|
-
* [Updating to Latest arc42 Template](#updating-to-latest-arc42-template)
|
|
16
|
+
* [Updating to the Latest arc42 Template](#updating-to-the-latest-arc42-template)
|
|
17
17
|
* [🚀 Quick Start](#-quick-start)
|
|
18
18
|
* [Installation](#installation)
|
|
19
19
|
* [Setup in Claude Desktop](#setup-in-claude-desktop)
|
|
20
20
|
* [Setup in Cursor](#setup-in-cursor)
|
|
21
21
|
* [Setup in Cline](#setup-in-cline)
|
|
22
|
+
* [Troubleshooting: NVM Users](#troubleshooting-nvm-users)
|
|
22
23
|
* [Understanding Workspace Configuration](#understanding-workspace-configuration)
|
|
23
24
|
* [Option 1: Default Workspace Path (Server Startup Argument)](#option-1-default-workspace-path-server-startup-argument)
|
|
24
25
|
* [Option 2: Dynamic targetFolder Parameter (Per-Tool Override)](#option-2-dynamic-targetfolder-parameter-per-tool-override)
|
|
@@ -31,6 +32,10 @@ A Model Context Protocol (MCP) server that helps you create comprehensive archit
|
|
|
31
32
|
* [generate-template](#generate-template)
|
|
32
33
|
* [update-section](#update-section)
|
|
33
34
|
* [get-section](#get-section)
|
|
35
|
+
* [🌍 Multi-Language Support](#-multi-language-support)
|
|
36
|
+
* [Supported Languages](#supported-languages)
|
|
37
|
+
* [Using Languages](#using-languages)
|
|
38
|
+
* [Language Configuration](#language-configuration)
|
|
34
39
|
* [📚 The 12 arc42 Sections](#-the-12-arc42-sections)
|
|
35
40
|
* [📖 Usage Examples](#-usage-examples)
|
|
36
41
|
* [Example 1: Starting Fresh](#example-1-starting-fresh)
|
|
@@ -41,6 +46,8 @@ A Model Context Protocol (MCP) server that helps you create comprehensive archit
|
|
|
41
46
|
* [For AI Assistants](#for-ai-assistants)
|
|
42
47
|
* [For Users](#for-users)
|
|
43
48
|
* [🔧 Development](#-development)
|
|
49
|
+
* [Development Methodology](#development-methodology)
|
|
50
|
+
* [Documentation Quality Assurance](#documentation-quality-assurance)
|
|
44
51
|
* [Building from Source](#building-from-source)
|
|
45
52
|
* [Running in Development Mode](#running-in-development-mode)
|
|
46
53
|
* [🧪 Testing](#-testing)
|
|
@@ -61,6 +68,7 @@ A Model Context Protocol (MCP) server that helps you create comprehensive archit
|
|
|
61
68
|
* [🙏 Acknowledgments](#-acknowledgments)
|
|
62
69
|
* [📞 Support](#-support)
|
|
63
70
|
* [🔗 Links](#-links)
|
|
71
|
+
* [⭐ Star History](#-star-history)
|
|
64
72
|
<!-- TOC -->
|
|
65
73
|
|
|
66
74
|
## 📋 What is arc42?
|
|
@@ -130,13 +138,15 @@ npm run submodule:init
|
|
|
130
138
|
### Installation
|
|
131
139
|
|
|
132
140
|
```bash
|
|
133
|
-
# Install latest version
|
|
141
|
+
# Install globally (installs latest version by default)
|
|
134
142
|
npm install -g @h2nguyen/arc42-node-mcp-server
|
|
135
143
|
|
|
136
|
-
#
|
|
137
|
-
npm install -g @h2nguyen/arc42-node-mcp-server
|
|
144
|
+
# Or install a specific version
|
|
145
|
+
npm install -g @h2nguyen/arc42-node-mcp-server@<version>
|
|
138
146
|
```
|
|
139
147
|
|
|
148
|
+
> **Tip**: Check [npm](https://www.npmjs.com/package/@h2nguyen/arc42-node-mcp-server) or [GitHub Releases](https://github.com/h2nguyen/Arc42-Node-MCP-Server/releases) for available versions.
|
|
149
|
+
|
|
140
150
|
### Setup in Claude Desktop
|
|
141
151
|
|
|
142
152
|
Add to your Claude configuration file:
|
|
@@ -144,6 +154,21 @@ Add to your Claude configuration file:
|
|
|
144
154
|
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
145
155
|
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
146
156
|
|
|
157
|
+
**Using npx (no installation required):**
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"mcpServers": {
|
|
162
|
+
"arc42-mcp-server": {
|
|
163
|
+
"command": "npx",
|
|
164
|
+
"args": ["-y", "@h2nguyen/arc42-node-mcp-server", "/path/to/your/project"]
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Using global installation:**
|
|
171
|
+
|
|
147
172
|
```json
|
|
148
173
|
{
|
|
149
174
|
"mcpServers": {
|
|
@@ -159,6 +184,21 @@ Add to your Claude configuration file:
|
|
|
159
184
|
|
|
160
185
|
Add to your MCP settings in Cursor:
|
|
161
186
|
|
|
187
|
+
**Using npx (no installation required):**
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"mcpServers": {
|
|
192
|
+
"arc42-mcp-server": {
|
|
193
|
+
"command": "npx",
|
|
194
|
+
"args": ["-y", "@h2nguyen/arc42-node-mcp-server", "${workspaceFolder}"]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Using global installation:**
|
|
201
|
+
|
|
162
202
|
```json
|
|
163
203
|
{
|
|
164
204
|
"mcpServers": {
|
|
@@ -174,7 +214,74 @@ Add to your MCP settings in Cursor:
|
|
|
174
214
|
|
|
175
215
|
Add to your Cline MCP settings file (`~/.cline/data/settings/cline_mcp_settings.json`):
|
|
176
216
|
|
|
177
|
-
**Using
|
|
217
|
+
**Using npx (no installation required):**
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"mcpServers": {
|
|
222
|
+
"arc42-mcp-server": {
|
|
223
|
+
"disabled": false,
|
|
224
|
+
"timeout": 60,
|
|
225
|
+
"type": "stdio",
|
|
226
|
+
"command": "npx",
|
|
227
|
+
"args": ["-y", "@h2nguyen/arc42-node-mcp-server", "/path/to/your/project"],
|
|
228
|
+
"autoApprove": [
|
|
229
|
+
"arc42-workflow-guide",
|
|
230
|
+
"arc42-init",
|
|
231
|
+
"arc42-status",
|
|
232
|
+
"update-section",
|
|
233
|
+
"generate-template",
|
|
234
|
+
"get-section"
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
> ⚠️ **Important for NVM users**: For the npx approach to work with NVM, you may need to use the full path to npx: `/path/to/.nvm/versions/node/vXX.X.X/bin/npx`
|
|
242
|
+
|
|
243
|
+
**Using npm package with NVM:**
|
|
244
|
+
|
|
245
|
+
> ⚠️ **Important for NVM users**: Cline spawns MCP servers without loading your shell profile (`.zshrc`/`.bashrc`), so NVM-managed Node.js paths are not in PATH. You must use **full absolute paths** to both the Node.js binary and the `arc42-mcp` command. See [Troubleshooting: NVM Users](#troubleshooting-nvm-users) for details.
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"mcpServers": {
|
|
250
|
+
"arc42-mcp-server": {
|
|
251
|
+
"disabled": false,
|
|
252
|
+
"timeout": 60,
|
|
253
|
+
"type": "stdio",
|
|
254
|
+
"command": "/path/to/.nvm/versions/node/vXX.X.X/bin/node",
|
|
255
|
+
"args": [
|
|
256
|
+
"/path/to/.nvm/versions/node/vXX.X.X/bin/arc42-mcp",
|
|
257
|
+
"/path/to/your/project"
|
|
258
|
+
],
|
|
259
|
+
"autoApprove": [
|
|
260
|
+
"arc42-workflow-guide",
|
|
261
|
+
"arc42-init",
|
|
262
|
+
"arc42-status",
|
|
263
|
+
"update-section",
|
|
264
|
+
"generate-template",
|
|
265
|
+
"get-section"
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
To find your NVM paths, run:
|
|
273
|
+
```bash
|
|
274
|
+
# Get the Node.js binary path
|
|
275
|
+
nvm which current
|
|
276
|
+
# Example output: /Users/yourname/.nvm/versions/node/v24.13.0/bin/node
|
|
277
|
+
|
|
278
|
+
# The arc42-mcp command is in the same bin directory
|
|
279
|
+
# /Users/yourname/.nvm/versions/node/v24.13.0/bin/arc42-mcp
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Using npm package without NVM (system Node.js):**
|
|
283
|
+
|
|
284
|
+
If Node.js is installed system-wide (not via NVM), you can use the simpler configuration:
|
|
178
285
|
|
|
179
286
|
```json
|
|
180
287
|
{
|
|
@@ -209,7 +316,8 @@ Add to your Cline MCP settings file (`~/.cline/data/settings/cline_mcp_settings.
|
|
|
209
316
|
"type": "stdio",
|
|
210
317
|
"command": "node",
|
|
211
318
|
"args": [
|
|
212
|
-
"/path/to/
|
|
319
|
+
"/path/to/Arc42-Node-MCP-Server/dist/index.js",
|
|
320
|
+
"/path/to/your/project"
|
|
213
321
|
],
|
|
214
322
|
"autoApprove": [
|
|
215
323
|
"arc42-workflow-guide",
|
|
@@ -224,6 +332,20 @@ Add to your Cline MCP settings file (`~/.cline/data/settings/cline_mcp_settings.
|
|
|
224
332
|
}
|
|
225
333
|
```
|
|
226
334
|
|
|
335
|
+
> **Note**: For local builds with NVM, use the full path to the Node.js binary as the `command` instead of just `node`.
|
|
336
|
+
|
|
337
|
+
#### Troubleshooting: NVM Users
|
|
338
|
+
|
|
339
|
+
If you see "MCP error -32001: Request timed out" or the server fails to start, this is typically caused by NVM path issues:
|
|
340
|
+
|
|
341
|
+
1. **Problem**: Cline spawns processes without sourcing shell profiles, so `node` and `arc42-mcp` commands resolve to system paths (or aren't found at all) instead of NVM-managed versions.
|
|
342
|
+
|
|
343
|
+
2. **Solution**: Use full absolute paths in your configuration:
|
|
344
|
+
- `command`: Full path to the Node.js binary (e.g., `~/.nvm/versions/node/v24.13.0/bin/node`)
|
|
345
|
+
- First `args` item: Full path to `arc42-mcp` (e.g., `~/.nvm/versions/node/v24.13.0/bin/arc42-mcp`)
|
|
346
|
+
|
|
347
|
+
3. **Why both paths?**: Even if you use the full path to `arc42-mcp`, the script's shebang (`#!/usr/bin/env node`) will resolve `node` from PATH, which may point to an incompatible system Node.js version. By specifying Node.js directly as the command, we bypass the shebang entirely.
|
|
348
|
+
|
|
227
349
|
### Understanding Workspace Configuration
|
|
228
350
|
|
|
229
351
|
The arc42 MCP server needs to know **where to create and manage documentation files**. There are two ways to configure this:
|
|
@@ -286,8 +408,9 @@ This is useful when:
|
|
|
286
408
|
Load the complete arc42 documentation workflow guide with instructions for all 12 sections.
|
|
287
409
|
|
|
288
410
|
```typescript
|
|
289
|
-
|
|
290
|
-
|
|
411
|
+
arc42-workflow-guide {
|
|
412
|
+
language?: "EN" | "DE" | "ES" | ... // Optional: language code (default: EN)
|
|
413
|
+
}
|
|
291
414
|
```
|
|
292
415
|
|
|
293
416
|
### arc42-init
|
|
@@ -296,6 +419,7 @@ Initialize arc42 documentation workspace for your project.
|
|
|
296
419
|
```typescript
|
|
297
420
|
arc42-init {
|
|
298
421
|
projectName: "Your Project Name",
|
|
422
|
+
language?: "EN", // Optional: language for templates (default: EN)
|
|
299
423
|
force?: false, // Re-initialize even if exists
|
|
300
424
|
targetFolder?: "/path/to/project" // Optional: specify target directory
|
|
301
425
|
}
|
|
@@ -308,6 +432,7 @@ Check the status of your documentation, including completion percentage and sect
|
|
|
308
432
|
arc42-status {
|
|
309
433
|
targetFolder?: "/path/to/project" // Optional: specify target directory
|
|
310
434
|
}
|
|
435
|
+
// Returns: language info, available languages, and localized section titles
|
|
311
436
|
```
|
|
312
437
|
|
|
313
438
|
### generate-template
|
|
@@ -315,7 +440,8 @@ Generate a detailed template for any of the 12 arc42 sections.
|
|
|
315
440
|
|
|
316
441
|
```typescript
|
|
317
442
|
generate-template {
|
|
318
|
-
section: "01_introduction_and_goals" | "02_architecture_constraints" |
|
|
443
|
+
section: "01_introduction_and_goals" | "02_architecture_constraints" | ...,
|
|
444
|
+
language?: "EN" | "DE" | "ES" | ... // Optional: language code (default: EN)
|
|
319
445
|
}
|
|
320
446
|
```
|
|
321
447
|
|
|
@@ -341,6 +467,67 @@ get-section {
|
|
|
341
467
|
}
|
|
342
468
|
```
|
|
343
469
|
|
|
470
|
+
## 🌍 Multi-Language Support
|
|
471
|
+
|
|
472
|
+
This MCP server supports documentation templates in **11 languages**, matching the official arc42 template translations.
|
|
473
|
+
|
|
474
|
+
### Supported Languages
|
|
475
|
+
|
|
476
|
+
| Code | Language | Native Name |
|
|
477
|
+
|------|------------|-------------|
|
|
478
|
+
| EN | English | English |
|
|
479
|
+
| DE | German | Deutsch |
|
|
480
|
+
| ES | Spanish | Español |
|
|
481
|
+
| FR | French | Français |
|
|
482
|
+
| IT | Italian | Italiano |
|
|
483
|
+
| NL | Dutch | Nederlands |
|
|
484
|
+
| PT | Portuguese | Português |
|
|
485
|
+
| RU | Russian | Русский |
|
|
486
|
+
| CZ | Czech | Čeština |
|
|
487
|
+
| UKR | Ukrainian | Українська |
|
|
488
|
+
| ZH | Chinese | 中文 |
|
|
489
|
+
|
|
490
|
+
### Using Languages
|
|
491
|
+
|
|
492
|
+
**Initialize with a specific language:**
|
|
493
|
+
|
|
494
|
+
```typescript
|
|
495
|
+
arc42-init {
|
|
496
|
+
projectName: "Mein Projekt",
|
|
497
|
+
language: "DE" // German templates and section titles
|
|
498
|
+
}
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
**Generate templates in a specific language:**
|
|
502
|
+
|
|
503
|
+
```typescript
|
|
504
|
+
generate-template {
|
|
505
|
+
section: "01_introduction_and_goals",
|
|
506
|
+
language: "FR" // French template
|
|
507
|
+
}
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
**Get workflow guide in a specific language:**
|
|
511
|
+
|
|
512
|
+
```typescript
|
|
513
|
+
arc42-workflow-guide {
|
|
514
|
+
language: "ES" // Spanish guide
|
|
515
|
+
}
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### Language Configuration
|
|
519
|
+
|
|
520
|
+
The language is stored in `config.yaml` when you initialize a workspace:
|
|
521
|
+
|
|
522
|
+
```yaml
|
|
523
|
+
projectName: My Project
|
|
524
|
+
language: DE
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
- `arc42-status` reads and displays the configured language
|
|
528
|
+
- Templates and section titles are localized based on this setting
|
|
529
|
+
- Language codes are case-insensitive (`de`, `DE`, `De` all work)
|
|
530
|
+
|
|
344
531
|
## 📚 The 12 arc42 Sections
|
|
345
532
|
|
|
346
533
|
1. **Introduction and Goals** - Requirements, quality goals, stakeholders
|
|
@@ -406,7 +593,7 @@ After initialization, your project will have:
|
|
|
406
593
|
your-project/
|
|
407
594
|
└── arc42-docs/
|
|
408
595
|
├── README.md # Getting started guide
|
|
409
|
-
├── arc42-
|
|
596
|
+
├── arc42-documentation.md # Main combined document
|
|
410
597
|
├── config.yaml # Configuration
|
|
411
598
|
├── images/ # Diagrams and images
|
|
412
599
|
└── sections/ # Individual section files
|
|
@@ -444,6 +631,24 @@ your-project/
|
|
|
444
631
|
|
|
445
632
|
## 🔧 Development
|
|
446
633
|
|
|
634
|
+
### Development Methodology
|
|
635
|
+
|
|
636
|
+
This project is developed using **Spec Driven Development (SDD)**, a methodology that emphasizes creating detailed specifications before implementation. Features are planned, documented, and approved through a structured workflow before any code is written.
|
|
637
|
+
|
|
638
|
+
The SDD workflow is powered by [@pimzino/spec-workflow-mcp](https://www.npmjs.com/package/@pimzino/spec-workflow-mcp), an MCP server that provides:
|
|
639
|
+
- Structured specification workflow (Requirements → Design → Tasks → Implementation)
|
|
640
|
+
- Real-time web dashboard for tracking progress
|
|
641
|
+
- Approval gates between development phases
|
|
642
|
+
- Implementation logging for knowledge preservation
|
|
643
|
+
|
|
644
|
+
### Documentation Quality Assurance
|
|
645
|
+
|
|
646
|
+
Architecture documentation is reviewed and validated using [dacli](https://github.com/docToolchain/dacli), a Documentation Access CLI that bridges LLMs with documentation projects. As an MCP server, dacli enables:
|
|
647
|
+
- Hierarchical navigation and content retrieval of documentation
|
|
648
|
+
- Full-text search across all documentation sections
|
|
649
|
+
- Structure validation to detect orphaned files and issues
|
|
650
|
+
- Programmatic querying and manipulation of AsciiDoc/Markdown content
|
|
651
|
+
|
|
447
652
|
### Building from Source
|
|
448
653
|
|
|
449
654
|
```bash
|
|
@@ -662,7 +867,9 @@ This project is licensed under the Apache License 2.0 – see the [LICENSE](LICE
|
|
|
662
867
|
|
|
663
868
|
- [arc42](https://arc42.org/) - The proven, practical, and pragmatic architecture template
|
|
664
869
|
- [Dr. Gernot Starke](https://github.com/gernotstarke) and [Dr. Peter Hruschka](https://github.com/Hruschka) - Creators of arc42
|
|
665
|
-
- [Model Context Protocol](https://modelcontextprotocol.io/) - The protocol enabling AI tool use
|
|
870
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/) - The protocol enabling AI tool use, including [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for testing
|
|
871
|
+
- [@pimzino/spec-workflow-mcp](https://www.npmjs.com/package/@pimzino/spec-workflow-mcp) - MCP server powering our Spec Driven Development workflow
|
|
872
|
+
- [dacli](https://github.com/docToolchain/dacli) - Documentation Access CLI for reviewing and validating architecture documentation
|
|
666
873
|
|
|
667
874
|
## 📞 Support
|
|
668
875
|
|
|
@@ -684,3 +891,7 @@ This project is licensed under the Apache License 2.0 – see the [LICENSE](LICE
|
|
|
684
891
|
|
|
685
892
|
[](https://arc42.org/)
|
|
686
893
|
[](https://modelcontextprotocol.io/)
|
|
894
|
+
|
|
895
|
+
## ⭐ Star History
|
|
896
|
+
|
|
897
|
+
[](https://www.star-history.com/#h2nguyen/Arc42-Node-MCP-Server&type=date&legend=top-left)
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAyCA,qBAAa,cAAc;IACzB,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,UAAU,CAAS;;IAcrB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6CpD,OAAO,CAAC,aAAa;IA2Ff,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB5B"}
|
package/dist/server.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
3
|
import { readFileSync } from 'fs';
|
|
5
4
|
import { join, dirname } from 'path';
|
|
6
5
|
import { fileURLToPath } from 'url';
|
|
7
|
-
import { toMCPResponse
|
|
8
|
-
// Import tool handlers
|
|
9
|
-
import { arc42WorkflowGuideHandler } from './tools/arc42-workflow-guide.js';
|
|
10
|
-
import { arc42InitHandler } from './tools/arc42-init.js';
|
|
11
|
-
import { arc42StatusHandler } from './tools/arc42-status.js';
|
|
12
|
-
import { updateSectionHandler } from './tools/update-section.js';
|
|
13
|
-
import { getSectionHandler } from './tools/get-section.js';
|
|
14
|
-
import { generateTemplateHandler } from './tools/generate-template.js';
|
|
6
|
+
import { toMCPResponse } from './types.js';
|
|
7
|
+
// Import tool handlers AND schemas (Single Source of Truth)
|
|
8
|
+
import { arc42WorkflowGuideHandler, arc42WorkflowGuideInputSchema, arc42WorkflowGuideDescription } from './tools/arc42-workflow-guide.js';
|
|
9
|
+
import { arc42InitHandler, arc42InitInputSchema, arc42InitDescription } from './tools/arc42-init.js';
|
|
10
|
+
import { arc42StatusHandler, arc42StatusInputSchema, arc42StatusDescription } from './tools/arc42-status.js';
|
|
11
|
+
import { updateSectionHandler, updateSectionInputSchema, updateSectionDescription } from './tools/update-section.js';
|
|
12
|
+
import { getSectionHandler, getSectionInputSchema, getSectionDescription } from './tools/get-section.js';
|
|
13
|
+
import { generateTemplateHandler, generateTemplateInputSchema, generateTemplateDescription } from './tools/generate-template.js';
|
|
15
14
|
export class Arc42MCPServer {
|
|
16
15
|
mcpServer;
|
|
17
16
|
projectPath;
|
|
@@ -73,93 +72,50 @@ export class Arc42MCPServer {
|
|
|
73
72
|
isError: mcpResponse.isError
|
|
74
73
|
};
|
|
75
74
|
};
|
|
76
|
-
// Register arc42-workflow-guide tool
|
|
75
|
+
// Register arc42-workflow-guide tool (using imported schema)
|
|
77
76
|
this.mcpServer.registerTool('arc42-workflow-guide', {
|
|
78
|
-
description:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
Use this tool when:
|
|
83
|
-
- Starting a new architecture documentation project
|
|
84
|
-
- Needing guidance on what to document in each section
|
|
85
|
-
- Looking for best practices in architecture documentation`
|
|
86
|
-
}, async () => {
|
|
87
|
-
const response = await arc42WorkflowGuideHandler({}, context);
|
|
77
|
+
description: arc42WorkflowGuideDescription,
|
|
78
|
+
inputSchema: arc42WorkflowGuideInputSchema
|
|
79
|
+
}, async (args) => {
|
|
80
|
+
const response = await arc42WorkflowGuideHandler(args, context);
|
|
88
81
|
return toCallToolResult(response);
|
|
89
82
|
});
|
|
90
|
-
// Register arc42-init tool
|
|
83
|
+
// Register arc42-init tool (using imported schema)
|
|
91
84
|
this.mcpServer.registerTool('arc42-init', {
|
|
92
|
-
description:
|
|
93
|
-
|
|
94
|
-
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.
|
|
95
|
-
|
|
96
|
-
Use this tool once at the beginning of your architecture documentation journey.
|
|
97
|
-
|
|
98
|
-
You can optionally specify a targetFolder to create the documentation in a specific directory instead of the default workspace.`,
|
|
99
|
-
inputSchema: {
|
|
100
|
-
projectName: z.string().describe('Name of the project being documented'),
|
|
101
|
-
force: z.boolean().optional().describe('Force re-initialization even if workspace exists'),
|
|
102
|
-
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.')
|
|
103
|
-
}
|
|
85
|
+
description: arc42InitDescription,
|
|
86
|
+
inputSchema: arc42InitInputSchema
|
|
104
87
|
}, async (args) => {
|
|
105
88
|
const response = await arc42InitHandler(args, context);
|
|
106
89
|
return toCallToolResult(response);
|
|
107
90
|
});
|
|
108
|
-
// Register arc42-status tool
|
|
91
|
+
// Register arc42-status tool (using imported schema)
|
|
109
92
|
this.mcpServer.registerTool('arc42-status', {
|
|
110
|
-
description:
|
|
111
|
-
|
|
112
|
-
This tool provides an overview of which sections have been created, their completion status, and overall progress. Use this tool to track documentation progress and identify which sections need attention.
|
|
113
|
-
|
|
114
|
-
You can optionally specify a targetFolder to check documentation status in a specific directory instead of the default workspace.`,
|
|
115
|
-
inputSchema: {
|
|
116
|
-
targetFolder: z.string().optional().describe('Optional: Absolute path to the target folder containing arc42-docs. If not provided, uses the default workspace configured at server startup.')
|
|
117
|
-
}
|
|
93
|
+
description: arc42StatusDescription,
|
|
94
|
+
inputSchema: arc42StatusInputSchema
|
|
118
95
|
}, async (args) => {
|
|
119
96
|
const response = await arc42StatusHandler(args, context);
|
|
120
97
|
return toCallToolResult(response);
|
|
121
98
|
});
|
|
122
|
-
// Register update-section tool
|
|
123
|
-
const sectionValues = ARC42_SECTIONS;
|
|
99
|
+
// Register update-section tool (using imported schema)
|
|
124
100
|
this.mcpServer.registerTool('update-section', {
|
|
125
|
-
description:
|
|
126
|
-
|
|
127
|
-
This tool allows you to add or update content in any of the 12 arc42 sections. The content will be written to the appropriate section file while preserving the overall structure.
|
|
128
|
-
|
|
129
|
-
You can optionally specify a targetFolder to update documentation in a specific directory instead of the default workspace.`,
|
|
130
|
-
inputSchema: {
|
|
131
|
-
section: z.enum(sectionValues).describe('The section to update (e.g., "01_introduction_and_goals")'),
|
|
132
|
-
content: z.string().describe('The markdown content to write to the section'),
|
|
133
|
-
mode: z.enum(['replace', 'append']).optional().describe('Write mode: "replace" (default) or "append"'),
|
|
134
|
-
targetFolder: z.string().optional().describe('Optional: Absolute path to the target folder containing arc42-docs. If not provided, uses the default workspace configured at server startup.')
|
|
135
|
-
}
|
|
101
|
+
description: updateSectionDescription,
|
|
102
|
+
inputSchema: updateSectionInputSchema
|
|
136
103
|
}, async (args) => {
|
|
137
104
|
const response = await updateSectionHandler(args, context);
|
|
138
105
|
return toCallToolResult(response);
|
|
139
106
|
});
|
|
140
|
-
// Register get-section tool
|
|
107
|
+
// Register get-section tool (using imported schema)
|
|
141
108
|
this.mcpServer.registerTool('get-section', {
|
|
142
|
-
description:
|
|
143
|
-
|
|
144
|
-
This tool allows you to retrieve the current content of any of the 12 arc42 sections. Use this to review existing documentation or before making updates.
|
|
145
|
-
|
|
146
|
-
You can optionally specify a targetFolder to read documentation from a specific directory instead of the default workspace.`,
|
|
147
|
-
inputSchema: {
|
|
148
|
-
section: z.enum(sectionValues).describe('The section to read (e.g., "01_introduction_and_goals")'),
|
|
149
|
-
targetFolder: z.string().optional().describe('Optional: Absolute path to the target folder containing arc42-docs. If not provided, uses the default workspace configured at server startup.')
|
|
150
|
-
}
|
|
109
|
+
description: getSectionDescription,
|
|
110
|
+
inputSchema: getSectionInputSchema
|
|
151
111
|
}, async (args) => {
|
|
152
112
|
const response = await getSectionHandler(args, context);
|
|
153
113
|
return toCallToolResult(response);
|
|
154
114
|
});
|
|
155
|
-
// Register generate-template tool
|
|
115
|
+
// Register generate-template tool (using imported schema)
|
|
156
116
|
this.mcpServer.registerTool('generate-template', {
|
|
157
|
-
description:
|
|
158
|
-
|
|
159
|
-
This tool provides the complete template structure, guidance, and examples for any of the 12 arc42 sections. Use this before documenting a section to understand what content is needed.`,
|
|
160
|
-
inputSchema: {
|
|
161
|
-
section: z.enum(sectionValues).describe('The section to generate template for')
|
|
162
|
-
}
|
|
117
|
+
description: generateTemplateDescription,
|
|
118
|
+
inputSchema: generateTemplateInputSchema
|
|
163
119
|
}, async (args) => {
|
|
164
120
|
const response = await generateTemplateHandler(args, context);
|
|
165
121
|
return toCallToolResult(response);
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,MAA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CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;YAC/C,kDAAkD;QACpD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,7 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Templates Module
|
|
3
|
+
*
|
|
4
|
+
* Main entry point for arc42 templates.
|
|
5
|
+
* Provides backward-compatible access to English templates while delegating
|
|
6
|
+
* to the new locales system for multi-language support.
|
|
7
|
+
*
|
|
8
|
+
* @module templates
|
|
9
|
+
*/
|
|
1
10
|
import { Arc42Section } from '../types.js';
|
|
2
11
|
export { ARC42_REFERENCE, Arc42Reference, getArc42ReferenceString, getArc42ReferenceMarkdown, getArc42ReferenceConfig, reloadArc42Reference } from './arc42-reference.js';
|
|
12
|
+
export { type LanguageCode, type SectionTitle, type SectionDescription, type LanguageInfo, type LanguageStrategy, type LocalizedSectionMetadata, SUPPORTED_LANGUAGE_CODES, isLanguageCode, normalizeLanguageCode, getDefaultLanguageCode, isInitialized, LanguageRegistry, LanguageFactory, LocalizedTemplateProvider, languageRegistry, languageFactory, templateProvider, englishStrategy } from './locales/index.js';
|
|
3
13
|
/**
|
|
4
14
|
* Get template for a specific arc42 section
|
|
15
|
+
*
|
|
16
|
+
* This function maintains backward compatibility with the original API
|
|
17
|
+
* while delegating to the new locales system.
|
|
18
|
+
*
|
|
19
|
+
* @param section - The arc42 section to get the template for
|
|
20
|
+
* @param language - Optional language code (defaults to English)
|
|
21
|
+
* @returns The template content
|
|
22
|
+
*/
|
|
23
|
+
export declare function getSectionTemplate(section: Arc42Section, language?: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get localized section metadata
|
|
26
|
+
*
|
|
27
|
+
* @param section - The arc42 section
|
|
28
|
+
* @param language - Optional language code (defaults to English)
|
|
29
|
+
* @returns The section metadata including title and description
|
|
30
|
+
*/
|
|
31
|
+
export declare function getSectionMetadata(section: Arc42Section, language?: string): import("./locales/template-provider.js").LocalizedSectionMetadata;
|
|
32
|
+
/**
|
|
33
|
+
* Get the workflow guide
|
|
34
|
+
*
|
|
35
|
+
* @param language - Optional language code (defaults to English)
|
|
36
|
+
* @returns The workflow guide content
|
|
37
|
+
*/
|
|
38
|
+
export declare function getWorkflowGuide(language?: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Get available languages
|
|
41
|
+
*
|
|
42
|
+
* @returns Array of available language information
|
|
43
|
+
*/
|
|
44
|
+
export declare function getAvailableLanguages(): import("./locales/language-strategy.js").LanguageInfo[];
|
|
45
|
+
/**
|
|
46
|
+
* Check if a language is supported
|
|
47
|
+
*
|
|
48
|
+
* @param language - The language code to check
|
|
49
|
+
* @returns True if the language is supported
|
|
5
50
|
*/
|
|
6
|
-
export declare function
|
|
51
|
+
export declare function isLanguageSupported(language: string): boolean;
|
|
7
52
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,EACL,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAG7B,wBAAwB,EAGxB,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EAGb,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EAGzB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAGhB,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,qEAE1E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,4DAEpC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE7D"}
|