@rryando/arcs 3.4.0 → 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 (60) hide show
  1. package/README.md +12 -11
  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 +91 -101
  9. package/dist/cli/arcs-orchestrate.js.map +1 -1
  10. package/dist/cli/instructions.d.ts.map +1 -1
  11. package/dist/cli/instructions.js +2 -0
  12. package/dist/cli/instructions.js.map +1 -1
  13. package/dist/cli/setup.d.ts +9 -0
  14. package/dist/cli/setup.d.ts.map +1 -1
  15. package/dist/cli/setup.js +138 -0
  16. package/dist/cli/setup.js.map +1 -1
  17. package/dist/utils/rtk.d.ts +7 -0
  18. package/dist/utils/rtk.d.ts.map +1 -0
  19. package/dist/utils/rtk.js +26 -0
  20. package/dist/utils/rtk.js.map +1 -0
  21. package/opencode/arcs/.opencode/plugins/arcs.js +1 -40
  22. package/opencode/arcs/manifest.json +67 -7
  23. package/opencode/arcs/prompts/arcs-docs.txt +34 -33
  24. package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +95 -106
  25. package/opencode/arcs/prompts/arcs-orchestrate.txt +91 -101
  26. package/opencode/arcs/prompts/code-reviewer.txt +27 -20
  27. package/opencode/arcs/prompts/devil-advocate.txt +16 -6
  28. package/opencode/arcs/prompts/docs-researcher.txt +17 -14
  29. package/opencode/arcs/prompts/graph-explorer.txt +17 -14
  30. package/opencode/arcs/prompts/oncall-ops.txt +26 -19
  31. package/opencode/arcs/prompts/qa-analyst.txt +26 -20
  32. package/opencode/arcs/prompts/software-engineer.txt +18 -19
  33. package/opencode/arcs/prompts/system-architect.txt +18 -13
  34. package/opencode/arcs/prompts/tech-architect.txt +18 -13
  35. package/opencode/arcs/skills/code-agent/SKILL.md +2 -2
  36. package/opencode/arcs/skills/deep-pr-review/SKILL.md +7 -7
  37. package/opencode/arcs/skills/deep-pr-review/review-template.md +2 -2
  38. package/opencode/arcs/skills/executing-plans/SKILL.md +12 -8
  39. package/opencode/arcs/skills/init-project/SKILL.md +1 -1
  40. package/opencode/arcs/skills/quick-dev/SKILL.md +3 -3
  41. package/opencode/arcs/skills/requesting-code-review/SKILL.md +11 -7
  42. package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +36 -76
  43. package/opencode/arcs/skills/subagent-driven-development/SKILL.md +30 -11
  44. package/opencode/arcs/skills/subagent-driven-development/code-quality-reviewer-prompt.md +3 -2
  45. package/opencode/arcs/skills/subagent-driven-development/implementer-prompt.md +13 -13
  46. package/opencode/arcs/skills/subagent-driven-development/spec-reviewer-prompt.md +1 -1
  47. package/opencode/arcs/skills/systematic-debugging/SKILL.md +3 -3
  48. package/opencode/arcs/skills/systematic-debugging/root-cause-tracing.md +2 -2
  49. package/opencode/arcs/skills/test-driven-development/SKILL.md +4 -4
  50. package/opencode/arcs/skills/test-driven-development/tdd-rationalizations-and-examples.md +2 -2
  51. package/opencode/arcs/skills/to-diagram/SKILL.md +3 -1
  52. package/opencode/arcs/skills/writing-plans/SKILL.md +3 -1
  53. package/package.json +1 -1
  54. package/scripts/arcs-init.mjs +3 -2
  55. package/scripts/deploy-claudecode-bundle.mjs +30 -11
  56. package/scripts/deploy-opencode-bundle.mjs +5 -1
  57. package/scripts/lib/bundle-helpers.mjs +27 -1
  58. package/scripts/lint-bundle.mjs +0 -1
  59. package/skills/init-project.md +1 -1
  60. package/skills/orchestrate.md +10 -3
@@ -32,7 +32,7 @@ import {
32
32
  import { homedir } from "node:os";
33
33
  import { dirname, relative, resolve } from "node:path";
34
34
  import { fileURLToPath } from "node:url";
35
- import { wireCodegraphMcp } from "./lib/bundle-helpers.mjs";
35
+ import { wireCodegraphMcp, wireRtk } from "./lib/bundle-helpers.mjs";
36
36
 
37
37
  const scriptDir = dirname(fileURLToPath(import.meta.url));
38
38
  const repoRoot = resolve(scriptDir, "..");
@@ -88,71 +88,84 @@ const agentTierMap = {
88
88
  "arcs-docs": "heavy",
89
89
  "oncall-ops": "heavy",
90
90
  "system-architect": "heavy",
91
- general: "heavy",
92
91
  "arcs-orchestrate": "standard",
93
92
  "arcs-orchestrate-caveman": "standard",
94
93
  "devil-advocate": "standard",
94
+ "graph-explorer": "light",
95
95
  "code-reviewer": "light",
96
96
  "tech-architect": "light",
97
97
  "qa-analyst": "light",
98
98
  };
99
99
 
100
+ // Agent descriptions mirror opencode/arcs/manifest.json (canonical) — keep in sync.
100
101
  const agentMetadata = {
101
102
  "software-engineer": {
102
103
  name: "Software Engineer",
103
- 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.",
104
106
  tools: "Read, Write, Edit, Glob, Grep, Bash",
105
107
  model: "inherit",
106
108
  },
107
109
  "devil-advocate": {
108
110
  name: "Devil's Advocate",
109
- 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.",
110
120
  tools: "Read, Glob, Grep, Bash",
111
121
  model: "inherit",
112
122
  },
113
123
  "tech-architect": {
114
124
  name: "Technical Architect",
115
125
  description:
116
- "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.",
117
127
  tools: "Read, Glob, Grep, Bash",
118
128
  model: "inherit",
119
129
  },
120
130
  "code-reviewer": {
121
131
  name: "Code Reviewer",
122
- 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.",
123
134
  tools: "Read, Glob, Grep, Bash",
124
135
  model: "inherit",
125
136
  },
126
137
  "qa-analyst": {
127
138
  name: "QA Analyst",
128
- description: "Quality enforcement specialist. Proactive code audits and convention compliance.",
139
+ description:
140
+ "Quality enforcement specialist. Proactive code audits, review dispatch, convention compliance.",
129
141
  tools: "Read, Glob, Grep, Bash",
130
142
  model: "inherit",
131
143
  },
132
144
  "system-architect": {
133
145
  name: "System Architect",
134
146
  description:
135
- "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.",
136
148
  tools: "Read, Glob, Grep, Bash",
137
149
  model: "inherit",
138
150
  },
139
151
  "arcs-docs": {
140
152
  name: "ARCS Docs Specialist",
141
153
  description:
142
- "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.",
143
155
  tools: "Read, Write, Edit, Glob, Grep, Bash",
144
156
  model: "inherit",
145
157
  },
146
158
  "docs-researcher": {
147
159
  name: "Docs Researcher",
148
- 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.",
149
162
  tools: "Read, Write, Edit, Glob, Grep, Bash",
150
163
  model: "inherit",
151
164
  },
152
165
  "oncall-ops": {
153
166
  name: "On-Call Ops",
154
167
  description:
155
- "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.",
156
169
  tools: "Read, Write, Edit, Glob, Grep, Bash",
157
170
  model: "inherit",
158
171
  },
@@ -428,6 +441,11 @@ function main() {
428
441
  // Best-effort: wire the codegraph MCP server. Skipped on dry-run; never fatal.
429
442
  const codegraphWired = dryRun ? false : wireCodegraphMcp("claude");
430
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
+
431
449
  const result = {
432
450
  dryRun,
433
451
  source: bundleRoot,
@@ -438,6 +456,7 @@ function main() {
438
456
  filesRemoved,
439
457
  filesUnchanged,
440
458
  codegraphWired,
459
+ rtkWired,
441
460
  };
442
461
 
443
462
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
@@ -24,7 +24,7 @@ import {
24
24
  import { homedir } from "node:os";
25
25
  import { dirname, relative, resolve } from "node:path";
26
26
  import { fileURLToPath } from "node:url";
27
- import { wireCodegraphMcp } from "./lib/bundle-helpers.mjs";
27
+ import { wireCodegraphMcp, wireRtk } from "./lib/bundle-helpers.mjs";
28
28
 
29
29
  const scriptDir = dirname(fileURLToPath(import.meta.url));
30
30
  const repoRoot = resolve(scriptDir, "..");
@@ -182,6 +182,9 @@ async function main() {
182
182
  // Best-effort: wire the codegraph MCP server. Skipped on dry-run; never fatal.
183
183
  const codegraphWired = dryRun ? false : wireCodegraphMcp("opencode");
184
184
 
185
+ // Best-effort: wire RTK instructions + hook. Skipped on dry-run; never fatal.
186
+ const rtkWired = dryRun ? false : wireRtk("opencode");
187
+
185
188
  const result = {
186
189
  dryRun,
187
190
  source: bundleRoot,
@@ -193,6 +196,7 @@ async function main() {
193
196
  restartRequired,
194
197
  cliRegistered: !dryRun,
195
198
  codegraphWired,
199
+ rtkWired,
196
200
  ...(restartRequired && {
197
201
  restartGuidance: "Plugin file changed. Restart opencode for changes to take effect.",
198
202
  }),
@@ -174,7 +174,10 @@ export function validateDeclaredPath(relativePath, outputRoot, validationRoot) {
174
174
 
175
175
  export function wireCodegraphMcp(target) {
176
176
  // Best-effort: wire the codegraph MCP server for this host. Non-fatal.
177
- // Skipped silently if the codegraph binary is absent.
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;
178
181
  try {
179
182
  const r = spawnSync("codegraph", ["install", `--target=${target}`, "--yes"], {
180
183
  encoding: "utf-8",
@@ -187,3 +190,26 @@ export function wireCodegraphMcp(target) {
187
190
  return false;
188
191
  }
189
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
+ }
@@ -28,7 +28,6 @@ const preservedFiles = new Set([
28
28
  ".opencode/plugins/arcs.js",
29
29
  "skills/loop/SKILL.md",
30
30
  "skills/caveman-commit/SKILL.md",
31
- "skills/caveman-review/SKILL.md",
32
31
  "skills/init-project/SKILL.md",
33
32
  // Sub-agent prompt files (repo-authored, referenced from manifest.json
34
33
  // requiredMerges, not from bundle-runtime.json's `agents` array).
@@ -87,7 +87,7 @@ If codegraph is missing, log "codegraph not on PATH; proceeding without graph si
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 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`).
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
 
@@ -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