@yunhozz/arc 0.5.0 → 0.5.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 (57) hide show
  1. package/MANIFEST.sha256 +45 -51
  2. package/README.md +99 -33
  3. package/claude/agents/arc-implementer.md +1 -1
  4. package/claude/skill/SKILL.md +1 -1
  5. package/claude/skill/models.toml +6 -6
  6. package/claude/skill/references/coordination.md +0 -4
  7. package/claude/skill/references/handoff-prep.md +1 -1
  8. package/claude/skill/references/verification.md +4 -9
  9. package/codex/skill/SKILL.md +1 -1
  10. package/codex/skill/models.toml +6 -6
  11. package/codex/skill/references/coordination.md +0 -4
  12. package/codex/skill/references/handoff-prep.md +1 -1
  13. package/codex/skill/references/verification.md +4 -9
  14. package/gemini/agents/arc-implementer.md +2 -2
  15. package/gemini/agents/arc-planner.md +1 -1
  16. package/gemini/agents/arc-qa.md +1 -1
  17. package/gemini/agents/arc-scouter.md +1 -1
  18. package/gemini/skill/SKILL.md +1 -1
  19. package/gemini/skill/models.toml +5 -5
  20. package/gemini/skill/references/coordination.md +0 -4
  21. package/gemini/skill/references/handoff-prep.md +1 -1
  22. package/gemini/skill/references/verification.md +4 -9
  23. package/grok/agents/arc-implementer.md +1 -1
  24. package/grok/skill/SKILL.md +1 -1
  25. package/grok/skill/references/coordination.md +0 -4
  26. package/grok/skill/references/handoff-prep.md +1 -1
  27. package/grok/skill/references/verification.md +4 -9
  28. package/lib/installer/runtime-assets.mjs +1 -5
  29. package/lib/installer/targets.mjs +3 -1
  30. package/lib/management/operations.mjs +4 -4
  31. package/lib/prompts/agent-fragments.json +3 -3
  32. package/lib/runtime/local-cli.mjs +9 -2
  33. package/lib/runtime/role-dispatch-policy.mjs +5 -2
  34. package/lib/tui/app.mjs +36 -11
  35. package/lib/tui/interface.mjs +2 -2
  36. package/lib/tui/render.mjs +4 -2
  37. package/lib/tui/terminal.mjs +5 -3
  38. package/lib/watch/brief.mjs +44 -0
  39. package/lib/watch/dispatch.mjs +44 -6
  40. package/lib/watch/index.mjs +107 -22
  41. package/lib/watch/markdown.mjs +42 -9
  42. package/lib/watch/model.mjs +1 -0
  43. package/lib/watch/render.mjs +3 -2
  44. package/lib/watch/scope.mjs +125 -0
  45. package/lib/watch/watcher.mjs +149 -82
  46. package/lib/watch/worktree-menu.mjs +64 -0
  47. package/package.json +1 -1
  48. package/shared/skill/runtime/local-cli.mjs +9 -2
  49. package/shared/skill/runtime/role-dispatch-policy.mjs +5 -2
  50. package/lib/runtime/final-verify.mjs +0 -2158
  51. package/lib/runtime/node-test-reporter.mjs +0 -81
  52. package/lib/runtime/test-results.mjs +0 -736
  53. package/lib/runtime/verify-cli.mjs +0 -60
  54. package/shared/skill/runtime/final-verify.mjs +0 -2158
  55. package/shared/skill/runtime/node-test-reporter.mjs +0 -81
  56. package/shared/skill/runtime/test-results.mjs +0 -736
  57. package/shared/skill/runtime/verify-cli.mjs +0 -60
@@ -28,7 +28,7 @@ Standalone document writing has no specialist auto-route. Design, spec, plan and
28
28
 
29
29
  Apply these terms across references and the Implementer profile, preserving context-specific commands, paths and state checks.
30
30
 
31
- - **Preservation rule:** Preserve unrelated staged, unstaged and untracked changes and edit ownership. NEVER automatically stash, reset, clean, unstage, discard, amend or delete branches/worktrees. Orchestrator includes completed task progress records and approved pending spec/plan revisions in subsequent accepted commits under [planning](references/planning.md#plan-updates-during-execution), [preparation](references/handoff-prep.md#execution-time-plan-revision) and [commit](references/commit.md#execution-time-plan-document-updates). Plan-level progress records ride the plan's next commit or stay only in the canonical record. No separate docs/fixup commit except the standalone `docs(plan)` closing exception. NEVER amend or rewrite planning or implementation history. NEVER change permissions, delete locks or bypass the sandbox to proceed. Stop and report to Orchestrator, who reports to the user.
31
+ - **Preservation rule:** Preserve unrelated staged, unstaged and untracked changes and edit ownership. NEVER automatically stash, reset, clean, unstage, discard, amend or delete branches/worktrees. The only exception is the ARC-owned base worktree under [verification](references/verification.md#test-scope-and-result-comparison), which Orchestrator removes after all final dispositions only if it is still clean. Orchestrator includes completed task progress records and approved pending spec/plan revisions in subsequent accepted commits under [planning](references/planning.md#plan-updates-during-execution), [preparation](references/handoff-prep.md#execution-time-plan-revision) and [commit](references/commit.md#execution-time-plan-document-updates). Plan-level progress records ride the plan's next commit or stay only in the canonical record. No separate docs/fixup commit except the standalone `docs(plan)` closing exception. NEVER amend or rewrite planning or implementation history. NEVER change permissions, delete locks or bypass the sandbox to proceed. Stop and report to Orchestrator, who reports to the user.
32
32
  - **Explicit choice:** Only clear user selection counts, except a recorded Full Auto auto-decision for a gate the installed Run mode permits. Planning approval, silence, refusal of another option and ambiguous replies do not.
33
33
  - **Stop and inspect:** On failure or partial completion, stop dependent work. Record actual path, branch or detached HEAD, HEAD, index, files and completed steps. NEVER automatically retry, fall back or repeat completed work. Revalidate affected gates after resolution.
34
34
  - **Evidence verdict:** Each criterion is proven, unmet or unverified. Passing runs, reports and dispositions never turn unverified into proven. Keep unverified scope visible.
@@ -4,11 +4,11 @@ version = 3
4
4
 
5
5
  [roles.arc_scouter]
6
6
  model = "gpt-6.2-sol"
7
- model_reasoning_effort = "high"
7
+ model_reasoning_effort = "medium"
8
8
 
9
9
  [roles.arc_planner]
10
- model = "gpt-6.2-astra"
11
- model_reasoning_effort = "xhigh"
10
+ model = "gpt-6.2-sol"
11
+ model_reasoning_effort = "medium"
12
12
 
13
13
  [roles.arc_implementer]
14
14
  model = "gpt-6.2-sol"
@@ -16,8 +16,8 @@ model_reasoning_effort = "medium"
16
16
 
17
17
  [roles.arc_qa]
18
18
  model = "gpt-6.2-sol"
19
- model_reasoning_effort = "high"
19
+ model_reasoning_effort = "medium"
20
20
 
21
21
  [roles.arc_reviewer]
22
- model = "gpt-6.2-astra"
23
- model_reasoning_effort = "high"
22
+ model = "gpt-6.2-sol"
23
+ model_reasoning_effort = "medium"
@@ -143,14 +143,12 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
143
143
  **Claude**
144
144
 
145
145
  - Approval: No per-call ARC approval gate.
146
- - Detached survival of the verify runner is unverified on a Claude host; use `detach: false` until it is verified.
147
146
  - Target home probe: None.
148
147
  - Desktop: Held as described below.
149
148
 
150
149
  **Codex**
151
150
 
152
151
  - 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`.
153
- - On a Codex host ask for the same escalation approval each time a `verify-*` command (`verify-start`, `verify-status`, `verify-compare`, `verify-rerun`, `verify-cleanup`) runs, because it writes `<git-common-dir>/arc/verify` and the system temporary directory; record an approved call as `sandboxMode: "escalated"`. Detached survival of the verify runner is unverified; use `detach: false` until it is verified.
154
152
  - 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
153
  - Target home probe: None.
156
154
  - Desktop: Held as described below.
@@ -158,7 +156,6 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
158
156
  **Gemini**
159
157
 
160
158
  - Approval: Hold the host pending live host measurement (GG2). The registry lists `gemini` and `gemini-cli`, but `compositeHost` is off.
161
- - Detached survival of the verify runner is unverified on a Gemini host; use `detach: false`.
162
159
  - Target home probe: See the shared probe rule below. The capability hold applies before the probe.
163
160
  - Desktop: No Desktop value.
164
161
 
@@ -167,7 +164,6 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
167
164
  GK2 is `approval`.
168
165
 
169
166
  - 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.
170
- - On a Grok host ask the user for approval the same way each time a `verify-*` command runs. Detached survival of the verify runner is unverified; use `detach: false`.
171
167
  - Target home probe: See the shared probe rule below.
172
168
  - Desktop: No Desktop value.
173
169
 
@@ -92,7 +92,7 @@ After initial document batching, follow [planning](planning.md#plan-updates-duri
92
92
  <a id="verification-brief-inputs"></a>
93
93
  ### Verification brief inputs
94
94
 
95
- Implementer and QA briefs that assign checks MUST include the baseline record reference (revision, commands, environment and failures by test name, with baseline-incomplete files marked), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison). While a background baseline run is still active, the brief MAY cite its `runId` and recording conditions instead of the completed record; the executor's comparison waits for its completion.
95
+ Implementer and QA briefs that assign checks MUST include the approved base revision, the base worktree path and its prerequisite state when one already exists (prepared, or not prepared with the needed commands), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison). Final verification QA briefs also include the re-changed-file list and the provisional full-regression trigger judgment with reasons, including integration history.
96
96
 
97
97
  <a id="recovery-prerequisite"></a>
98
98
  ### Recovery prerequisite
@@ -17,18 +17,13 @@ Policy, generated-file and manifest checks prove structure, not role behavior, i
17
17
 
18
18
  **Task checks and rechecks** run only tests related to the change: test files that directly exercise a changed module, contract tests that the change requires updating, and the matching check scripts. The brief lists the minimum set; executors MAY add only items in these three categories, each with a reason. Other additions need Orchestrator authorization. Report every selected item and why. This rule takes precedence over the upstream TDD per-task project-suite instruction; upstream text is unchanged. Report every failure observed in any run by name.
19
19
 
20
- **Final verification** runs once after all tasks are accepted: the union of all tasks' related tests, plus all contract tests and all check scripts. Orchestrator runs it directly, not through QA, as a background process where the host supports one, and continues independent work such as assigning the final Reviewer meanwhile. Run it in a clean detached worktree of the verified HEAD commit, prepared with the same prerequisites as the baseline, for example through the runtime [final verification commands](#final-verification-runtime-commands); uncommitted changes MAY be captured as a snapshot commit without changing refs, the index or working files, reporting included and excluded paths. Orchestrator then performs the result comparison below and records the verdict. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
20
+ **Final verification** runs once after all tasks are accepted and committed, as one fresh QA assignment at the verified HEAD of the execution target worktree: all contract tests, all check scripts and the related tests of re-changed files; it does not rerun the union of tests that task QA already passed. A re-changed file is a file that a task's QA verified, as a changed file or a related test file it ran, and that a later commit changed after that task's focused commit (`git diff --name-only <task commit> HEAD`), plus every non-documentation file changed in base..HEAD by a commit that no task QA verified. Orchestrator computes the list and cites it in the brief; QA cross-checks it with read-only `git diff`, MAY add items only within the three categories above with reasons, and reports the reason when the list is empty. QA records `git status --porcelain` at start and end; a state that is not clean is an environment block that holds final verification. While it runs, neither Orchestrator nor any Implementer writes in that workspace; the read-only final Reviewer MAY run concurrently. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
21
21
 
22
- **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan; Orchestrator decides from the actual final diff and history. If no trigger applies, omit it and report the reason; if applicability cannot be determined, run it. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings. Full regression uses the same clean worktree and prerequisites as the baseline.
22
+ **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan. Orchestrator cites its provisional judgment and reasons, including the integration history for trigger (2), in the final QA brief, and QA independently checks triggers (1), (3) and (4) from the base..HEAD diff and log. If either finds a trigger applies or cannot determine applicability, QA runs it once without further authorization; if no trigger applies, omit it and report the reason. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings. Full regression failures follow the base check below.
23
23
 
24
- **Baseline:** Before dependent work, Orchestrator records a baseline at the approved base revision after the prerequisites the checks require (for example build outputs and environment settings): commands, environment, revision and failures by test name, covering every command final verification may run, including the full suite when the provisional trigger judgment is run or undetermined. A file-level load or collection failure without test names marks that file baseline-incomplete; re-record with prerequisites or treat current failures in that file as new candidates. NEVER absorb them as baseline failures. Orchestrator MAY record the baseline in the background in a separate clean worktree immediately after base approval while continuing independent work, but MUST complete it before the result comparison. Record its load (quiet, contended or unknown), and by default DO NOT run baseline and HEAD verification concurrently. Reuse a cached baseline only when every cache key input matches and the cached run was quiet and complete; a missing, unreadable or differing input requires a fresh record, and a contended or unknown baseline serves only the current comparison.
24
+ **Baseline:** No baseline run is recorded in advance, and no base worktree is prepared in advance. QA classifies each failure in two steps. First, a static check against the approved base: task QA, which verifies uncommitted work, uses read-only `git diff --name-only <approved base>` plus the untracked files from `git status --porcelain`; final verification QA uses `git diff --name-only <approved base> HEAD`. QA checks whether the test file, the modules it directly imports or loads, the fixtures or data it reads, or its test configuration changed. If none changed, it is an unrelated failure: report it separately with that evidence; it is not a finding, and Orchestrator dispositions it. Because it rests on the diff, not a run, NEVER report it as a baseline failure. If any changed, or the check cannot decide (for example a dynamic import, a failure without a test name, or a file-level load failure), report the failure as needing a base run, with the changed paths. Second, only for those failures, Orchestrator prepares a clean detached worktree of the approved base revision at `<git-common-dir>/arc/base/<workflow>`, never under a managed worktree directory (such as `.claude/worktrees/`) or inside the execution target worktree, reuses it for that workflow, runs no tests there, and sends its path and prerequisite state (prepared, or not prepared with the needed commands) to the current QA. After all final dispositions Orchestrator removes it only if it is still clean; this ARC-owned base worktree is the only exception to the Preservation rule's worktree-deletion ban, and any other state holds removal for the user. QA runs only those test names alone in the base worktree, for example with Node `--test-name-pattern` or a Python node id. A failure under the same name at base is a baseline failure; a pass at base, or a test or file absent at base, makes it a new failure; a base run that was not performed, was blocked by the environment, failed to load or lacks the name makes it a new-failure candidate. NEVER absorb a candidate as a baseline failure. Check a file-level load or collection failure by loading the same file at base; an identical load failure at base stays a new-failure candidate (same at base) for Orchestrator disposition. If base needs prerequisites or the sandbox prevents running there, QA installs or generates nothing and reports an environment block; Orchestrator then prepares the prerequisites or assigns a separate QA whose workspace is the base worktree. If both are blocked, those failures stay new-failure candidates for Orchestrator disposition. Static checks and base reruns classify failures; they are not intermittency diagnosis.
25
25
 
26
- **Result comparison:** Compare failures with the baseline by test name; only new failures are findings. Report baseline failures separately. Identify tests by name from structured results such as JUnit XML, TAP or a declared line pattern; a failure without a test name, or in a command or file whose results are incomplete, is a new-failure candidate, never a baseline failure. Report intermittent candidates, tests whose outcomes differ across runs with the same inputs, separately from baseline and new failures. Report the slowest files and tests (default ten) for information only. If a failure looks intermittent, rerun only that test in isolation, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding.
27
-
28
- <a id="final-verification-runtime-commands"></a>
29
- ## Final verification runtime commands
30
-
31
- Orchestrator MAY run `node <skill>/runtime/verify-cli.mjs <command> --cwd <workspace> --workflow <id> --input -` with `verify-start`, `verify-status`, `verify-compare`, `verify-rerun` or `verify-cleanup`. The commands reject bridge children, never retry, restart or delete automatically, create worktrees only under the system temporary directory and store records under `<git-common-dir>/arc/verify`. Commands receive only a fixed environment allowlist plus declared `envNames` and command `env`, all of which enter the cache key; declare any other variable a check needs. Use `detach: true` only on a host whose detached-process survival is verified in [coordination](coordination.md); otherwise run with `detach: false`, through the host's own background facility where available. `verify-rerun` runs one isolated attempt per call within the rerun limit, and `verify-cleanup` removes only worktrees the tool created and recorded, on explicit request.
26
+ **Result comparison:** Compare failures by test name; only new failures are findings, and unrelated failures and new-failure candidates need Orchestrator disposition. Report baseline and unrelated failures separately. Identify tests by name from structured results such as JUnit XML, TAP or a declared line pattern; a failure without a test name, or in a command or file whose results are incomplete, is a new-failure candidate, never a baseline failure. Report intermittent candidates, tests whose outcomes differ across runs with the same inputs, separately from baseline and new failures. Report the slowest files and tests (default ten) for information only. If a failure looks intermittent, rerun only that test in isolation at HEAD, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding. For each failure report the test name and file, HEAD command and result, static-check result (changed related paths, or none), base revision, command and result (pass, fail, absent, load-fail or not-run) when a base run was needed, verdict, isolated rerun count and outcome, and environment limits.
32
27
 
33
28
  <a id="risk-scaled-execution"></a>
34
29
  ## Risk-scaled execution
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: arc-implementer
3
3
  description: Implement approved scoped changes and focused verification
4
- model: gemini-4-hydrogen
4
+ model: gemini-4-neon
5
5
  ---
6
6
 
7
7
  # Implementer
@@ -18,7 +18,7 @@ On an actual conflict, missing assigned path, tool failure, unexpected Git state
18
18
 
19
19
  DO NOT reload Orchestrator's ARC SKILL.md. Follow this profile, brief, assigned skills and explicit references. DO NOT bypass delegation limits through CLI processes. State material assumptions and tradeoffs before acting; return unresolved decisions. DO NOT request user approval. Target choice MUST be explicit; silence and unrelated approvals do not count.
20
20
 
21
- Before feature/behavior edits, read brief-cited TDD and required relative references: observe failing tests → minimal implementation → related checks; full regression only in Orchestrator's final verification when triggered. If blocked, report constraints/needed approval before source edits. Waivers/docs exceptions need exact recorded scope/reasons, never inferred from size. Only Orchestrator accepts/commits. Even explicit assignment forbids stage/commit/push/merge or other Git mutations.
21
+ Before feature/behavior edits, read brief-cited TDD and required relative references: observe failing tests → minimal implementation → related checks; full regression only in final QA verification when triggered. If blocked, report constraints/needed approval before source edits. Waivers/docs exceptions need exact recorded scope/reasons, never inferred from size. Only Orchestrator accepts/commits. Even explicit assignment forbids stage/commit/push/merge or other Git mutations.
22
22
 
23
23
  This profile is the complete Implementer handoff contract. Read `references/handoff.md`, `handoff-prep.md` only for brief-cited sections. Read only assigned plan/spec sections; request further material from Orchestrator.
24
24
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: arc-planner
3
3
  description: Draft scoped designs and implementation plans for Orchestrator
4
- model: gemini-4-carbon
4
+ model: gemini-4-neon
5
5
  ---
6
6
 
7
7
  # Planner
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: arc-qa
3
3
  description: Execute approved focused verification and report evidence
4
- model: gemini-4-hydrogen
4
+ model: gemini-4-neon
5
5
  ---
6
6
 
7
7
  # QA
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: arc-scouter
3
3
  description: Research evidence and inspect assigned static source
4
- model: gemini-4-hydrogen
4
+ model: gemini-4-neon
5
5
  ---
6
6
 
7
7
  # Scouter
@@ -28,7 +28,7 @@ Standalone document writing has no specialist auto-route. Design, spec, plan and
28
28
 
29
29
  Apply these terms across references and the Implementer profile, preserving context-specific commands, paths and state checks.
30
30
 
31
- - **Preservation rule:** Preserve unrelated staged, unstaged and untracked changes and edit ownership. NEVER automatically stash, reset, clean, unstage, discard, amend or delete branches/worktrees. Orchestrator includes completed task progress records and approved pending spec/plan revisions in subsequent accepted commits under [planning](references/planning.md#plan-updates-during-execution), [preparation](references/handoff-prep.md#execution-time-plan-revision) and [commit](references/commit.md#execution-time-plan-document-updates). Plan-level progress records ride the plan's next commit or stay only in the canonical record. No separate docs/fixup commit except the standalone `docs(plan)` closing exception. NEVER amend or rewrite planning or implementation history. NEVER change permissions, delete locks or bypass the sandbox to proceed. Stop and report to Orchestrator, who reports to the user.
31
+ - **Preservation rule:** Preserve unrelated staged, unstaged and untracked changes and edit ownership. NEVER automatically stash, reset, clean, unstage, discard, amend or delete branches/worktrees. The only exception is the ARC-owned base worktree under [verification](references/verification.md#test-scope-and-result-comparison), which Orchestrator removes after all final dispositions only if it is still clean. Orchestrator includes completed task progress records and approved pending spec/plan revisions in subsequent accepted commits under [planning](references/planning.md#plan-updates-during-execution), [preparation](references/handoff-prep.md#execution-time-plan-revision) and [commit](references/commit.md#execution-time-plan-document-updates). Plan-level progress records ride the plan's next commit or stay only in the canonical record. No separate docs/fixup commit except the standalone `docs(plan)` closing exception. NEVER amend or rewrite planning or implementation history. NEVER change permissions, delete locks or bypass the sandbox to proceed. Stop and report to Orchestrator, who reports to the user.
32
32
  - **Explicit choice:** Only clear user selection counts, except a recorded Full Auto auto-decision for a gate the installed Run mode permits. Planning approval, silence, refusal of another option and ambiguous replies do not.
33
33
  - **Stop and inspect:** On failure or partial completion, stop dependent work. Record actual path, branch or detached HEAD, HEAD, index, files and completed steps. NEVER automatically retry, fall back or repeat completed work. Revalidate affected gates after resolution.
34
34
  - **Evidence verdict:** Each criterion is proven, unmet or unverified. Passing runs, reports and dispositions never turn unverified into proven. Keep unverified scope visible.
@@ -1,21 +1,21 @@
1
1
  # Canonical source for every role model and effort.
2
- # Defaults are recommended pairs from the packaged catalog.
2
+ # Defaults use one packaged model for every role.
3
3
  version = 3
4
4
 
5
5
  [roles.arc_scouter]
6
- model = "gemini-4-hydrogen"
6
+ model = "gemini-4-neon"
7
7
  effort = "default"
8
8
 
9
9
  [roles.arc_planner]
10
- model = "gemini-4-carbon"
10
+ model = "gemini-4-neon"
11
11
  effort = "default"
12
12
 
13
13
  [roles.arc_implementer]
14
- model = "gemini-4-hydrogen"
14
+ model = "gemini-4-neon"
15
15
  effort = "default"
16
16
 
17
17
  [roles.arc_qa]
18
- model = "gemini-4-hydrogen"
18
+ model = "gemini-4-neon"
19
19
  effort = "default"
20
20
 
21
21
  [roles.arc_reviewer]
@@ -145,14 +145,12 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
145
145
  **Claude**
146
146
 
147
147
  - Approval: No per-call ARC approval gate.
148
- - Detached survival of the verify runner is unverified on a Claude host; use `detach: false` until it is verified.
149
148
  - Target home probe: None.
150
149
  - Desktop: Held as described below.
151
150
 
152
151
  **Codex**
153
152
 
154
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`.
155
- - On a Codex host ask for the same escalation approval each time a `verify-*` command (`verify-start`, `verify-status`, `verify-compare`, `verify-rerun`, `verify-cleanup`) runs, because it writes `<git-common-dir>/arc/verify` and the system temporary directory; record an approved call as `sandboxMode: "escalated"`. Detached survival of the verify runner is unverified; use `detach: false` until it is verified.
156
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.
157
155
  - Target home probe: None.
158
156
  - Desktop: Held as described below.
@@ -160,7 +158,6 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
160
158
  **Gemini**
161
159
 
162
160
  - Approval: Hold the host pending live host measurement (GG2). The registry lists `gemini` and `gemini-cli`, but `compositeHost` is off.
163
- - Detached survival of the verify runner is unverified on a Gemini host; use `detach: false`.
164
161
  - Target home probe: See the shared probe rule below. The capability hold applies before the probe.
165
162
  - Desktop: No Desktop value.
166
163
 
@@ -169,7 +166,6 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
169
166
  GK2 is `approval`.
170
167
 
171
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.
172
- - On a Grok host ask the user for approval the same way each time a `verify-*` command runs. Detached survival of the verify runner is unverified; use `detach: false`.
173
169
  - Target home probe: See the shared probe rule below.
174
170
  - Desktop: No Desktop value.
175
171
 
@@ -92,7 +92,7 @@ After initial document batching, follow [planning](planning.md#plan-updates-duri
92
92
  <a id="verification-brief-inputs"></a>
93
93
  ### Verification brief inputs
94
94
 
95
- Implementer and QA briefs that assign checks MUST include the baseline record reference (revision, commands, environment and failures by test name, with baseline-incomplete files marked), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison). While a background baseline run is still active, the brief MAY cite its `runId` and recording conditions instead of the completed record; the executor's comparison waits for its completion.
95
+ Implementer and QA briefs that assign checks MUST include the approved base revision, the base worktree path and its prerequisite state when one already exists (prepared, or not prepared with the needed commands), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison). Final verification QA briefs also include the re-changed-file list and the provisional full-regression trigger judgment with reasons, including integration history.
96
96
 
97
97
  <a id="recovery-prerequisite"></a>
98
98
  ### Recovery prerequisite
@@ -19,18 +19,13 @@ Policy, generated-file and manifest checks prove structure, not role behavior, i
19
19
 
20
20
  **Task checks and rechecks** run only tests related to the change: test files that directly exercise a changed module, contract tests that the change requires updating, and the matching check scripts. The brief lists the minimum set; executors MAY add only items in these three categories, each with a reason. Other additions need Orchestrator authorization. Report every selected item and why. This rule takes precedence over the upstream TDD per-task project-suite instruction; upstream text is unchanged. Report every failure observed in any run by name.
21
21
 
22
- **Final verification** runs once after all tasks are accepted: the union of all tasks' related tests, plus all contract tests and all check scripts. Orchestrator runs it directly, not through QA, as a background process where the host supports one, and continues independent work such as assigning the final Reviewer meanwhile. Run it in a clean detached worktree of the verified HEAD commit, prepared with the same prerequisites as the baseline, for example through the runtime [final verification commands](#final-verification-runtime-commands); uncommitted changes MAY be captured as a snapshot commit without changing refs, the index or working files, reporting included and excluded paths. Orchestrator then performs the result comparison below and records the verdict. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
22
+ **Final verification** runs once after all tasks are accepted and committed, as one fresh QA assignment at the verified HEAD of the execution target worktree: all contract tests, all check scripts and the related tests of re-changed files; it does not rerun the union of tests that task QA already passed. A re-changed file is a file that a task's QA verified, as a changed file or a related test file it ran, and that a later commit changed after that task's focused commit (`git diff --name-only <task commit> HEAD`), plus every non-documentation file changed in base..HEAD by a commit that no task QA verified. Orchestrator computes the list and cites it in the brief; QA cross-checks it with read-only `git diff`, MAY add items only within the three categories above with reasons, and reports the reason when the list is empty. QA records `git status --porcelain` at start and end; a state that is not clean is an environment block that holds final verification. While it runs, neither Orchestrator nor any Implementer writes in that workspace; the read-only final Reviewer MAY run concurrently. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
23
23
 
24
- **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan; Orchestrator decides from the actual final diff and history. If no trigger applies, omit it and report the reason; if applicability cannot be determined, run it. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings. Full regression uses the same clean worktree and prerequisites as the baseline.
24
+ **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan. Orchestrator cites its provisional judgment and reasons, including the integration history for trigger (2), in the final QA brief, and QA independently checks triggers (1), (3) and (4) from the base..HEAD diff and log. If either finds a trigger applies or cannot determine applicability, QA runs it once without further authorization; if no trigger applies, omit it and report the reason. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings. Full regression failures follow the base check below.
25
25
 
26
- **Baseline:** Before dependent work, Orchestrator records a baseline at the approved base revision after the prerequisites the checks require (for example build outputs and environment settings): commands, environment, revision and failures by test name, covering every command final verification may run, including the full suite when the provisional trigger judgment is run or undetermined. A file-level load or collection failure without test names marks that file baseline-incomplete; re-record with prerequisites or treat current failures in that file as new candidates. NEVER absorb them as baseline failures. Orchestrator MAY record the baseline in the background in a separate clean worktree immediately after base approval while continuing independent work, but MUST complete it before the result comparison. Record its load (quiet, contended or unknown), and by default DO NOT run baseline and HEAD verification concurrently. Reuse a cached baseline only when every cache key input matches and the cached run was quiet and complete; a missing, unreadable or differing input requires a fresh record, and a contended or unknown baseline serves only the current comparison.
26
+ **Baseline:** No baseline run is recorded in advance, and no base worktree is prepared in advance. QA classifies each failure in two steps. First, a static check against the approved base: task QA, which verifies uncommitted work, uses read-only `git diff --name-only <approved base>` plus the untracked files from `git status --porcelain`; final verification QA uses `git diff --name-only <approved base> HEAD`. QA checks whether the test file, the modules it directly imports or loads, the fixtures or data it reads, or its test configuration changed. If none changed, it is an unrelated failure: report it separately with that evidence; it is not a finding, and Orchestrator dispositions it. Because it rests on the diff, not a run, NEVER report it as a baseline failure. If any changed, or the check cannot decide (for example a dynamic import, a failure without a test name, or a file-level load failure), report the failure as needing a base run, with the changed paths. Second, only for those failures, Orchestrator prepares a clean detached worktree of the approved base revision at `<git-common-dir>/arc/base/<workflow>`, never under a managed worktree directory (such as `.claude/worktrees/`) or inside the execution target worktree, reuses it for that workflow, runs no tests there, and sends its path and prerequisite state (prepared, or not prepared with the needed commands) to the current QA. After all final dispositions Orchestrator removes it only if it is still clean; this ARC-owned base worktree is the only exception to the Preservation rule's worktree-deletion ban, and any other state holds removal for the user. QA runs only those test names alone in the base worktree, for example with Node `--test-name-pattern` or a Python node id. A failure under the same name at base is a baseline failure; a pass at base, or a test or file absent at base, makes it a new failure; a base run that was not performed, was blocked by the environment, failed to load or lacks the name makes it a new-failure candidate. NEVER absorb a candidate as a baseline failure. Check a file-level load or collection failure by loading the same file at base; an identical load failure at base stays a new-failure candidate (same at base) for Orchestrator disposition. If base needs prerequisites or the sandbox prevents running there, QA installs or generates nothing and reports an environment block; Orchestrator then prepares the prerequisites or assigns a separate QA whose workspace is the base worktree. If both are blocked, those failures stay new-failure candidates for Orchestrator disposition. Static checks and base reruns classify failures; they are not intermittency diagnosis.
27
27
 
28
- **Result comparison:** Compare failures with the baseline by test name; only new failures are findings. Report baseline failures separately. Identify tests by name from structured results such as JUnit XML, TAP or a declared line pattern; a failure without a test name, or in a command or file whose results are incomplete, is a new-failure candidate, never a baseline failure. Report intermittent candidates, tests whose outcomes differ across runs with the same inputs, separately from baseline and new failures. Report the slowest files and tests (default ten) for information only. If a failure looks intermittent, rerun only that test in isolation, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding.
29
-
30
- <a id="final-verification-runtime-commands"></a>
31
- ## Final verification runtime commands
32
-
33
- Orchestrator MAY run `node <skill>/runtime/verify-cli.mjs <command> --cwd <workspace> --workflow <id> --input -` with `verify-start`, `verify-status`, `verify-compare`, `verify-rerun` or `verify-cleanup`. The commands reject bridge children, never retry, restart or delete automatically, create worktrees only under the system temporary directory and store records under `<git-common-dir>/arc/verify`. Commands receive only a fixed environment allowlist plus declared `envNames` and command `env`, all of which enter the cache key; declare any other variable a check needs. Use `detach: true` only on a host whose detached-process survival is verified in [coordination](coordination.md); otherwise run with `detach: false`, through the host's own background facility where available. `verify-rerun` runs one isolated attempt per call within the rerun limit, and `verify-cleanup` removes only worktrees the tool created and recorded, on explicit request.
28
+ **Result comparison:** Compare failures by test name; only new failures are findings, and unrelated failures and new-failure candidates need Orchestrator disposition. Report baseline and unrelated failures separately. Identify tests by name from structured results such as JUnit XML, TAP or a declared line pattern; a failure without a test name, or in a command or file whose results are incomplete, is a new-failure candidate, never a baseline failure. Report intermittent candidates, tests whose outcomes differ across runs with the same inputs, separately from baseline and new failures. Report the slowest files and tests (default ten) for information only. If a failure looks intermittent, rerun only that test in isolation at HEAD, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding. For each failure report the test name and file, HEAD command and result, static-check result (changed related paths, or none), base revision, command and result (pass, fail, absent, load-fail or not-run) when a base run was needed, verdict, isolated rerun count and outcome, and environment limits.
34
29
 
35
30
  <a id="risk-scaled-execution"></a>
36
31
  ## Risk-scaled execution
@@ -18,7 +18,7 @@ On an actual conflict, missing assigned path, tool failure, unexpected Git state
18
18
 
19
19
  DO NOT reload Orchestrator's ARC SKILL.md. Follow this profile, brief, assigned skills and explicit references. DO NOT bypass delegation limits through CLI processes. State material assumptions and tradeoffs before acting; return unresolved decisions. DO NOT request user approval. Target choice MUST be explicit; silence and unrelated approvals do not count.
20
20
 
21
- Before feature/behavior edits, read brief-cited TDD and required relative references: observe failing tests → minimal implementation → related checks; full regression only in Orchestrator's final verification when triggered. If blocked, report constraints/needed approval before source edits. Waivers/docs exceptions need exact recorded scope/reasons, never inferred from size. Only Orchestrator accepts/commits. Even explicit assignment forbids stage/commit/push/merge or other Git mutations.
21
+ Before feature/behavior edits, read brief-cited TDD and required relative references: observe failing tests → minimal implementation → related checks; full regression only in final QA verification when triggered. If blocked, report constraints/needed approval before source edits. Waivers/docs exceptions need exact recorded scope/reasons, never inferred from size. Only Orchestrator accepts/commits. Even explicit assignment forbids stage/commit/push/merge or other Git mutations.
22
22
 
23
23
  This profile is the complete Implementer handoff contract. Read `references/handoff.md`, `handoff-prep.md` only for brief-cited sections. Read only assigned plan/spec sections; request further material from Orchestrator.
24
24
 
@@ -28,7 +28,7 @@ Standalone document writing has no specialist auto-route. Design, spec, plan and
28
28
 
29
29
  Apply these terms across references and the Implementer profile, preserving context-specific commands, paths and state checks.
30
30
 
31
- - **Preservation rule:** Preserve unrelated staged, unstaged and untracked changes and edit ownership. NEVER automatically stash, reset, clean, unstage, discard, amend or delete branches/worktrees. Orchestrator includes completed task progress records and approved pending spec/plan revisions in subsequent accepted commits under [planning](references/planning.md#plan-updates-during-execution), [preparation](references/handoff-prep.md#execution-time-plan-revision) and [commit](references/commit.md#execution-time-plan-document-updates). Plan-level progress records ride the plan's next commit or stay only in the canonical record. No separate docs/fixup commit except the standalone `docs(plan)` closing exception. NEVER amend or rewrite planning or implementation history. NEVER change permissions, delete locks or bypass the sandbox to proceed. Stop and report to Orchestrator, who reports to the user.
31
+ - **Preservation rule:** Preserve unrelated staged, unstaged and untracked changes and edit ownership. NEVER automatically stash, reset, clean, unstage, discard, amend or delete branches/worktrees. The only exception is the ARC-owned base worktree under [verification](references/verification.md#test-scope-and-result-comparison), which Orchestrator removes after all final dispositions only if it is still clean. Orchestrator includes completed task progress records and approved pending spec/plan revisions in subsequent accepted commits under [planning](references/planning.md#plan-updates-during-execution), [preparation](references/handoff-prep.md#execution-time-plan-revision) and [commit](references/commit.md#execution-time-plan-document-updates). Plan-level progress records ride the plan's next commit or stay only in the canonical record. No separate docs/fixup commit except the standalone `docs(plan)` closing exception. NEVER amend or rewrite planning or implementation history. NEVER change permissions, delete locks or bypass the sandbox to proceed. Stop and report to Orchestrator, who reports to the user.
32
32
  - **Explicit choice:** Only clear user selection counts, except a recorded Full Auto auto-decision for a gate the installed Run mode permits. Planning approval, silence, refusal of another option and ambiguous replies do not.
33
33
  - **Stop and inspect:** On failure or partial completion, stop dependent work. Record actual path, branch or detached HEAD, HEAD, index, files and completed steps. NEVER automatically retry, fall back or repeat completed work. Revalidate affected gates after resolution.
34
34
  - **Evidence verdict:** Each criterion is proven, unmet or unverified. Passing runs, reports and dispositions never turn unverified into proven. Keep unverified scope visible.
@@ -145,14 +145,12 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
145
145
  **Claude**
146
146
 
147
147
  - Approval: No per-call ARC approval gate.
148
- - Detached survival of the verify runner is unverified on a Claude host; use `detach: false` until it is verified.
149
148
  - Target home probe: None.
150
149
  - Desktop: Held as described below.
151
150
 
152
151
  **Codex**
153
152
 
154
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`.
155
- - On a Codex host ask for the same escalation approval each time a `verify-*` command (`verify-start`, `verify-status`, `verify-compare`, `verify-rerun`, `verify-cleanup`) runs, because it writes `<git-common-dir>/arc/verify` and the system temporary directory; record an approved call as `sandboxMode: "escalated"`. Detached survival of the verify runner is unverified; use `detach: false` until it is verified.
156
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.
157
155
  - Target home probe: None.
158
156
  - Desktop: Held as described below.
@@ -160,7 +158,6 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
160
158
  **Gemini**
161
159
 
162
160
  - Approval: Hold the host pending live host measurement (GG2). The registry lists `gemini` and `gemini-cli`, but `compositeHost` is off.
163
- - Detached survival of the verify runner is unverified on a Gemini host; use `detach: false`.
164
161
  - Target home probe: See the shared probe rule below. The capability hold applies before the probe.
165
162
  - Desktop: No Desktop value.
166
163
 
@@ -169,7 +166,6 @@ Read roles are Scouter, Planner and Reviewer. The table shows which routes the r
169
166
  GK2 is `approval`.
170
167
 
171
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.
172
- - On a Grok host ask the user for approval the same way each time a `verify-*` command runs. Detached survival of the verify runner is unverified; use `detach: false`.
173
169
  - Target home probe: See the shared probe rule below.
174
170
  - Desktop: No Desktop value.
175
171
 
@@ -92,7 +92,7 @@ After initial document batching, follow [planning](planning.md#plan-updates-duri
92
92
  <a id="verification-brief-inputs"></a>
93
93
  ### Verification brief inputs
94
94
 
95
- Implementer and QA briefs that assign checks MUST include the baseline record reference (revision, commands, environment and failures by test name, with baseline-incomplete files marked), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison). While a background baseline run is still active, the brief MAY cite its `runId` and recording conditions instead of the completed record; the executor's comparison waits for its completion.
95
+ Implementer and QA briefs that assign checks MUST include the approved base revision, the base worktree path and its prerequisite state when one already exists (prepared, or not prepared with the needed commands), the related-test list with reasons and the intermittent-failure isolated rerun limit under [verification](verification.md#test-scope-and-result-comparison). Final verification QA briefs also include the re-changed-file list and the provisional full-regression trigger judgment with reasons, including integration history.
96
96
 
97
97
  <a id="recovery-prerequisite"></a>
98
98
  ### Recovery prerequisite
@@ -19,18 +19,13 @@ Policy, generated-file and manifest checks prove structure, not role behavior, i
19
19
 
20
20
  **Task checks and rechecks** run only tests related to the change: test files that directly exercise a changed module, contract tests that the change requires updating, and the matching check scripts. The brief lists the minimum set; executors MAY add only items in these three categories, each with a reason. Other additions need Orchestrator authorization. Report every selected item and why. This rule takes precedence over the upstream TDD per-task project-suite instruction; upstream text is unchanged. Report every failure observed in any run by name.
21
21
 
22
- **Final verification** runs once after all tasks are accepted: the union of all tasks' related tests, plus all contract tests and all check scripts. Orchestrator runs it directly, not through QA, as a background process where the host supports one, and continues independent work such as assigning the final Reviewer meanwhile. Run it in a clean detached worktree of the verified HEAD commit, prepared with the same prerequisites as the baseline, for example through the runtime [final verification commands](#final-verification-runtime-commands); uncommitted changes MAY be captured as a snapshot commit without changing refs, the index or working files, reporting included and excluded paths. Orchestrator then performs the result comparison below and records the verdict. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
22
+ **Final verification** runs once after all tasks are accepted and committed, as one fresh QA assignment at the verified HEAD of the execution target worktree: all contract tests, all check scripts and the related tests of re-changed files; it does not rerun the union of tests that task QA already passed. A re-changed file is a file that a task's QA verified, as a changed file or a related test file it ran, and that a later commit changed after that task's focused commit (`git diff --name-only <task commit> HEAD`), plus every non-documentation file changed in base..HEAD by a commit that no task QA verified. Orchestrator computes the list and cites it in the brief; QA cross-checks it with read-only `git diff`, MAY add items only within the three categories above with reasons, and reports the reason when the list is empty. QA records `git status --porcelain` at start and end; a state that is not clean is an environment block that holds final verification. While it runs, neither Orchestrator nor any Implementer writes in that workspace; the read-only final Reviewer MAY run concurrently. A new failure from final verification follows Implementer → QA even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
23
23
 
24
- **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan; Orchestrator decides from the actual final diff and history. If no trigger applies, omit it and report the reason; if applicability cannot be determined, run it. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings. Full regression uses the same clean worktree and prerequisites as the baseline.
24
+ **Full regression** runs once within final verification only if at least one trigger applies: (1) the change modifies a shared module; (2) changes made by others were integrated after the approved base, by merge, rebase onto a newer base or cherry-pick; (3) the change modifies dependency manifests or lockfiles, language or runtime versions, or build or test configuration; (4) the change removes, renames or changes the signature of a public interface such as an exported function, CLI option or configuration key. A shared module is code, configuration, schema, data or generator input that more than one task, role, component or execution or delivery path imports, loads or renders at run time, including its mirrors and generated outputs; documentation read only by people and modules used by a single component are not shared. Decide from actual consumers; when they cannot be determined, treat the module as shared. Planner records a provisional judgment in the plan. Orchestrator cites its provisional judgment and reasons, including the integration history for trigger (2), in the final QA brief, and QA independently checks triggers (1), (3) and (4) from the base..HEAD diff and log. If either finds a trigger applies or cannot determine applicability, QA runs it once without further authorization; if no trigger applies, omit it and report the reason. Change size, risk level alone and out-of-scope failures seen during task checks are not triggers; report such failures as findings. Full regression failures follow the base check below.
25
25
 
26
- **Baseline:** Before dependent work, Orchestrator records a baseline at the approved base revision after the prerequisites the checks require (for example build outputs and environment settings): commands, environment, revision and failures by test name, covering every command final verification may run, including the full suite when the provisional trigger judgment is run or undetermined. A file-level load or collection failure without test names marks that file baseline-incomplete; re-record with prerequisites or treat current failures in that file as new candidates. NEVER absorb them as baseline failures. Orchestrator MAY record the baseline in the background in a separate clean worktree immediately after base approval while continuing independent work, but MUST complete it before the result comparison. Record its load (quiet, contended or unknown), and by default DO NOT run baseline and HEAD verification concurrently. Reuse a cached baseline only when every cache key input matches and the cached run was quiet and complete; a missing, unreadable or differing input requires a fresh record, and a contended or unknown baseline serves only the current comparison.
26
+ **Baseline:** No baseline run is recorded in advance, and no base worktree is prepared in advance. QA classifies each failure in two steps. First, a static check against the approved base: task QA, which verifies uncommitted work, uses read-only `git diff --name-only <approved base>` plus the untracked files from `git status --porcelain`; final verification QA uses `git diff --name-only <approved base> HEAD`. QA checks whether the test file, the modules it directly imports or loads, the fixtures or data it reads, or its test configuration changed. If none changed, it is an unrelated failure: report it separately with that evidence; it is not a finding, and Orchestrator dispositions it. Because it rests on the diff, not a run, NEVER report it as a baseline failure. If any changed, or the check cannot decide (for example a dynamic import, a failure without a test name, or a file-level load failure), report the failure as needing a base run, with the changed paths. Second, only for those failures, Orchestrator prepares a clean detached worktree of the approved base revision at `<git-common-dir>/arc/base/<workflow>`, never under a managed worktree directory (such as `.claude/worktrees/`) or inside the execution target worktree, reuses it for that workflow, runs no tests there, and sends its path and prerequisite state (prepared, or not prepared with the needed commands) to the current QA. After all final dispositions Orchestrator removes it only if it is still clean; this ARC-owned base worktree is the only exception to the Preservation rule's worktree-deletion ban, and any other state holds removal for the user. QA runs only those test names alone in the base worktree, for example with Node `--test-name-pattern` or a Python node id. A failure under the same name at base is a baseline failure; a pass at base, or a test or file absent at base, makes it a new failure; a base run that was not performed, was blocked by the environment, failed to load or lacks the name makes it a new-failure candidate. NEVER absorb a candidate as a baseline failure. Check a file-level load or collection failure by loading the same file at base; an identical load failure at base stays a new-failure candidate (same at base) for Orchestrator disposition. If base needs prerequisites or the sandbox prevents running there, QA installs or generates nothing and reports an environment block; Orchestrator then prepares the prerequisites or assigns a separate QA whose workspace is the base worktree. If both are blocked, those failures stay new-failure candidates for Orchestrator disposition. Static checks and base reruns classify failures; they are not intermittency diagnosis.
27
27
 
28
- **Result comparison:** Compare failures with the baseline by test name; only new failures are findings. Report baseline failures separately. Identify tests by name from structured results such as JUnit XML, TAP or a declared line pattern; a failure without a test name, or in a command or file whose results are incomplete, is a new-failure candidate, never a baseline failure. Report intermittent candidates, tests whose outcomes differ across runs with the same inputs, separately from baseline and new failures. Report the slowest files and tests (default ten) for information only. If a failure looks intermittent, rerun only that test in isolation, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding.
29
-
30
- <a id="final-verification-runtime-commands"></a>
31
- ## Final verification runtime commands
32
-
33
- Orchestrator MAY run `node <skill>/runtime/verify-cli.mjs <command> --cwd <workspace> --workflow <id> --input -` with `verify-start`, `verify-status`, `verify-compare`, `verify-rerun` or `verify-cleanup`. The commands reject bridge children, never retry, restart or delete automatically, create worktrees only under the system temporary directory and store records under `<git-common-dir>/arc/verify`. Commands receive only a fixed environment allowlist plus declared `envNames` and command `env`, all of which enter the cache key; declare any other variable a check needs. Use `detach: true` only on a host whose detached-process survival is verified in [coordination](coordination.md); otherwise run with `detach: false`, through the host's own background facility where available. `verify-rerun` runs one isolated attempt per call within the rerun limit, and `verify-cleanup` removes only worktrees the tool created and recorded, on explicit request.
28
+ **Result comparison:** Compare failures by test name; only new failures are findings, and unrelated failures and new-failure candidates need Orchestrator disposition. Report baseline and unrelated failures separately. Identify tests by name from structured results such as JUnit XML, TAP or a declared line pattern; a failure without a test name, or in a command or file whose results are incomplete, is a new-failure candidate, never a baseline failure. Report intermittent candidates, tests whose outcomes differ across runs with the same inputs, separately from baseline and new failures. Report the slowest files and tests (default ten) for information only. If a failure looks intermittent, rerun only that test in isolation at HEAD, up to three times unless the brief sets another limit. This is diagnosis, not an automatic retry. Report "passes in isolation: yes/no" and the rerun count. A pass in isolation never erases the original failure; Orchestrator dispositions it. A failure in isolation is a new-failure finding. For each failure report the test name and file, HEAD command and result, static-check result (changed related paths, or none), base revision, command and result (pass, fail, absent, load-fail or not-run) when a base run was needed, verdict, isolated rerun count and outcome, and environment limits.
34
29
 
35
30
  <a id="risk-scaled-execution"></a>
36
31
  ## Risk-scaled execution
@@ -13,7 +13,6 @@ export const RUNTIME_MODULE_PATHS = Object.freeze([
13
13
  'lib/runtime/cooperative.mjs',
14
14
  'lib/runtime/evaluate.mjs',
15
15
  'lib/runtime/external.mjs',
16
- 'lib/runtime/final-verify.mjs',
17
16
  'lib/runtime/gate.mjs',
18
17
  'lib/runtime/gemini-stream.mjs',
19
18
  'lib/runtime/git-evidence.mjs',
@@ -22,7 +21,6 @@ export const RUNTIME_MODULE_PATHS = Object.freeze([
22
21
  'lib/runtime/grok-stream.mjs',
23
22
  'lib/runtime/identity.mjs',
24
23
  'lib/runtime/local-cli.mjs',
25
- 'lib/runtime/node-test-reporter.mjs',
26
24
  'lib/runtime/operations.mjs',
27
25
  'lib/runtime/platform-registry.mjs',
28
26
  'lib/runtime/role-bridge-args.mjs',
@@ -37,7 +35,5 @@ export const RUNTIME_MODULE_PATHS = Object.freeze([
37
35
  'lib/runtime/scope.mjs',
38
36
  'lib/runtime/store.mjs',
39
37
  'lib/runtime/target-preparation.mjs',
40
- 'lib/runtime/test-results.mjs',
41
- 'lib/runtime/verification.mjs',
42
- 'lib/runtime/verify-cli.mjs'
38
+ 'lib/runtime/verification.mjs'
43
39
  ]);
@@ -1,11 +1,13 @@
1
1
  import {installerRegistryOf} from '../platforms/index.mjs';
2
2
  import {standaloneProfileFile} from '../runtime/platform-registry.mjs';
3
+ import {unknownPlatformMessage} from '../runtime/local-cli.mjs';
3
4
  import path from 'node:path';import crypto from 'node:crypto';
4
5
  import {TargetConfigurationError} from './target-errors.mjs';
5
6
  export {TargetConfigurationError} from './target-errors.mjs';
6
7
  const fail=message=>{throw new TargetConfigurationError(message);};
7
8
  export function resolveTarget(platform,{userHome,env={},cwd,platforms}={}){
8
- const descriptor=installerRegistryOf({platforms}).getPlatform(platform);if(!descriptor)fail('Target must be codex or claude');
9
+ const registry=installerRegistryOf({platforms}),descriptor=registry.getPlatform(platform);
10
+ if(!descriptor)fail(unknownPlatformMessage(platform,registry.byDisplayOrder().map(({runtime})=>runtime.id)));
9
11
  let home;try{home=descriptor.runtime.home.resolve({userHome,env,cwd});}catch(error){fail(error.message);}
10
12
  const profileNames=['scouter','planner','implementer','qa','reviewer'].map(role=>standaloneProfileFile(descriptor.runtime,`arc_${role}`));
11
13
  return Object.freeze({platform,home,userHome:path.resolve(userHome),payloadPrefix:descriptor.payloadPrefix,profileNames:Object.freeze(profileNames),instructionPath:path.join(home,descriptor.instructionFile),runtimeConfigPath:path.join(home,descriptor.runtimeConfigFile),globalPaths:Object.freeze(descriptor.globalPaths.map(name=>path.join(home,name)))});
@@ -2,7 +2,7 @@ import {readInstallMode,assertVerifiedInstallMode} from '../installer/install-mo
2
2
  import os from 'node:os';
3
3
  import {fileURLToPath} from 'node:url';
4
4
  import {resolveTarget,resolveTargets} from '../installer/targets.mjs';
5
- import {defaultCompositePlatformIds,installerRegistryOf,sortByAnchor,sortByDisplay,platformLabel} from '../platforms/index.mjs';
5
+ import {defaultCompositePlatformIds,installerRegistryOf,sortByAnchor,platformLabel} from '../platforms/index.mjs';
6
6
  import {platformAvailability} from '../platforms/availability.mjs';
7
7
  import {buildInstallPlan,renderStandaloneProfiles,validatePlanSet} from '../installer/plan.mjs';
8
8
  import {verifyPayload} from '../installer/manifest.mjs';
@@ -90,7 +90,7 @@ export async function prepareCompositeOperation(context,options){
90
90
  const statuses=await collectStatus(context);
91
91
  const warnings=await assertCompositeAvailability(context,config,statuses);
92
92
  for(let i=0;i<platforms.length;i++)for(let j=0;j<i;j++){const a=targets[platforms[i]].home,b=targets[platforms[j]].home;if(a===b||a.startsWith(b+path.sep)||b.startsWith(a+path.sep))throw new TargetConfigurationError('Selected platform homes overlap');}
93
- if(options.kind==='preset'&&statuses.some(status=>platforms.includes(status.platform)&&status.state!=='installed'))throw new TargetConfigurationError('Both ARC installations are required to change composite settings');
93
+ if(options.kind==='preset'&&statuses.some(status=>platforms.includes(status.platform)&&status.state!=='installed'))throw new TargetConfigurationError('All participating ARC installations are required to change composite settings');
94
94
  const plans=[],profileInputs={},modelConfigs={},sourceSnapshot=new Map(),externalPaths=[];
95
95
  if(options.kind==='install'){
96
96
  const payload=verifyPayload(context);
@@ -141,12 +141,12 @@ export async function executeCompositeOperation(context,prepared){
141
141
  if(prepared.operation==='install'){result=await installTargets(prepared.plans,{safeFs:context.safeFs,signal:context.signal,hooks:context.hooks,platforms:installerRegistryOf(context)});if(result.interrupted||result.results.some(item=>item.status!=='installed'||item.error)){installationHeld={...operationResult(result),activation:'held',support:held};throw new TargetConfigurationError('Participating installations are incomplete');}}
142
142
  if(prepared.operation==='install')for(const plan of prepared.plans)for(const name of plan.profileWrites.keys()){const filename=path.join(plan.target.home,'agents',name);inspectPath(context.safeFs,filename,{kind:'file',read:true,snapshot:prepared.files.snapshot});if(!prepared.files.standaloneRemovals.includes(filename)){prepared.files.standaloneRemovals.push(filename);prepared.files.managedPaths.push(filename);}}
143
143
  if(context.signal?.aborted){installationHeld={...operationResult({...result,interrupted:true}),activation:'held',support:held};throw new TargetConfigurationError('Install interrupted');}
144
- const statuses=await collectStatus(context,{codexCheck:'local'});await assertCompositeAvailability(context,prepared.config,statuses);if(prepared.operation!=='install'&&statuses.some(status=>prepared.config.platforms.includes(status.platform)&&status.state!=='installed'))throw new TargetConfigurationError('Both ARC installations must be complete before publication');
144
+ const statuses=await collectStatus(context,{codexCheck:'local'});await assertCompositeAvailability(context,prepared.config,statuses);if(prepared.operation!=='install'&&statuses.some(status=>prepared.config.platforms.includes(status.platform)&&status.state!=='installed'))throw new TargetConfigurationError('All participating ARC installations must be complete before publication');
145
145
  };
146
146
  if(!moving)await ready();
147
147
  const publication=await publishCompositeFiles({context,prepared:prepared.files,...(moving?{beforePublish:ready}:{})});
148
148
  const history=moving?[`Dispatch history stays in ${prepared.files.targets[prepared.files.previous.anchor].home}/arc-role-dispatch.`]:[];
149
- return {...operationResult(result),code:publication.cleanupError?1:0,activation:'published',publication,support:held,...(publication.cleanupError?{error:publication.cleanupError}:{}),messages:[`Mixed routing on: ${sortByDisplay(prepared.config.platforms,installerRegistryOf(context)).map(id=>platformLabel(id,installerRegistryOf(context))).join(' + ')}.`,'After upgrading ARC, run Configure again.',...history,...(publication.residualPaths??[]).map(value=>'Residual path: '+value)]};
149
+ return {...operationResult(result),code:publication.cleanupError?1:0,activation:'published',publication,support:held,...(publication.cleanupError?{error:publication.cleanupError}:{}),messages:[...history,...(publication.residualPaths??[]).map(value=>'Residual path: '+value)]};
150
150
  }catch(error){if(installationHeld&&!error.lockReleaseFailed)return installationHeld;return {code:context.signal?.aborted?130:1,exitSession:false,interrupted:Boolean(context.signal?.aborted),results:result.results,activation:error.activation??'held',support:held,error,messages:[...(Array.isArray(error.activeDispatches)?[`${prepared.files.previous&&prepared.files.previous.anchor!==prepared.files.anchor?'Active dispatches':'Active bridge dispatches'}: ${error.activeDispatches.join(', ')}`]:[]),...(error.activation==='unknown'?['Configuration publication state is unknown; inspect the reported paths before retrying.']:[]),...(error.residualPaths??[]).map(value=>'Residual path: '+value)]};}
151
151
  }
152
152
  export function operationResult(result,successStatuses=['installed']){return{...result,code:result.interrupted?130:result.results.every(item=>successStatuses.includes(item.status)&&!item.error)?0:1,exitSession:false};}