archgen-mcp 0.0.0-stage → 0.0.6
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 +125 -2
- package/assets/briefs/investigate.md +22 -0
- package/assets/briefs/review.md +35 -0
- package/assets/briefs/survey.md +22 -0
- package/assets/briefs/verifier.md +44 -0
- package/assets/depth-ladder.json +90 -0
- package/assets/harness-mcp.json +159 -0
- package/assets/mcp-template.json +45 -0
- package/assets/platform-capabilities.json +252 -0
- package/assets/references/artifact-templates.md +271 -0
- package/assets/references/interview.md +277 -0
- package/assets/references/mcp-and-skills.md +152 -0
- package/assets/references/orchestration.md +262 -0
- package/assets/references/platforms.md +140 -0
- package/assets/skill-registry.json +119 -0
- package/assets/templates/adr.md +8 -0
- package/assets/templates/architecture.yaml +58 -0
- package/assets/templates/edge-matrix.md +8 -0
- package/assets/templates/mermaid.md +47 -0
- package/assets/templates/prd.md +31 -0
- package/assets/templates/tasks.yaml +40 -0
- package/bin/archgen-mcp.mjs +33 -0
- package/package.json +47 -4
- package/src/cli.mjs +245 -0
- package/src/context.mjs +188 -0
- package/src/core/briefs.mjs +47 -0
- package/src/core/codegraph-manager.mjs +436 -0
- package/src/core/compat.mjs +177 -0
- package/src/core/doc-navigator.mjs +513 -0
- package/src/core/docs.mjs +156 -0
- package/src/core/errors.mjs +65 -0
- package/src/core/fs-safety.mjs +140 -0
- package/src/core/graph.mjs +222 -0
- package/src/core/harness-wiring.mjs +363 -0
- package/src/core/impact-analyzer.mjs +89 -0
- package/src/core/mcp-server-manager.mjs +142 -0
- package/src/core/plan-coverage.mjs +32 -0
- package/src/core/plan-grapher.mjs +338 -0
- package/src/core/platform-caps.mjs +88 -0
- package/src/core/refs.mjs +187 -0
- package/src/core/registry-updater.mjs +232 -0
- package/src/core/resume-snapshot.mjs +108 -0
- package/src/core/scaffold.mjs +193 -0
- package/src/core/scope.mjs +65 -0
- package/src/core/skill-manager.mjs +311 -0
- package/src/core/status-mutator.mjs +90 -0
- package/src/core/ui-channel.mjs +171 -0
- package/src/core/validator.mjs +108 -0
- package/src/core/verifier.mjs +105 -0
- package/src/core/wave-resolver.mjs +116 -0
- package/src/core/worker-contract.mjs +156 -0
- package/src/core/yaml.mjs +492 -0
- package/src/envelope.mjs +65 -0
- package/src/server.mjs +61 -0
- package/src/tools/_register.mjs +119 -0
- package/src/tools/codegraph.mjs +55 -0
- package/src/tools/docs.mjs +105 -0
- package/src/tools/help.mjs +294 -0
- package/src/tools/plan.mjs +125 -0
- package/src/tools/refs.mjs +62 -0
- package/src/tools/registry.mjs +35 -0
- package/src/tools/setup.mjs +175 -0
- package/src/tools/skills.mjs +135 -0
- package/src/tools/tasks.mjs +147 -0
- package/src/tools/ui.mjs +67 -0
package/README.md
CHANGED
|
@@ -1,3 +1,126 @@
|
|
|
1
|
-
#
|
|
1
|
+
# archgen-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The MCP server for [archgen](https://github.com/akashmaurya99/archgen) — it
|
|
4
|
+
owns **every** deterministic capability in the archgen workflow.
|
|
5
|
+
|
|
6
|
+
The archgen skill is orchestration guidance for an agent; this server is the
|
|
7
|
+
runtime it drives. One implementation, three ways in:
|
|
8
|
+
|
|
9
|
+
| Consumer | How it reaches the server |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Coding agents | MCP over stdio — 10 domain tools |
|
|
12
|
+
| `archgen-skill init` / `install` | `archgen-mcp bootstrap` |
|
|
13
|
+
| The VS Code extension | `archgen-mcp exec <tool> '<json>'` |
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
The archgen installer wires this server into every detected harness for you:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx archgen-skill init
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
That installs the skill, writes the `archgen` MCP entry into each detected
|
|
24
|
+
harness's own config (with the correct per-platform file and top-level key),
|
|
25
|
+
and ensures CodeGraph.
|
|
26
|
+
|
|
27
|
+
To run it by hand:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx archgen-mcp # serve MCP over stdio
|
|
31
|
+
npx archgen-mcp --list # list the tools
|
|
32
|
+
npx archgen-mcp doctor # health report
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Requires **Node.js >= 20** (the official MCP SDK v2 floor).
|
|
36
|
+
|
|
37
|
+
## The tools
|
|
38
|
+
|
|
39
|
+
| Tool | Use it for |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `archgen_plan` | validate · verifier gate · dependency graph · blast radius · coverage · **scaffold** (the artifact set for a scope class) · **brief** (a dispatch brief) |
|
|
42
|
+
| `archgen_tasks` | next wave · set status · list · resume snapshot · **contract** (the assembled worker prompt) |
|
|
43
|
+
| `archgen_docs` | navigate markdown artifacts: section index, one section, token map, reference integrity |
|
|
44
|
+
| `archgen_registry` | refresh / read the AGENTS.md features registry |
|
|
45
|
+
| `archgen_codegraph` | install + wire + index CodeGraph and its MCP |
|
|
46
|
+
| `archgen_setup` | doctor · bootstrap servers · install/remove the MCP · list harnesses · **harness_info** (a platform's capabilities) |
|
|
47
|
+
| `archgen_ui` | drive the VS Code extension in real time |
|
|
48
|
+
| `archgen_skills` | match / install / load external capability skills |
|
|
49
|
+
| `archgen_refs` | load archgen's own protocol documents — section by section |
|
|
50
|
+
| `archgen_help` | the full briefing for one domain |
|
|
51
|
+
|
|
52
|
+
Every tool returns the same envelope:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{ "ok": true, "data": { }, "error": null, "meta": { "serverVersion": "…", "skillVersion": "…", "projectRoot": "…" } }
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`ok` says whether the **call** succeeded. A failed call carries a typed
|
|
59
|
+
`error.code`:
|
|
60
|
+
|
|
61
|
+
`INVALID_INPUT` · `NOT_FOUND` · `CYCLE` · `OWNERSHIP_CONFLICT` · `CONFLICT` ·
|
|
62
|
+
`PERMISSION_DENIED` · `UNAVAILABLE` · `TIMEOUT` · `INTERNAL`
|
|
63
|
+
|
|
64
|
+
Call `archgen_help { topic: "<domain>" }` for the full briefing on any tool —
|
|
65
|
+
including when to call it, every action, and its gotchas.
|
|
66
|
+
|
|
67
|
+
### The judgment / output split
|
|
68
|
+
|
|
69
|
+
The archgen **skill** carries the judgment (policy, rules, when-to-use). This
|
|
70
|
+
server carries the **deterministic output** — the artifact sets, the skeletons,
|
|
71
|
+
the dispatch briefs, the assembled worker prompt, the harness capability tables.
|
|
72
|
+
|
|
73
|
+
The five orchestrator-facing protocol documents also live **here**, in
|
|
74
|
+
`assets/references/`, and are served section-by-section by `archgen_refs`:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
archgen_refs { action: 'index', topic: 'orchestration' }
|
|
78
|
+
archgen_refs { action: 'read', topic: 'orchestration', section: 'dispatch--wave-execution' }
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
They live here so they are always the same version as the tools they describe.
|
|
82
|
+
One exception stays in the skill as a plain file: `code-standards.md`, because
|
|
83
|
+
WORKER sub-agents read it with their native file tools and may have no MCP
|
|
84
|
+
server at all.
|
|
85
|
+
|
|
86
|
+
### The capability contract
|
|
87
|
+
|
|
88
|
+
The skill declares the server version it needs:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
metadata:
|
|
92
|
+
requires:
|
|
93
|
+
archgen_mcp: ">=0.0.6"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`archgen_setup { action: 'doctor' }` reports a mismatch, `bootstrap` warns
|
|
97
|
+
before wiring, and CI refuses to ship a skill whose declared minimum exceeds
|
|
98
|
+
this package's version.
|
|
99
|
+
|
|
100
|
+
## The CLI facade
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
archgen-mcp exec archgen_plan '{"action":"validate","tasksYaml":"/abs/tasks.yaml"}'
|
|
104
|
+
archgen-mcp exec archgen_tasks '{"action":"next","tasksYaml":"/abs/tasks.yaml"}'
|
|
105
|
+
archgen-mcp bootstrap --project . --location both --yes
|
|
106
|
+
archgen-mcp doctor --project . --json
|
|
107
|
+
archgen-mcp uninstall-mcp --project . --yes
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`exec` runs the **same handlers** the MCP tools expose — there is no second
|
|
111
|
+
implementation of any capability, only a second way to reach it.
|
|
112
|
+
|
|
113
|
+
## Safety
|
|
114
|
+
|
|
115
|
+
- Every path argument is resolved against the project root and refused if it
|
|
116
|
+
escapes; symlinked targets are never written through.
|
|
117
|
+
- MCP-config writes are approval-gated (`approve: true` / `--yes`); without
|
|
118
|
+
approval the tool reports its **plan** and writes nothing.
|
|
119
|
+
- A config file that cannot be parsed is reported, never rewritten.
|
|
120
|
+
- Writes are atomic (temp file + rename): readers see old-or-new, never a
|
|
121
|
+
partial file.
|
|
122
|
+
- UI commands are allowlisted, workspace-scoped, expiring, and idempotent.
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
TASK: Investigate a recurring issue in this repository.
|
|
2
|
+
TRIGGER: the user reports repetitive/recurring issues AFTER implementation waves
|
|
3
|
+
completed. This is NOT a patch-fix task.
|
|
4
|
+
|
|
5
|
+
DELIVERABLE: all four, or the investigation is incomplete:
|
|
6
|
+
1. ROOT CAUSE — one sentence naming the actual defect (not the symptom).
|
|
7
|
+
2. EVIDENCE — files / lines / repro steps that prove it.
|
|
8
|
+
3. BLAST RADIUS — which tasks and artifacts are affected.
|
|
9
|
+
Use `archgen_plan { action: 'impact', tasksYaml: <tasks.yaml>, target: <id-or-path> }`.
|
|
10
|
+
4. REMEDIATION — routed through the NORMAL gates: new fix tasks get fresh ids
|
|
11
|
+
inheriting the affected task's ownership globs.
|
|
12
|
+
|
|
13
|
+
SIZING
|
|
14
|
+
- SMALL scope: the main agent investigates directly.
|
|
15
|
+
- MEDIUM/LARGE: 1–3 investigator sub-agents split by suspected subsystem.
|
|
16
|
+
|
|
17
|
+
DISCIPLINE
|
|
18
|
+
- Read narrowly around the evidence — no whole-repo sweeps.
|
|
19
|
+
- A patch-fix WITHOUT a root-cause statement is FORBIDDEN under this protocol.
|
|
20
|
+
- Write your notes under .archgen/<slug>/.agent/notes/<topic>.md and your
|
|
21
|
+
findings under .archgen/<slug>/.agent/reports/investigate-<round>.md.
|
|
22
|
+
NEVER create ad-hoc folders at the repo root.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
TASK: Review the plan in .archgen/<slug>/ READ-ONLY.
|
|
2
|
+
DELIVERABLE: a numbered findings list; each finding = what + where + why.
|
|
3
|
+
You NEVER edit files. You report only.
|
|
4
|
+
|
|
5
|
+
EXAMINE
|
|
6
|
+
- edge cases per module
|
|
7
|
+
- task ordering / parallelization sanity (waves vs real dependencies)
|
|
8
|
+
- cross-module contract mismatches (interfaces, paths, naming)
|
|
9
|
+
- enhancement recommendations
|
|
10
|
+
- documentation completeness
|
|
11
|
+
|
|
12
|
+
CONTEXT TO ATTACH
|
|
13
|
+
- `archgen_plan { action: 'graph', tasksYaml: <tasks.yaml>, format: 'mermaid', status: true }`
|
|
14
|
+
— the wave-progress render; reviewer reads it to sanity-check ordering.
|
|
15
|
+
- `archgen_docs { action: 'validate', slugDir: <slug dir> }` — the reference
|
|
16
|
+
integrity result; broken references are findings, not noise.
|
|
17
|
+
|
|
18
|
+
SIZING
|
|
19
|
+
- SMALL: the main agent's self-review is acceptable when the harness has no
|
|
20
|
+
reviewer mechanism.
|
|
21
|
+
- MEDIUM: 1 reviewer.
|
|
22
|
+
- LARGE: 1 holistic reviewer on the strongest reasoning tier. A 2nd reviewer
|
|
23
|
+
ONLY if the plan is genuinely too large for one reviewer's context — split by
|
|
24
|
+
ARTIFACT/VOLUME (e.g. plans vs docs), never by concern.
|
|
25
|
+
|
|
26
|
+
ONE holistic reviewer analyzes ALL issues together: cross-issue reasoning catches
|
|
27
|
+
contradictions a narrow per-concern slice misses, and one reviewer costs far
|
|
28
|
+
fewer tokens than several. NEVER dispatch one sub-agent per individual issue.
|
|
29
|
+
|
|
30
|
+
BOUNDS
|
|
31
|
+
- A "more review" approval authorizes EXACTLY ONE additional pass — never a
|
|
32
|
+
fresh loop, never more reviewers. The stage ends ONLY at zero findings or an
|
|
33
|
+
explicit user waiver on record.
|
|
34
|
+
- The ORCHESTRATOR fixes the artifacts, re-runs validate + the verifier gate
|
|
35
|
+
after every change, and re-dispatches. Reviewers never fix.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
TASK: Survey this repository to prepare a feature plan for: <feature request>
|
|
2
|
+
DELIVERABLE: write .archgen/<slug>/codebase-map.md containing EXACTLY these
|
|
3
|
+
sections:
|
|
4
|
+
## Structure — top-2-levels folder tree w/ one-line purpose each
|
|
5
|
+
## Modules — table: module | responsibility | key entry points
|
|
6
|
+
## Conventions — naming, error-handling, test layout actually observed
|
|
7
|
+
## Affected — files/modules the feature will touch, with evidence paths
|
|
8
|
+
SCOPE: read-only.
|
|
9
|
+
NAVIGATE: use the CodeGraph MCP tools when available — the index is built once
|
|
10
|
+
at bootstrap and kept live by the server's watcher, so never re-index.
|
|
11
|
+
Otherwise Glob+Grep systematically.
|
|
12
|
+
VERIFY: every claim cites a real path; no guessed APIs. A claim without an
|
|
13
|
+
evidence path is a defect, not a detail.
|
|
14
|
+
|
|
15
|
+
ACCEPTANCE
|
|
16
|
+
The map is accepted only if every section is present and NON-EMPTY. Anything the
|
|
17
|
+
survey could not determine is written down as an explicit unknown, not omitted —
|
|
18
|
+
an omitted section is indistinguishable from an un-surveyed one.
|
|
19
|
+
|
|
20
|
+
THEN: the orchestrator asks ONLY what the survey could not answer. Never
|
|
21
|
+
interrogate the user with what a file already answers — quote the file and ask
|
|
22
|
+
for confirmation instead.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
TASK: Verify this archgen plan before any execution.
|
|
2
|
+
DELIVERABLE: exactly one line — `APPROVE` or `ISSUES:` followed by a numbered list.
|
|
3
|
+
SCOPE: read-only. You NEVER edit files. You report findings only.
|
|
4
|
+
|
|
5
|
+
RUN THESE FIRST (the deterministic floor — every one must pass):
|
|
6
|
+
1. `archgen_plan { action: 'verify', tasksYaml: <tasks.yaml>, planDir: <plans dir> }`
|
|
7
|
+
— must return verdict APPROVE. It checks cycles, dangling refs, same-wave
|
|
8
|
+
ownership overlap, missing acceptance criteria and plan<->task coverage.
|
|
9
|
+
2. `archgen_docs { action: 'validate', slugDir: <slug dir> }` (when markdown
|
|
10
|
+
artifacts exist) — must return valid:true. Broken references BLOCK approval.
|
|
11
|
+
|
|
12
|
+
THEN judge what the tools cannot:
|
|
13
|
+
- Are wave boundaries sensible (no artificial serialization)?
|
|
14
|
+
- Do acceptance criteria objectively verify (a command or an observable)?
|
|
15
|
+
- Is edge-case coverage adequate for the scope class of each task?
|
|
16
|
+
- Is code-standards compliance plausible for the planned structure?
|
|
17
|
+
- CONTRACT-COMPLETENESS sweep — round 1 must confirm OR flag-as-missing every
|
|
18
|
+
APPLICABLE dimension. Apply a dimension only where the system actually has
|
|
19
|
+
that concern, but NEVER skip a dimension the system touches:
|
|
20
|
+
- Functional coverage: every stated requirement has a task + objectively
|
|
21
|
+
verifiable acceptance.
|
|
22
|
+
- Security & data protection (if it authenticates, authorizes, encrypts or
|
|
23
|
+
handles sensitive data): authn/authz flows, session & credential lifecycle,
|
|
24
|
+
replay/CSRF protection, encryption & privacy boundaries, input validation.
|
|
25
|
+
- Data integrity: schemas, relationships, validation, migration / back-compat.
|
|
26
|
+
- State, lifecycle & recovery (if any operation is stateful, long-running or
|
|
27
|
+
multi-step): checkpointing/resume, idempotency, cleanup, expiry,
|
|
28
|
+
compensation/rollback semantics.
|
|
29
|
+
- Resource limits & abuse (if it exposes shared or anonymous resources):
|
|
30
|
+
quotas, rate limits, retention/deletion, anonymous-abuse controls.
|
|
31
|
+
- Operational entrypoints: every stack-required build/deploy/test/bootstrap
|
|
32
|
+
entrypoint is OWNED by some task.
|
|
33
|
+
- Metric traceability: every PRD success metric maps to a task acceptance
|
|
34
|
+
criterion with a reproducible command / sample size / data source.
|
|
35
|
+
- Consistency: cross-contract claims must not contradict each other.
|
|
36
|
+
These failure classes are the TOP cause of multi-round loops — round 1 MUST
|
|
37
|
+
sweep the applicable dimensions exhaustively.
|
|
38
|
+
|
|
39
|
+
RULES
|
|
40
|
+
- Run on the STRONGEST reasoning agent the harness offers. NEVER an explore /
|
|
41
|
+
research / quick / cheap tier: a weak verifier misses real defects AND raises
|
|
42
|
+
false positives, costing MORE rounds, not fewer.
|
|
43
|
+
- Every finding names the file and the reason. No vague findings.
|
|
44
|
+
- If everything passes, return exactly `APPROVE` and nothing else.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"_readme": [
|
|
4
|
+
"Canonical depth ladder: scope class -> the artifact set a plan MUST have.",
|
|
5
|
+
"",
|
|
6
|
+
"This is the machine-readable twin of references/artifact-templates.md § Plan",
|
|
7
|
+
"depth by scope class. The reference keeps the AUTHORING RULES; this file",
|
|
8
|
+
"owns the ARTIFACT SET, so the orchestrator never guesses which files a",
|
|
9
|
+
"SMALL/MEDIUM/LARGE plan needs. `archgen_plan{action:'scaffold'}` serves it.",
|
|
10
|
+
"",
|
|
11
|
+
"A drift test (packages/mcp/test/core/depth-ladder.test.mjs) pins this file",
|
|
12
|
+
"against the reference's stated minimums."
|
|
13
|
+
],
|
|
14
|
+
"classes": {
|
|
15
|
+
"SMALL": {
|
|
16
|
+
"label": "SMALL — add or touch a few things",
|
|
17
|
+
"intentDefaults": ["BROWNFIELD-CHANGE"],
|
|
18
|
+
"roundCap": 3,
|
|
19
|
+
"artifacts": [
|
|
20
|
+
{ "path": ".archgen/<slug>/tasks.yaml", "required": true, "purpose": "the task contract" },
|
|
21
|
+
{ "path": ".archgen/<slug>/plans/<slug>-note.md", "required": true, "purpose": "a lean plan note" }
|
|
22
|
+
],
|
|
23
|
+
"planSections": ["Intent", "Tasks", "Risks"],
|
|
24
|
+
"minEdgeCasesPerTask": 0,
|
|
25
|
+
"requires": [],
|
|
26
|
+
"forbids": ["docs/prd.md", "architecture.yaml", "decisions/"],
|
|
27
|
+
"notes": [
|
|
28
|
+
"Every task entry STILL carries repo-root-relative paths verbatim in file_ownership, in each step, and in verification commands.",
|
|
29
|
+
"No Context section, no diagrams, no PRD."
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"MEDIUM": {
|
|
33
|
+
"label": "MEDIUM — a real feature with real risk",
|
|
34
|
+
"intentDefaults": ["GREENFIELD-MODULE", "BROWNFIELD-FEATURE"],
|
|
35
|
+
"roundCap": 3,
|
|
36
|
+
"artifacts": [
|
|
37
|
+
{ "path": ".archgen/<slug>/tasks.yaml", "required": true, "purpose": "the task contract" },
|
|
38
|
+
{ "path": ".archgen/<slug>/plans/<slug>.md", "required": true, "purpose": "the full plan" }
|
|
39
|
+
],
|
|
40
|
+
"planSections": ["Context", "Per-task sections", "Verification steps"],
|
|
41
|
+
"minEdgeCasesPerTask": 3,
|
|
42
|
+
"requires": ["plan context of 2-4 paragraphs", "per-task sections with approach + edge cases + out-of-scope", "ordered runnable verification steps"],
|
|
43
|
+
"forbids": ["docs/prd.md", "architecture.yaml"],
|
|
44
|
+
"notes": [
|
|
45
|
+
"One `<id> — <title>` heading per task, in dependency order.",
|
|
46
|
+
"Verification steps are repo-root-relative (no `../`, no `--plan .`), exact, and runnable."
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"LARGE": {
|
|
50
|
+
"label": "LARGE — a full professional stack (greenfield from scratch)",
|
|
51
|
+
"intentDefaults": ["GREENFIELD-SYSTEM"],
|
|
52
|
+
"roundCap": 6,
|
|
53
|
+
"artifacts": [
|
|
54
|
+
{ "path": ".archgen/<slug>/answers.yaml", "required": true, "purpose": "the captured requirements" },
|
|
55
|
+
{ "path": ".archgen/<slug>/docs/prd.md", "required": true, "purpose": "the product requirements — FR ids tasks cite" },
|
|
56
|
+
{ "path": ".archgen/<slug>/architecture.yaml", "required": true, "purpose": "the contract source of truth" },
|
|
57
|
+
{ "path": ".archgen/<slug>/tasks.yaml", "required": true, "purpose": "the task contract" },
|
|
58
|
+
{ "path": ".archgen/<slug>/plans/<slug>.md", "required": true, "purpose": "the full plan" },
|
|
59
|
+
{ "path": ".archgen/<slug>/decisions/NNNN-<title>.md", "required": false, "purpose": "formal ADRs (one per decision)" },
|
|
60
|
+
{ "path": ".archgen/<slug>/docs/<module>.md", "required": false, "purpose": "per-module diagrams (≤15 nodes each)" }
|
|
61
|
+
],
|
|
62
|
+
"planSections": ["Context", "Per-task sections", "Edge-case matrices", "Verification steps"],
|
|
63
|
+
"minEdgeCasesPerTask": 3,
|
|
64
|
+
"requires": [
|
|
65
|
+
"docs/prd.md written BEFORE tasks.yaml (~1 page per major module)",
|
|
66
|
+
"architecture.yaml with naming_conventions, data_contracts, api_contracts and environment_matrix",
|
|
67
|
+
"an edge-case matrix per task (every row maps to an acceptance bullet)",
|
|
68
|
+
"per-module diagrams (≤15 nodes each) plus one integration diagram",
|
|
69
|
+
"MEDIUM-grade plan sections"
|
|
70
|
+
],
|
|
71
|
+
"forbids": [],
|
|
72
|
+
"notes": [
|
|
73
|
+
"Requirement ids (FR-<MODULE>-nn) are defined in docs/prd.md and cited from tasks.yaml acceptance lines.",
|
|
74
|
+
"architecture.yaml is the anti-hallucination source of truth: tasks cite its keys instead of restating shapes from memory."
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"edgeCaseClasses": [
|
|
79
|
+
"empty/null",
|
|
80
|
+
"boundary values",
|
|
81
|
+
"authz denied",
|
|
82
|
+
"concurrent/conflicting write",
|
|
83
|
+
"failure/retry path",
|
|
84
|
+
"i18n/formatting edge"
|
|
85
|
+
],
|
|
86
|
+
"edgeCaseExtras": {
|
|
87
|
+
"infra": ["partial-failure recovery", "rollback story"],
|
|
88
|
+
"maxRowsPerMatrix": 10
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"_readme": [
|
|
4
|
+
"Authoritative MCP wiring registry. ONE source of truth: the MCP server,",
|
|
5
|
+
"the CLI installer and the docs must agree.",
|
|
6
|
+
"",
|
|
7
|
+
"TWO SERVERS: 'entries'/'npxEntries' describe the CodeGraph server;",
|
|
8
|
+
"'archgenEntries'/'archgenNpxEntries' describe archgen's own server. Both",
|
|
9
|
+
"are written by the SAME writer (core/harness-wiring.mjs), so a platform",
|
|
10
|
+
"that works for one works for the other.",
|
|
11
|
+
"",
|
|
12
|
+
"ENTRY SHAPES: every platform has a DIFFERENT top-level key and a DIFFERENT",
|
|
13
|
+
"server-object shape. The four known top-level keys are mcpServers (claude,",
|
|
14
|
+
"cursor, windsurf, gemini, antigravity, kiro, trae), servers (vscode/copilot),",
|
|
15
|
+
"mcp (opencode), context_servers (zed). Codex CLI uses TOML ([mcp_servers.<id>]).",
|
|
16
|
+
"",
|
|
17
|
+
"COMMAND SHAPE: the server entries below are the ones the official installers",
|
|
18
|
+
"write — keep them byte-compatible, or the MCP server never connects.",
|
|
19
|
+
"The CodeGraph server also runs a FILE WATCHER, so the index stays live after",
|
|
20
|
+
"the one-time init; nothing is re-indexed by hand.",
|
|
21
|
+
"",
|
|
22
|
+
"The command below is the resolved absolute path to the binary when one is",
|
|
23
|
+
"found on PATH; the wiring layer substitutes it at write time. When no binary",
|
|
24
|
+
"is available the npx form is used instead."
|
|
25
|
+
],
|
|
26
|
+
"package": "@colbymchenry/codegraph",
|
|
27
|
+
"entries": {
|
|
28
|
+
"stdio": { "type": "stdio", "command": "codegraph", "args": ["serve", "--mcp"] },
|
|
29
|
+
"stdioNoType": { "command": "codegraph", "args": ["serve", "--mcp"] },
|
|
30
|
+
"opencodeLocal": { "type": "local", "command": ["codegraph", "serve", "--mcp"], "enabled": true }
|
|
31
|
+
},
|
|
32
|
+
"npxEntries": {
|
|
33
|
+
"stdio": { "type": "stdio", "command": "npx", "args": ["-y", "@colbymchenry/codegraph", "serve", "--mcp"] },
|
|
34
|
+
"stdioNoType": { "command": "npx", "args": ["-y", "@colbymchenry/codegraph", "serve", "--mcp"] },
|
|
35
|
+
"opencodeLocal": { "type": "local", "command": ["npx", "-y", "@colbymchenry/codegraph", "serve", "--mcp"], "enabled": true }
|
|
36
|
+
},
|
|
37
|
+
"archgenPackage": "archgen-mcp",
|
|
38
|
+
"archgenEntries": {
|
|
39
|
+
"stdio": { "type": "stdio", "command": "archgen-mcp", "args": [] },
|
|
40
|
+
"stdioNoType": { "command": "archgen-mcp", "args": [] },
|
|
41
|
+
"opencodeLocal": { "type": "local", "command": ["archgen-mcp"], "enabled": true }
|
|
42
|
+
},
|
|
43
|
+
"archgenNpxEntries": {
|
|
44
|
+
"stdio": { "type": "stdio", "command": "npx", "args": ["-y", "archgen-mcp"] },
|
|
45
|
+
"stdioNoType": { "command": "npx", "args": ["-y", "archgen-mcp"] },
|
|
46
|
+
"opencodeLocal": { "type": "local", "command": ["npx", "-y", "archgen-mcp"], "enabled": true }
|
|
47
|
+
},
|
|
48
|
+
"harnesses": {
|
|
49
|
+
"claude": {
|
|
50
|
+
"label": "Claude Code",
|
|
51
|
+
"codegraphTarget": "claude",
|
|
52
|
+
"detectHome": [".claude", ".claude.json"],
|
|
53
|
+
"detectProject": [".claude", ".mcp.json"],
|
|
54
|
+
"configs": {
|
|
55
|
+
"global": { "path": "~/.claude.json", "key": "mcpServers", "entry": "stdio" },
|
|
56
|
+
"project": { "path": ".mcp.json", "key": "mcpServers", "entry": "stdio" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"cursor": {
|
|
60
|
+
"label": "Cursor",
|
|
61
|
+
"codegraphTarget": "cursor",
|
|
62
|
+
"detectHome": [".cursor"],
|
|
63
|
+
"detectProject": [".cursor"],
|
|
64
|
+
"configs": {
|
|
65
|
+
"global": { "path": "~/.cursor/mcp.json", "key": "mcpServers", "entry": "stdio" },
|
|
66
|
+
"project": { "path": ".cursor/mcp.json", "key": "mcpServers", "entry": "stdio" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"opencode": {
|
|
70
|
+
"label": "OpenCode",
|
|
71
|
+
"codegraphTarget": "opencode",
|
|
72
|
+
"detectHome": [".config/opencode"],
|
|
73
|
+
"detectProject": [".opencode", "opencode.json", "opencode.jsonc"],
|
|
74
|
+
"_note": "OpenCode's global config is JSONC (opencode.jsonc) — codegraph's own installer writes it correctly; our writer refuses non-JSON files on purpose, so this entry is a fallback only.",
|
|
75
|
+
"configs": {
|
|
76
|
+
"global": { "path": "~/.config/opencode/opencode.json", "key": "mcp", "entry": "opencodeLocal" },
|
|
77
|
+
"project": { "path": "opencode.json", "key": "mcp", "entry": "opencodeLocal" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"codex": {
|
|
81
|
+
"label": "Codex CLI",
|
|
82
|
+
"codegraphTarget": "codex",
|
|
83
|
+
"detectHome": [".codex"],
|
|
84
|
+
"detectProject": [".codex"],
|
|
85
|
+
"configs": {
|
|
86
|
+
"global": { "path": "~/.codex/config.toml", "format": "toml", "key": "mcp_servers.codegraph", "entry": "toml" },
|
|
87
|
+
"project": { "path": ".codex/config.toml", "format": "toml", "key": "mcp_servers.codegraph", "entry": "toml" }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"gemini": {
|
|
91
|
+
"label": "Gemini CLI",
|
|
92
|
+
"codegraphTarget": "gemini",
|
|
93
|
+
"detectHome": [".gemini"],
|
|
94
|
+
"detectProject": [".gemini"],
|
|
95
|
+
"configs": {
|
|
96
|
+
"global": { "path": "~/.gemini/settings.json", "key": "mcpServers", "entry": "stdio" },
|
|
97
|
+
"project": { "path": ".gemini/settings.json", "key": "mcpServers", "entry": "stdio" }
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"antigravity": {
|
|
101
|
+
"label": "Antigravity",
|
|
102
|
+
"codegraphTarget": "antigravity",
|
|
103
|
+
"detectHome": [".gemini/config"],
|
|
104
|
+
"detectProject": [".agents/mcp_config.json"],
|
|
105
|
+
"configs": {
|
|
106
|
+
"global": { "path": "~/.gemini/config/mcp_config.json", "key": "mcpServers", "entry": "stdio" },
|
|
107
|
+
"project": { "path": ".agents/mcp_config.json", "key": "mcpServers", "entry": "stdio" }
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"kiro": {
|
|
111
|
+
"label": "Kiro",
|
|
112
|
+
"codegraphTarget": "kiro",
|
|
113
|
+
"detectHome": [".kiro"],
|
|
114
|
+
"detectProject": [".kiro"],
|
|
115
|
+
"configs": {
|
|
116
|
+
"global": { "path": "~/.kiro/settings/mcp.json", "key": "mcpServers", "entry": "stdioNoType" },
|
|
117
|
+
"project": { "path": ".kiro/settings/mcp.json", "key": "mcpServers", "entry": "stdioNoType" }
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"windsurf": {
|
|
121
|
+
"label": "Windsurf",
|
|
122
|
+
"codegraphTarget": null,
|
|
123
|
+
"detectHome": [".codeium/windsurf"],
|
|
124
|
+
"detectProject": [".windsurf"],
|
|
125
|
+
"configs": {
|
|
126
|
+
"global": { "path": "~/.codeium/windsurf/mcp_config.json", "key": "mcpServers", "entry": "stdioNoType" }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"vscode": {
|
|
130
|
+
"label": "VS Code / Copilot",
|
|
131
|
+
"codegraphTarget": null,
|
|
132
|
+
"detectHome": [],
|
|
133
|
+
"detectProject": [".vscode", ".github/copilot-instructions.md"],
|
|
134
|
+
"configs": {
|
|
135
|
+
"project": { "path": ".vscode/mcp.json", "key": "servers", "entry": "stdio" }
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"zed": {
|
|
139
|
+
"label": "Zed",
|
|
140
|
+
"codegraphTarget": null,
|
|
141
|
+
"detectHome": [".config/zed"],
|
|
142
|
+
"detectProject": [".zed"],
|
|
143
|
+
"configs": {
|
|
144
|
+
"global": { "path": "~/.config/zed/settings.json", "key": "context_servers", "entry": "stdioNoType" },
|
|
145
|
+
"project": { "path": ".zed/settings.json", "key": "context_servers", "entry": "stdioNoType" }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"trae": {
|
|
149
|
+
"label": "Trae",
|
|
150
|
+
"codegraphTarget": null,
|
|
151
|
+
"detectHome": [".trae"],
|
|
152
|
+
"detectProject": [".trae"],
|
|
153
|
+
"configs": {
|
|
154
|
+
"project": { "path": ".trae/mcp.json", "key": "mcpServers", "entry": "stdioNoType" }
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"codegraphNativeTargets": ["claude", "cursor", "opencode", "codex", "gemini", "antigravity", "kiro"]
|
|
159
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_readme": [
|
|
3
|
+
"Generic MCP server declarations. COPY the variant matching your platform",
|
|
4
|
+
"(references/platforms.md owns file paths + top-level keys).",
|
|
5
|
+
"Keys DIFFER per platform: mcpServers | servers | mcp | context_servers.",
|
|
6
|
+
"Remote URL field varies: url | serverUrl | httpUrl.",
|
|
7
|
+
"",
|
|
8
|
+
"CodeGraph is wired automatically by the archgen MCP server (the per-platform",
|
|
9
|
+
"shapes live in packages/mcp/assets/harness-mcp.json) — it needs no entry here.",
|
|
10
|
+
"This file documents the SHAPE for any other MCP server.",
|
|
11
|
+
"Prefer the archgen_setup tool to hand-editing harness configs: it detects the",
|
|
12
|
+
"harness, resolves the absolute binary path, writes the right shape, and is",
|
|
13
|
+
"idempotent."
|
|
14
|
+
],
|
|
15
|
+
"_claude_code_cursor_windsurf_kiro_gemini": {
|
|
16
|
+
"mcpServers": {
|
|
17
|
+
"context7-remote": {
|
|
18
|
+
"type": "http",
|
|
19
|
+
"url": "https://mcp.context7.com/mcp",
|
|
20
|
+
"headers": { "Authorization": "Bearer ${env:CONTEXT7_TOKEN}" }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"_vscode_copilot": {
|
|
25
|
+
"servers": {
|
|
26
|
+
"context7": { "type": "http", "url": "https://mcp.context7.com/mcp" }
|
|
27
|
+
},
|
|
28
|
+
"inputs": []
|
|
29
|
+
},
|
|
30
|
+
"_opencode": {
|
|
31
|
+
"mcp": {
|
|
32
|
+
"context7": { "type": "remote", "url": "https://mcp.context7.com/mcp", "enabled": true }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"_zed": {
|
|
36
|
+
"context_servers": {
|
|
37
|
+
"context7": { "url": "https://mcp.context7.com/mcp" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"_codex_toml": {
|
|
41
|
+
"_note": "TOML in ~/.codex/config.toml",
|
|
42
|
+
"mcp_servers.context7": { "url": "https://mcp.context7.com/mcp" }
|
|
43
|
+
},
|
|
44
|
+
"_antigravity_warning": "Remote servers MUST use serverUrl (url/httpUrl are rejected): { mcpServers: { name: { serverUrl: '...' } } }"
|
|
45
|
+
}
|