@yunhozz/arc 0.4.7 → 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 (51) hide show
  1. package/MANIFEST.sha256 +47 -45
  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 +9 -9
  6. package/claude/skill/references/handoff-prep.md +1 -1
  7. package/claude/skill/references/verification.md +4 -4
  8. package/codex/skill/SKILL.md +1 -1
  9. package/codex/skill/models.toml +9 -9
  10. package/codex/skill/references/handoff-prep.md +1 -1
  11. package/codex/skill/references/verification.md +4 -4
  12. package/gemini/agents/arc-implementer.md +2 -2
  13. package/gemini/agents/arc-planner.md +1 -1
  14. package/gemini/agents/arc-qa.md +1 -1
  15. package/gemini/agents/arc-reviewer.md +1 -1
  16. package/gemini/agents/arc-scouter.md +1 -1
  17. package/gemini/skill/SKILL.md +1 -1
  18. package/gemini/skill/models.toml +6 -6
  19. package/gemini/skill/references/handoff-prep.md +1 -1
  20. package/gemini/skill/references/verification.md +4 -4
  21. package/grok/agents/arc-implementer.md +1 -1
  22. package/grok/skill/SKILL.md +1 -1
  23. package/grok/skill/references/handoff-prep.md +1 -1
  24. package/grok/skill/references/verification.md +4 -4
  25. package/lib/cli/postinstall.mjs +1 -1
  26. package/lib/installer/targets.mjs +3 -1
  27. package/lib/management/operations.mjs +4 -4
  28. package/lib/models/catalog-gemini.mjs +4 -1
  29. package/lib/models/gemini-models.json +4 -0
  30. package/lib/prompts/agent-fragments.json +3 -3
  31. package/lib/runtime/local-cli.mjs +9 -2
  32. package/lib/runtime/platform-registry.mjs +1 -1
  33. package/lib/runtime/role-dispatch-policy.mjs +5 -2
  34. package/lib/tui/app.mjs +36 -9
  35. package/lib/tui/interface.mjs +2 -2
  36. package/lib/tui/render.mjs +5 -3
  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/menu.mjs +26 -15
  43. package/lib/watch/model.mjs +1 -0
  44. package/lib/watch/render.mjs +3 -2
  45. package/lib/watch/scope.mjs +125 -0
  46. package/lib/watch/watcher.mjs +149 -82
  47. package/lib/watch/worktree-menu.mjs +64 -0
  48. package/package.json +1 -1
  49. package/shared/skill/runtime/local-cli.mjs +9 -2
  50. package/shared/skill/runtime/platform-registry.mjs +1 -1
  51. package/shared/skill/runtime/role-dispatch-policy.mjs +5 -2
@@ -17,13 +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. 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.
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.
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. 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.
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.
27
27
 
28
28
  <a id="risk-scaled-execution"></a>
29
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-2.5-flash
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-2.5-flash
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-2.5-flash
4
+ model: gemini-4-neon
5
5
  ---
6
6
 
7
7
  # QA
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: arc-reviewer
3
3
  description: Independently review correctness security and policy consistency
4
- model: gemini-2.5-flash
4
+ model: gemini-4-neon
5
5
  ---
6
6
 
7
7
  # Reviewer
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: arc-scouter
3
3
  description: Research evidence and inspect assigned static source
4
- model: gemini-2.5-flash
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,23 +1,23 @@
1
1
  # Canonical source for every role model and effort.
2
- # Defaults come from the live-verified catalog (L2 evidence).
2
+ # Defaults use one packaged model for every role.
3
3
  version = 3
4
4
 
5
5
  [roles.arc_scouter]
6
- model = "gemini-2.5-flash"
6
+ model = "gemini-4-neon"
7
7
  effort = "default"
8
8
 
9
9
  [roles.arc_planner]
10
- model = "gemini-2.5-flash"
10
+ model = "gemini-4-neon"
11
11
  effort = "default"
12
12
 
13
13
  [roles.arc_implementer]
14
- model = "gemini-2.5-flash"
14
+ model = "gemini-4-neon"
15
15
  effort = "default"
16
16
 
17
17
  [roles.arc_qa]
18
- model = "gemini-2.5-flash"
18
+ model = "gemini-4-neon"
19
19
  effort = "default"
20
20
 
21
21
  [roles.arc_reviewer]
22
- model = "gemini-2.5-flash"
22
+ model = "gemini-4-neon"
23
23
  effort = "default"
@@ -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).
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,13 +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. 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.
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.
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. 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.
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.
29
29
 
30
30
  <a id="risk-scaled-execution"></a>
31
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.
@@ -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).
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,13 +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. 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.
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.
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. 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.
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.
29
29
 
30
30
  <a id="risk-scaled-execution"></a>
31
31
  ## Risk-scaled execution
@@ -1,4 +1,4 @@
1
1
  export async function runPostinstall({output=process.stdout}={}){
2
- output.write('Run arc to install or manage the ARC harness.\n');
2
+ output.write('🎉 ARC installed successfully! Run arc to set up the harness.\n');
3
3
  return 0;
4
4
  }
@@ -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};}
@@ -2,7 +2,10 @@ export const GEMINI_MODELS_API = 'https://generativelanguage.googleapis.com/v1be
2
2
  const unavailable = (code, message) => ({status: 'unavailable', code, message});
3
3
 
4
4
  export function selectGeminiCatalogModels(ids) {
5
- return [...new Set(ids.filter(id => typeof id === 'string' && id === id.trim() && /^gemini-(\d+(?:\.\d+)?)-(pro|flash|flash-lite)$/.test(id)))];
5
+ return [...new Set(ids.filter(id => typeof id === 'string' && id === id.trim() && (
6
+ /^gemini-(\d+(?:\.\d+)?)-(pro|flash|flash-lite)$/.test(id)
7
+ || /^gemini-(\d+)-(neon|hydrogen|carbon|argon)$/.test(id)
8
+ )))];
6
9
  }
7
10
 
8
11
  export async function discoverGeminiCatalog({apiKey, fetchImpl = globalThis.fetch, signal} = {}) {
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "platform": "gemini",
3
3
  "pairs": [
4
+ {"model": "gemini-4-neon", "effort": "default"},
5
+ {"model": "gemini-4-hydrogen", "effort": "default"},
6
+ {"model": "gemini-4-carbon", "effort": "default"},
7
+ {"model": "gemini-4-argon", "effort": "default"},
4
8
  {"model": "gemini-3.8-flash", "effort": "default"},
5
9
  {"model": "gemini-3.7-flash", "effort": "default"},
6
10
  {"model": "gemini-3.6-flash", "effort": "default"},
@@ -51,7 +51,7 @@
51
51
  },
52
52
  {
53
53
  "id": "planner.task-shape",
54
- "text": "Return one complete plan draft covering all top-level tasks and dependencies; DO NOT split it into a Planner call per implementation task. For each top-level task, include ID/title, implementation goal/scope/files, predecessors/dependencies and criteria. For that task, also include required QA/focused checks/evidence before acceptance and holds. List each task's related tests with reasons. In final verification list the union, all contract tests and check scripts, and a provisional full-regression trigger judgment with reason. Put inseparable changes in one task from the outset. DO NOT merge distinct approved tasks during execution. Substeps/checkboxes track progress, not commit units."
54
+ "text": "Return one complete plan draft covering all top-level tasks and dependencies; DO NOT split it into a Planner call per implementation task. For each top-level task, include ID/title, implementation goal/scope/files, predecessors/dependencies and criteria. For that task, also include required QA/focused checks/evidence before acceptance and holds. List each task's related tests with reasons. In final verification list all contract tests and check scripts, expected cross-task file overlap that may need recheck, and a provisional full-regression trigger judgment with reason. Put inseparable changes in one task from the outset. DO NOT merge distinct approved tasks during execution. Substeps/checkboxes track progress, not commit units."
55
55
  },
56
56
  {
57
57
  "id": "planner.commit-boundary",
@@ -79,7 +79,7 @@
79
79
  },
80
80
  {
81
81
  "id": "qa.verification-steps",
82
- "text": "1. Use the shared brief, criteria, Implementer summary and relevant prior findings. Independently verify assigned behavior with related tests only: test files directly exercising changed modules, contract tests the change requires updating and matching check scripts; additions within these categories with reasons are authorized; report each selection and reason. Final verification is run by Orchestrator, not QA. Use approved structural/consistency checks for policy/configuration.\n2. Run authorized tests and inspect output, but DO NOT edit source, documents, tests or configuration. DO NOT repair failures or broaden verification without authorization.\n3. Report every brief criterion by ID or original wording. Record method/scope, run status, accessible evidence, criterion verdict, unverified reason and remaining scope.\n4. Run status is passed, failed, not run or environment blocked. Verdict is proven, unmet or unverified. Passing alone proves no criterion; connect conditions/expected results to observations. Keep partial checks, out-of-scope criteria, missing checks and environment blocks unverified. Omit no criterion. PASS means run status only.\n5. Structural checks prove structural criteria only, not behavior, installation or live agent compliance. After a fix, rerun reproduction and invalidated checks; report the prior finding resolved, unresolved or unverified with evidence. Compare failures with the brief's baseline by test name; only new failures are findings. Rerun a suspected intermittent test alone, up to the brief's limit (default three), as diagnosis rather than retry; report passes-in-isolation and rerun count.\n6. Only with assigned UI criteria and a brief citation to installed ARC `references/verification.md`'s `UI browser acceptance checks`, read/follow that section before launching apps or using browser tools. Otherwise DO NOT launch apps/browsers for UI acceptance. Report missing citations/prerequisites and leave criteria unverified.\n7. Report exact commands, results, evidence, unresolved issues and limits. Separate failures from environment problems. Run approved checks and report only; DO NOT edit, repair, plan or decide acceptance."
82
+ "text": "1. Use the shared brief, criteria, Implementer summary and relevant prior findings. Independently verify assigned behavior with related tests only: test files directly exercising changed modules, contract tests the change requires updating and matching check scripts; additions within these categories with reasons are authorized; report each selection and reason. When assigned final verification, run all contract tests, all check scripts and the brief's re-changed-file tests at the verified HEAD, plus full regression once when the brief's provisional judgment or your own check of triggers (1), (3) and (4) finds one applies or cannot decide. Use approved structural/consistency checks for policy/configuration.\n2. Run authorized tests and inspect output, but DO NOT edit source, documents, tests or configuration. DO NOT repair failures or broaden verification without authorization.\n3. Report every brief criterion by ID or original wording. Record method/scope, run status, accessible evidence, criterion verdict, unverified reason and remaining scope.\n4. Run status is passed, failed, not run or environment blocked. Verdict is proven, unmet or unverified. Passing alone proves no criterion; connect conditions/expected results to observations. Keep partial checks, out-of-scope criteria, missing checks and environment blocks unverified. Omit no criterion. PASS means run status only.\n5. Structural checks prove structural criteria only, not behavior, installation or live agent compliance. After a fix, rerun reproduction and invalidated checks; report the prior finding resolved, unresolved or unverified with evidence. Classify each HEAD failure first by read-only diff against the approved base (unrelated when its test, direct imports, fixtures and test configuration are unchanged), and report the rest as needing a base run; when Orchestrator supplies a base worktree, rerun only those by test name and classify them as baseline, new or new-failure candidate. Only new failures are findings; unrelated failures and candidates need Orchestrator disposition. Rerun a suspected intermittent test alone, up to the brief's limit (default three), as diagnosis rather than retry; report passes-in-isolation and rerun count.\n6. Only with assigned UI criteria and a brief citation to installed ARC `references/verification.md`'s `UI browser acceptance checks`, read/follow that section before launching apps or using browser tools. Otherwise DO NOT launch apps/browsers for UI acceptance. Report missing citations/prerequisites and leave criteria unverified.\n7. Report exact commands, results, evidence, unresolved issues and limits. Separate failures from environment problems. Run approved checks and report only; DO NOT edit, repair, plan or decide acceptance."
83
83
  },
84
84
  {
85
85
  "id": "reviewer.contract-intro",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  {
89
89
  "id": "reviewer.review-steps",
90
- "text": "- Use goal, criteria, assigned diff/source scope and relevant QA evidence. Independently review only that scope for substantive correctness, factual accuracy and security.\n- Return actionable findings, relevant questions, next actions and workspace/path issues with file/page/source references. State when no substantive findings exist.\n- For acceptance-linked behavior findings, report criterion, expected behavior, observed problem, source, reproduction conditions/steps and evidence. Separate source inference from execution observation. DO NOT run QA tests to obtain observations.\n- Outside the final plan Reviewer exception, Orchestrator routes corrections to Implementer and post-fix QA. Continue reviewing structure/design/factual/security issues execution cannot settle.\n- For significant/high-risk work, review the final full change after required QA/focused checks and QA rechecks. QA owns task functional/test verification; Orchestrator runs final verification and owns overall completion and acceptance.\n- DO NOT run QA, plan or decide acceptance. "
90
+ "text": "- Use goal, criteria, assigned diff/source scope and relevant QA evidence. Independently review only that scope for substantive correctness, factual accuracy and security.\n- Return actionable findings, relevant questions, next actions and workspace/path issues with file/page/source references. State when no substantive findings exist.\n- For acceptance-linked behavior findings, report criterion, expected behavior, observed problem, source, reproduction conditions/steps and evidence. Separate source inference from execution observation. DO NOT run QA tests to obtain observations.\n- Outside the final plan Reviewer exception, Orchestrator routes corrections to Implementer and post-fix QA. Continue reviewing structure/design/factual/security issues execution cannot settle.\n- For significant/high-risk work, review the final full change after required QA/focused checks and QA rechecks. QA owns task and final functional/test verification; Orchestrator owns overall completion and acceptance.\n- DO NOT run QA, plan or decide acceptance. "
91
91
  },
92
92
  {
93
93
  "id": "reviewer.final-plan-findings",
@@ -6,9 +6,16 @@ import {runtimeRegistryOf} from './platform-registry.mjs';
6
6
 
7
7
  const environments = new WeakMap();
8
8
  const authKinds = new WeakMap();
9
+ export function unknownPlatformMessage(platform, knownIds) {
10
+ const id = typeof platform === 'string'
11
+ ? [...platform.replace(/[\p{Cc}\u2028\u2029]/gu, '')].slice(0, 256).join('')
12
+ : '(invalid)';
13
+ return `Unknown platform: ${id}. Known platforms: ${knownIds.join(', ')}`;
14
+ }
9
15
  export function resolveConfigHome(platform, context = {}) {
10
- const descriptor = runtimeRegistryOf(context).getPlatform(platform);
11
- if (!descriptor) throw Error('Target must be codex or claude');
16
+ const registry = runtimeRegistryOf(context);
17
+ const descriptor = registry.getPlatform(platform);
18
+ if (!descriptor) throw Error(unknownPlatformMessage(platform, registry.byDisplayOrder().map(({id}) => id)));
12
19
  return descriptor.home.resolve(context);
13
20
  }
14
21
  export function resolveLocalCli(platform, { cwd, userHome, env = process.env, runtimePlatforms } = {}) {
@@ -109,7 +109,7 @@ export const DEFAULT_PLATFORM_REGISTRY = createPlatformRegistry([
109
109
  {
110
110
  id: 'gemini', label: 'Gemini', displayOrder: 2, anchorOrder: 2,
111
111
  home: {env: 'GEMINI_CLI_HOME', resolve: context => resolveHome('gemini', context)},
112
- cli: {command: 'gemini', supportedVersions: '>=0.68.0 <0.69.0'},
112
+ cli: {command: 'gemini', supportedVersions: null},
113
113
  auth: {kind: 'none'},
114
114
  models: {effortField: 'effort'},
115
115
  profile: {
@@ -1,4 +1,4 @@
1
- import {runtimeRegistryOf} from './platform-registry.mjs';
1
+ import {byDisplayOrder, runtimeRegistryOf} from './platform-registry.mjs';
2
2
  // Fixed policy values for composite role dispatch. G2 'escalation' means the bridge runs only with per-call user escalation approval on a Codex host; it is not a verified pass.
3
3
  // GK2/GG2 'approval' means a Grok/Gemini host keeps its platform-default sandbox (off), runs in ask mode, and obtains user approval for each runtime command; it is not a verified pass.
4
4
  // GK2 evidence: Grok 1.0.89, 2026-11-19, ask mode with the sandbox off.
@@ -65,6 +65,9 @@ export const DEFAULT_POLICY = Object.freeze({
65
65
  probeTimeoutMs: PROBE_TIMEOUT_MS
66
66
  });
67
67
 
68
+ const cliEnvironments = byDisplayOrder().flatMap(({executionEnvironments}) => executionEnvironments)
69
+ .filter(environment => environment.endsWith('-cli')).join(' or ');
70
+
68
71
  export const RELEASE_CONDITIONS = Object.freeze({
69
72
  activation_unverified: 'Verify the active configuration, all prepared markers, installed bytes, host limits and the shared lock, and inspect the lease records in <anchor home>/arc-role-dispatch for unreadable or corrupted files.',
70
73
  resume_unverified: 'Update ARC after verifying platform session resume against the recorded session UUID.',
@@ -72,7 +75,7 @@ export const RELEASE_CONDITIONS = Object.freeze({
72
75
  'Not Available': 'Install the target platform CLI so that it is found on PATH.',
73
76
  Unauthorized: 'Authenticate the target platform CLI.',
74
77
  Incomplete: 'Make the target platform CLI authentication status check complete successfully.',
75
- environment_unverified: 'Desktop hosts are held in this release. If this session is not running inside a Desktop app (for example a terminal or IDE terminal session), declare codex-cli or claude-cli instead; otherwise use a CLI host or a later ARC update that changes the support status.',
78
+ environment_unverified: `Desktop hosts are held in this release. If this session is not running inside a Desktop app (for example a terminal or IDE terminal session), declare a CLI environment (${cliEnvironments}) instead; otherwise use a CLI host or a later ARC update that changes the support status.`,
76
79
  host_sandbox_blocked: 'Allow the host to write the anchor home and keep a detached supervisor alive, with explicit user approval.',
77
80
  capacity_exhausted: 'Finish or release active bridge executions, or raise the host limits.',
78
81
  permission_scope_unverified: 'Update ARC and verify enforcement of the role permissions and approved scope before starting.',
package/lib/tui/app.mjs CHANGED
@@ -8,15 +8,41 @@ import {collectStatus} from '../management/status.mjs';
8
8
  import {runInstallFlow,loadRoleDefaults,roleDisplayName} from './setup.mjs';
9
9
  import {loadStaticModelCatalog} from '../models/static-catalog.mjs';
10
10
  import {statusInfo,statusVersion} from './mode.mjs';
11
- import {installerRegistryOf,platformLabel} from '../platforms/index.mjs';
11
+ import {installerRegistryOf,platformLabel,sortByDisplay} from '../platforms/index.mjs';
12
12
  const packageVersion=JSON.parse(readFileSync(new URL('../../package.json',import.meta.url),'utf8')).version;
13
13
  const home=[{id:'install',label:'Configure'},{id:'status',label:'Status'},{id:'uninstall',label:'Uninstall'},{id:'exit',label:'Exit'}];
14
- export function resultRows(result,registry=installerRegistryOf(),{version}={}){
14
+ export function resultRows(result,registry=installerRegistryOf(),{version,kind,latestVersion,previousStates}={}){
15
15
  version=result.version??version;
16
16
  const clean=text=>text.replace(/; rollback: [^\r\n]*/g,''),label=platform=>platformLabel(platform,registry),errorLine=error=>clean(error.message.split(/[\r\n]/)[0]);
17
- const residualRows=new Set();
18
- const removed=result.code===0&&['removed','absent'].includes(result.cli?.status);
19
- return[...(result.messages??[]).map(s=>clean(s.trim())),...[result.stdout,result.stderr].flatMap(text=>text?text.trimEnd().split(/\r?\n/).map(clean):[]),...(result.results??[]).flatMap(item=>{const platform=item.platform??item.target?.platform??'Target';return[...(removed&&item.status==='uninstalled'?[]:[item.status==='installed'?`ARC${version==null?'':' '+version} installed for ${label(platform)}.`:item.status==='uninstalled'?`Removed from ${label(platform)}.`:`${platform}: ${item.status}`]),...(item.residualPaths??[]).map(p=>'Residual path: '+p),...(item.error?['Error: '+errorLine(item.error)]:[])];}),...(removed?[result.cli.status==='removed'?'Removed ARC and CLI.':'Removed ARC.']:result.cli?['CLI: '+result.cli.status,...(result.cli.error?['CLI error: '+errorLine(result.cli.error)]:[])]:[]),...(result.error?['Error: '+errorLine(result.error)]:[]),...(result.code!==0?['Exit code: '+result.code]:[]),...(result.exitSession?[result.cli?'CLI removal ended this session.':'CLI replacement ended this session.']:[])].filter(row=>{if(!row.startsWith('Residual path: '))return true;if(residualRows.has(row))return false;residualRows.add(row);return true;});
17
+ const items=result.results??[],platformOf=item=>item.platform??item.target?.platform??'Target';
18
+ const messages=(result.messages??[]).map(s=>clean(s.trim())),residualPaths=item=>(item.residualPaths??[]).map(p=>'Residual path: '+p);
19
+ const isResidual=row=>row.startsWith('Residual path: '),residualRows=new Set();
20
+ const uniqueResiduals=rows=>rows.filter(row=>{if(!isResidual(row))return true;if(residualRows.has(row))return false;residualRows.add(row);return true;});
21
+ const cliRemoved=result.cli?.status==='removed',cliAbsent=result.cli?.status==='absent';
22
+ if(result.code===0&&kind==='update'){
23
+ const residuals=(result.stdout??'').split(/\r?\n/).filter(isResidual);
24
+ return uniqueResiduals([`🚀 Upgraded to ARC ${latestVersion}.`,'Restart ARC to check.',...residuals]);
25
+ }
26
+ if(result.code===0&&!result.error&&!result.cli?.error&&(!result.cli||cliRemoved||cliAbsent)&&items.every(item=>['installed','uninstalled'].includes(item.status)&&!item.error)){
27
+ const rows=[];
28
+ if(cliRemoved){
29
+ rows.push('👋 ARC and the arc CLI removed.');
30
+ if(result.exitSession)rows.push('CLI removal ended this session.');
31
+ }else if(cliAbsent){
32
+ rows.push('👋 ARC removed.');
33
+ }else{
34
+ const displayOrder=ids=>[...sortByDisplay(ids.filter(id=>registry.getPlatform(id)),registry),...ids.filter(id=>!registry.getPlatform(id))];
35
+ const installed=displayOrder(items.filter(item=>item.status==='installed').map(platformOf));
36
+ const existing=platform=>['installed','incomplete'].includes(previousStates?.[platform]);
37
+ const newPlatforms=installed.filter(platform=>!existing(platform)),existingPlatforms=installed.filter(existing);
38
+ if(newPlatforms.length)rows.push(`✨ ARC installed for ${newPlatforms.map(label).join(', ')}.`);
39
+ if(existingPlatforms.length)rows.push(`🔧 Settings applied to ${existingPlatforms.map(label).join(', ')}.`);
40
+ if(installed.length)rows.push('Restart ARC to check.');
41
+ for(const platform of displayOrder(items.filter(item=>item.status==='uninstalled').map(platformOf)))rows.push(`🧹 Removed ARC from ${label(platform)}.`);
42
+ }
43
+ return uniqueResiduals([...rows,...messages,...items.flatMap(residualPaths)]);
44
+ }
45
+ return uniqueResiduals([...messages,...[result.stdout,result.stderr].flatMap(text=>text?text.trimEnd().split(/\r?\n/).map(clean):[]),...items.flatMap(item=>{const platform=platformOf(item);return[item.status==='installed'?`ARC${version==null?'':' '+version} installed for ${label(platform)}.`:item.status==='uninstalled'?`Removed from ${label(platform)}.`:`${platform}: ${item.status}`,...residualPaths(item),...(item.error?['Error: '+errorLine(item.error)]:[])];}),...(result.cli?['CLI: '+result.cli.status,...(result.cli.error?['CLI error: '+errorLine(result.cli.error)]:[])]:[]),...(result.error?['Error: '+errorLine(result.error)]:[]),...(result.code!==0?['Exit code: '+result.code]:[]),...(result.exitSession?[result.cli?'CLI removal ended this session.':'CLI replacement ended this session.']:[])]);
20
46
  }
21
47
  function formatElapsed(ms){
22
48
  const minutes=Math.floor(ms/60000),hours=Math.floor(minutes/60),days=Math.floor(hours/24);
@@ -56,7 +82,7 @@ export async function runTui(options={}){
56
82
  try{return typeof api.currentInstallState==='function'?await api.currentInstallState(context):{mode:'unverified',platforms:[]};}
57
83
  catch{return {mode:'unverified',platforms:[]};}
58
84
  }
59
- async function execute(prepared,{retried=false,request}={}){
85
+ async function execute(prepared,{retried=false,request,statuses=[]}={}){
60
86
  if(!prepared)return;const result=await ui.busy(()=>api.executeOperation(context,prepared));code=result.code;
61
87
  if(code!==130&&!result.exitSession&&!retried&&['composite','switch'].includes(prepared.kind)&&result.error?.blockingDispatches?.length){
62
88
  const entries=result.error.blockingDispatches,eligible=entries.some(entry=>entry.forceFinishable);
@@ -69,11 +95,12 @@ export async function runTui(options={}){
69
95
  let next;
70
96
  try{next=await ui.busy(()=>api.prepareOperation(context,request));}
71
97
  catch(error){if(['ARC_CANCELLED','ARC_TUI_EOF','ARC_TUI_HOME'].includes(error.code))throw error;await ui.page('Force finish',[error.message,notRetried]);return false;}
72
- return execute(next,{retried:true,request});
98
+ return execute(next,{retried:true,request,statuses});
73
99
  }
74
100
  }
75
101
  if(code===0&&['install','preset','switch','composite'].includes(prepared.kind))for(const key of Object.keys(draft))delete draft[key];
76
- const rows=prepared.kind==='update'&&code===0?[`ARC updated: ${prepared.currentVersion} → ${prepared.latestVersion}.`]:resultRows(result,registry,{version:packageVersion});
102
+ const previousStates=Object.fromEntries(statuses.map(status=>[status.platform,status.state]));
103
+ const rows=resultRows(result,registry,{version:packageVersion,kind:prepared.kind,latestVersion:prepared.latestVersion,previousStates});
77
104
  if(code===130||result.exitSession){finalReport=rows;if(result.exitSession)session.render({title:'Result',rows:finalReport,hint:'Session ended'});return true;}
78
105
  await ui.page('Result',rows);return false;
79
106
  }
@@ -101,7 +128,7 @@ export async function runTui(options={}){
101
128
  if(choice!==0||!showUpgrade)prepared=null;
102
129
  }
103
130
  else if(action==='uninstall')prepared=await uninstall(statuses);
104
- if(await execute(prepared,{request:lastRequest}))return code;
131
+ if(await execute(prepared,{request:lastRequest,statuses}))return code;
105
132
  }catch(error){if(error.code==='ARC_TUI_HOME')continue;if(['ARC_CANCELLED','ARC_TUI_EOF'].includes(error.code))throw error;code=error.code==='ARC_CLI_INPUT'?2:1;try{await ui.page('Operation unavailable',[error.message,...(error.residualPaths??[]).map(p=>'Residual path: '+p),'No changes were applied.']);}catch(navigation){if(navigation.code!=='ARC_TUI_HOME')throw navigation;}}
106
133
  }
107
134
 
@@ -4,7 +4,7 @@ function goHome(){throw Object.assign(Error('Return home'),{code:'ARC_TUI_HOME'}
4
4
  function interrupted(){return Object.assign(Error('Session interrupted'),{code:'ARC_CANCELLED'});}
5
5
  export function createTuiInterface(session,{input,controller}={}){
6
6
  async function event(){const e=await session.nextEvent();if(e.name==='interrupt')throw interrupted();if(e.name==='eof')throw Object.assign(Error('Session closed'),{code:'ARC_TUI_EOF'});if(e.name==='error')throw e.error;return e;}
7
- async function menu(title,rows,{selected=0,info=[],infoTones,notice=[],fitRows=false,backRow=false,actionKinds,backLabel='back',wordmark=false,version,renderBody,onHorizontal,refreshMs,hint='menu'}={}){
7
+ async function menu(title,rows,{selected=0,info=[],infoTones,rowTones,notice=[],fitRows=false,backRow=false,actionKinds,backLabel='back',wordmark=false,version,renderBody,onHorizontal,refreshMs,hint='menu'}={}){
8
8
  const actions=backRow?[...rows,'Back']:rows,kinds=rows.map((_,index)=>actionKinds?.[index]);if(backRow)kinds.push('cancel');
9
9
  selected=actions.length?Math.max(0,Math.min(selected,actions.length-1)):0;
10
10
  const animate=wordmark&&session.frameMs>0,pulse=typeof onHorizontal==='function'&&session.motion===true,tickMs=animate||pulse?session.frameMs:refreshMs;
@@ -17,7 +17,7 @@ export function createTuiInterface(session,{input,controller}={}){
17
17
  const notices=typeof notice==='function'?notice({selected,...viewport}):notice,noticeRows=wrapDetailRows(notices,viewport.columns);while(noticeRows.at(-1)==='')noticeRows.pop();
18
18
  const capacity=Math.max(1,viewport.rows-(wordmark?wordmarkRows(viewport):1)-information.length-noticeRows.length-4),offset=Math.max(0,Math.min(displayIndex-capacity+1,display.length-capacity)),visible=display.slice(offset,offset+capacity).map(row=>fitRows?fitChoiceRow(row,viewport.columns):row);
19
19
  const screen={title,wordmark,version,frame,notices,rows:[...information,...visible],selected:actions.length?information.length+displayIndex-offset:undefined,hint:navigationHint(hint,{backLabel,horizontal:typeof onHorizontal==='function'}),...(display.length>capacity?{position:(offset+1)+'-'+Math.min(offset+capacity,display.length)+'/'+display.length}:{})};
20
- if(infoTones){screen.rowTones=[...tones,...visible.map(()=>undefined)];screen.rowStatusSpans=spans;}
20
+ if(infoTones||rowTones){screen.rowTones=[...tones,...visible.map((_,index)=>rowTones?.[offset+index])];screen.rowStatusSpans=spans;}
21
21
  if(backRow||actionKinds)screen.rowKinds=[...information.map(()=>undefined),...kinds.slice(offset,offset+capacity)];
22
22
  const body=renderBody?.({selected,blink,frame,...viewport});if(body){delete screen.rowTones;delete screen.rowStatusSpans;delete screen.rowKinds;if(body.rowKinds)screen.rowKinds=body.rowKinds;screen.rows=body.rows;screen.selected=body.selected;screen.showSelection=body.showSelection;screen.compactFooter=body.compactFooter;if(Object.hasOwn(body,'notices'))screen.notices=body.notices;if(Object.hasOwn(body,'position'))screen.position=body.position;}
23
23
  const rendered=(repainting?(session.repaint??session.render):session.render).call(session,screen);pending??=event().then(e=>{settled={e};wake?.();},error=>{settled={error};wake?.();});