@yunhozz/arc 0.5.5 → 0.5.7
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/MANIFEST.sha256 +83 -74
- package/claude/agents/arc-implementer.md +2 -2
- package/claude/agents/arc-planner.md +1 -1
- package/claude/agents/arc-reviewer.md +1 -1
- package/claude/agents/arc-scouter.md +1 -1
- package/claude/agents/arc-tester.md +1 -1
- package/claude/skill/SKILL.md +3 -3
- package/claude/skill/references/arc-visual-companion.md +2 -21
- package/claude/skill/references/commit.md +3 -30
- package/claude/skill/references/coordination.md +20 -126
- package/claude/skill/references/git-recovery.md +3 -3
- package/claude/skill/references/handoff-prep.md +9 -24
- package/claude/skill/references/handoff.md +19 -108
- package/claude/skill/references/limits.md +4 -15
- package/claude/skill/references/planning.md +56 -95
- package/claude/skill/references/verification.md +16 -118
- package/claude/skill/references/worktree-creation.md +1 -1
- package/codex/agents/arc-implementer.toml +3 -1
- package/codex/agents/arc-planner.toml +4 -0
- package/codex/agents/arc-reviewer.toml +6 -0
- package/codex/agents/arc-scouter.toml +6 -0
- package/codex/agents/arc-tester.toml +6 -0
- package/codex/skill/SKILL.md +3 -3
- package/codex/skill/references/arc-visual-companion.md +3 -27
- package/codex/skill/references/commit.md +3 -30
- package/codex/skill/references/coordination.md +19 -126
- package/codex/skill/references/git-recovery.md +2 -7
- package/codex/skill/references/handoff-prep.md +9 -24
- package/codex/skill/references/handoff.md +18 -107
- package/codex/skill/references/limits.md +5 -16
- package/codex/skill/references/planning.md +56 -95
- package/codex/skill/references/verification.md +15 -117
- package/gemini/agents/arc-implementer.md +1 -1
- package/gemini/skill/SKILL.md +3 -3
- package/gemini/skill/references/arc-visual-companion.md +2 -21
- package/gemini/skill/references/commit.md +3 -30
- package/gemini/skill/references/coordination.md +23 -129
- package/gemini/skill/references/git-recovery.md +3 -3
- package/gemini/skill/references/handoff-prep.md +9 -24
- package/gemini/skill/references/handoff.md +19 -108
- package/gemini/skill/references/limits.md +4 -15
- package/gemini/skill/references/planning.md +56 -95
- package/gemini/skill/references/verification.md +16 -118
- package/grok/agents/arc-implementer.md +1 -1
- package/grok/skill/SKILL.md +2 -2
- package/grok/skill/references/arc-visual-companion.md +2 -21
- package/grok/skill/references/commit.md +3 -30
- package/grok/skill/references/coordination.md +21 -127
- package/grok/skill/references/git-recovery.md +3 -3
- package/grok/skill/references/handoff-prep.md +9 -24
- package/grok/skill/references/handoff.md +19 -108
- package/grok/skill/references/limits.md +4 -15
- package/grok/skill/references/planning.md +56 -95
- package/grok/skill/references/verification.md +16 -118
- package/lib/policy/role-policy.json +1 -1
- package/lib/prompts/agent-fragments.json +20 -9
- package/lib/prompts/render.mjs +16 -5
- package/lib/runtime/adapters/codex.mjs +1 -1
- package/lib/runtime/assignment.mjs +3 -2
- package/lib/runtime/cooperative.mjs +36 -3
- package/lib/runtime/evaluate.mjs +21 -6
- package/lib/runtime/gate.mjs +2 -1
- package/lib/runtime/schema.mjs +16 -0
- package/lib/runtime/target-preparation.mjs +7 -2
- package/lib/runtime/verification.mjs +1 -1
- package/package.json +1 -1
- package/shared/skill/references/arc-visual-companion-common.md +39 -0
- package/shared/skill/references/commit-common.md +45 -0
- package/shared/skill/references/coordination-common.md +193 -0
- package/shared/skill/references/git-recovery-common.md +15 -0
- package/shared/skill/references/handoff-common.md +182 -0
- package/shared/skill/references/handoff-prep-common.md +53 -0
- package/shared/skill/references/limits-common.md +34 -0
- package/shared/skill/references/planning-common.md +185 -0
- package/shared/skill/references/verification-common.md +170 -0
- package/shared/skill/runtime/adapters/codex.mjs +1 -1
- package/shared/skill/runtime/assignment.mjs +3 -2
- package/shared/skill/runtime/cooperative.mjs +36 -3
- package/shared/skill/runtime/evaluate.mjs +21 -6
- package/shared/skill/runtime/gate.mjs +2 -1
- package/shared/skill/runtime/role-policy.json +1 -1
- package/shared/skill/runtime/schema.mjs +16 -0
- package/shared/skill/runtime/target-preparation.mjs +7 -2
- package/shared/skill/runtime/verification.mjs +1 -1
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
<a id="role-assignment-and-coordination"></a>
|
|
2
2
|
# Role assignment and coordination
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Shared text for this section: [coordination-common.md#role-assignment-and-coordination](coordination-common.md#role-assignment-and-coordination). It applies here exactly as if written in place.
|
|
5
5
|
|
|
6
6
|
<a id="ownership"></a>
|
|
7
7
|
## Ownership
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|---|---|
|
|
11
|
-
| Orchestrator | Sole coordinator of development/configuration/tests/dependent docs/mixed implementation. Assigns edits to Implementer; owns scope, planning, approval, integration (save/review/directly revise the same spec or plan after Planner first draft, route decisions and request approval), verification, acceptance and completion |
|
|
12
|
-
| Scouter | Read-only material research/analysis and assigned static exploration. Reports evidence, assumptions, questions, impact, next actions and path issues. No editing, standalone documents or design/plan/verification/review/completion decisions |
|
|
13
|
-
| Planner | Returns design/spec/plan drafts |
|
|
14
|
-
| Implementer | Edits approved assigned implementation/configuration/tests/dependent docs; Orchestrator direct edits only under the small-task path |
|
|
15
|
-
| Tester | Verifies without editing |
|
|
16
|
-
| Reviewer | Independently reviews the final full change |
|
|
17
|
-
|
|
18
|
-
Orchestrator is depth 1. All five specialists report directly at depth 2 without creating agents/delegating. Reviewer stays independent.
|
|
9
|
+
Shared text for this section: [coordination-common.md#ownership](coordination-common.md#ownership). It applies here exactly as if written in place.
|
|
19
10
|
|
|
20
11
|
### Execution mode
|
|
21
12
|
|
|
@@ -25,54 +16,37 @@ Standalone native names: Scouter=`arc-scouter`, Planner=`arc-planner`, Implement
|
|
|
25
16
|
|
|
26
17
|
Composite native names (`Mixed routing`): Markdown-profile platforms use `arc-routing-<suffix>`; Codex uses `arc_routing_<suffix>`; the suffix is the role name. NEVER pass a model argument when spawning them.
|
|
27
18
|
|
|
28
|
-
|
|
19
|
+
Shared text for this section: [coordination-common.md#coordination-execution-mode](coordination-common.md#coordination-execution-mode). It applies here exactly as if written in place.
|
|
29
20
|
|
|
30
21
|
ARC limits do not prove native concurrency/depth support. Invoke installed native names and receive results; report unavailable execution. Scouter/Planner/Reviewer cannot edit, execute commands or save documents. Tester verifies without edits. Use only actually available, authorized tools; prompt contracts are not filesystem sandboxes.
|
|
31
22
|
|
|
23
|
+
After each read-only role return (Scouter/Planner/Reviewer), compare `git status` with the pre-spawn snapshot. Unexpected changes stop under Preservation rule. Concurrent Implementer edits and ignored/out-of-repository paths cannot be attributed/detected. Read-only is prompt policy, not sandbox enforcement.
|
|
24
|
+
|
|
32
25
|
<a id="instruction-and-execution-adapter"></a>
|
|
33
26
|
## Instruction and execution adapter
|
|
34
27
|
|
|
35
28
|
ARC defines Grok profiles with scalar YAML frontmatter (`name`, `description`, `model`) and body instructions. Effort is `default` in ARC model settings and is not rendered into native profiles. No native tool restriction fields or config.toml keys are verified; ARC does not write config.toml. Role contracts are prompt-level restrictions, not a filesystem sandbox.
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Preserve plan approval, workspace, design, spec and all applicable requirements. TDD applies to permitted test work under [handoff](handoff.md#implementer-tdd-and-constraints)'s explicit ARC exceptions. Follow an applicable higher-priority prohibition on adding or running tests; when its precedence and scope are clear, neither report a conflict on that basis nor ask permission to violate it. Record unperformed verification; hold only affected work and acceptance when scope or precedence is genuinely unclear or required verification is blocked. Adapt local `brainstorming` role/save/early-spec-commit instructions to Planner ownership and planning/handoff evidence gates, preserving upstream text. Report conflicts/missing required references before dependent work.
|
|
40
|
-
|
|
41
|
-
Orchestrator integrates results, routes decisions/approvals and owns acceptance/completion. Run dependent implementation sequentially with a fresh Implementer per top-level task. Reuse current Implementer only for same-task correction/rework/rechecks while scope/workspace/ownership/context remain valid. Default same-task Tester corrections to it; findings alone create no new task. Before reuse, compare actual workspace, branch/HEAD and change state to the brief.
|
|
42
|
-
|
|
43
|
-
For each plan task, keep the current Implementer conversation ID, status, last result and reuse/replacement decision in the canonical handoff record. Before each call, identify the task and current Implementer. Send same-task corrections, rework and rechecks as follow-up work in that conversation. A completed or idle turn, partial implementation, failed result, missing brief, division by step or file, or Tester/Reviewer finding alone does not justify a new Implementer; consolidate the missing information or findings and send them to the current one. For an initial successful call, record the returned ID; if its result is uncertain, reconcile it before another assignment.
|
|
44
|
-
|
|
45
|
-
Before a same-task replacement, establish an allowed reason: the existing context is invalid/unavailable or the Implementer cannot continue, or an approved plan/acceptance-criteria amendment requires a fresh Implementer. Record the prior conversation ID, status, reason and supporting evidence before calling. Hold if the reason is not established. After a successful call, update the current ID; reconcile an uncertain result before any further assignment. These are prompt-level procedures, not proof of automatic interception of native collaboration calls.
|
|
46
|
-
|
|
47
|
-
Replace/restart only for invalid/unavailable context or changed task boundary, except approved plan/criteria amendments require a fresh Implementer for remaining work even within the same task. Next-task and amendment assignments are handoff restarts, subject to choice reuse/restart briefs. Follow [risk-scaled execution](verification.md#risk-scaled-execution) at task boundaries.
|
|
30
|
+
Shared text for this section: [coordination-common.md#instruction-and-execution-adapter](coordination-common.md#instruction-and-execution-adapter). It applies here exactly as if written in place.
|
|
48
31
|
|
|
49
32
|
Planner/Reviewer/Scouter return findings/questions/actions/path issues; Planner preserves complete drafts. Task boundaries alone add no Tester/review. Unverified risky dependencies require boundary Tester and resolved/explicitly dispositioned findings before implementation, not blanket task gates.
|
|
50
33
|
|
|
51
34
|
<a id="local-superpowers-references"></a>
|
|
52
35
|
### Local Superpowers references
|
|
53
36
|
|
|
54
|
-
|
|
37
|
+
Shared text for this section: [coordination-common.md#local-superpowers-references](coordination-common.md#local-superpowers-references). It applies here exactly as if written in place.
|
|
55
38
|
|
|
56
39
|
<a id="token-discipline-and-handoffs"></a>
|
|
57
|
-
|
|
40
|
+
Shared text for this section: [coordination-common.md#token-discipline-and-handoffs](coordination-common.md#token-discipline-and-handoffs). It applies here exactly as if written in place.
|
|
58
41
|
|
|
59
42
|
## Context discipline and handoffs
|
|
60
43
|
|
|
61
44
|
Only Orchestrator invokes/assigns Grok roles. Describe role and bounded objective. Grok native routing in Mixed routing uses the procedure below. The Grok child uses the session model.
|
|
62
45
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
1. Goal
|
|
66
|
-
2. Criteria (IDs)
|
|
67
|
-
3. Exact scope/ownership: absolute workspace, branch or detached HEAD and HEAD, existing record path, files
|
|
68
|
-
4. Constraints/decisions
|
|
69
|
-
5. Evidence: paths/lines, commands, artifact links
|
|
70
|
-
6. Prior findings
|
|
71
|
-
7. Exact next objective: one bounded objective
|
|
72
|
-
8. Return format: conclusion, evidence locations, unresolved points, next step
|
|
46
|
+
Shared text for this section: [coordination-common.md#coordination-context-discipline-and-handoffs](coordination-common.md#coordination-context-discipline-and-handoffs). It applies here exactly as if written in place.
|
|
73
47
|
|
|
74
48
|
- Follow-ups send changed fields only; mark others `unchanged` relative to a received brief. Restarts follow handoff; fresh specialists receive other fields in full.
|
|
75
|
-
- Send a self-contained needed subset and accessible artifacts. Omit full history/repeated instructions/raw logs. No-findings reports
|
|
49
|
+
- Send a self-contained needed subset and accessible artifacts. Omit full history/repeated instructions/raw logs. No-findings reports MAY be brief; requested full drafts remain complete. Cite locations/commands/links, investigating gaps only.
|
|
76
50
|
- Use only an actually available user-question tool and its verified input schema; Grok user-question APIs are unverified.
|
|
77
51
|
- For a native route in Mixed routing, use the returned `arc-routing-*` profile with a scoped brief. Standalone native invocation with `arc-*` profiles remains unverified. Claim fresh isolation only with evidence. Reuse valid related context, not unrelated/bloated context. Role gate governs Implementer/Tester freshness.
|
|
78
52
|
- Brief absolute local ARC SKILL.md paths: `test-driven-development` for Implementer, `brainstorming`/`writing-plans` for Planner. Read before dependent work.
|
|
@@ -80,28 +54,28 @@ Use this fixed brief order:
|
|
|
80
54
|
- Implementer briefs cite spec/plan task-section line ranges and needed excerpts/criteria/constraints; NEVER request whole-document reading.
|
|
81
55
|
- Follow [Planner preparation/feedback](planning.md#planner-drafting-preparation-and-consolidated-feedback). Complete the initial brief and whole-draft checklist; directly revise the same spec or plan after Planner returns its complete first draft and self-review. Preserve the Planner path for design/brainstorming revisions.
|
|
82
56
|
- Before optional calls name the unresolved question/expected artifact. Skip questions already resolved by evidence/direct inspection.
|
|
83
|
-
-
|
|
57
|
+
- Wait for actual role results or completion notifications from the available tool. Report unavailable execution; invent no API. NEVER poll/sleep-poll for timeout/delay. Batch corrections in one brief. Long shell commands use a sufficient timeout or the available background mode plus completion notification.
|
|
84
58
|
- Read needed file/output ranges only (`rg -n`, `sed -n`, `head`/`tail`) and cap output. DO NOT reread unchanged context material. Already-read unchanged mandatory references/SKILL.md need no follow-up reread; newly triggered mandatory reads remain required.
|
|
85
59
|
- At plan completion or before another plan in a long session, record canonical handoff and recommend a new session.
|
|
86
60
|
- Before handoff briefly state role/objective/output; after return combine findings/next stage. NEVER expose hidden reasoning/raw prompts.
|
|
87
61
|
|
|
88
|
-
|
|
62
|
+
Shared text for this section: [coordination-common.md#coordination-context-discipline-and-handoffs-2](coordination-common.md#coordination-context-discipline-and-handoffs-2). It applies here exactly as if written in place.
|
|
89
63
|
|
|
90
64
|
## Planner dispatch efficiency
|
|
91
65
|
|
|
92
|
-
|
|
66
|
+
Shared text for this section: [coordination-common.md#coordination-planner-dispatch-efficiency](coordination-common.md#coordination-planner-dispatch-efficiency). It applies here exactly as if written in place.
|
|
93
67
|
|
|
94
68
|
<a id="models"></a>
|
|
95
69
|
## Models
|
|
96
70
|
|
|
97
|
-
|
|
71
|
+
Shared text for this section: [coordination-common.md#models](coordination-common.md#models). It applies here exactly as if written in place.
|
|
98
72
|
|
|
99
73
|
`arc_scouter`, `arc_planner`, `arc_implementer`, `arc_tester`, `arc_reviewer` settings map to hyphenated native names, not tool calls. For visualization read [visual companion](arc-visual-companion.md), use only actual allowlisted tools and report unavailable/unverified scope. Shipped `model` defaults are replaced with active `models.toml` role settings at installation.
|
|
100
74
|
|
|
101
75
|
<a id="instruction-and-input-provenance"></a>
|
|
102
76
|
## Instruction and input provenance
|
|
103
77
|
|
|
104
|
-
|
|
78
|
+
Shared text for this section: [coordination-common.md#instruction-and-input-provenance](coordination-common.md#instruction-and-input-provenance). It applies here exactly as if written in place.
|
|
105
79
|
|
|
106
80
|
[ARC role policy: contract begin]
|
|
107
81
|
Generated from lib/policy/role-policy.json; do not edit this managed section manually.
|
|
@@ -116,105 +90,25 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
116
90
|
|
|
117
91
|
## Composite Platform Role Dispatch
|
|
118
92
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
Choose `executionEnvironment` by where the session actually runs: a terminal CLI or TUI session, including one in an IDE integrated terminal, uses `codex-cli`, `claude-cli`, `gemini-cli` or `grok-cli` for its host. Desktop values apply only to Codex and Claude. Use them only for a session confirmed to run inside the corresponding Desktop app. NEVER infer the environment from paths or directory names (for example `~/Desktop/...`). When unsure, declare the CLI value.
|
|
122
|
-
|
|
123
|
-
Procedure, in order:
|
|
124
|
-
|
|
125
|
-
1. `routing-status` with `hostPlatform`, `executionEnvironment`. Reads the active revision, each role's route, profile, model and effort, platform authentication and CLI versions without reserving anything. Authentication and version probes start a child process. The Codex authentication probe refreshes the login token over the network through `codex app-server`; a permanently rejected refresh is `Unauthorized` and a probe that cannot decide is `Incomplete`.
|
|
126
|
-
2. `prepare-dispatch` with `hostPlatform`, `executionEnvironment`, `role` (`arc_scouter`, `arc_planner`, `arc_implementer`, `arc_tester`, or `arc_reviewer`), `expectedRevision` (the revision from step 1), `requestId`, `taskId`, and `allowedPaths` (worktree-relative path array; required and non-empty for `arc_implementer`, optional for `arc_tester` where empty or omitted allows no writes, omitted for other roles). `allow` returns `dispatchId`, the route and initial claims and reserves a lease; `hold` returns every reason with its release condition; `deny` rejects the request. Reuse of a `requestId`, or a non-terminal dispatch for the same workflow, task and role, is denied with `duplicate_dispatch`.
|
|
127
|
-
3. Native route: before spawning, compare the `[arc-routing rev <revision>]` tag in the agent list description with the `routing-status` revision. If it differs or is not shown, hold the role as `native_profile_reload_unverified` and report that a new session is required. Then spawn: Claude host Agent tool `subagent_type: "arc-routing-<suffix>"`; Codex host `spawn_agent` `agent_type: "arc_routing_<suffix>"` with the existing `fork_turns="none"` and `task_name` rules. On Grok use `spawn_subagent` with `subagent_type: "arc-routing-<suffix>"`. The revision tag appears in the `subagent_type` description. Use the returned `subagent_id` as `nativeAgentId`. The Grok child uses the session model, so its model claim remains `operator-attested`. The child has no `spawn_subagent` tool. NEVER pass a model argument. On Claude and Codex the profile decides. Record the lifecycle with `observe` using `dispatchId`, `event` (`started`, `completed`, `failed`, or `cancelled`) and `nativeAgentId`. `nativeAgentId` is required with `started` and forbidden with every other event. A `cancelled` event is also accepted for a `reserved` native lease that was never started (without `nativeAgentId`). These are `operator-attested` claims.
|
|
128
|
-
4. Bridge route: `run-dispatch` with `hostPlatform`, `executionEnvironment`, `dispatchId`, `brief` (UTF-8, at most 256 KiB, delivered on stdin only). It starts a detached supervisor and returns at once with `routeStatus` and `resultPath`. Then `observe` with `hostPlatform`, `executionEnvironment`, `dispatchId` and optional `waitMs` (0 to 540000). Use the maximum wait for each call and DO NOT run a short polling loop. With `waitMs`, `observe` returns only when the dispatch reaches `completed`, `failed`, `cancelled` or `unknown`, or when `waitMs` elapses; a transition such as `starting` to `running` does not end the wait. `observe` returns status, claims, `resultPath` and reasons; `failed` and `unknown` are reported as hold (exit 3).
|
|
129
|
-
5. `resume` with `hostPlatform`, `executionEnvironment`, `dispatchId`, `brief`. It continues the same session as a new segment only for a dispatch in `completed` or `failed` state with a recorded session ID and an unchanged active revision (otherwise `revision_changed`). All flags are re-specified, the concurrency limit is checked again, and a session ID mismatch makes the state `unknown`. `unknown` and `cancelled` dispatches cannot be resumed. New Tester or Reviewer assignments never reuse a session.
|
|
130
|
-
6. `cancel` with `hostPlatform`, `executionEnvironment`, `dispatchId`. A `reserved` lease (native or bridge) becomes `cancelled` at once; a `starting` or `running` native lease is denied and is closed with `observe` events. A cancelled `unknown` lease keeps its recorded reasons. A running child gets SIGTERM, a 10 second grace, then SIGKILL; the result is `cancelling` and `cancelled` is recorded only after exit is observed. A reused PID or missing child information (including a `starting` lease whose supervisor is lost and that has no child record) is left unchanged and the result is hold, because exit cannot be observed; clean it up manually.
|
|
93
|
+
Shared text for this section: [coordination-common.md#coordination-composite-platform-role-dispatch](coordination-common.md#coordination-composite-platform-role-dispatch). It applies here exactly as if written in place.
|
|
131
94
|
|
|
132
95
|
### Host rules
|
|
133
96
|
|
|
134
|
-
|
|
135
|
-
|---|---|---|---|---|
|
|
136
|
-
| `claude-cli` | Native, all roles | Bridge, all roles | Bridge, read roles only (GG1 `fail`; Implementer/Tester held as `permission_scope_unverified`) | Bridge, all roles |
|
|
137
|
-
| `codex-cli` | Bridge, all roles | Native, all roles | Bridge, read roles only (GG1 `fail`; Implementer/Tester held as `permission_scope_unverified`) | Bridge, all roles |
|
|
138
|
-
| `gemini-cli` | Held (`capability_not_verified`; GG2 `fail`, `compositeHost` off) | Held (`capability_not_verified`; GG2 `fail`, `compositeHost` off) | Held (`capability_not_verified`; GG2 `fail`, `compositeHost` off) | Held (`capability_not_verified`; GG2 `fail`, `compositeHost` off) |
|
|
139
|
-
| `grok-cli` | Bridge, all roles | Bridge, all roles | Bridge, read roles only (GG1 `fail`; Implementer/Tester held as `permission_scope_unverified`) | Native, all roles |
|
|
140
|
-
| `claude-desktop` | Held (`environment_unverified`) | Held (`environment_unverified`) | Held (`environment_unverified`) | Held (`environment_unverified`) |
|
|
141
|
-
| `codex-desktop` | Held (`environment_unverified`) | Held (`environment_unverified`) | Held (`environment_unverified`) | Held (`environment_unverified`) |
|
|
142
|
-
|
|
143
|
-
Read roles are Scouter, Planner and Reviewer. The table shows which routes the recorded gates permit; apply the host rules and check each dispatch result.
|
|
144
|
-
|
|
145
|
-
**Claude**
|
|
146
|
-
|
|
147
|
-
- Approval: No per-call ARC approval gate.
|
|
148
|
-
- Target home probe: None.
|
|
149
|
-
- Desktop: Held as described below.
|
|
150
|
-
|
|
151
|
-
**Codex**
|
|
152
|
-
|
|
153
|
-
- On a Codex host ask the user for escalation approval each time any runtime command (`routing-status`, `prepare-dispatch`, `run-dispatch`, `observe`, `resume`, `cancel`) runs, because each may write `CODEX_HOME`. The runtime does not check this approval; asking for it is an Orchestrator obligation. Without approval or on failure the result is `host_sandbox_blocked`.
|
|
154
|
-
- In a Codex host sandbox writes to `CODEX_HOME` are denied (G2), so a Codex-host bridge is not held in advance but runs only with the per-call escalation approval; a refused approval or a denied write is `host_sandbox_blocked`. Detached supervisor survival itself was observed under variant conditions, and native routes there remain supported.
|
|
155
|
-
- Target home probe: None.
|
|
156
|
-
- Desktop: Held as described below.
|
|
157
|
-
|
|
158
|
-
**Gemini**
|
|
159
|
-
|
|
160
|
-
- Approval: Hold the host pending live host measurement (GG2). The registry lists `gemini` and `gemini-cli`, but `compositeHost` is off.
|
|
161
|
-
- Target home probe: See the shared probe rule below. The capability hold applies before the probe.
|
|
162
|
-
- Desktop: No Desktop value.
|
|
163
|
-
|
|
164
|
-
**Grok**
|
|
165
|
-
|
|
166
|
-
GK2 is `approval`.
|
|
167
|
-
|
|
168
|
-
- On a Grok host start the session with `grok --permission-mode default` (ask), keep the platform-default sandbox off, and ask the user for approval each time any runtime command (`routing-status`, `prepare-dispatch`, `run-dispatch`, `observe`, `resume`, `cancel`) runs; NEVER use auto-review, `/auto`, `bypassPermissions`, `--always-approve` or `--yolo`, and DO NOT choose `Always allow`, which saves `permission_mode = "always-approve"` to the Grok config. Spawn with `spawn_subagent` only roles whose route is `native`; Grok can also list Claude `arc-routing-*` profiles, which remain bridge roles. The runtime does not check this approval; asking for it is an Orchestrator obligation. A denied write (for example by a host sandbox) is `host_sandbox_blocked`; ARC does not detect whether the host sandbox is on.
|
|
169
|
-
- Target home probe: See the shared probe rule below.
|
|
170
|
-
- Desktop: No Desktop value.
|
|
97
|
+
Shared text for this section: [coordination-common.md#coordination-host-rules](coordination-common.md#coordination-host-rules). It applies here exactly as if written in place.
|
|
171
98
|
|
|
172
99
|
#### Shared host rules
|
|
173
100
|
|
|
174
|
-
|
|
175
|
-
- On Desktop hosts (`codex-desktop`, `claude-desktop`) every role (native and bridge) is held as `environment_unverified` in this release; the manual checklist in the ARC operation guide is a list of manual checks for a future ARC update that may change the support status, and recording it releases nothing. Even then `supportStatus` is at most `unverified`.
|
|
101
|
+
Shared text for this section: [coordination-common.md#coordination-shared-host-rules](coordination-common.md#coordination-shared-host-rules). It applies here exactly as if written in place.
|
|
176
102
|
|
|
177
103
|
### Bridge target rules
|
|
178
104
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
**Claude**
|
|
182
|
-
|
|
183
|
-
- Writing roles: Claude bridge `arc_implementer` and `arc_tester` run with recorded sandbox settings on every host and are held as `permission_scope_unverified` when an injected G1 fails or settings are missing (G1). Claude Implementer/Tester bridges also deny writes under `.git` (permission rules and sandbox `denyWrite`), and are held as `permission_scope_unverified` when the worktree `.claude/settings.json` or `.claude/settings.local.json` would widen their scope (additional directories, allow rules for tools outside the safe list (Bash, Read, Grep, Glob, WebFetch, WebSearch), hooks, sandbox or defaultMode).
|
|
184
|
-
- Permission claim: Compare the `init` event with the expected tools and permission mode. If `init` is missing, the `permissions` claim is `unverified`. If the tools or permission mode differ, the claim is `unverified` and the reason is `permission_scope_mismatch`.
|
|
185
|
-
- Delegation: Role instructions forbid re-delegation. Claude children expose no Task tool. Apply the shared child guard below.
|
|
186
|
-
- Execution confirmation: Check the stream session identity and model, transcript effort, and the observed terminal result.
|
|
187
|
-
|
|
188
|
-
**Codex**
|
|
189
|
-
|
|
190
|
-
- Gate: G4 applies to every Codex bridge role. G4 `pass` permits dispatch; a failed G4 holds as `permission_scope_unverified`.
|
|
191
|
-
- Writing roles: Codex `workspace-write` may reach beyond the worktree (G5): writes outside the worktree are outside post-run detection.
|
|
192
|
-
- Permission claim: For a Codex bridge the `permissions` claim is at most `operator-attested` and notes `user-config-mcp-not-controlled`, because the child loads the user's Codex configuration (for example MCP servers), which ARC does not control; its `supportStatus` is therefore never `verified`.
|
|
193
|
-
- Delegation: Codex rollout checks apply. The re-delegation of a Codex child is not blocked, and a spawn found afterwards in its rollout fails the dispatch as `delegation_observed` (G3).
|
|
194
|
-
- Execution confirmation: Check the rollout for model, effort, sandbox mode and approval policy, and check the observed terminal result.
|
|
195
|
-
|
|
196
|
-
**Gemini**
|
|
197
|
-
|
|
198
|
-
- Writing roles: Gemini bridge `arc_implementer` and `arc_tester` are held as `permission_scope_unverified` while GG1 is `fail`. Scouter, Planner and Reviewer remain supported.
|
|
199
|
-
- Permission claim: The worktree snapshot covers only Git-visible worktree changes.
|
|
200
|
-
- Delegation: The dispatch record reports `unverifiedContracts.delegation` as `undetectable`.
|
|
201
|
-
- Execution confirmation: Check the stream session ID against the recorded ID, the observed model and the terminal result. Effort stays `unverified`.
|
|
202
|
-
|
|
203
|
-
**Grok**
|
|
204
|
-
|
|
205
|
-
- Writing roles: Grok bridge `arc_implementer` and `arc_tester` use a per-dispatch sandbox profile and require a verified `ProfileApplied` event after execution (GK1), with read-role behavior unchanged. Writing roles are held as `permission_scope_unverified` if GK1 is anything other than `pass`.
|
|
206
|
-
- Grok records `ProfileApplied` itself in a file the child can write. If a Grok version neither applies the profile nor emits the event, a single forged candidate is indistinguishable from a genuine one. A forgery alongside a genuine event fails the two-candidate check.
|
|
207
|
-
- On cancellation, the events check adds no `permission_scope_mismatch` if a valid events file has no matching `ProfileApplied` candidate or the file was absent both before and after execution. Other reasons still apply.
|
|
208
|
-
- Permission claim: The worktree snapshot covers only Git-visible worktree changes.
|
|
209
|
-
- Delegation: The dispatch record reports `unverifiedContracts.delegation` as `undetectable`.
|
|
210
|
-
- Execution confirmation: Check the stream session ID against the recorded ID, the observed model and the terminal result. Effort stays `unverified`.
|
|
105
|
+
Shared text for this section: [coordination-common.md#coordination-bridge-target-rules](coordination-common.md#coordination-bridge-target-rules). It applies here exactly as if written in place.
|
|
211
106
|
|
|
212
107
|
### Bridge tool access
|
|
213
108
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
Use `ARC_SCRATCH_DIR` for temporary files and put files that must survive the dispatch in `ARC_EVIDENCE_DIR` for supervisor collection. Read `ARC_HOST_SERVICES_FILE` for service endpoints when a host service was granted. When a host-only operation blocks a check, report it as “environment constraint (host only)” and identify the blocked check and what remains unverified. Host-only operations include process inspection (`ps`, `pgrep`), Docker, writes to actual CLI authentication or configuration, dependency installation and its remote fetches, Git writes, Cypress, and Keychain operations. The Orchestrator handles host verification within existing authority.
|
|
109
|
+
Shared text for this section: [coordination-common.md#coordination-bridge-tool-access](coordination-common.md#coordination-bridge-tool-access). It applies here exactly as if written in place.
|
|
217
110
|
|
|
111
|
+
<a id="coordination-shared-dispatch-rules"></a>
|
|
218
112
|
### Shared dispatch rules
|
|
219
113
|
|
|
220
114
|
- Bridge children receive the profile instructions only and NEVER load ARC `SKILL.md`. Role instructions forbid re-delegation.
|
|
@@ -10,7 +10,7 @@ Apply the Preservation rule: preserve unrelated work and recovery artifacts. No
|
|
|
10
10
|
<a id="branch-collision-and-invalid-names"></a>
|
|
11
11
|
## Branch collisions and invalid names
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Shared text for this section: [git-recovery-common.md#branch-collision-and-invalid-names](git-recovery-common.md#branch-collision-and-invalid-names). It applies here exactly as if written in place.
|
|
14
14
|
|
|
15
15
|
<a id="git-metadata-write-denial"></a>
|
|
16
16
|
## Git metadata write denial
|
|
@@ -24,11 +24,11 @@ Invalid names, creation/switch failures, lookup errors or unexpected branches re
|
|
|
24
24
|
<a id="handoff-record-write-denial"></a>
|
|
25
25
|
## Handoff record write denial
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Shared text for this section: [git-recovery-common.md#handoff-record-write-denial](git-recovery-common.md#handoff-record-write-denial). It applies here exactly as if written in place.
|
|
28
28
|
|
|
29
29
|
If canonical-record writing is denied/unavailable, stop it and report path/error. NEVER change permissions or bypass sandbox. Use [handoff](handoff.md)'s inline fallback.
|
|
30
30
|
|
|
31
|
-
Orchestrator inspects related processes/ACLs read-only itself or assigns Tester; Scouter/Planner/Reviewer cannot execute commands.
|
|
31
|
+
Orchestrator inspects related processes/ACLs read-only itself or assigns Tester; Scouter/Planner/Reviewer cannot execute commands.
|
|
32
32
|
|
|
33
33
|
<a id="worktree-failures-and-partial-completion"></a>
|
|
34
34
|
### Worktree failures and partial completion
|
|
@@ -9,30 +9,21 @@ Offer three options: current checkout, new task branch in that checkout, or new
|
|
|
9
9
|
<a id="execution-target-request-gate"></a>
|
|
10
10
|
### Execution-target request gate
|
|
11
11
|
|
|
12
|
-
Before requesting choice, verify/record planned document scope, absolute paths/coverage, design/plan depth/valid omissions, dependencies and order. Completed documents/
|
|
12
|
+
Before requesting choice, verify/record planned document scope, absolute paths/coverage, design/plan depth/valid omissions, dependencies and order. Completed documents/approvals are not yet required; unfinished drafts alone do not block asking. Include required artifacts, not mandatory specs everywhere. Settle scope/dependencies needed to identify the target without requiring choice evidence before asking.
|
|
13
13
|
|
|
14
14
|
Present each supported option with:
|
|
15
15
|
|
|
16
16
|
- Planned documents, coverage, expected relative paths, dependencies/order and pending drafting/approval.
|
|
17
17
|
- Verified absolute workspace/repository, branch or detached HEAD, base HEAD, validated offered branch candidate/collision, staged/unstaged/untracked state, preservation/ownership.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Shared text for this section: [handoff-prep-common.md#execution-target-request-gate](handoff-prep-common.md#execution-target-request-gate). It applies here exactly as if written in place.
|
|
20
20
|
|
|
21
21
|
Present current checkout (current branch/detached HEAD), new task branch in that checkout, or new managed worktree and task branch at `.grok/worktrees/<name>`. Planning approval/silence chooses none. Before offering managed worktrees, verify/present source absolute path/repository/common directory, source branch/detached HEAD/full SHA, approved candidate/collision, name/path, planned documents and existing approved transfer/commit scope. Validate naming/collision and source unrelated staging/approved document HEAD/index/working bytes. NEVER substitute/fetch remote/default base. Only after explicit selection read [handoff-worktree](handoff-worktree.md), before creation/branch/transfer. Preserve unrelated work; no preparation stash/reset/clean.
|
|
22
22
|
|
|
23
23
|
<a id="git-mutation-evidence-gate"></a>
|
|
24
24
|
### Git mutation evidence gate
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
1. Explicit choice or verified valid reuse.
|
|
29
|
-
2. Absolute workspace/intended repository, actual branch or detached HEAD and HEAD.
|
|
30
|
-
3. Staged/unstaged/untracked state, preservation and ownership.
|
|
31
|
-
4. Exact command/paths/approved scope; no unresolved failure or partial completion.
|
|
32
|
-
|
|
33
|
-
Missing or mismatched evidence blocks mutation. Initial preparation verifies planned scope/inputs without requiring complete approved documents. Document staging/commit also verifies the full set, individual approvals/versions/dependencies and actual index. Read-only Git remains allowed. External skills' early commits grant no authority.
|
|
34
|
-
|
|
35
|
-
After branch/commit operations verify path/branch/HEAD/preservation/result before dependent action. After staging verify index paths/diff and finalized message. Unrelated staged paths block changes. Revalidate affected evidence after a change or failure; NEVER retroactively authorize pre-gate actions.
|
|
26
|
+
Shared text for this section: [handoff-prep-common.md#git-mutation-evidence-gate](handoff-prep-common.md#git-mutation-evidence-gate). It applies here exactly as if written in place.
|
|
36
27
|
|
|
37
28
|
<a id="new-task-branch"></a>
|
|
38
29
|
<a id="new-task-branch-naming"></a>
|
|
@@ -61,12 +52,12 @@ Immediately recheck workspace, branch/detached HEAD, base and candidate. Changed
|
|
|
61
52
|
<a id="current-checkout"></a>
|
|
62
53
|
### Current checkout
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
Shared text for this section: [handoff-prep-common.md#current-checkout](handoff-prep-common.md#current-checkout). It applies here exactly as if written in place.
|
|
65
56
|
|
|
66
57
|
<a id="planning-document-commit"></a>
|
|
67
58
|
### Planning document commit
|
|
68
59
|
|
|
69
|
-
Begin after target preparation and all applicable documents are written
|
|
60
|
+
Begin after target preparation and all applicable documents are written and approved. Architectural paths permit no document commit before the one combined spec+plan approval; after it, record the spec and every plan in one planning-document commit. Bounded plan-required paths commit their approved plans in one planning-document commit. Plan-less paths commit their own approved document set. Verify full set/evidence/versions before staging/commit. New branches require successful switch, actual branch, unchanged path/preservation. Current checkout requires selected branch/detached HEAD/path/changes.
|
|
70
61
|
For worktrees verify actual registration/a verified native attachment mechanism session attachment/identity/base/branch and directly written documents or protected legacy/restart transfers before target docs commits. Commit remaining approvals once at target; no automatic source docs commit.
|
|
71
62
|
|
|
72
63
|
1. Verify already committed approvals by SHA, actual message/paths/content and selected-checkout validity; reuse without recommitting.
|
|
@@ -76,18 +67,12 @@ For worktrees verify actual registration/a verified native attachment mechanism
|
|
|
76
67
|
5. Failure/staged-content mismatch stops handoff. Inspect branch/HEAD/index/partial completion and resolve before resuming; NEVER commit implementation instead.
|
|
77
68
|
6. Verify SHA/message/paths/content, post-commit HEAD/branch and remaining state in the brief, including selected base and actual order/deviations. Command success alone proves no preparation. Docs commit is neither implementation acceptance nor push approval; no push without separate explicit request.
|
|
78
69
|
|
|
79
|
-
|
|
70
|
+
Shared text for this section: [handoff-prep-common.md#planning-document-commit](handoff-prep-common.md#planning-document-commit). It applies here exactly as if written in place.
|
|
80
71
|
|
|
81
72
|
<a id="execution-time-plan-revision"></a>
|
|
82
73
|
### Execution-time plan revision
|
|
83
74
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
1. Classify progress records versus contract/mechanical plan revisions. Verify applicable approvals, actual approval time, ordered written-spec/dependent-plan approval, preparation and holds; contract revisions require a fresh Implementer for remaining work. NEVER authorize past work retroactively.
|
|
87
|
-
2. After approval edit the same document, append its revision-history row and leave it uncommitted. Record each pending revision with its approved content hash and approval in the canonical `.git/arc/handoff/<workflow>/` record: `gitPath`, `fromVersion`, `toVersion`, `contentHash` (approved content SHA-256), `approvalRef`, `approvedAt` (actual time), `classification` (`contract|mechanical`), `reason`, `affectedTaskIds`, `status` (`pending|committed`). Preserve each full approved version at `.git/arc/handoff/<workflow>/plan-revisions/<flattened-gitPath>.v<N>.md`; NEVER overwrite prior approvals or copies.
|
|
88
|
-
3. In every role brief identify the Orchestrator-owned pending revision, working-tree version and `contentHash`. If another task's progress records were committed after approval, also include in the brief the SHA-256 of the working-tree document content, which is the approved content plus those progress records. Implementer and Tester preserve it untouched as neither their own work nor unrelated user changes.
|
|
89
|
-
4. Include all pending revisions in the accepted commit of the first top-level task executed or reconfirmed against the revised version, otherwise a current task or final Reviewer follow-up commit. Only before overall completion, a standalone `docs(plan)` closing commit MAY include all pending revisions/trailers and no implementation files when no implementation work remains; keep canonical supporting evidence. Exclude pending revision hunks from independent prior-version task commits; hold the commit if separation is unsafe. Add `Plan-Revision: <gitPath> v<from> -> v<to>`, `Plan-Approved-At: <gitPath> v<N> <actual ISO 8601 approval time>` and `Plan-Reason: <gitPath> v<N> <reason>`: one revision trailer per document, approval/reason trailers per version after from through to; repeat keys as needed and preserve existing Git trailers. Use ASCII `->`. Plan-level progress records follow [commit](commit.md#execution-time-plan-document-updates) and alone never justify the closing commit.
|
|
90
|
-
5. After commit verify the SHA-256 of each committed document's content (not the Git blob OID) equals the latest approved `contentHash` if no progress records have been committed since approval. Otherwise compare against the latest approved copy and allow only classified progress records of this commit's task or committed for other tasks after approval (including R-8 separation) and plan-level progress records carried by this commit. Record the SHA-256 of the expected content used for this comparison in the canonical record; NEVER overwrite approved copies. Mark recorded revisions `committed` and verify no pending revisions remain under [verification](verification.md#evidence-after-plan-revision-commit). Link commit SHA only in the canonical record, never the document. NEVER amend/reset/replay/rewrite planning or implementation commits or create other docs/fixup commits.
|
|
75
|
+
Shared text for this section: [handoff-prep-common.md#execution-time-plan-revision](handoff-prep-common.md#execution-time-plan-revision). It applies here exactly as if written in place.
|
|
91
76
|
|
|
92
77
|
<a id="verification-brief-inputs"></a>
|
|
93
78
|
### Verification brief inputs
|
|
@@ -97,12 +82,12 @@ Tester briefs MUST include the required field `mode: task | final`. One assignme
|
|
|
97
82
|
<a id="recovery-prerequisite"></a>
|
|
98
83
|
### Recovery prerequisite
|
|
99
84
|
|
|
100
|
-
|
|
85
|
+
Shared text for this section: [handoff-prep-common.md#recovery-prerequisite](handoff-prep-common.md#recovery-prerequisite). It applies here exactly as if written in place.
|
|
101
86
|
|
|
102
87
|
<a id="instruction-and-input-provenance"></a>
|
|
103
88
|
## Instruction and input provenance
|
|
104
89
|
|
|
105
|
-
|
|
90
|
+
Shared text for this section: [handoff-prep-common.md#instruction-and-input-provenance](handoff-prep-common.md#instruction-and-input-provenance). It applies here exactly as if written in place.
|
|
106
91
|
|
|
107
92
|
[ARC role policy: contract begin]
|
|
108
93
|
Generated from lib/policy/role-policy.json; do not edit this managed section manually.
|