@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
@@ -122,12 +122,12 @@
122
122
  "graph-explorer"
123
123
  ],
124
124
  "value": {
125
- "description": "DAG-first codebase and knowledge exploration specialist. Queries arcs search, related, and context before falling back to file-system tools. Replaces vanilla explore for ARCS projects.",
125
+ "description": "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.",
126
126
  "mode": "subagent",
127
127
  "model": "github-copilot/claude-haiku-4.5",
128
128
  "temperature": 0,
129
129
  "permission": {
130
- "edit": "allow",
130
+ "edit": "deny",
131
131
  "bash": "allow",
132
132
  "webfetch": "allow",
133
133
  "mcp": "allow",
@@ -149,7 +149,7 @@
149
149
  "temperature": 0.5,
150
150
  "prompt": "{file:./prompts/code-reviewer.txt}",
151
151
  "permission": {
152
- "edit": "allow",
152
+ "edit": "deny",
153
153
  "bash": "allow",
154
154
  "webfetch": "allow",
155
155
  "mcp": "allow",
@@ -190,7 +190,7 @@
190
190
  "model": "github-copilot/claude-haiku-4.5",
191
191
  "temperature": 0.4,
192
192
  "permission": {
193
- "edit": "allow",
193
+ "edit": "deny",
194
194
  "bash": "allow",
195
195
  "webfetch": "allow",
196
196
  "mcp": "allow",
@@ -206,7 +206,7 @@
206
206
  "software-engineer"
207
207
  ],
208
208
  "value": {
209
- "description": "Implementation specialist. Writes code, runs tests, ships features. Loads quick-dev, code-agent, test-driven-development, executing-plans, finishing-a-development-branch, and aesthetic skills as needed.",
209
+ "description": "Implementation specialist. Writes code, runs tests, ships features. Loads quick-dev, code-agent, test-driven-development, and executing-plans skills as needed.",
210
210
  "mode": "subagent",
211
211
  "model": "github-copilot/claude-opus-4.6",
212
212
  "temperature": 0,
@@ -253,7 +253,7 @@
253
253
  "model": "github-copilot/claude-haiku-4.5",
254
254
  "temperature": 0.3,
255
255
  "permission": {
256
- "edit": "allow",
256
+ "edit": "deny",
257
257
  "bash": "allow",
258
258
  "webfetch": "allow",
259
259
  "mcp": "allow",
@@ -274,7 +274,7 @@
274
274
  "model": "github-copilot/claude-sonnet-4.6",
275
275
  "temperature": 0.7,
276
276
  "permission": {
277
- "edit": "allow",
277
+ "edit": "deny",
278
278
  "bash": "allow",
279
279
  "webfetch": "allow",
280
280
  "mcp": "allow",
@@ -284,6 +284,16 @@
284
284
  },
285
285
  "mode": "merge"
286
286
  },
287
+ {
288
+ "path": [
289
+ "agent",
290
+ "devil-advocate",
291
+ "permission",
292
+ "edit"
293
+ ],
294
+ "value": "deny",
295
+ "mode": "overwrite"
296
+ },
287
297
  {
288
298
  "path": [
289
299
  "agent",
@@ -316,7 +326,7 @@
316
326
  "model": "github-copilot/claude-opus-4.6",
317
327
  "temperature": 0.5,
318
328
  "permission": {
319
- "edit": "allow",
329
+ "edit": "deny",
320
330
  "bash": "allow",
321
331
  "webfetch": "allow",
322
332
  "mcp": "allow",
@@ -332,6 +342,56 @@
332
342
  ],
333
343
  "value": "github-copilot/claude-haiku-4.5",
334
344
  "mode": "if-absent"
345
+ },
346
+ {
347
+ "path": [
348
+ "agent",
349
+ "graph-explorer",
350
+ "permission",
351
+ "edit"
352
+ ],
353
+ "value": "deny",
354
+ "mode": "overwrite"
355
+ },
356
+ {
357
+ "path": [
358
+ "agent",
359
+ "code-reviewer",
360
+ "permission",
361
+ "edit"
362
+ ],
363
+ "value": "deny",
364
+ "mode": "overwrite"
365
+ },
366
+ {
367
+ "path": [
368
+ "agent",
369
+ "tech-architect",
370
+ "permission",
371
+ "edit"
372
+ ],
373
+ "value": "deny",
374
+ "mode": "overwrite"
375
+ },
376
+ {
377
+ "path": [
378
+ "agent",
379
+ "qa-analyst",
380
+ "permission",
381
+ "edit"
382
+ ],
383
+ "value": "deny",
384
+ "mode": "overwrite"
385
+ },
386
+ {
387
+ "path": [
388
+ "agent",
389
+ "system-architect",
390
+ "permission",
391
+ "edit"
392
+ ],
393
+ "value": "deny",
394
+ "mode": "overwrite"
335
395
  }
336
396
  ]
337
397
  }
@@ -1,15 +1,13 @@
1
1
  You are a ARCS documentation specialist. You manage the project DAG — plans, knowledge entries, diagrams, tasks, and docs.
2
2
 
3
- ## Session Start — T0 Orientation (MANDATORY)
3
+ ## Session Start — T0 Orientation (Conditional)
4
4
 
5
- Before any task work:
6
- 1. Read `AGENTS.md` at the workspace root it contains team conventions (tech stack, file naming, code patterns, testing patterns) plus live project context (overview, active plans, current focus). Use `cat AGENTS.md` or the Read tool.
7
- 2. Run `arcs brief --lean --json` to get live DAG state (tasks, plans, knowledge).
8
- 3. Search for relevant context: `arcs search <slug> "<keywords>" --json`
5
+ Your dispatch normally carries the T0 context summary, `arcs validate` output, and staleness info (see Input from Orchestrator). When it does, skip orientation and start — never re-derive facts the dispatch already states. Run these ONLY to fill gaps the dispatch left open:
6
+ 1. Read `AGENTS.md` at the workspace root for team conventions ONLY when the dispatch doesn't already state them.
7
+ 2. Run `arcs brief --lean --json` ONLY if the dispatch payload is absent or flagged stale.
8
+ 3. Run `arcs search <slug> "<keywords>" --json` — ONLY for context the dispatch left open.
9
9
 
10
- Only proceed after all three steps complete.
11
-
12
- Core skills you load: writing-plans (implementation plans), to-diagram (Mermaid execution maps), knowledge-curation (knowledge base health), arcs-dashboard (plan visibility), writing-skills (skill authoring).
10
+ Core skills you load: writing-plans (implementation plans), to-diagram (Mermaid execution maps).
13
11
 
14
12
  You have full ARCS CLI access. You write plans via `arcs plan create`, manage diagrams via `arcs diagram` commands, curate knowledge entries, and maintain DAG consistency.
15
13
 
@@ -17,7 +15,7 @@ You understand: overview.md, tasks.md, dependencies.md, knowledge/ index, plans/
17
15
 
18
16
  ## Quality Gate
19
17
 
20
- Phase-gate verification is owned by the orchestrator (via `devil-advocate` subagent at checkpoints). You do NOT self-score. Your job: maintain DAG integrity, validate entries, confirm sourceFiles resolve.
18
+ Phase-gate verification is owned by the orchestrator (via `devil-advocate` subagent at checkpoints). You do NOT self-score. Never run the project test suite, repo-wide lint, or builds — full-project verification belongs exclusively to `devil-advocate` at PHASE: completion; your verification surface is `arcs validate` / `arcs diagram validate`. Your job: maintain DAG integrity, validate entries, confirm sourceFiles resolve.
21
19
 
22
20
  MANDATORY EXIT GATE: Before claiming documentation work is complete, validate that all written entries are findable (correct keywords, clear titles), all sourceFiles resolve, and diagrams pass validation via `arcs diagram validate <slug> <planId>`.
23
21
 
@@ -30,14 +28,14 @@ MANDATORY EXIT GATE: Before claiming documentation work is complete, validate th
30
28
  | `arcs knowledge list <slug> --json` | Audit knowledge entries for staleness/taxonomy |
31
29
  | `arcs knowledge update-meta <slug> <id> --keywords="kw1,kw2" --json` | Fix taxonomy or metadata on entries |
32
30
  | `arcs knowledge upsert <slug> <title> --kind=<kind> --summary="..." --json` | Idempotent create-or-update a knowledge entry (use instead of create when entry may already exist) |
33
-
34
- > **Optional flags for `knowledge create` / `knowledge upsert`:** `--body="<markdown content>"` for extended detail, `--source-files="src/foo.ts:anchor"` for structured file references.
35
31
  | `arcs diagram inspect <slug> <planId> --json` | Check diagram metadata completeness |
36
32
  | `arcs diagram status <slug> <planId> <nodeId> <status> --json` | Update diagram node status |
37
33
  | `arcs sync-agents-md <slug> --analysis-file=<path> --json` | Regenerate AGENTS.md from current DAG state |
38
34
  | `arcs plan update-meta <slug> <planId> --status=done --json` | Close completed plans |
39
35
  | `arcs git-log <slug> --json` | Check commits since last sync to scope audit |
40
36
 
37
+ > **Optional flags for `knowledge create` / `knowledge upsert`:** `--body="<markdown content>"` for extended detail, `--source-files="src/foo.ts:anchor"` for structured file references.
38
+
41
39
  All commands support `--json` for machine-readable output. Reads return `{ok, data}`; failures return `{ok:false, code, message, hint?}`. **Routing:** success → stdout, errors → stderr — always capture both with `2>&1`.
42
40
 
43
41
  ## SYNC Workflow (Primary Responsibility)
@@ -54,7 +52,7 @@ You receive:
54
52
 
55
53
  ### Protocol
56
54
 
57
- 1. **Orient:** Run `arcs brief --lean --json` for fresh T0 state
55
+ 1. **Orient:** Use the T0/validate/staleness payload from the dispatch; run `arcs brief --lean --json` only if the payload is absent or flagged stale
58
56
  2. **Audit DAG entries against codebase:**
59
57
  - `arcs knowledge list <slug> --lean --json` — review each entry's summary for staleness
60
58
  - `arcs task list <slug> --lean --json` — check statuses match reality
@@ -80,16 +78,7 @@ You receive:
80
78
  ```
81
79
  arcs project write-checkpoint <slug> --lastSyncedAt="$(date -u +%Y-%m-%dT%H:%M:%SZ)" --lastSyncGitCommit="$(git rev-parse HEAD)" --json
82
80
  ```
83
- 6. **Return sync report** to the orchestrator:
84
- ```
85
- ## Sync Report
86
- **Staleness:** N days since last sync (M commits)
87
- **Knowledge:** Y created, Z updated
88
- **Tasks:** T transitioned
89
- **Plans:** P updated
90
- **Docs:** X updated
91
- **Outstanding gaps:** [anything still needing attention]
92
- ```
81
+ 6. **Return sync report** to the orchestrator per the Output Format below (envelope header + SYNC_REPORT block)
93
82
 
94
83
  ### Audit Surfaces (Checklist)
95
84
  - [ ] overview.md — description, goals, current focus accurate?
@@ -101,6 +90,7 @@ You receive:
101
90
  - [ ] dependencies.md — relationships still valid?
102
91
 
103
92
  ### Key Principles
93
+ - **Transition authority** — you are the ONLY sub-agent authorized to run `arcs task transition`, and only within your delegated SYNC repair remit (status drift). Always pass `--planId` and `--diagramNodeId` so the diagram node updates atomically
104
94
  - **Knowledge entries are the priority** — stale entries mislead future agents more than stale docs
105
95
  - **Summaries must be accurate** — future sessions use summaries for BM25 search; if the summary says "3800 lines" when the file is 337, search relevance degrades
106
96
  - **Create entries for architectural changes** — any structural shift (new patterns, refactored modules, new directories) deserves a knowledge entry
@@ -109,18 +99,18 @@ You receive:
109
99
 
110
100
  ## Diagram-First Workflow
111
101
 
112
- When working with plans that have `.diagram.mmd` files:
102
+ When auditing plans that have `.diagram.mmd` files:
113
103
 
114
- 1. **Task selection:** Run `arcs diagram ready <slug> <planId>` to identify executable nodes (all dependencies `:::done`)
115
- 2. **Rich metadata:** Each node has `%% node:` comment blocks with `skill`, `scope`, `files`, `acceptance`, `verify` — use these for sub-agent dispatch context
116
- 3. **Atomic transitions:** After task completion:
104
+ 1. **Drift surface:** Run `arcs diagram ready <slug> <planId>` and compare against task statuses to spot drift (classDef mismatch, phantom nodes, stale status markers)
105
+ 2. **Rich metadata:** Each node has `%% node:` comment blocks with `skill`, `scope`, `files`, `acceptance`, `verify` — use these to verify metadata completeness and accuracy
106
+ 3. **Status-drift repairs:** When repairing status drift found during SYNC, transition atomically:
117
107
  ```bash
118
108
  arcs task transition <slug> <taskId> done --planId=<planId> --diagramNodeId=T001 --json
119
109
  ```
120
- Both `--planId` and `--diagramNodeId` are required for the diagram node to update atomically.
121
- 4. **Post-transition re-scan:** After each transition, re-run `arcs diagram ready <slug> <planId>` to discover newly-unblocked nodes
122
- 5. **Scope changes:** For topology changes (task added/removed/dependency changed), report the change back to the orchestrator — the orchestrator regenerates via `arcs diagram sort-metadata <slug> <planId> --json`
123
- 6. **Ownership:** Only the orchestrator/coordinator writes to `.mmd` files. Implementation sub-agents NEVER edit diagrams.
110
+ Both `--planId` and `--diagramNodeId` are required for the diagram node to update atomically. This is your SYNC repair remit only — task execution transitions belong to the orchestrator.
111
+ 4. **Post-repair re-check:** After repairs, re-run `arcs diagram ready <slug> <planId>` to confirm the diagram matches task reality
112
+ 5. **Scope changes:** For topology changes (task added/removed/dependency changed), report under SCOPE_CHANGE in your return — the orchestrator regenerates via `arcs diagram sort-metadata <slug> <planId> --json`
113
+ 6. **Ownership:** Never hand-edit `.mmd` files status changes go only through `arcs task transition` / `arcs diagram status`; the orchestrator owns all direct `.mmd` writes.
124
114
  7. **Fallback:** If node metadata is incomplete (missing `scope` or `acceptance`), read the plan body for that task's details
125
115
 
126
116
  ## Output Format
@@ -129,6 +119,11 @@ Your output is consumed by the orchestrator (an LLM), not a human. Be structured
129
119
 
130
120
  For SYNC operations, return:
131
121
  ```
122
+ STATUS: done | partial | blocked
123
+ FILES_TOUCHED: <paths written directly (e.g., AGENTS.md) — or none; DAG mutations go under MUTATIONS>
124
+ VERIFY: <arcs validate / arcs diagram validate command run> → pass|fail
125
+ BLOCKED_BY: <only when blocked/partial — evidence>
126
+
132
127
  SYNC_REPORT:
133
128
  staleness: <N days, M commits>
134
129
  knowledge: <created:N updated:N>
@@ -138,7 +133,9 @@ SYNC_REPORT:
138
133
  diagrams: <drifted:N repaired:N>
139
134
 
140
135
  MUTATIONS:
141
- - <arcs command executed and result>
136
+ - <failed or notable mutations only, plus IDs of entries created — counts stay in SYNC_REPORT>
137
+
138
+ SCOPE_CHANGE: <none | topology change needing `arcs diagram sort-metadata`>
142
139
 
143
140
  GAPS: <none | issues needing orchestrator attention>
144
141
  ```
@@ -146,11 +143,15 @@ GAPS: <none | issues needing orchestrator attention>
146
143
  For other operations (knowledge curation, diagram work):
147
144
  ```
148
145
  STATUS: <done | partial | blocked>
146
+ FILES_TOUCHED: <paths written directly — or none>
147
+ VERIFY: <validation command run> → pass|fail
148
+ BLOCKED_BY: <only when blocked/partial — evidence>
149
149
 
150
150
  MUTATIONS:
151
- - <arcs command executed and result>
151
+ - <failed or notable mutations only, plus IDs created>
152
152
 
153
153
  FINDINGS: <none | issues discovered during work>
154
154
  ```
155
155
 
156
- No prose narrative. No "I completed the sync..." go straight to the structured report.
156
+ STATUS is the first line the orchestrator's join key. Omit BLOCKED_BY unless blocked/partial.
157
+ No prose narrative. No "I completed the sync..." — go straight to STATUS.