archtracker-mcp 0.4.3 → 0.6.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/README.md +189 -14
- package/dist/bin.js +1 -1
- package/dist/bin.js.map +1 -1
- package/dist/cli/index.js +2092 -464
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +94 -4
- package/dist/index.js +604 -44
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.js +713 -89
- package/dist/mcp/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/arch-analyze/SKILL.md +8 -2
- package/skills/arch-check/SKILL.md +12 -8
- package/skills/arch-context/SKILL.md +8 -6
- package/skills/arch-search/SKILL.md +11 -7
- package/skills/arch-serve/SKILL.md +27 -0
- package/skills/arch-snapshot/SKILL.md +10 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: arch-analyze
|
|
3
|
-
description: Analyze existing architecture — comprehensive report of
|
|
3
|
+
description: Analyze existing architecture — comprehensive report of dependency structure, critical components, circular deps, orphan files, and coupling hotspots. Auto-detects multi-layer projects (layers.json). Use when introducing archtracker or when you need a full architectural overview.
|
|
4
4
|
argument-hint: "[target directory, e.g. src]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- mcp__archtracker__analyze_existing_architecture
|
|
@@ -12,6 +12,10 @@ allowed-tools:
|
|
|
12
12
|
Perform a comprehensive architecture analysis of the project.
|
|
13
13
|
|
|
14
14
|
1. Run `analyze_existing_architecture` on the target directory
|
|
15
|
+
- For multi-layer projects: set `projectRoot` to the project root where `.archtracker/layers.json` exists, and leave `targetDir` as default `"src"` to trigger auto-detection
|
|
16
|
+
- For single-directory projects: set `targetDir` to the source directory
|
|
17
|
+
- Optional `topN` parameter to control number of items per section (default: 10, max: 50)
|
|
18
|
+
- Optional `language` parameter to specify target language (e.g. `python`, `rust`) if auto-detection fails
|
|
15
19
|
2. Present the full report covering:
|
|
16
20
|
- Overview (file count, edge count, circular deps)
|
|
17
21
|
- Critical components (most depended-on files)
|
|
@@ -19,10 +23,12 @@ Perform a comprehensive architecture analysis of the project.
|
|
|
19
23
|
- High coupling files (most imports)
|
|
20
24
|
- Orphan files (isolated, no connections)
|
|
21
25
|
- Directory breakdown
|
|
26
|
+
- **Multi-layer info** (if detected): layer summary, cross-layer connections
|
|
22
27
|
3. Offer to save a snapshot if one doesn't exist yet
|
|
23
28
|
|
|
24
|
-
Present results
|
|
29
|
+
Present results in the user's language, highlighting:
|
|
25
30
|
- Architectural risks (circular deps, high coupling)
|
|
26
31
|
- Key files that many components depend on
|
|
27
32
|
- Orphan files that may be dead code
|
|
33
|
+
- Cross-layer dependencies (if multi-layer)
|
|
28
34
|
- Recommendations for improvement
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: arch-check
|
|
3
|
-
description: Check architecture diff — compare current code against the saved snapshot and report components that may need updates. Use when checking for dependency breakage after code changes.
|
|
3
|
+
description: Check architecture diff — compare current code against the saved snapshot and report components that may need updates. Auto-detects multi-layer projects. Use when checking for dependency breakage after code changes.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- mcp__archtracker__check_architecture_diff
|
|
6
6
|
- mcp__archtracker__generate_map
|
|
@@ -10,13 +10,17 @@ allowed-tools:
|
|
|
10
10
|
|
|
11
11
|
Run an architecture diff check for the current project.
|
|
12
12
|
|
|
13
|
-
1.
|
|
14
|
-
|
|
13
|
+
1. Run `check_architecture_diff`
|
|
14
|
+
- For multi-layer projects: set `projectRoot` to the project root where `.archtracker/layers.json` exists
|
|
15
|
+
- Leave `targetDir` as default `"src"` to trigger multi-layer auto-detection
|
|
16
|
+
- Optional `language` parameter to specify target language (e.g. `python`, `rust`) if auto-detection fails
|
|
17
|
+
2. Compare current code against the saved snapshot
|
|
15
18
|
3. Report any files that have changed and their affected dependents
|
|
16
19
|
|
|
17
|
-
If no snapshot exists,
|
|
20
|
+
If no snapshot exists, one is auto-generated as the initial baseline.
|
|
18
21
|
|
|
19
|
-
Present results in
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
22
|
+
Present results in the user's language, clearly listing:
|
|
23
|
+
- Changed files (added, removed, modified edges)
|
|
24
|
+
- Affected dependent files that may need updates
|
|
25
|
+
- Cross-layer impact (if multi-layer project)
|
|
26
|
+
- Recommended actions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: arch-context
|
|
3
|
-
description: Load the current architecture context into the session. Use at the start of a new session or when you need to understand the project structure. Prevents hallucination of old file paths.
|
|
3
|
+
description: Load the current architecture context into the session. Auto-detects multi-layer projects. Use at the start of a new session or when you need to understand the project structure. Prevents hallucination of old file paths.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- mcp__archtracker__get_current_context
|
|
6
6
|
---
|
|
@@ -10,12 +10,14 @@ allowed-tools:
|
|
|
10
10
|
Retrieve and display the current project architecture context.
|
|
11
11
|
|
|
12
12
|
1. Call `get_current_context` to get valid file paths and architecture summary
|
|
13
|
+
- For multi-layer projects: set `projectRoot` to the project root where `.archtracker/layers.json` exists
|
|
13
14
|
2. Internalize the returned structure so you reference only existing files
|
|
14
15
|
3. Display a brief summary to the user
|
|
15
16
|
|
|
16
|
-
Present results in
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
17
|
+
Present results in the user's language:
|
|
18
|
+
- Valid file paths (organized by layer if multi-layer)
|
|
19
|
+
- Architecture overview summary
|
|
20
|
+
- Time since last snapshot (if available)
|
|
21
|
+
- Layer structure and cross-layer connections (if multi-layer)
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
**Important**: Use this context to avoid referencing non-existent file paths in subsequent interactions.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: arch-search
|
|
3
|
-
description: Search the architecture for files, impact analysis, critical components, or orphans. Use when asking about dependencies, impact of changes, or finding important files.
|
|
3
|
+
description: Search the architecture for files, impact analysis, critical components, or orphans. Works across all layers in multi-layer projects. Use when asking about dependencies, impact of changes, or finding important files.
|
|
4
4
|
argument-hint: [query]
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- mcp__archtracker__search_architecture
|
|
@@ -11,14 +11,18 @@ allowed-tools:
|
|
|
11
11
|
Search the project architecture using $ARGUMENTS.
|
|
12
12
|
|
|
13
13
|
Available search modes:
|
|
14
|
-
- **path**: Find files matching a pattern (default)
|
|
15
|
-
- **affected**: Find all files affected if a specific file changes
|
|
14
|
+
- **path**: Find files matching a pattern (default). In multi-layer projects, paths are prefixed with layer name (e.g. `Backend/worker.py`)
|
|
15
|
+
- **affected**: Find all files affected if a specific file changes (including cross-layer impact)
|
|
16
16
|
- **critical**: Find the most important files (most depended-on)
|
|
17
17
|
- **orphans**: Find isolated files with no connections
|
|
18
18
|
|
|
19
19
|
Choose the most appropriate mode based on the user's question and execute the search.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
21
|
+
Optional parameters:
|
|
22
|
+
- `limit`: Max number of results to return (default: 10, max: 50)
|
|
23
|
+
- `language`: Target language if auto-detection is insufficient (e.g. `python`, `rust`, `java`)
|
|
24
|
+
|
|
25
|
+
Present results in the user's language with clear formatting:
|
|
26
|
+
- File paths and dependency counts
|
|
27
|
+
- Match reason
|
|
28
|
+
- Recommended actions (for impact analysis)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arch-serve
|
|
3
|
+
description: Launch the interactive architecture graph viewer in the browser. Visualizes dependency graphs with force-directed layout, convex hull layer grouping, diff highlighting, and hierarchy view. Use when the user wants to see the architecture visually.
|
|
4
|
+
argument-hint: "[port number, e.g. 3000]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Launch Architecture Viewer
|
|
8
|
+
|
|
9
|
+
Start the interactive web-based architecture viewer.
|
|
10
|
+
|
|
11
|
+
Run the following CLI command via Bash:
|
|
12
|
+
```
|
|
13
|
+
archtracker serve --root <projectRoot> --port <port>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- Default port: 3000
|
|
17
|
+
- For multi-layer projects: use `--root <dir>` pointing to the directory containing `.archtracker/layers.json`
|
|
18
|
+
- For single-directory projects: use `--target <dir>` to specify the source directory
|
|
19
|
+
- Add `--watch` for auto-reload on file changes
|
|
20
|
+
|
|
21
|
+
The viewer provides:
|
|
22
|
+
- **Graph view**: Force-directed dependency graph with layer grouping (convex hulls), cross-layer links, and layer tab filtering
|
|
23
|
+
- **Hierarchy view**: Depth-based layout showing import hierarchy levels with layer filtering
|
|
24
|
+
- **Diff view**: Visual comparison against saved snapshot highlighting added/removed/modified files
|
|
25
|
+
- **Settings**: Node size, gravity, layer cohesion, link opacity, cross-layer link toggle, theme, and language
|
|
26
|
+
|
|
27
|
+
After launching, inform the user of the URL (http://localhost:<port>) and available features.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: arch-snapshot
|
|
3
|
-
description: Save the current architecture state as a snapshot. Use when the current code state is confirmed good and should be the new baseline.
|
|
3
|
+
description: Save the current architecture state as a snapshot baseline. Auto-detects multi-layer projects (layers.json). Use when the current code state is confirmed good and should be the new baseline for diff checks.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- mcp__archtracker__generate_map
|
|
6
6
|
- mcp__archtracker__save_architecture_snapshot
|
|
@@ -10,11 +10,15 @@ allowed-tools:
|
|
|
10
10
|
|
|
11
11
|
Save the current project architecture as the baseline snapshot.
|
|
12
12
|
|
|
13
|
-
1.
|
|
13
|
+
1. Run `save_architecture_snapshot`
|
|
14
|
+
- For multi-layer projects: set `projectRoot` to the project root where `.archtracker/layers.json` exists
|
|
15
|
+
- Leave `targetDir` as default `"src"` to trigger multi-layer auto-detection
|
|
16
|
+
- Optional `language` parameter to specify target language (e.g. `python`, `rust`) if auto-detection fails
|
|
14
17
|
2. Save it as `.archtracker/snapshot.json`
|
|
15
18
|
3. Confirm the save with a summary
|
|
16
19
|
|
|
17
|
-
Present results in
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
20
|
+
Present results in the user's language:
|
|
21
|
+
- Saved file count and edge count
|
|
22
|
+
- Key components (top 5 most depended-on files)
|
|
23
|
+
- Snapshot timestamp
|
|
24
|
+
- Layer breakdown (if multi-layer project)
|