@rryando/arcs 3.3.2 → 3.4.1

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.
Files changed (97) hide show
  1. package/README.md +29 -25
  2. package/dist/cli/arcs-orchestrate-caveman.d.ts +1 -1
  3. package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -1
  4. package/dist/cli/arcs-orchestrate-caveman.js +4 -5
  5. package/dist/cli/arcs-orchestrate-caveman.js.map +1 -1
  6. package/dist/cli/arcs-orchestrate.d.ts +1 -1
  7. package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
  8. package/dist/cli/arcs-orchestrate.js +94 -102
  9. package/dist/cli/arcs-orchestrate.js.map +1 -1
  10. package/dist/cli/bundle-installer.d.ts.map +1 -1
  11. package/dist/cli/bundle-installer.js +32 -0
  12. package/dist/cli/bundle-installer.js.map +1 -1
  13. package/dist/cli/commands/maintenance.js +26 -24
  14. package/dist/cli/commands/maintenance.js.map +1 -1
  15. package/dist/cli/commands/project.js +49 -26
  16. package/dist/cli/commands/project.js.map +1 -1
  17. package/dist/cli/commands/proposal.js +12 -11
  18. package/dist/cli/commands/proposal.js.map +1 -1
  19. package/dist/cli/config.d.ts +19 -0
  20. package/dist/cli/config.d.ts.map +1 -1
  21. package/dist/cli/config.js +23 -0
  22. package/dist/cli/config.js.map +1 -1
  23. package/dist/cli/instructions.d.ts.map +1 -1
  24. package/dist/cli/instructions.js +16 -0
  25. package/dist/cli/instructions.js.map +1 -1
  26. package/dist/cli/setup.d.ts +15 -3
  27. package/dist/cli/setup.d.ts.map +1 -1
  28. package/dist/cli/setup.js +257 -64
  29. package/dist/cli/setup.js.map +1 -1
  30. package/dist/utils/codegraph-install.d.ts +16 -0
  31. package/dist/utils/codegraph-install.d.ts.map +1 -0
  32. package/dist/utils/codegraph-install.js +81 -0
  33. package/dist/utils/codegraph-install.js.map +1 -0
  34. package/dist/utils/codegraph-knowledge.d.ts +22 -0
  35. package/dist/utils/codegraph-knowledge.d.ts.map +1 -0
  36. package/dist/utils/codegraph-knowledge.js +47 -0
  37. package/dist/utils/codegraph-knowledge.js.map +1 -0
  38. package/dist/utils/codegraph.d.ts +101 -0
  39. package/dist/utils/codegraph.d.ts.map +1 -0
  40. package/dist/utils/codegraph.js +383 -0
  41. package/dist/utils/codegraph.js.map +1 -0
  42. package/dist/utils/json-schemas.d.ts +84 -84
  43. package/dist/utils/json-schemas.d.ts.map +1 -1
  44. package/dist/utils/json-schemas.js +11 -9
  45. package/dist/utils/json-schemas.js.map +1 -1
  46. package/dist/utils/proposal-store.d.ts +2 -2
  47. package/dist/utils/proposal-store.d.ts.map +1 -1
  48. package/dist/utils/proposal-store.js +34 -7
  49. package/dist/utils/proposal-store.js.map +1 -1
  50. package/dist/utils/rtk.d.ts +7 -0
  51. package/dist/utils/rtk.d.ts.map +1 -0
  52. package/dist/utils/rtk.js +26 -0
  53. package/dist/utils/rtk.js.map +1 -0
  54. package/opencode/arcs/.opencode/plugins/arcs.js +1 -40
  55. package/opencode/arcs/bundle-runtime.json +2 -2
  56. package/opencode/arcs/manifest.json +68 -8
  57. package/opencode/arcs/prompts/arcs-docs.txt +34 -33
  58. package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +98 -107
  59. package/opencode/arcs/prompts/arcs-orchestrate.txt +94 -102
  60. package/opencode/arcs/prompts/code-reviewer.txt +29 -20
  61. package/opencode/arcs/prompts/devil-advocate.txt +16 -6
  62. package/opencode/arcs/prompts/docs-researcher.txt +18 -15
  63. package/opencode/arcs/prompts/graph-explorer.txt +53 -216
  64. package/opencode/arcs/prompts/oncall-ops.txt +28 -19
  65. package/opencode/arcs/prompts/qa-analyst.txt +26 -20
  66. package/opencode/arcs/prompts/software-engineer.txt +18 -19
  67. package/opencode/arcs/prompts/system-architect.txt +20 -13
  68. package/opencode/arcs/prompts/tech-architect.txt +20 -13
  69. package/opencode/arcs/skills/code-agent/SKILL.md +2 -2
  70. package/opencode/arcs/skills/deep-pr-review/SKILL.md +12 -12
  71. package/opencode/arcs/skills/deep-pr-review/{graphify-diff.md → codegraph-diff.md} +27 -31
  72. package/opencode/arcs/skills/deep-pr-review/review-template.md +4 -4
  73. package/opencode/arcs/skills/{enriching-graphify-proposals → enriching-codegraph-proposals}/SKILL.md +8 -8
  74. package/opencode/arcs/skills/executing-plans/SKILL.md +12 -8
  75. package/opencode/arcs/skills/init-project/SKILL.md +39 -39
  76. package/opencode/arcs/skills/quick-dev/SKILL.md +3 -3
  77. package/opencode/arcs/skills/requesting-code-review/SKILL.md +11 -7
  78. package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +36 -76
  79. package/opencode/arcs/skills/subagent-driven-development/SKILL.md +30 -11
  80. package/opencode/arcs/skills/subagent-driven-development/code-quality-reviewer-prompt.md +3 -2
  81. package/opencode/arcs/skills/subagent-driven-development/implementer-prompt.md +13 -13
  82. package/opencode/arcs/skills/subagent-driven-development/spec-reviewer-prompt.md +1 -1
  83. package/opencode/arcs/skills/systematic-debugging/SKILL.md +3 -3
  84. package/opencode/arcs/skills/systematic-debugging/root-cause-tracing.md +2 -2
  85. package/opencode/arcs/skills/test-driven-development/SKILL.md +4 -4
  86. package/opencode/arcs/skills/test-driven-development/tdd-rationalizations-and-examples.md +2 -2
  87. package/opencode/arcs/skills/to-diagram/SKILL.md +3 -1
  88. package/opencode/arcs/skills/writing-plans/SKILL.md +3 -1
  89. package/package.json +2 -2
  90. package/scripts/arcs-init.mjs +3 -2
  91. package/scripts/build-opencode-bundle.mjs +4 -3
  92. package/scripts/deploy-claudecode-bundle.mjs +37 -11
  93. package/scripts/deploy-opencode-bundle.mjs +12 -1
  94. package/scripts/lib/bundle-helpers.mjs +43 -0
  95. package/scripts/lint-bundle.mjs +5 -3
  96. package/skills/init-project.md +25 -25
  97. package/skills/orchestrate.md +10 -3
@@ -31,8 +31,11 @@ import {
31
31
  } from "node:fs";
32
32
  import { homedir } from "node:os";
33
33
  import { dirname, relative, resolve } from "node:path";
34
+ import { fileURLToPath } from "node:url";
35
+ import { wireCodegraphMcp, wireRtk } from "./lib/bundle-helpers.mjs";
34
36
 
35
- const repoRoot = resolve(import.meta.dirname, "..");
37
+ const scriptDir = dirname(fileURLToPath(import.meta.url));
38
+ const repoRoot = resolve(scriptDir, "..");
36
39
  const defaultBundleRoot = resolve(repoRoot, "opencode/arcs");
37
40
  const defaultConfigRoot = resolve(homedir(), ".claude");
38
41
  const defaultProjectRoot = repoRoot;
@@ -85,71 +88,84 @@ const agentTierMap = {
85
88
  "arcs-docs": "heavy",
86
89
  "oncall-ops": "heavy",
87
90
  "system-architect": "heavy",
88
- general: "heavy",
89
91
  "arcs-orchestrate": "standard",
90
92
  "arcs-orchestrate-caveman": "standard",
91
93
  "devil-advocate": "standard",
94
+ "graph-explorer": "light",
92
95
  "code-reviewer": "light",
93
96
  "tech-architect": "light",
94
97
  "qa-analyst": "light",
95
98
  };
96
99
 
100
+ // Agent descriptions mirror opencode/arcs/manifest.json (canonical) — keep in sync.
97
101
  const agentMetadata = {
98
102
  "software-engineer": {
99
103
  name: "Software Engineer",
100
- description: "Implementation specialist. Writes code, runs tests, and ships features.",
104
+ description:
105
+ "Implementation specialist. Writes code, runs tests, ships features. Loads quick-dev, code-agent, test-driven-development, and executing-plans skills as needed.",
101
106
  tools: "Read, Write, Edit, Glob, Grep, Bash",
102
107
  model: "inherit",
103
108
  },
104
109
  "devil-advocate": {
105
110
  name: "Devil's Advocate",
106
- description: "Adversarial phase-gate agent. Checks work using KISS/YAGNI/DRY principles.",
111
+ description:
112
+ "Adversarial phase-gate agent. Checks work at phase boundaries using KISS/YAGNI/DRY principles. Runs tests, reads diffs, delivers pass/block verdicts. Cannot edit code.",
113
+ tools: "Read, Glob, Grep, Bash",
114
+ model: "inherit",
115
+ },
116
+ "graph-explorer": {
117
+ name: "Graph Explorer",
118
+ description:
119
+ "DAG-first codebase and knowledge exploration specialist. Queries arcs search, related, and context first, then codegraph MCP code-intelligence tools, before falling back to raw file-system tools. Replaces vanilla explore for ARCS projects.",
107
120
  tools: "Read, Glob, Grep, Bash",
108
121
  model: "inherit",
109
122
  },
110
123
  "tech-architect": {
111
124
  name: "Technical Architect",
112
125
  description:
113
- "Architecture and analysis specialist. Deep structural reasoning and trade-off evaluation.",
126
+ "Architecture and analysis specialist. Deep structural reasoning, refactor guidance, trade-off evaluation, and root cause analysis without making hasty edits.",
114
127
  tools: "Read, Glob, Grep, Bash",
115
128
  model: "inherit",
116
129
  },
117
130
  "code-reviewer": {
118
131
  name: "Code Reviewer",
119
- description: "Reviews code changes for correctness, maintainability, and testing issues.",
132
+ description:
133
+ "Reviews code changes for production readiness and catches correctness, maintainability, and testing issues.",
120
134
  tools: "Read, Glob, Grep, Bash",
121
135
  model: "inherit",
122
136
  },
123
137
  "qa-analyst": {
124
138
  name: "QA Analyst",
125
- description: "Quality enforcement specialist. Proactive code audits and convention compliance.",
139
+ description:
140
+ "Quality enforcement specialist. Proactive code audits, review dispatch, convention compliance.",
126
141
  tools: "Read, Glob, Grep, Bash",
127
142
  model: "inherit",
128
143
  },
129
144
  "system-architect": {
130
145
  name: "System Architect",
131
146
  description:
132
- "Architecture and design specialist. Module boundaries, dependency graphs, and design decisions.",
147
+ "Architecture and design specialist. Module boundaries, dependency graphs, migration strategies, and cross-project design decisions.",
133
148
  tools: "Read, Glob, Grep, Bash",
134
149
  model: "inherit",
135
150
  },
136
151
  "arcs-docs": {
137
152
  name: "ARCS Docs Specialist",
138
153
  description:
139
- "Documentation specialist. Manages plans, knowledge entries, diagrams, and DAG health.",
154
+ "ARCS documentation specialist. Manages plans, knowledge entries, diagrams, and DAG health. Knows ARCS structure intimately.",
140
155
  tools: "Read, Write, Edit, Glob, Grep, Bash",
141
156
  model: "inherit",
142
157
  },
143
158
  "docs-researcher": {
144
159
  name: "Docs Researcher",
145
- description: "Handles documentation writing, research synthesis, and document-heavy analysis.",
160
+ description:
161
+ "Handles documentation writing, research synthesis, OCR-adjacent extraction, and document-heavy analysis tasks.",
146
162
  tools: "Read, Write, Edit, Glob, Grep, Bash",
147
163
  model: "inherit",
148
164
  },
149
165
  "oncall-ops": {
150
166
  name: "On-Call Ops",
151
167
  description:
152
- "Debugging and diagnosis specialist. Finds root causes through systematic investigation.",
168
+ "Debugging and diagnosis specialist. Finds root causes through systematic investigation, log triage, bisect, and performance profiling.",
153
169
  tools: "Read, Write, Edit, Glob, Grep, Bash",
154
170
  model: "inherit",
155
171
  },
@@ -422,6 +438,14 @@ function main() {
422
438
  }
423
439
  }
424
440
 
441
+ // Best-effort: wire the codegraph MCP server. Skipped on dry-run; never fatal.
442
+ const codegraphWired = dryRun ? false : wireCodegraphMcp("claude");
443
+
444
+ // Best-effort: wire RTK instructions + hook. `rtk init -g` only writes the
445
+ // user-global config, so project-scoped deploys skip it. Skipped on dry-run;
446
+ // never fatal.
447
+ const rtkWired = dryRun || scope === "project" ? false : wireRtk("claude");
448
+
425
449
  const result = {
426
450
  dryRun,
427
451
  source: bundleRoot,
@@ -431,6 +455,8 @@ function main() {
431
455
  filesChanged,
432
456
  filesRemoved,
433
457
  filesUnchanged,
458
+ codegraphWired,
459
+ rtkWired,
434
460
  };
435
461
 
436
462
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
@@ -23,8 +23,11 @@ import {
23
23
  } from "node:fs";
24
24
  import { homedir } from "node:os";
25
25
  import { dirname, relative, resolve } from "node:path";
26
+ import { fileURLToPath } from "node:url";
27
+ import { wireCodegraphMcp, wireRtk } from "./lib/bundle-helpers.mjs";
26
28
 
27
- const repoRoot = resolve(import.meta.dirname, "..");
29
+ const scriptDir = dirname(fileURLToPath(import.meta.url));
30
+ const repoRoot = resolve(scriptDir, "..");
28
31
  const defaultBundleRoot = resolve(repoRoot, "opencode/arcs");
29
32
  const defaultConfigRoot = resolve(homedir(), ".config/opencode");
30
33
 
@@ -176,6 +179,12 @@ async function main() {
176
179
  }
177
180
  }
178
181
 
182
+ // Best-effort: wire the codegraph MCP server. Skipped on dry-run; never fatal.
183
+ const codegraphWired = dryRun ? false : wireCodegraphMcp("opencode");
184
+
185
+ // Best-effort: wire RTK instructions + hook. Skipped on dry-run; never fatal.
186
+ const rtkWired = dryRun ? false : wireRtk("opencode");
187
+
179
188
  const result = {
180
189
  dryRun,
181
190
  source: bundleRoot,
@@ -186,6 +195,8 @@ async function main() {
186
195
  filesUnchanged,
187
196
  restartRequired,
188
197
  cliRegistered: !dryRun,
198
+ codegraphWired,
199
+ rtkWired,
189
200
  ...(restartRequired && {
190
201
  restartGuidance: "Plugin file changed. Restart opencode for changes to take effect.",
191
202
  }),
@@ -1,3 +1,4 @@
1
+ import { spawnSync } from "node:child_process";
1
2
  import { isAbsolute, relative, resolve } from "node:path";
2
3
 
3
4
  export function normalizeRelativePath(filePath) {
@@ -170,3 +171,45 @@ export function validateDeclaredPath(relativePath, outputRoot, validationRoot) {
170
171
 
171
172
  return normalizedPath;
172
173
  }
174
+
175
+ export function wireCodegraphMcp(target) {
176
+ // Best-effort: wire the codegraph MCP server for this host. Non-fatal.
177
+ // Skipped silently if the codegraph binary is absent, or when
178
+ // ARCS_SKIP_CODEGRAPH=1 (set by the test suite so deploy-script runs never
179
+ // mutate the developer's real host config).
180
+ if (process.env.ARCS_SKIP_CODEGRAPH === "1") return false;
181
+ try {
182
+ const r = spawnSync("codegraph", ["install", `--target=${target}`, "--yes"], {
183
+ encoding: "utf-8",
184
+ stdio: ["pipe", "pipe", "pipe"],
185
+ timeout: 120_000,
186
+ });
187
+ if (r.error || r.status !== 0) return false;
188
+ return true;
189
+ } catch {
190
+ return false;
191
+ }
192
+ }
193
+
194
+ export function wireRtk(target) {
195
+ // Best-effort: wire RTK (token-optimized command proxy) for this host.
196
+ // `rtk init -g` always covers Claude Code; `--opencode` additionally
197
+ // installs the OpenCode plugin. Non-fatal. Skipped silently if the rtk
198
+ // binary is absent, or when ARCS_SKIP_RTK=1 (set by the test suite so
199
+ // deploy-script runs never mutate the developer's real host config).
200
+ if (process.env.ARCS_SKIP_RTK === "1") return false;
201
+ try {
202
+ const args = ["init", "-g"];
203
+ if (target === "opencode") args.push("--opencode");
204
+ args.push("--auto-patch");
205
+ const r = spawnSync("rtk", args, {
206
+ encoding: "utf-8",
207
+ stdio: ["pipe", "pipe", "pipe"],
208
+ timeout: 120_000,
209
+ });
210
+ if (r.error || r.status !== 0) return false;
211
+ return true;
212
+ } catch {
213
+ return false;
214
+ }
215
+ }
@@ -9,9 +9,12 @@
9
9
  // Exit code: 0 if no errors, 1 if errors found.
10
10
 
11
11
  import { existsSync, readdirSync, readFileSync } from "node:fs";
12
- import { relative, resolve } from "node:path";
12
+ import { dirname, relative, resolve } from "node:path";
13
+ import { fileURLToPath } from "node:url";
13
14
 
14
- const repoRoot = resolve(import.meta.dirname, "..");
15
+ // import.meta.dirname is Node >=20.11; derive it for Node 18 compatibility.
16
+ const scriptDir = dirname(fileURLToPath(import.meta.url));
17
+ const repoRoot = resolve(scriptDir, "..");
15
18
  const defaultBundleRoot = resolve(repoRoot, "opencode/arcs");
16
19
 
17
20
  const bundleRoot = process.env.BUNDLE_LINT_BUNDLE_ROOT
@@ -25,7 +28,6 @@ const preservedFiles = new Set([
25
28
  ".opencode/plugins/arcs.js",
26
29
  "skills/loop/SKILL.md",
27
30
  "skills/caveman-commit/SKILL.md",
28
- "skills/caveman-review/SKILL.md",
29
31
  "skills/init-project/SKILL.md",
30
32
  // Sub-agent prompt files (repo-authored, referenced from manifest.json
31
33
  // requiredMerges, not from bundle-runtime.json's `agents` array).
@@ -19,11 +19,11 @@ flowchart TD
19
19
  B --> C[Present summary to user]
20
20
  C -->|confirmed| D[arcs project init]
21
21
  D --> E[arcs project update-doc × 4]
22
- E --> F{graphify on PATH?}
23
- F -->|yes| G[graphify update --force --no-cluster]
22
+ E --> F{codegraph on PATH?}
23
+ F -->|yes| G[codegraph index --force --quiet]
24
24
  F -->|no| H[Skip graph step, log gap]
25
25
  G --> G2[ingestGraph → ≤20 proposals]
26
- G2 --> G3[graphify query / explain for enrichment]:::sub
26
+ G2 --> G3[codegraph MCP explore / impact for enrichment]:::sub
27
27
  H & G3 --> I[Fan out: system-architect + docs-researcher + tech-architect]:::sub
28
28
  I --> J[Collect proposals → dedup → arcs knowledge create × N]
29
29
  J --> K[Done]
@@ -43,31 +43,31 @@ Discovery: `arcs --commands --json`
43
43
  - Init creates empty plans/ and knowledge/ indexes
44
44
  - Repo analysis is **fan-out across typed agents**, not a generic "analysis sub-agent" (see Agent Dispatch table below)
45
45
 
46
- ## Graphify Sub-Flow (DEFAULT: ON when binary present)
46
+ ## Codegraph Sub-Flow (DEFAULT: ON when binary present)
47
47
 
48
- The orchestrator runs graphify directly during INIT to seed knowledge entries with structural evidence before any sub-agent reads code.
48
+ The orchestrator runs codegraph directly during INIT to produce structural **proposals** before any sub-agent reads code. Proposals land on the proposal-store ledger (`pending_enrichment: true`); agents enrich them into knowledge entries via the `enriching-codegraph-proposals` skill.
49
49
 
50
- 1. **Detect:** `detectGraphify()` from `src/utils/graphify.ts`. If unavailable, skip cleanly — never block INIT on graphify.
51
- 2. **Trust the gitignore guarantee:** `runExtraction()` already auto-appends `graphify-out/` to `.gitignore` (`ensureGitignoreEntry`). Don't redundantly check or modify `.gitignore` from agents — running extraction is sufficient.
52
- 3. **Extract (AST-only, no LLM key required):**
50
+ 1. **Detect:** `detectCodegraph()` from `src/utils/codegraph.ts`. If unavailable, skip cleanly — never block INIT on codegraph.
51
+ 2. **Trust the gitignore guarantee:** `runIndex()` already auto-appends `.codegraph/` to `.gitignore` (`ensureGitignoreEntry`). Don't redundantly check or modify `.gitignore` from agents — running the index is sufficient.
52
+ 3. **Index (AST-based; CLI drives the bundled runtime, no LLM key required):**
53
53
  ```bash
54
- graphify update <workspacePath> --force --no-cluster
54
+ codegraph index <workspacePath> --force --quiet
55
55
  ```
56
- Produces `graphify-out/graph.json`.
57
- 4. **Ingest:** call internal `ingestGraph(graphJsonPath, slug)` → up to 20 `KnowledgeProposal` records:
58
- - 8 god nodes (`kind=module`, top 5% degree, test files filtered)
59
- - 8 architecture clusters (`kind=architecture`, by community or directory grouping)
56
+ Builds a per-project SQLite index under `<workspacePath>/.codegraph/`. There is no `graph.json` artifact.
57
+ 4. **Ingest:** `arcs project init` internally calls `ingestGraph(workspacePath, slug)` → up to 20 `KnowledgeProposal` records written to `proposals/graphify.json` (filename retained for compatibility; rename pending; test files filtered):
58
+ - 8 god nodes (`kind=module`, ranked by callers+callees / impact)
59
+ - 8 architecture clusters (`kind=architecture`, synthesized pseudo-communities by directory prefix)
60
60
  - 5 cross-module couplings (`kind=gotcha`, high-degree links across top-level dirs)
61
- 5. **Enrich** with read-only graph queries (sub-agents may run these):
62
- - `graphify query "entry points and main commands" --graph graphify-out/graph.json --budget 2000` → seeds for "key files" reference entries
63
- - `graphify query "core data flow" --graph graphify-out/graph.json --budget 2000` → seeds for "core modules" entries
64
- - `graphify explain "<godNodeLabel>" --graph graphify-out/graph.json` → plain-language summary for module entry bodies
65
- - `graphify affected "<critical-symbol>" --graph graphify-out/graph.json --depth 2` → reverse-impact map for high-risk modules
66
- - `graphify path "<A>" "<B>" --graph graphify-out/graph.json` → shortest dependency path for architecture entries
61
+ 5. **Enrich** with the `enriching-codegraph-proposals` skill — read `arcs proposal list <slug> --json`, decide per-proposal verdicts (keep / merge / drop), persist via `arcs proposal promote` and `arcs proposal drop`. Sub-agents may run read-only codegraph MCP queries for evidence (the MCP server auto-syncs via its own file watcher):
62
+ - `codegraph_search "entry points and main commands"` → seeds for "key files" reference entries
63
+ - `codegraph_explore` on core modules → seeds for "core modules" entries
64
+ - `codegraph_node "<godNodeLabel>"` → structural summary for module entry bodies
65
+ - `codegraph_impact "<critical-symbol>"` → reverse-impact map for high-risk modules
66
+ - `codegraph_callers` / `codegraph_callees "<symbol>"` → dependency paths for architecture entries
67
67
  6. **Hand to typed agents:** the proposals + query results go to the sub-agents listed in **Agent Dispatch** below; they merge graph evidence with code reading and return finalized knowledge entries.
68
68
  7. **Write** the entries directly via `arcs batch --file=ops.json` (one batch invocation for all knowledge entries) or `arcs knowledge create` per entry.
69
69
 
70
- If graphify is missing, log "graphify not on PATH; proceeding without graph signal" and skip steps 3–5. Sub-agents still run; they just lack the graph priors.
70
+ If codegraph is missing, log "codegraph not on PATH; proceeding without graph signal" and skip steps 3–5. Sub-agents still run; they just lack the graph priors.
71
71
 
72
72
  ## Content Guidelines
73
73
 
@@ -87,19 +87,19 @@ If graphify is missing, log "graphify not on PATH; proceeding without graph sign
87
87
  | `tech-architect` | Cross-module couplings, structural gotchas, lessons | `gotcha`, `lesson` |
88
88
  | `qa-analyst` (optional) | Coding-style + convention scan from existing code | `pattern` |
89
89
 
90
- Dispatch in parallel (load `dispatching-parallel-agents`). Each agent receives the relevant `KnowledgeProposal` records from `ingestGraph` plus targeted graphify queries for evidence. Each agent returns finalized proposals (title, kind, summary, keywords, sourceFiles, body) for the orchestrator to write directly via `arcs knowledge create` (or `arcs batch`).
90
+ Dispatch in parallel. Each agent receives the relevant `KnowledgeProposal` records from `ingestGraph` plus targeted codegraph MCP queries for evidence. Each agent returns finalized proposals (title, kind, summary, keywords, sourceFiles, body) for the orchestrator to write directly via `arcs knowledge create` (or `arcs batch`).
91
91
 
92
92
  ## Knowledge Categories for Analysis Sub-Agents
93
93
 
94
94
  | Category | Kind | What to discover | Primary agent |
95
95
  |----------|------|------------------|---------------|
96
96
  | tech stack | `architecture` | Languages, frameworks, runtimes, build tools, versions | `docs-researcher` |
97
- | key files | `reference` | Entry points, config files, main modules, purposes | `docs-researcher` (graphify query "entry points") |
97
+ | key files | `reference` | Entry points, config files, main modules, purposes | `docs-researcher` (codegraph_search "entry points") |
98
98
  | code patterns | `pattern` | Recurring design patterns, abstractions, error handling | `qa-analyst` or `system-architect` |
99
99
  | coding style | `pattern` | Formatting, linting, import ordering, file organization | `qa-analyst` |
100
- | core modules | `module` | Core modules/shared functions — what, where, interconnections | `system-architect` (god nodes from graphify) |
100
+ | core modules | `module` | Core modules/shared functions — what, where, interconnections | `system-architect` (god nodes from codegraph) |
101
101
  | external services | `module` | APIs, databases, message queues the project interacts with | `docs-researcher` |
102
102
  | third-party libraries | `reference` | Key dependencies and why they are used | `docs-researcher` |
103
103
  | features | `feature` | Major user-facing or system-facing features | `docs-researcher` |
104
- | cross-module couplings | `gotcha` | Hot edges between modules surfaced by graphify | `tech-architect` (auto from `ingestGraph`) |
105
- | architecture clusters | `architecture` | Community/directory groupings from graphify | `system-architect` (auto from `ingestGraph`) |
104
+ | cross-module couplings | `gotcha` | Hot edges between modules surfaced by codegraph | `tech-architect` (auto from `ingestGraph`) |
105
+ | architecture clusters | `architecture` | Pseudo-community/directory groupings from codegraph | `system-architect` (auto from `ingestGraph`) |
@@ -86,9 +86,16 @@ Discovery: `arcs --commands --json`
86
86
 
87
87
  Pair with `loop` skill for iteration discipline.
88
88
 
89
+ ## Verification Contract
90
+
91
+ - Sub-agents run ONLY the scoped VERIFY command from their dispatch (tests/lint on files they touched) — never the full suite.
92
+ - The orchestrator never verifies: no tests, lint, builds, or `tsc`.
93
+ - `devil-advocate` PHASE: completion is the session's single full-project pass (full suite + `tsc --noEmit`); on BLOCK, re-dispatch scoped fixes from its FAILURES attribution and re-gate. Two consecutive BLOCKs → stop, report.
94
+
89
95
  ## Completion
90
96
 
91
97
  Every session ends with:
92
- 1. What was done
93
- 2. Current project state
94
- 3. Suggested next steps
98
+ 1. Gate if any agent reported FILES_TOUCHED ≠ none, dispatch `devil-advocate` PHASE: completion (the only full-project verification); BLOCK → fix loop; never claim done before PASS. Zero-file-change sessions skip the gate.
99
+ 2. What was done
100
+ 3. Current project state
101
+ 4. Suggested next steps