archgraph 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -85
- package/docs/release.md +3 -3
- package/docs/view-spec.md +2 -2
- package/integrations/README.md +7 -7
- package/integrations/claude/{skills/backend-graphing → .claude/skills/archgraph}/SKILL.md +8 -8
- package/integrations/{codex/skills/backend-graphing-describe → claude/.claude/skills/archgraph-describe}/SKILL.md +7 -7
- package/integrations/claude/.claude-plugin/marketplace.json +4 -4
- package/integrations/claude/.claude-plugin/plugin.json +2 -2
- package/integrations/{codex/skills/backend-graphing → claude/skills/archgraph}/SKILL.md +8 -8
- package/integrations/claude/{.claude/skills/backend-graphing-describe → skills/archgraph-describe}/SKILL.md +7 -7
- package/integrations/{claude/.claude/skills/backend-graphing → codex/skills/archgraph}/SKILL.md +8 -8
- package/integrations/{claude/skills/backend-graphing-describe → codex/skills/archgraph-describe}/SKILL.md +7 -7
- package/package.json +6 -3
- package/packages/cli/src/index.js +10 -10
- package/packages/core/src/export.js +1 -1
- package/packages/viewer/public/app.js +5 -5
- package/packages/viewer/public/canvas.js +2 -2
- package/packages/viewer/public/index.html +6 -3
- package/packages/viewer/public/minimap.js +2 -2
- package/packages/viewer/public/render.js +2 -2
- package/packages/viewer/public/styles.css +1 -1
- package/packages/viewer/public/theme.js +1 -1
- package/packages/viewer/src/index.js +2 -2
- /package/bin/{bgx.js → arcgx.js} +0 -0
package/README.md
CHANGED
|
@@ -1,123 +1,107 @@
|
|
|
1
|
-
#
|
|
1
|
+
# archgraph
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Endpoint-first static code graph analyzer and interactive viewer for backend/frontend architectures.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g archgraph
|
|
9
|
+
```
|
|
4
10
|
|
|
5
11
|
## Packages
|
|
6
|
-
|
|
7
|
-
- `@
|
|
8
|
-
- `@
|
|
12
|
+
|
|
13
|
+
- `@archgraph/core`: static analyzer, graph model, view builder, exporters
|
|
14
|
+
- `@archgraph/cli`: `arcgx` command for analyze/export/view/describe/install
|
|
15
|
+
- `@archgraph/viewer`: local interactive viewer server + DAG client with code drilldown and task queue
|
|
9
16
|
|
|
10
17
|
## Quick Start
|
|
18
|
+
|
|
11
19
|
```bash
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
--
|
|
29
|
-
--spec docs/examples/view-spec.yaml \
|
|
30
|
-
--out scout-manager-backend.view.json
|
|
31
|
-
|
|
32
|
-
# launch local viewer
|
|
33
|
-
node packages/cli/src/index.js view \
|
|
34
|
-
--graph scout-manager-backend.graph.json \
|
|
35
|
-
--serve \
|
|
36
|
-
--port 4310
|
|
37
|
-
|
|
38
|
-
# generate structured bilingual descriptions
|
|
39
|
-
node packages/cli/src/index.js describe \
|
|
40
|
-
--graph scout-manager-backend.graph.json \
|
|
41
|
-
--out scout-manager-backend.descriptions.json \
|
|
20
|
+
# Analyze a backend repo
|
|
21
|
+
arcgx analyze --project /path/to/your/project --out graph.json
|
|
22
|
+
|
|
23
|
+
# Export to Cypher or Mermaid
|
|
24
|
+
arcgx export --graph graph.json --format cypher --out graph.cypher
|
|
25
|
+
arcgx export --graph graph.json --format mermaid --out graph.mmd
|
|
26
|
+
|
|
27
|
+
# Generate a filtered view file
|
|
28
|
+
arcgx view --graph graph.json --spec view-spec.yaml --out view.json
|
|
29
|
+
|
|
30
|
+
# Launch interactive viewer
|
|
31
|
+
arcgx view --graph graph.json --serve --port 4310
|
|
32
|
+
|
|
33
|
+
# Generate structured bilingual descriptions
|
|
34
|
+
arcgx describe \
|
|
35
|
+
--graph graph.json \
|
|
36
|
+
--out descriptions.json \
|
|
42
37
|
--executor codex \
|
|
43
38
|
--language bilingual \
|
|
44
39
|
--detail structured
|
|
45
40
|
```
|
|
46
41
|
|
|
47
|
-
After global install, use:
|
|
48
|
-
```bash
|
|
49
|
-
bgx --help
|
|
50
|
-
bgx analyze --project /absolute/path/to/project --out graph.json
|
|
51
|
-
```
|
|
52
|
-
|
|
53
42
|
## Install as Codex Skill / Claude Plugin
|
|
54
43
|
|
|
55
|
-
Global install:
|
|
56
|
-
```bash
|
|
57
|
-
npm install -g /Users/sangsoolee/GitHub/backend-graphing
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Automatic import into local assistant folders:
|
|
61
44
|
```bash
|
|
62
|
-
#
|
|
63
|
-
|
|
45
|
+
# Install both Codex and Claude integrations
|
|
46
|
+
arcgx install --target all
|
|
64
47
|
|
|
65
|
-
#
|
|
66
|
-
|
|
48
|
+
# Codex only
|
|
49
|
+
arcgx install --target codex
|
|
67
50
|
|
|
68
|
-
#
|
|
69
|
-
|
|
70
|
-
```
|
|
51
|
+
# Claude only
|
|
52
|
+
arcgx install --target claude
|
|
71
53
|
|
|
72
|
-
Custom home paths
|
|
73
|
-
|
|
74
|
-
bgx install --target all --codex-home /path/to/.codex --claude-home /path/to/.claude
|
|
75
|
-
```
|
|
54
|
+
# Custom home paths
|
|
55
|
+
arcgx install --target all --codex-home /path/to/.codex --claude-home /path/to/.claude
|
|
76
56
|
|
|
77
|
-
Dry-run preview
|
|
78
|
-
|
|
79
|
-
bgx install --target all --dry-run
|
|
57
|
+
# Dry-run preview
|
|
58
|
+
arcgx install --target all --dry-run
|
|
80
59
|
```
|
|
81
60
|
|
|
82
61
|
## Canonical Graph Format
|
|
62
|
+
|
|
83
63
|
`GraphBundle { schemaVersion, createdAt, project, strings[], nodes[], edges[], groups[], indexes }`
|
|
84
64
|
|
|
85
65
|
Node kinds:
|
|
66
|
+
|
|
86
67
|
- `endpoint`, `route_handler`, `function`, `method`, `class`, `object`, `agent`, `langgraph_node`, `mcp_tool`, `module`, `file`, `ui_route`, `ui_component`, `group`, `condition`
|
|
87
68
|
|
|
88
69
|
Edge kinds:
|
|
70
|
+
|
|
89
71
|
- `declares_endpoint`, `handles`, `calls`, `imports`, `invokes_agent`, `uses_mcp_tool`, `langgraph_edge`, `belongs_to_group`, `ui_calls_api`, `frontend_proxies_to_backend`, `evaluates_condition`, `condition_true`, `condition_false`, `condition_case`
|
|
90
72
|
|
|
91
|
-
##
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
73
|
+
## Extraction Coverage
|
|
74
|
+
|
|
75
|
+
- Express route extraction with mounted prefix propagation
|
|
76
|
+
- Handler linkage from endpoint to route handlers and function symbols
|
|
77
|
+
- Transitive call graph extraction using TypeScript AST (with local TypeScript module fallback)
|
|
78
|
+
- Conditional flow extraction for `if`/`switch`/ternary branches into explicit condition nodes
|
|
79
|
+
- LangGraph extraction from `.addNode/.addEdge/.addConditionalEdges` chains
|
|
80
|
+
- MCP extraction from `*_TOOLS` arrays and `callTool("...")` usage
|
|
81
|
+
- Grouping by endpoint + secondary overlays by agent/purpose
|
|
82
|
+
|
|
83
|
+
## Viewer Capabilities
|
|
84
|
+
|
|
85
|
+
- Endpoint-first directed graph rendering (logical DAG) with conditional edge styling
|
|
86
|
+
- Grouping by `endpoint`, `agent`, or `purpose` with item selector and search
|
|
87
|
+
- Node click opens code snippet and related 1-hop context
|
|
88
|
+
- Sidepanel comment/task queue with status lifecycle and approval-gated execution
|
|
89
|
+
- Optional descriptions panel from `arcgx describe` output
|
|
106
90
|
|
|
107
91
|
Executor config template:
|
|
108
|
-
|
|
92
|
+
|
|
93
|
+
- Copy `docs/examples/executors.example.json` to `<your-repo>/.arcgx/executors.json`
|
|
94
|
+
|
|
95
|
+
## View Spec
|
|
96
|
+
|
|
97
|
+
See [`docs/view-spec.md`](docs/view-spec.md) for the full view specification format.
|
|
109
98
|
|
|
110
99
|
## Tests
|
|
100
|
+
|
|
111
101
|
```bash
|
|
112
102
|
npm test
|
|
113
103
|
```
|
|
114
104
|
|
|
115
|
-
|
|
116
|
-
- extractor unit tests
|
|
117
|
-
- view and export tests
|
|
118
|
-
- integration checks against `/Users/sangsoolee/GitHub/scout-manager-backend`
|
|
119
|
-
- CLI integration tests
|
|
120
|
-
- viewer asset contract tests
|
|
105
|
+
## License
|
|
121
106
|
|
|
122
|
-
|
|
123
|
-
- `.omx/plans/prd-backend-graphing-engine.md`
|
|
107
|
+
MIT
|
package/docs/release.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
2. Verify tests:
|
|
7
7
|
- `npm test`
|
|
8
8
|
3. Publish packages in dependency order:
|
|
9
|
-
- `@
|
|
10
|
-
- `@
|
|
11
|
-
- `@
|
|
9
|
+
- `@archgraph/core`
|
|
10
|
+
- `@archgraph/viewer`
|
|
11
|
+
- `@archgraph/cli`
|
|
12
12
|
|
|
13
13
|
## Versioning
|
|
14
14
|
- Follow semver.
|
package/docs/view-spec.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# View Spec
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`arcgx view --spec <file>` accepts JSON or simple YAML.
|
|
4
4
|
|
|
5
5
|
Supported fields:
|
|
6
6
|
- `version`: required (`"1"`)
|
|
@@ -13,7 +13,7 @@ Supported fields:
|
|
|
13
13
|
- `labelMode`: `short | full`
|
|
14
14
|
|
|
15
15
|
Notes:
|
|
16
|
-
- `depth` is still supported for `
|
|
16
|
+
- `depth` is still supported for `arcgx view` artifact generation.
|
|
17
17
|
- Local viewer UI no longer exposes a depth slider; it renders from the generated view and group/search filters.
|
|
18
18
|
|
|
19
19
|
Example:
|
package/integrations/README.md
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
This folder contains copyable integration bundles for Codex and Claude.
|
|
4
4
|
|
|
5
5
|
## Codex
|
|
6
|
-
- Source bundle: `integrations/codex/skills/
|
|
7
|
-
- Source bundle: `integrations/codex/skills/
|
|
8
|
-
- Destination: `$CODEX_HOME/skills/
|
|
6
|
+
- Source bundle: `integrations/codex/skills/archgraph/`
|
|
7
|
+
- Source bundle: `integrations/codex/skills/archgraph-describe/`
|
|
8
|
+
- Destination: `$CODEX_HOME/skills/archgraph/` (or `~/.codex/skills/archgraph/`)
|
|
9
9
|
|
|
10
10
|
## Claude
|
|
11
11
|
- Source bundle: `integrations/claude/`
|
|
12
|
-
- Plugin destination: `~/.claude/plugins/marketplaces/
|
|
13
|
-
- Skill destination: `~/.claude/skills/
|
|
14
|
-
- Skill destination: `~/.claude/skills/
|
|
12
|
+
- Plugin destination: `~/.claude/plugins/marketplaces/archgraph/`
|
|
13
|
+
- Skill destination: `~/.claude/skills/archgraph/`
|
|
14
|
+
- Skill destination: `~/.claude/skills/archgraph-describe/`
|
|
15
15
|
|
|
16
16
|
## Automatic install
|
|
17
17
|
Use:
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
arcgx install --target all
|
|
20
20
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Analyze backend/frontend codebases into endpoint-first graph artifacts with `
|
|
2
|
+
name: archgraph
|
|
3
|
+
description: Analyze backend/frontend codebases into endpoint-first graph artifacts with `arcgx`, and export to Cypher/Mermaid or interactive view JSON.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Backend Graphing Skill
|
|
@@ -17,32 +17,32 @@ description: Analyze backend/frontend codebases into endpoint-first graph artifa
|
|
|
17
17
|
## Commands
|
|
18
18
|
1. Analyze project:
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
arcgx analyze --project <ABS_PROJECT_PATH> --out <GRAPH_JSON_PATH>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
2. Analyze with frontend linkage:
|
|
24
24
|
```bash
|
|
25
|
-
|
|
25
|
+
arcgx analyze --project <ABS_BACKEND_PATH> --frontend <ABS_FRONTEND_PATH> --out <GRAPH_JSON_PATH>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
3. Export Cypher:
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
arcgx export --graph <GRAPH_JSON_PATH> --format cypher --out <GRAPH_CYPHER_PATH>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
4. Export Mermaid:
|
|
34
34
|
```bash
|
|
35
|
-
|
|
35
|
+
arcgx export --graph <GRAPH_JSON_PATH> --format mermaid --out <GRAPH_MMD_PATH>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
5. Build view JSON from spec:
|
|
39
39
|
```bash
|
|
40
|
-
|
|
40
|
+
arcgx view --graph <GRAPH_JSON_PATH> --spec <VIEW_SPEC_YAML_OR_JSON> --out <VIEW_JSON_PATH>
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
6. Launch local viewer:
|
|
44
44
|
```bash
|
|
45
|
-
|
|
45
|
+
arcgx view --graph <GRAPH_JSON_PATH> --serve --port 4310
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
## Output expectations
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Generate bilingual natural-language descriptions for endpoint/purpose graph nodes using `
|
|
2
|
+
name: archgraph-describe
|
|
3
|
+
description: Generate bilingual natural-language descriptions for endpoint/purpose graph nodes using `arcgx describe`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Backend Graphing Describe Skill
|
|
@@ -10,14 +10,14 @@ description: Generate bilingual natural-language descriptions for endpoint/purpo
|
|
|
10
10
|
- You want Korean + English architectural summaries for docs or reviews.
|
|
11
11
|
|
|
12
12
|
## Required input
|
|
13
|
-
- Graph JSON path (`
|
|
13
|
+
- Graph JSON path (`arcgx analyze` output).
|
|
14
14
|
- Output path for description bundle.
|
|
15
15
|
- Executor choice (`codex` or `claude`).
|
|
16
16
|
|
|
17
17
|
## Commands
|
|
18
18
|
1. Generate description bundle:
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
arcgx describe \
|
|
21
21
|
--graph <GRAPH_JSON_PATH> \
|
|
22
22
|
--out <DESCRIPTION_JSON_PATH> \
|
|
23
23
|
--executor codex \
|
|
@@ -27,16 +27,16 @@ bgx describe \
|
|
|
27
27
|
|
|
28
28
|
2. Validate executor template config:
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
arcgx describe \
|
|
31
31
|
--graph <GRAPH_JSON_PATH> \
|
|
32
32
|
--out <DESCRIPTION_JSON_PATH> \
|
|
33
33
|
--executor claude \
|
|
34
|
-
--executor-config .
|
|
34
|
+
--executor-config .arcgx/executors.json
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
3. Serve viewer with descriptions loaded:
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
arcgx view --graph <GRAPH_JSON_PATH> --serve --descriptions <DESCRIPTION_JSON_PATH>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Output expectations
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"description": "Local marketplace metadata for
|
|
2
|
+
"name": "archgraph-marketplace",
|
|
3
|
+
"description": "Local marketplace metadata for archgraph plugin",
|
|
4
4
|
"owner": {
|
|
5
5
|
"name": "Sangsoo Lee"
|
|
6
6
|
},
|
|
7
7
|
"plugins": [
|
|
8
8
|
{
|
|
9
|
-
"name": "
|
|
10
|
-
"description": "Graph analysis plugin for endpoint-first backend/frontend architecture mapping with
|
|
9
|
+
"name": "archgraph",
|
|
10
|
+
"description": "Graph analysis plugin for endpoint-first backend/frontend architecture mapping with arcgx",
|
|
11
11
|
"version": "0.1.0",
|
|
12
12
|
"source": "./",
|
|
13
13
|
"author": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"description": "Graph analysis plugin for endpoint-first backend/frontend architecture mapping with
|
|
2
|
+
"name": "archgraph",
|
|
3
|
+
"description": "Graph analysis plugin for endpoint-first backend/frontend architecture mapping with arcgx",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sangsoo Lee"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Analyze backend/frontend codebases into endpoint-first graph artifacts with `
|
|
2
|
+
name: archgraph
|
|
3
|
+
description: Analyze backend/frontend codebases into endpoint-first graph artifacts with `arcgx`, and export to Cypher/Mermaid or interactive view JSON.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Backend Graphing Skill
|
|
@@ -17,32 +17,32 @@ description: Analyze backend/frontend codebases into endpoint-first graph artifa
|
|
|
17
17
|
## Commands
|
|
18
18
|
1. Analyze project:
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
arcgx analyze --project <ABS_PROJECT_PATH> --out <GRAPH_JSON_PATH>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
2. Analyze with frontend linkage:
|
|
24
24
|
```bash
|
|
25
|
-
|
|
25
|
+
arcgx analyze --project <ABS_BACKEND_PATH> --frontend <ABS_FRONTEND_PATH> --out <GRAPH_JSON_PATH>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
3. Export Cypher:
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
arcgx export --graph <GRAPH_JSON_PATH> --format cypher --out <GRAPH_CYPHER_PATH>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
4. Export Mermaid:
|
|
34
34
|
```bash
|
|
35
|
-
|
|
35
|
+
arcgx export --graph <GRAPH_JSON_PATH> --format mermaid --out <GRAPH_MMD_PATH>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
5. Build view JSON from spec:
|
|
39
39
|
```bash
|
|
40
|
-
|
|
40
|
+
arcgx view --graph <GRAPH_JSON_PATH> --spec <VIEW_SPEC_YAML_OR_JSON> --out <VIEW_JSON_PATH>
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
6. Launch local viewer:
|
|
44
44
|
```bash
|
|
45
|
-
|
|
45
|
+
arcgx view --graph <GRAPH_JSON_PATH> --serve --port 4310
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
## Output expectations
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Generate bilingual natural-language descriptions for endpoint/purpose graph nodes using `
|
|
2
|
+
name: archgraph-describe
|
|
3
|
+
description: Generate bilingual natural-language descriptions for endpoint/purpose graph nodes using `arcgx describe`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Backend Graphing Describe Skill
|
|
@@ -10,14 +10,14 @@ description: Generate bilingual natural-language descriptions for endpoint/purpo
|
|
|
10
10
|
- You want Korean + English architectural summaries for docs or reviews.
|
|
11
11
|
|
|
12
12
|
## Required input
|
|
13
|
-
- Graph JSON path (`
|
|
13
|
+
- Graph JSON path (`arcgx analyze` output).
|
|
14
14
|
- Output path for description bundle.
|
|
15
15
|
- Executor choice (`codex` or `claude`).
|
|
16
16
|
|
|
17
17
|
## Commands
|
|
18
18
|
1. Generate description bundle:
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
arcgx describe \
|
|
21
21
|
--graph <GRAPH_JSON_PATH> \
|
|
22
22
|
--out <DESCRIPTION_JSON_PATH> \
|
|
23
23
|
--executor codex \
|
|
@@ -27,16 +27,16 @@ bgx describe \
|
|
|
27
27
|
|
|
28
28
|
2. Validate executor template config:
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
arcgx describe \
|
|
31
31
|
--graph <GRAPH_JSON_PATH> \
|
|
32
32
|
--out <DESCRIPTION_JSON_PATH> \
|
|
33
33
|
--executor claude \
|
|
34
|
-
--executor-config .
|
|
34
|
+
--executor-config .arcgx/executors.json
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
3. Serve viewer with descriptions loaded:
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
arcgx view --graph <GRAPH_JSON_PATH> --serve --descriptions <DESCRIPTION_JSON_PATH>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Output expectations
|
package/integrations/{claude/.claude/skills/backend-graphing → codex/skills/archgraph}/SKILL.md
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Analyze backend/frontend codebases into endpoint-first graph artifacts with `
|
|
2
|
+
name: archgraph
|
|
3
|
+
description: Analyze backend/frontend codebases into endpoint-first graph artifacts with `arcgx`, and export to Cypher/Mermaid or interactive view JSON.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Backend Graphing Skill
|
|
@@ -17,32 +17,32 @@ description: Analyze backend/frontend codebases into endpoint-first graph artifa
|
|
|
17
17
|
## Commands
|
|
18
18
|
1. Analyze project:
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
arcgx analyze --project <ABS_PROJECT_PATH> --out <GRAPH_JSON_PATH>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
2. Analyze with frontend linkage:
|
|
24
24
|
```bash
|
|
25
|
-
|
|
25
|
+
arcgx analyze --project <ABS_BACKEND_PATH> --frontend <ABS_FRONTEND_PATH> --out <GRAPH_JSON_PATH>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
3. Export Cypher:
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
arcgx export --graph <GRAPH_JSON_PATH> --format cypher --out <GRAPH_CYPHER_PATH>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
4. Export Mermaid:
|
|
34
34
|
```bash
|
|
35
|
-
|
|
35
|
+
arcgx export --graph <GRAPH_JSON_PATH> --format mermaid --out <GRAPH_MMD_PATH>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
5. Build view JSON from spec:
|
|
39
39
|
```bash
|
|
40
|
-
|
|
40
|
+
arcgx view --graph <GRAPH_JSON_PATH> --spec <VIEW_SPEC_YAML_OR_JSON> --out <VIEW_JSON_PATH>
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
6. Launch local viewer:
|
|
44
44
|
```bash
|
|
45
|
-
|
|
45
|
+
arcgx view --graph <GRAPH_JSON_PATH> --serve --port 4310
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
## Output expectations
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Generate bilingual natural-language descriptions for endpoint/purpose graph nodes using `
|
|
2
|
+
name: archgraph-describe
|
|
3
|
+
description: Generate bilingual natural-language descriptions for endpoint/purpose graph nodes using `arcgx describe`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Backend Graphing Describe Skill
|
|
@@ -10,14 +10,14 @@ description: Generate bilingual natural-language descriptions for endpoint/purpo
|
|
|
10
10
|
- You want Korean + English architectural summaries for docs or reviews.
|
|
11
11
|
|
|
12
12
|
## Required input
|
|
13
|
-
- Graph JSON path (`
|
|
13
|
+
- Graph JSON path (`arcgx analyze` output).
|
|
14
14
|
- Output path for description bundle.
|
|
15
15
|
- Executor choice (`codex` or `claude`).
|
|
16
16
|
|
|
17
17
|
## Commands
|
|
18
18
|
1. Generate description bundle:
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
arcgx describe \
|
|
21
21
|
--graph <GRAPH_JSON_PATH> \
|
|
22
22
|
--out <DESCRIPTION_JSON_PATH> \
|
|
23
23
|
--executor codex \
|
|
@@ -27,16 +27,16 @@ bgx describe \
|
|
|
27
27
|
|
|
28
28
|
2. Validate executor template config:
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
arcgx describe \
|
|
31
31
|
--graph <GRAPH_JSON_PATH> \
|
|
32
32
|
--out <DESCRIPTION_JSON_PATH> \
|
|
33
33
|
--executor claude \
|
|
34
|
-
--executor-config .
|
|
34
|
+
--executor-config .arcgx/executors.json
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
3. Serve viewer with descriptions loaded:
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
arcgx view --graph <GRAPH_JSON_PATH> --serve --descriptions <DESCRIPTION_JSON_PATH>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Output expectations
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archgraph",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Endpoint-first static code graph analyzer and interactive viewer for backend/frontend architectures",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"arcgx": "./bin/arcgx.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin",
|
|
@@ -45,5 +45,8 @@
|
|
|
45
45
|
"homepage": "https://github.com/Lee-Sangsu/backend-graphing#readme",
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=18"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"typescript": "^5.0.0"
|
|
48
51
|
}
|
|
49
|
-
}
|
|
52
|
+
}
|
|
@@ -14,8 +14,8 @@ async function loadWorkspaceModule(name, fallbackPath) {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const coreModule = await loadWorkspaceModule('@
|
|
18
|
-
const viewerModule = await loadWorkspaceModule('@
|
|
17
|
+
const coreModule = await loadWorkspaceModule('@archgraph/core', '../../core/src/index.js');
|
|
18
|
+
const viewerModule = await loadWorkspaceModule('@archgraph/viewer', '../../viewer/src/index.js');
|
|
19
19
|
|
|
20
20
|
const { analyzeProject, buildView, exportGraph } = coreModule;
|
|
21
21
|
const { startViewerServer } = viewerModule;
|
|
@@ -25,11 +25,11 @@ const PROJECT_ROOT = resolve(dirname(CLI_FILE), '../../../');
|
|
|
25
25
|
function usage() {
|
|
26
26
|
return [
|
|
27
27
|
'Usage:',
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
28
|
+
' arcgx analyze --project <path> --out <file> [--format graph-json] [--compress gzip]',
|
|
29
|
+
' arcgx export --graph <file> --format cypher|mermaid --out <file>',
|
|
30
|
+
' arcgx view --graph <file> [--spec <view.yaml|json>] [--serve] [--port 4310]',
|
|
31
|
+
' arcgx describe --graph <file> --out <file> --executor codex|claude [--executor-config <path>] [--language bilingual] [--detail structured]',
|
|
32
|
+
' arcgx install [--target codex|claude|all] [--codex-home <dir>] [--claude-home <dir>] [--dry-run]',
|
|
33
33
|
].join('\n');
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -177,7 +177,7 @@ function buildDescriptionBundle(graph, { executor, language = 'bilingual', detai
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
async function installCodexSkill({ codexHome, dryRun }) {
|
|
180
|
-
const skillNames = ['
|
|
180
|
+
const skillNames = ['archgraph', 'archgraph-describe'];
|
|
181
181
|
const installs = [];
|
|
182
182
|
|
|
183
183
|
for (const name of skillNames) {
|
|
@@ -203,8 +203,8 @@ async function installCodexSkill({ codexHome, dryRun }) {
|
|
|
203
203
|
|
|
204
204
|
async function installClaudePlugin({ claudeHome, dryRun }) {
|
|
205
205
|
const pluginSource = join(PROJECT_ROOT, 'integrations', 'claude');
|
|
206
|
-
const pluginDestination = join(claudeHome, 'plugins', 'marketplaces', '
|
|
207
|
-
const skillNames = ['
|
|
206
|
+
const pluginDestination = join(claudeHome, 'plugins', 'marketplaces', 'archgraph');
|
|
207
|
+
const skillNames = ['archgraph', 'archgraph-describe'];
|
|
208
208
|
|
|
209
209
|
if (!(await pathExists(pluginSource))) {
|
|
210
210
|
throw new Error(`Claude plugin source not found: ${pluginSource}`);
|
|
@@ -10,7 +10,7 @@ function escapeMermaid(value) {
|
|
|
10
10
|
|
|
11
11
|
function toCypher(graph) {
|
|
12
12
|
const lines = [];
|
|
13
|
-
lines.push('//
|
|
13
|
+
lines.push('// archgraph cypher export');
|
|
14
14
|
lines.push('BEGIN;');
|
|
15
15
|
|
|
16
16
|
const nodes = [...graph.nodes].sort((a, b) => a.id.localeCompare(b.id));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// app.js —
|
|
1
|
+
// app.js — ARCGX Viewer entry point
|
|
2
2
|
|
|
3
3
|
import { initCanvas, canvasTransform, nodePositions, applyCanvasTransform } from './canvas.js';
|
|
4
4
|
import { initMinimap, setMinimapView, updateMinimap } from './minimap.js';
|
|
@@ -147,8 +147,8 @@ async function loadData() {
|
|
|
147
147
|
view = await viewRes.json();
|
|
148
148
|
descriptions = await descRes.json();
|
|
149
149
|
|
|
150
|
-
projectNameEl.textContent = graph.project?.name ?? '
|
|
151
|
-
document.title = `
|
|
150
|
+
projectNameEl.textContent = graph.project?.name ?? 'ARCGX Viewer';
|
|
151
|
+
document.title = `ARCGX — ${graph.project?.name ?? 'Viewer'}`;
|
|
152
152
|
|
|
153
153
|
setRenderView(view);
|
|
154
154
|
setMinimapView(view);
|
|
@@ -170,14 +170,14 @@ function doResetView() {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
// ─── Global hooks (used by render.js and minimap.js to avoid circular deps) ───
|
|
173
|
-
window.
|
|
173
|
+
window.__arcgxPanToWorld = (worldX, worldY) => {
|
|
174
174
|
const rect = graphSvg.getBoundingClientRect();
|
|
175
175
|
canvasTransform.x = rect.width / 2 - worldX * canvasTransform.scale;
|
|
176
176
|
canvasTransform.y = rect.height / 2 - worldY * canvasTransform.scale;
|
|
177
177
|
applyCanvasTransform();
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
window.
|
|
180
|
+
window.__arcgxRender = async () => {
|
|
181
181
|
await render();
|
|
182
182
|
};
|
|
183
183
|
|
|
@@ -118,8 +118,8 @@ function onCanvasPointerMove(e) {
|
|
|
118
118
|
y: dragStart.ny + dy,
|
|
119
119
|
});
|
|
120
120
|
// repositionNodeAndEdges is imported dynamically to avoid circular deps
|
|
121
|
-
if (window.
|
|
122
|
-
window.
|
|
121
|
+
if (window.__arcgxRepositionNode) {
|
|
122
|
+
window.__arcgxRepositionNode(draggingNodeId);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
return;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>
|
|
6
|
+
<title>ARCGX Viewer</title>
|
|
7
7
|
<link rel="stylesheet" href="/styles.css" />
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<!-- Layer 2: Floating toolbar (Figma-style top bar) -->
|
|
19
19
|
<div id="toolbar">
|
|
20
|
-
<span id="projectName" class="toolbar-title">
|
|
20
|
+
<span id="projectName" class="toolbar-title">ARCGX Viewer</span>
|
|
21
21
|
|
|
22
22
|
<div id="toolbarControls">
|
|
23
23
|
<label class="ctrl-label">
|
|
@@ -82,7 +82,10 @@
|
|
|
82
82
|
</div>
|
|
83
83
|
</div>
|
|
84
84
|
|
|
85
|
-
<!-- Layer 5:
|
|
85
|
+
<!-- Layer 5: Tasks panel -->
|
|
86
|
+
<aside id="tasksPanel" class="tasks-panel" aria-hidden="true"></aside>
|
|
87
|
+
|
|
88
|
+
<!-- Layer 6: Minimap -->
|
|
86
89
|
<div id="minimap">
|
|
87
90
|
<svg id="minimapSvg" xmlns="http://www.w3.org/2000/svg"></svg>
|
|
88
91
|
</div>
|
|
@@ -86,7 +86,7 @@ function onMinimapClick(e) {
|
|
|
86
86
|
const worldY = mmY / mmScale + minY;
|
|
87
87
|
|
|
88
88
|
// Import canvasTransform at runtime to avoid circular dep — use global reference
|
|
89
|
-
if (window.
|
|
90
|
-
window.
|
|
89
|
+
if (window.__arcgxPanToWorld) {
|
|
90
|
+
window.__arcgxPanToWorld(worldX, worldY);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -237,7 +237,7 @@ export function renderGraph(nodes, edges) {
|
|
|
237
237
|
} else {
|
|
238
238
|
collapsedGroups.add(groupId);
|
|
239
239
|
}
|
|
240
|
-
if (window.
|
|
240
|
+
if (window.__arcgxRender) window.__arcgxRender();
|
|
241
241
|
});
|
|
242
242
|
|
|
243
243
|
group.appendChild(toggle);
|
|
@@ -258,7 +258,7 @@ export function renderGraph(nodes, edges) {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
// Register repositionNodeAndEdges globally for canvas.js to call
|
|
261
|
-
window.
|
|
261
|
+
window.__arcgxRepositionNode = (nodeId) => repositionNodeAndEdges(nodeId);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
export function renderCommentPins(tasks) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ──────────────────────────────────────────────────────────────────
|
|
2
|
-
|
|
2
|
+
ARCGX Viewer — Figma-like canvas layout
|
|
3
3
|
────────────────────────────────────────────────────────────────── */
|
|
4
4
|
|
|
5
5
|
/* ─── Design tokens (light mode) ─────────────────────────────────── */
|
|
@@ -134,8 +134,8 @@ export async function createViewerService(options) {
|
|
|
134
134
|
const graph = options.graph;
|
|
135
135
|
const view = options.view ?? { spec: { version: '1' }, nodes: graph.nodes, edges: graph.edges, groups: graph.groups };
|
|
136
136
|
const repoRoot = resolve(options.repoRoot ?? graph?.project?.rootPath ?? process.cwd());
|
|
137
|
-
const tasksFile = options.tasksFile ?? join(repoRoot, '.
|
|
138
|
-
const executorConfigPath = options.executorConfigPath ?? join(repoRoot, '.
|
|
137
|
+
const tasksFile = options.tasksFile ?? join(repoRoot, '.arcgx', 'comment-tasks.json');
|
|
138
|
+
const executorConfigPath = options.executorConfigPath ?? join(repoRoot, '.arcgx', 'executors.json');
|
|
139
139
|
const descriptionsPath = options.descriptionsPath ?? null;
|
|
140
140
|
|
|
141
141
|
const nodeById = new Map(graph.nodes.map((node) => [node.id, node]));
|
/package/bin/{bgx.js → arcgx.js}
RENAMED
|
File without changes
|