@rryando/arcs 3.4.0 → 3.4.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 +12 -11
- package/dist/cli/arcs-orchestrate-caveman.d.ts +1 -1
- package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate-caveman.js +4 -5
- package/dist/cli/arcs-orchestrate-caveman.js.map +1 -1
- package/dist/cli/arcs-orchestrate.d.ts +1 -1
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate.js +91 -101
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/instructions.d.ts.map +1 -1
- package/dist/cli/instructions.js +2 -0
- package/dist/cli/instructions.js.map +1 -1
- package/dist/cli/setup.d.ts +9 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +138 -0
- package/dist/cli/setup.js.map +1 -1
- package/dist/utils/rtk.d.ts +7 -0
- package/dist/utils/rtk.d.ts.map +1 -0
- package/dist/utils/rtk.js +26 -0
- package/dist/utils/rtk.js.map +1 -0
- package/opencode/arcs/.opencode/plugins/arcs.js +1 -40
- package/opencode/arcs/manifest.json +67 -7
- package/opencode/arcs/prompts/arcs-docs.txt +34 -33
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +95 -106
- package/opencode/arcs/prompts/arcs-orchestrate.txt +91 -101
- package/opencode/arcs/prompts/code-reviewer.txt +27 -20
- package/opencode/arcs/prompts/devil-advocate.txt +16 -6
- package/opencode/arcs/prompts/docs-researcher.txt +17 -14
- package/opencode/arcs/prompts/graph-explorer.txt +17 -14
- package/opencode/arcs/prompts/oncall-ops.txt +26 -19
- package/opencode/arcs/prompts/qa-analyst.txt +26 -20
- package/opencode/arcs/prompts/software-engineer.txt +18 -19
- package/opencode/arcs/prompts/system-architect.txt +18 -13
- package/opencode/arcs/prompts/tech-architect.txt +18 -13
- package/opencode/arcs/skills/code-agent/SKILL.md +2 -2
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +7 -7
- package/opencode/arcs/skills/deep-pr-review/review-template.md +2 -2
- package/opencode/arcs/skills/executing-plans/SKILL.md +12 -8
- package/opencode/arcs/skills/init-project/SKILL.md +1 -1
- package/opencode/arcs/skills/quick-dev/SKILL.md +3 -3
- package/opencode/arcs/skills/requesting-code-review/SKILL.md +11 -7
- package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +36 -76
- package/opencode/arcs/skills/subagent-driven-development/SKILL.md +30 -11
- package/opencode/arcs/skills/subagent-driven-development/code-quality-reviewer-prompt.md +3 -2
- package/opencode/arcs/skills/subagent-driven-development/implementer-prompt.md +13 -13
- package/opencode/arcs/skills/subagent-driven-development/spec-reviewer-prompt.md +1 -1
- package/opencode/arcs/skills/systematic-debugging/SKILL.md +3 -3
- package/opencode/arcs/skills/systematic-debugging/root-cause-tracing.md +2 -2
- package/opencode/arcs/skills/test-driven-development/SKILL.md +4 -4
- package/opencode/arcs/skills/test-driven-development/tdd-rationalizations-and-examples.md +2 -2
- package/opencode/arcs/skills/to-diagram/SKILL.md +3 -1
- package/opencode/arcs/skills/writing-plans/SKILL.md +3 -1
- package/package.json +1 -1
- package/scripts/arcs-init.mjs +3 -2
- package/scripts/deploy-claudecode-bundle.mjs +42 -15
- package/scripts/deploy-opencode-bundle.mjs +5 -1
- package/scripts/lib/bundle-helpers.mjs +27 -1
- package/scripts/lint-bundle.mjs +0 -1
- package/skills/init-project.md +1 -1
- 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:
|
|
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:
|
|
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
|
|
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:
|
|
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:
|
|
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
|
-
"
|
|
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:
|
|
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
|
},
|
|
@@ -224,15 +237,23 @@ function buildAgentSources() {
|
|
|
224
237
|
const tier = agentTierMap[stem] || "standard";
|
|
225
238
|
const model = tierModels[tier];
|
|
226
239
|
|
|
227
|
-
|
|
228
|
-
|
|
240
|
+
// Claude Code requires `name` to be a kebab-case identifier (lowercase
|
|
241
|
+
// letters + hyphens). The filename stem already satisfies this and is
|
|
242
|
+
// unique, so it IS the agent name — the human-readable label lives in
|
|
243
|
+
// `description`. The default-agent setting (DEFAULT_AGENT) references this
|
|
244
|
+
// same stem, so it resolves. Display names with spaces/parens/apostrophes
|
|
245
|
+
// (meta.name) are invalid here and caused intermittent init failures.
|
|
246
|
+
const toolsCsv = meta.tools
|
|
247
|
+
.split(",")
|
|
248
|
+
.map((t) => t.trim())
|
|
249
|
+
.join(", ");
|
|
229
250
|
|
|
230
251
|
const compiledContent = [
|
|
231
252
|
"---",
|
|
232
|
-
`name: ${
|
|
253
|
+
`name: ${stem}`,
|
|
233
254
|
`description: ${meta.description}`,
|
|
234
255
|
`model: ${model}`,
|
|
235
|
-
`tools: ${
|
|
256
|
+
`tools: ${toolsCsv}`,
|
|
236
257
|
"---",
|
|
237
258
|
"",
|
|
238
259
|
promptContent,
|
|
@@ -428,6 +449,11 @@ function main() {
|
|
|
428
449
|
// Best-effort: wire the codegraph MCP server. Skipped on dry-run; never fatal.
|
|
429
450
|
const codegraphWired = dryRun ? false : wireCodegraphMcp("claude");
|
|
430
451
|
|
|
452
|
+
// Best-effort: wire RTK instructions + hook. `rtk init -g` only writes the
|
|
453
|
+
// user-global config, so project-scoped deploys skip it. Skipped on dry-run;
|
|
454
|
+
// never fatal.
|
|
455
|
+
const rtkWired = dryRun || scope === "project" ? false : wireRtk("claude");
|
|
456
|
+
|
|
431
457
|
const result = {
|
|
432
458
|
dryRun,
|
|
433
459
|
source: bundleRoot,
|
|
@@ -438,6 +464,7 @@ function main() {
|
|
|
438
464
|
filesRemoved,
|
|
439
465
|
filesUnchanged,
|
|
440
466
|
codegraphWired,
|
|
467
|
+
rtkWired,
|
|
441
468
|
};
|
|
442
469
|
|
|
443
470
|
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
|
+
}
|
package/scripts/lint-bundle.mjs
CHANGED
|
@@ -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).
|
package/skills/init-project.md
CHANGED
|
@@ -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
|
|
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
|
|
package/skills/orchestrate.md
CHANGED
|
@@ -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.
|
|
93
|
-
2.
|
|
94
|
-
3.
|
|
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
|