@yunhozz/arc 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/MANIFEST.sha256 +139 -136
  2. package/README.md +2 -2
  3. package/claude/agents/arc-implementer.md +7 -7
  4. package/claude/agents/arc-planner.md +5 -5
  5. package/claude/agents/arc-reviewer.md +6 -6
  6. package/claude/agents/arc-scouter.md +5 -5
  7. package/claude/agents/{arc-qa.md → arc-tester.md} +10 -10
  8. package/claude/skill/SKILL.md +6 -6
  9. package/claude/skill/models.toml +2 -2
  10. package/claude/skill/references/arc-visual-companion.md +2 -2
  11. package/claude/skill/references/commit.md +3 -3
  12. package/claude/skill/references/coordination.md +21 -21
  13. package/claude/skill/references/git-recovery.md +3 -1
  14. package/claude/skill/references/handoff-prep.md +3 -3
  15. package/claude/skill/references/handoff.md +16 -14
  16. package/claude/skill/references/limits.md +2 -2
  17. package/claude/skill/references/planning.md +12 -10
  18. package/claude/skill/references/verification.md +67 -35
  19. package/claude/skill/references/worktree-creation.md +2 -0
  20. package/claude/skill/scripts/model_config.py +25 -9
  21. package/codex/agents/arc-implementer.toml +7 -7
  22. package/codex/agents/arc-planner.toml +6 -6
  23. package/codex/agents/arc-reviewer.toml +7 -7
  24. package/codex/agents/arc-scouter.toml +6 -6
  25. package/codex/agents/{arc-qa.toml → arc-tester.toml} +10 -10
  26. package/codex/skill/SKILL.md +7 -7
  27. package/codex/skill/models.toml +2 -2
  28. package/codex/skill/references/arc-visual-companion.md +3 -3
  29. package/codex/skill/references/commit.md +4 -4
  30. package/codex/skill/references/coordination.md +20 -20
  31. package/codex/skill/references/git-recovery.md +2 -0
  32. package/codex/skill/references/handoff-prep.md +4 -4
  33. package/codex/skill/references/handoff.md +17 -15
  34. package/codex/skill/references/limits.md +2 -2
  35. package/codex/skill/references/planning.md +13 -11
  36. package/codex/skill/references/verification.md +68 -36
  37. package/codex/skill/references/worktree-creation.md +2 -0
  38. package/codex/skill/scripts/model_config.py +28 -15
  39. package/gemini/agents/arc-implementer.md +7 -7
  40. package/gemini/agents/arc-planner.md +5 -5
  41. package/gemini/agents/arc-reviewer.md +6 -6
  42. package/gemini/agents/arc-scouter.md +5 -5
  43. package/gemini/agents/{arc-qa.md → arc-tester.md} +10 -10
  44. package/gemini/skill/SKILL.md +6 -6
  45. package/gemini/skill/models.toml +2 -2
  46. package/gemini/skill/references/arc-visual-companion.md +2 -2
  47. package/gemini/skill/references/commit.md +3 -3
  48. package/gemini/skill/references/coordination.md +21 -21
  49. package/gemini/skill/references/git-recovery.md +3 -1
  50. package/gemini/skill/references/handoff-prep.md +3 -3
  51. package/gemini/skill/references/handoff.md +16 -14
  52. package/gemini/skill/references/limits.md +2 -2
  53. package/gemini/skill/references/planning.md +12 -10
  54. package/gemini/skill/references/verification.md +67 -35
  55. package/gemini/skill/references/worktree-creation.md +2 -0
  56. package/grok/agents/arc-implementer.md +7 -7
  57. package/grok/agents/arc-planner.md +5 -5
  58. package/grok/agents/arc-reviewer.md +6 -6
  59. package/grok/agents/arc-scouter.md +5 -5
  60. package/grok/agents/{arc-qa.md → arc-tester.md} +10 -10
  61. package/grok/skill/SKILL.md +6 -6
  62. package/grok/skill/models.toml +2 -2
  63. package/grok/skill/references/arc-visual-companion.md +2 -2
  64. package/grok/skill/references/commit.md +3 -3
  65. package/grok/skill/references/coordination.md +21 -21
  66. package/grok/skill/references/git-recovery.md +3 -1
  67. package/grok/skill/references/handoff-prep.md +3 -3
  68. package/grok/skill/references/handoff.md +16 -14
  69. package/grok/skill/references/limits.md +2 -2
  70. package/grok/skill/references/planning.md +12 -10
  71. package/grok/skill/references/verification.md +67 -35
  72. package/grok/skill/references/worktree-creation.md +2 -0
  73. package/lib/installer/install-mode.mjs +4 -2
  74. package/lib/installer/install.mjs +4 -3
  75. package/lib/installer/language.mjs +1 -1
  76. package/lib/installer/legacy-profiles.mjs +51 -0
  77. package/lib/installer/manifest.mjs +1 -1
  78. package/lib/installer/plan.mjs +5 -3
  79. package/lib/installer/preset.mjs +2 -2
  80. package/lib/installer/role-routing.mjs +49 -18
  81. package/lib/installer/runtime-assets.mjs +1 -0
  82. package/lib/installer/targets.mjs +1 -1
  83. package/lib/installer/transaction.mjs +35 -4
  84. package/lib/installer/uninstall.mjs +13 -10
  85. package/lib/installer/upgrade-state.mjs +13 -1
  86. package/lib/management/operations.mjs +10 -10
  87. package/lib/management/reapply.mjs +5 -3
  88. package/lib/models/config.mjs +25 -7
  89. package/lib/models/profiles.mjs +1 -1
  90. package/lib/platforms/formats/gemini-markdown.mjs +3 -3
  91. package/lib/platforms/formats/grok-markdown.mjs +3 -3
  92. package/lib/platforms/formats/markdown.mjs +2 -2
  93. package/lib/platforms/formats/toml.mjs +2 -2
  94. package/lib/policy/placement.mjs +1 -1
  95. package/lib/policy/render.mjs +3 -3
  96. package/lib/policy/role-policy.json +28 -28
  97. package/lib/prompts/agent-fragments.json +24 -24
  98. package/lib/prompts/render.mjs +9 -9
  99. package/lib/runtime/acceptance.mjs +4 -3
  100. package/lib/runtime/bootstrap.mjs +3 -1
  101. package/lib/runtime/command.mjs +27 -1
  102. package/lib/runtime/cooperative-schema.mjs +16 -5
  103. package/lib/runtime/cooperative.mjs +6 -3
  104. package/lib/runtime/evaluate.mjs +10 -7
  105. package/lib/runtime/handoff-record.mjs +58 -0
  106. package/lib/runtime/identity.mjs +10 -7
  107. package/lib/runtime/operations.mjs +41 -3
  108. package/lib/runtime/role-bridge-args.mjs +5 -5
  109. package/lib/runtime/role-bridge.mjs +10 -2
  110. package/lib/runtime/role-dispatch-policy.mjs +6 -4
  111. package/lib/runtime/role-dispatch-store.mjs +3 -0
  112. package/lib/runtime/role-observe.mjs +5 -5
  113. package/lib/runtime/role-routing-config.mjs +20 -6
  114. package/lib/runtime/role-routing.mjs +4 -3
  115. package/lib/runtime/schema.mjs +8 -5
  116. package/lib/runtime/scope.mjs +1 -1
  117. package/lib/runtime/store.mjs +2 -2
  118. package/lib/runtime/verification.mjs +15 -7
  119. package/lib/tui/setup.mjs +1 -1
  120. package/lib/watch/labels.mjs +2 -1
  121. package/lib/watch/model.mjs +2 -2
  122. package/lib/watch/render.mjs +2 -2
  123. package/package.json +1 -1
  124. package/shared/skill/runtime/acceptance.mjs +4 -3
  125. package/shared/skill/runtime/bootstrap.mjs +3 -1
  126. package/shared/skill/runtime/command.mjs +27 -1
  127. package/shared/skill/runtime/cooperative-schema.mjs +16 -5
  128. package/shared/skill/runtime/cooperative.mjs +6 -3
  129. package/shared/skill/runtime/evaluate.mjs +10 -7
  130. package/shared/skill/runtime/handoff-record.mjs +58 -0
  131. package/shared/skill/runtime/identity.mjs +10 -7
  132. package/shared/skill/runtime/operations.mjs +41 -3
  133. package/shared/skill/runtime/role-bridge-args.mjs +5 -5
  134. package/shared/skill/runtime/role-bridge.mjs +10 -2
  135. package/shared/skill/runtime/role-dispatch-policy.mjs +6 -4
  136. package/shared/skill/runtime/role-dispatch-store.mjs +3 -0
  137. package/shared/skill/runtime/role-observe.mjs +5 -5
  138. package/shared/skill/runtime/role-policy.json +28 -28
  139. package/shared/skill/runtime/role-routing-config.mjs +20 -6
  140. package/shared/skill/runtime/role-routing.mjs +4 -3
  141. package/shared/skill/runtime/schema.mjs +8 -5
  142. package/shared/skill/runtime/scope.mjs +1 -1
  143. package/shared/skill/runtime/store.mjs +2 -2
  144. package/shared/skill/runtime/verification.mjs +15 -7
@@ -3,27 +3,57 @@
3
3
 
4
4
  Behavior work follows meaningful failing test observation → minimal implementation → focused success → scoped checks under [Test scope and result comparison](#test-scope-and-result-comparison). Report skill/test constraints before edits. Waivers need recorded narrow/understood/reversible scope, no dependent/cross-component lifecycle stages and one check path. Docs exceptions permit named structural checks only, never TDD claims. Report side effects within scope. Reviewer lacks Bash and requests runtime checks. Local tests prove neither remote models nor effort application. Policy prose needs independent role/approval review; text presence proves no compliance. Unexpected failure triggers diagnosis/holds; expected RED grants no unrelated repairs.
5
5
 
6
- Read before verification design, QA/Reviewer assignment, correction rechecks or UI acceptance. QA/Reviewer use their profiles and brief-cited sections only. Design companions differ from UI acceptance.
6
+ Read before verification design, Tester/Reviewer assignment, correction rechecks or UI acceptance. Tester/Reviewer use their profiles and brief-cited sections only. Design companions differ from UI acceptance.
7
7
 
8
8
  **Evidence verdict:** Criteria are proven, unmet or unverified. Passing runs/reports/dispositions never convert unverified to proven; retain gaps.
9
9
 
10
10
  <a id="visual-evidence-and-adjudication"></a>
11
11
  ## Visual evidence and adjudication
12
12
 
13
- Each criterion needs the exact approved source, version, approval and access state; IDs, properties and comparison method; and a link between output and revision. Implementer reporting does not replace fresh QA. Record pass/mismatch/unverified and connect to criterion verdicts; pass needs accessible supporting evidence. Missing linkage is unverified; visible difference is mismatch, separately, without inferring current branch UI. Hold comparison when materials are inaccessible or interpretation approval is missing.
13
+ Each criterion needs the exact approved source, version, approval and access state; IDs, properties and comparison method; and a link between output and revision. Implementer reporting does not replace fresh Tester. Record pass/mismatch/unverified and connect to criterion verdicts; pass needs accessible supporting evidence. Missing linkage is unverified; visible difference is mismatch, separately, without inferring current branch UI. Hold comparison when materials are inaccessible or interpretation approval is missing.
14
14
 
15
15
  Policy, generated-file and manifest checks prove structure, not role behavior, installed builds, Grok CLI compliance or fidelity. Report changes, exclusions, checks run and omitted, criterion evidence and limits, and platform availability. Report baseline failures separately; independent progress does not relax checks.
16
16
 
17
17
  <a id="test-scope-and-result-comparison"></a>
18
18
  ## Test scope and result comparison
19
19
 
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.
20
+ Tester briefs MUST include the required field `mode: task | final`. One assignment performs one mode; the only exception is the approved full regression follow-up in final mode.
21
21
 
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.
22
+ **Task mode** assigns a fresh Tester for each top-level task requiring Tester verification. Task checks and rechecks verify uncommitted work and 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. Read only to confirm the brief and identify tests in those categories. In task mode, never run full regression or substitute checks. In task mode, do not search reverse dependencies. Failures follow Implementer → Tester recheck, reusing the current Tester for the same task. 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.
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 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.
24
+ **Final mode** runs once after all tasks are accepted and committed, as one fresh Tester assignment at the verified HEAD of the execution target worktree. Run (1) all contract tests, (2) all check scripts, (3) the related tests of re-changed files and (4) substitute checks for applicable triggers. Final mode does not rerun the union of tests that task Tester already passed. A re-changed file is a file that a task's Tester 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 Tester verified. Orchestrator computes the list and cites it in the brief; Tester 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. Tester 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 → Tester even after the final Reviewer has started; Reviewer evidence for affected files becomes stale and needs a refreshed-diff recheck.
25
25
 
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.
26
+ Read-only reverse dependency search is allowed in final mode. Use the project's affected tool only in list or dry-run form with no writes, installs or cache generation; otherwise report an environment block and continue with the next step of the impact procedure.
27
+
28
+ **Trigger substitute checks** run in final mode for each applicable trigger: (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.
29
+
30
+ Planner records a provisional trigger judgment with the substitute-check list and reasons in the plan. Orchestrator cites its provisional judgment and reasons in the final-mode Tester brief. Tester independently checks triggers (1), (3) and (4) from the base..HEAD diff and log and checks trigger (2) using the integration history cited by Orchestrator. If trigger applicability is undeterminable, report it as unverified. If no trigger applies, omit substitute checks 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.
31
+
32
+ | Trigger | Substitute check | Undeterminable when |
33
+ | --- | --- | --- |
34
+ | (1) Shared module | Trace reverse dependencies transitively and run tests reached. Include static import, require, load and path-string references, including mirrors and generated outputs. If the set cannot be determined, expand once to the nearest package manifest directory, otherwise the test directory. | A suspected dynamic reference. |
35
+ | (2) Integrated changes | Add incoming changes and conflict-resolution files to the changed set and apply the same impact procedure. Reuse external CI or verification evidence only for the same commit or tree hash. | An uncertain integration history. |
36
+ | (3) Dependencies | Use the lockfile diff to find packages whose resolved version changed, including transitive dependencies. Run tests for modules that import those packages. | A missing or unreadable lockfile. |
37
+ | (3) Language, runtime, build or test configuration | Run one representative test per package or test directory. Use project-declared smoke tests first, otherwise select the lexicographically first test file per directory, and record why each test was selected. | An unidentifiable package or test layout. |
38
+ | (4) Public interface | Search for in-repository callers by identifiers, CLI option strings and configuration keys and run their tests. Final mode already runs all contract tests. Report that consumers outside the repository are unverified because they are outside this search scope. | A suspected dynamic reference. |
39
+
40
+ Select substitute checks in this impact procedure order:
41
+
42
+ 1. Reuse evidence for the same commit or tree hash and record the basis.
43
+ 2. Use the project's affected tool under the final-mode conditions above.
44
+ 3. Trace reverse dependencies and record why steps 1 and 2 were not used.
45
+ 4. If the affected set remains unclear, expand the boundary one step to the nearest package manifest directory, otherwise the test directory.
46
+ 5. If the scope still cannot be determined, report as undeterminable (unverified).
47
+
48
+ A suspected dynamic reference goes directly to step 5.
49
+
50
+ **Undeterminable scope** requires Tester to report each item, cause, substitute checks run and remaining unverified scope. Orchestrator asks the user to (i) approve full regression, (ii) substitute the project CI full test results, or (iii) disposition as unverified. Until the user decides, final acceptance is held, while Reviewer and independent work continue. Resolution of unknown state is never auto-decided in Full Auto. A disposition as unverified does not turn a criterion into proven.
51
+
52
+ **Approved full regression** requires explicit user approval, and the current final-mode Tester runs it as a follow-up; no new Tester is assigned. On resume, bridge resumes the same dispatch and native continues the same assignment. For bridge, each segment starts a new lease.timeoutMinutes timer. When resuming either route, if the same assignment cannot continue, report an environment block and hold; the user decides whether to assign a new Tester. Approval is valid only for that workflow and HEAD and expires when HEAD changes. The approved full regression runs once. Approved full regression failures follow the base check below.
53
+
54
+ **CI substitution** requires results for the same commit SHA as the verified HEAD or a matching tree hash with evidence, all jobs completed, accessible per-test-name results, results collected read-only by Orchestrator and cited in the brief, and an explicit user approval record. Use CI results as evidence only for the tests and scope they cover when every condition is met; otherwise a new-failure candidate or unverified is the applicable classification. This collection grants no external action authority.
55
+
56
+ **Baseline:** No baseline run is recorded in advance, and no base worktree is prepared in advance. Tester classifies each failure in two steps. First, a static check against the approved base: task Tester, which verifies uncommitted work, uses read-only `git diff --name-only <approved base>` plus the untracked files from `git status --porcelain`; final verification Tester uses `git diff --name-only <approved base> HEAD`. Tester 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 Tester. 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. Tester 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, Tester installs or generates nothing and reports an environment block; Orchestrator then prepares the prerequisites or assigns a separate Tester 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
57
 
28
58
  **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
59
 
@@ -37,28 +67,28 @@ Edits belong to Implementer except the [small direct path](handoff.md#orchestrat
37
67
  | Risk | Minimum flow |
38
68
  |---|---|
39
69
  | Small, low risk | Implementer or direct edit → Orchestrator focused checks → acceptance |
40
- | Ordinary behavior | Implementer → independent QA → acceptance |
41
- | Significant/high risk, no plan | Implementer → QA/rechecks → final full-change Reviewer → acceptance |
42
- | Significant/high risk, plan | Per task Implementer → required fresh QA → acceptance/commit; final independent whole-change Reviewer once after all accepted tasks/required checks/rechecks |
70
+ | Ordinary behavior | Implementer → independent Tester → acceptance |
71
+ | Significant/high risk, no plan | Implementer → Tester/rechecks → final full-change Reviewer → acceptance |
72
+ | Significant/high risk, plan | Per task Implementer → required fresh Tester → acceptance/commit; final independent whole-change Reviewer once after all accepted tasks/required checks/rechecks |
43
73
 
44
- Ordinary/significant tasks need fresh QA before acceptance. Low risk requires narrow/understood/reversible/focused-verifiable work. Ordinary behavior fails these without significant triggers. Shared role/behavior contracts/state, lifecycle/integration order, security/permissions, data loss/migration, public interfaces and costly install/deploy/rollback are significant. Substantial behavior/contracts are significant regardless of file count. Unclear risk requires investigation/higher flow. Environment failure waives no check or depth judgment.
74
+ Ordinary/significant tasks need fresh Tester before acceptance. Low risk requires narrow/understood/reversible/focused-verifiable work. Ordinary behavior fails these without significant triggers. Shared role/behavior contracts/state, lifecycle/integration order, security/permissions, data loss/migration, public interfaces and costly install/deploy/rollback are significant. Substantial behavior/contracts are significant regardless of file count. Unclear risk requires investigation/higher flow. Environment failure waives no check or depth judgment.
45
75
 
46
- - Task boundaries alone add no QA/review. Reviewer is never a plan-task/commit prerequisite. Plans review once at final relevant state after task acceptances/checks; no-plan Reviewer follows QA before acceptance.
47
- - Preserve specific commitments. Risky unverified dependencies need QA/resolved or explicitly dispositioned findings before implementation.
76
+ - Task boundaries alone add no Tester/review. Reviewer is never a plan-task/commit prerequisite. Plans review once at final relevant state after task acceptances/checks; no-plan Reviewer follows Tester before acceptance.
77
+ - Preserve specific commitments. Risky unverified dependencies need Tester/resolved or explicitly dispositioned findings before implementation.
48
78
  - Reuse evidence only for matching scope/state/independence/freshness/flow position. Changes/failures/missing-conflicting evidence invalidate affected reuse.
49
- - QA independently checks without edits. Reviewer performs no QA/planning/editing/delegation/completion decisions. Orchestrator routes fixes to Implementer and required QA rechecks; direct-check failures return to normal flow. Accept after findings/gaps resolved or dispositioned.
50
- - Fresh-per-task applies to Implementer/QA, not Reviewer. Reuse Reviewer only with independence, valid context and refreshed scope/target/evidence, never an old verdict or waived timing/coverage.
79
+ - Tester independently checks without edits. Reviewer performs no Tester/planning/editing/delegation/completion decisions. Orchestrator routes fixes to Implementer and required Tester rechecks; direct-check failures return to normal flow. Accept after findings/gaps resolved or dispositioned.
80
+ - Fresh-per-task applies to Implementer/Tester, not Reviewer. Reuse Reviewer only with independence, valid context and refreshed scope/target/evidence, never an old verdict or waived timing/coverage.
51
81
 
52
- Record which risk/instruction/approved obligations each check satisfies. DO NOT automatically assign QA/Reviewer for clear low-risk scope with sufficient evidence and no requirement. Metadata counts alone prove no significance; one permission/loss rule may. Vague file deletion is not low-risk evidence; reclassify installer/manifest impacts. Confirm cleanup targets unused, required materials intact, ignore patterns scoped and diff approved before focused-check-only acceptance.
82
+ Record which risk/instruction/approved obligations each check satisfies. DO NOT automatically assign Tester/Reviewer for clear low-risk scope with sufficient evidence and no requirement. Metadata counts alone prove no significance; one permission/loss rule may. Vague file deletion is not low-risk evidence; reclassify installer/manifest impacts. Confirm cleanup targets unused, required materials intact, ignore patterns scoped and diff approved before focused-check-only acceptance.
53
83
 
54
84
  Distinguish environment failures from code failures and report exact limits and gaps. Use Planner/Scouter only for unresolved planning/discovery. Reviewer covers substantial correctness/factual/security/data/interface risks. Orchestrator assigns support as needed. Claim only verified outputs. Read cited `references/test-driven-development.md`, preserving exceptions.
55
85
 
56
86
  <a id="final-plan-reviewer-correction-loop"></a>
57
87
  ### Final plan Reviewer correction loop
58
88
 
59
- Only final overall Reviewer findings on plan work, including behavior, follow Implementer → Reviewer without QA reassignment until resolved. One initial full review permits necessary rechecks. Before it, risk checks/QA failures/unmet criteria still need Implementer → QA. No-plan flow remains unchanged.
89
+ Only final overall Reviewer findings on plan work, including behavior, follow Implementer → Reviewer without Tester reassignment until resolved. One initial full review permits necessary rechecks. Before it, risk checks/Tester failures/unmet criteria still need Implementer → Tester. No-plan flow remains unchanged.
60
90
 
61
- Expanded scope/separate obligations/gaps hold affected work for resolution/approval. Orchestrator assigns/accepts; Reviewer stays read-only without QA/acceptance. NEVER present old QA as post-fix execution. Report actual actor/target/check/result/limits only.
91
+ Expanded scope/separate obligations/gaps hold affected work for resolution/approval. Orchestrator assigns/accepts; Reviewer stays read-only without Tester/acceptance. NEVER present old Tester as post-fix execution. Report actual actor/target/check/result/limits only.
62
92
 
63
93
  <a id="evidence-after-plan-revision-commit"></a>
64
94
  ## Evidence after plan revision commit
@@ -71,38 +101,38 @@ Existing commit evidence links remain valid because history is unchanged. For a
71
101
  <a id="reviewer-timing-and-task-acceptance"></a>
72
102
  ## Task acceptance and final plan acceptance
73
103
 
74
- Task acceptance differs from final verification/acceptance. Connect criteria/observations/current checks/findings, not checkboxes/reports/passing commands alone. Use fresh QA where required or low-risk focused checks. For same-task QA findings and required QA rechecks, reuse the current QA while scope/workspace/ownership/context remain valid. Final overall Reviewer findings on plan work follow Implementer → Reviewer without QA reassignment; see the [final plan Reviewer correction loop](#final-plan-reviewer-correction-loop).
104
+ Task acceptance differs from final verification/acceptance. Connect criteria/observations/current checks/findings, not checkboxes/reports/passing commands alone. Use fresh Tester where required or low-risk focused checks. For same-task Tester findings and required Tester rechecks, reuse the current Tester while scope/workspace/ownership/context remain valid. Final overall Reviewer findings on plan work follow Implementer → Reviewer without Tester reassignment; see the [final plan Reviewer correction loop](#final-plan-reviewer-correction-loop).
75
105
 
76
- DO NOT delay independently acceptable tasks solely for final-only checks or defer currently required checks to accept early. State final integration scope/timing separately. Whole-plan Reviewer is part of final verification; task commits prove no unperformed final checks. Orchestrator decides final acceptance with QA/Reviewer/integration evidence/findings and unverified/disposition records. Shared evidence MUST satisfy all reuse rules. Before the overall completion report and any push, PR or merge authorization request, Orchestrator verifies that plan-level progress records are carried by the verified next commit of the plan or, when none follows, recorded only in the canonical handoff record with the plan document unchanged and a clean working tree. While a user decision on a non-blocking final Reviewer finding is pending, hold overall completion; a fix decision follows plan revision and a new task whose accepted commit carries the records, and a no-fix disposition stays canonical only when no later commit follows.
106
+ DO NOT delay independently acceptable tasks solely for final-only checks or defer currently required checks to accept early. State final integration scope/timing separately. Whole-plan Reviewer is part of final verification; task commits prove no unperformed final checks. Orchestrator decides final acceptance with Tester/Reviewer/integration evidence/findings and unverified/disposition records. Shared evidence MUST satisfy all reuse rules. Before the overall completion report and any push, PR or merge authorization request, Orchestrator verifies that plan-level progress records are carried by the verified next commit of the plan or, when none follows, recorded only in the canonical handoff record with the plan document unchanged and a clean working tree. While a user decision on a non-blocking final Reviewer finding is pending, hold overall completion; a fix decision follows plan revision and a new task whose accepted commit carries the records, and a no-fix disposition stays canonical only when no later commit follows.
77
107
 
78
- Committed-plan final Reviewer findings need a follow-up task/planning/approvals. Keep corrections uncommitted; refresh committed state plus uncommitted diff/files in Reviewer artifacts/briefs. Reuse/assign independent Reviewer and repeat Implementer → Reviewer until resolved, then accept/commit one focused follow-up. Final QA findings still use Implementer → QA. No automatic amend/reset/duplicate originals; scope growth retains planning/approvals.
108
+ Committed-plan final Reviewer findings need a follow-up task/planning/approvals. Keep corrections uncommitted; refresh committed state plus uncommitted diff/files in Reviewer artifacts/briefs. Reuse/assign independent Reviewer and repeat Implementer → Reviewer until resolved, then accept/commit one focused follow-up. Final Tester findings still use Implementer → Tester. No automatic amend/reset/duplicate originals; scope growth retains planning/approvals.
79
109
 
80
110
  Orchestrator writes approved-base final base..HEAD diff/changed-file list to `<git-common-dir>/arc/review/<slug>.diff`, using handoff slug and absolute brief citation; inline if small/write denied. Reviewer reads artifact, not Git commands, stating limits.
81
111
 
82
112
  <a id="ui-browser-acceptance-checks"></a>
83
113
  ### UI browser acceptance checks
84
114
 
85
- QA has no browser tool: launch/exercise apps/URLs through Bash only with assigned criteria/cited prerequisites, following installed browser-skill CLI guidance.
115
+ Tester has no browser tool: launch/exercise apps/URLs through Bash only with assigned criteria/cited prerequisites, following installed browser-skill CLI guidance.
86
116
 
87
117
  Briefs MUST supply workspace, existing launch command/URL, account/test-data scope, allowed interactions and this section's accessible citation. Use existing approved environment/tool/browser-skill instructions. No source/docs/tests/config edits, dependencies or environment changes. Missing prerequisites/tools/environment leave exact reported limits/unverified criteria.
88
118
 
89
- For each criterion record command/URL, test state/viewport or inapplicability, interactions, expected/observed results and evidence. Startup/page-load/static checks alone prove no complete UI. Clean only QA-created processes/sessions; preserve shared services/sessions.
119
+ For each criterion record command/URL, test state/viewport or inapplicability, interactions, expected/observed results and evidence. Startup/page-load/static checks alone prove no complete UI. Clean only Tester-created processes/sessions; preserve shared services/sessions.
90
120
 
91
121
  <a id="criterion-evidence-and-finding-handoff"></a>
92
122
  ### Criterion evidence and finding handoff
93
123
 
94
124
  Report every criterion by ID or wording: method/scope, run status, evidence, verdict, unverified reason/remaining scope. Run status: passed/failed/not run/environment blocked. Verdict: proven/unmet/unverified. Connect conditions/expectations to actual observations; partial/out-of-scope/missing/environment gaps stay unverified. PASS means run status only. Structure proves structure only.
95
125
 
96
- Current-task failures/unmet criteria default to current Implementer/current QA under coordination context/boundary/amendment rules; findings alone create no task. Before Reviewer, rerun reproduction/invalidated checks, reporting actor/target/results/limits and prior finding resolved/unresolved/unverified with evidence. Repeat Implementer→QA if unresolved; QA reuse is no stale-evidence reuse. Environment/missing/out-of-scope are gaps, not presumed code defects; Reviewer cannot replace QA.
126
+ Current-task failures/unmet criteria default to current Implementer/current Tester under coordination context/boundary/amendment rules; findings alone create no task. Before Reviewer, rerun reproduction/invalidated checks, reporting actor/target/results/limits and prior finding resolved/unresolved/unverified with evidence. Repeat Implementer→Tester if unresolved; Tester reuse is no stale-evidence reuse. Environment/missing/out-of-scope are gaps, not presumed code defects; Reviewer cannot replace Tester.
97
127
 
98
- Reviewer behavior findings report criterion/expectation/problem/source/reproduction/evidence, separating source inference/execution. No QA execution. Outside final-plan exception route Implementer→QA; other Reviewer rechecks depend on scope/independence. Continue source review of structure/design/facts/security; observable security/interfaces may need both QA/Reviewer.
128
+ Reviewer behavior findings report criterion/expectation/problem/source/reproduction/evidence, separating source inference/execution. No Tester execution. Outside final-plan exception route Implementer→Tester; other Reviewer rechecks depend on scope/independence. Continue source review of structure/design/facts/security; observable security/interfaces may need both Tester/Reviewer.
99
129
 
100
130
  Accept from criterion verdicts/findings/rechecks/gaps, not overall run status. Disposition never proves unverified. Low-risk work also links each criterion to focused evidence.
101
131
 
102
132
  <a id="completion-continuity"></a>
103
133
  ## Completion continuity
104
134
 
105
- Once approval/depth/target/handoff hold, continue execution/correction/reverification/required QA-Reviewer/disposition/acceptance/report. Preserve timing without new task-level gates. Reports/probes/commands never complete remaining approved scope. DO NOT make authorized execution an optional offer awaiting response. Probe-only ends at question/evidence/limits; combined work follows planning. Omission changes neither risk nor acceptance. Hold only actual affected conditions and report resume requirements. Structure proves no live compliance.
135
+ Once approval/depth/target/handoff hold, continue execution/correction/reverification/required Tester-Reviewer/disposition/acceptance/report. Preserve timing without new task-level gates. Reports/probes/commands never complete remaining approved scope. DO NOT make authorized execution an optional offer awaiting response. Probe-only ends at question/evidence/limits; combined work follows planning. Omission changes neither risk nor acceptance. Hold only actual affected conditions and report resume requirements. Structure proves no live compliance.
106
136
 
107
137
  <a id="verification-lifecycle-in-the-cooperative-cli"></a>
108
138
  ## Verification lifecycle in the cooperative CLI
@@ -111,34 +141,36 @@ Supported `workflow` is approved complete spec+plan. No-plan/small-task/omission
111
141
 
112
142
  1. Orchestrator (`actor.role: "orchestrator"`) registers through `record`/`acceptance-evidence` with `data: {kind: "task", task: {...}}`. Task includes `id`, absolute `paths`, `criteria`, `requiredChecks`, `dependencies`, `approvalRef`, `approvalVersion`, `documentVersion`, `scopeVersion`, `targetVersion`. Pending-only registration is not acceptance/commit. Descriptor: `{executable, args, cwd, env, outputs}`; executable/cwd/outputs absolute, cwd/outputs inside workspace. No Reviewer in task checks.
113
143
  2. `status` observes `changeFingerprints.tasks[taskId]`/`changeFingerprints.final` independently from read-only Git inventory/index and current regular-file bytes/modes/deletions. Task covers owned paths, final the repository. Symlinks/submodules/unmerged indexes hold. This is no atomic observation/execution sandbox. RuntimeHash drift stays stale/hold without automatic stored-version update/migration/reapproval.
114
- 3. Check preparation: `operation: "check"`, `taskId`, `arguments: {scope: "task", actor: {id, role: "qa"}, descriptor, changeFingerprint, findingIds?}`. QA identity attestation MUST differ from Implementer/Orchestrator; cross-task QA/Implementer reuse is rejected. Descriptor exactly matches registration. After durable intent, execute only existing authorized scope.
144
+ 3. Check preparation: `operation: "check"`, `taskId`, `arguments: {scope: "task", actor: {id, role: "tester"}, descriptor, changeFingerprint, findingIds?}`. Tester identity attestation MUST differ from Implementer/Orchestrator; cross-task Tester/Implementer reuse is rejected. Descriptor exactly matches registration. After durable intent, execute only existing authorized scope.
115
145
  4. `result`/`reconcile` records `intentId`, `{status, messageRef, data}` with same actor/descriptor/scope, taskId where applicable, fingerprint and `verdict: "proven" | "unmet" | "unverified"`. Even succeeded/proven applies only to that version. It replaces neither semantic proof nor acceptance. Failed/unknown/mismatch/unverified is not passing evidence. Preserve history.
116
146
 
117
- Failed checks/reviews leave findings. Open separately via `data: {action: "open", id, checkId, message}`. After fixes record `data: {action: "resolve", id, actor: {id, role: "implementer"}, changeFingerprint}` plus evidence messageRef. Actor MUST be assigned to the task or relevant overall task. Resolved becomes closed only after later prepare `findingIds` and same-version successful revalidation. Prior QA failures retain Implementer→QA.
147
+ Failed checks/reviews leave findings. Open separately via `data: {action: "open", id, checkId, message}`. After fixes record `data: {action: "resolve", id, actor: {id, role: "implementer"}, changeFingerprint}` plus evidence messageRef. Actor MUST be assigned to the task or relevant overall task. Resolved becomes closed only after later prepare `findingIds` and same-version successful revalidation. Prior Tester failures retain Implementer→Tester.
148
+
149
+ Final-mode Tester results are not cooperative checks; record them in the plan-level progress record and the canonical handoff record. Record undeterminable dispositions, approved full regression and CI substitution there as well.
118
150
 
119
- Final review uses `operation: "review"`, `scope: "final"`, `actor.role: "reviewer"`, `descriptor: {kind: "source-review", paths: [...]}` without taskId. Initial final review needs all tasks accepted/current required QA, never task acceptance/commit prerequisite. Plan-final findings repeat Implementer resolution→Reviewer without QA reassignment; old QA is not subsequent-fix execution. Separate unresolved QA remains.
151
+ Final review uses `operation: "review"`, `scope: "final"`, `actor.role: "reviewer"`, `descriptor: {kind: "source-review", paths: [...]}` without taskId. Initial final review needs all tasks accepted/current required Tester, never task acceptance/commit prerequisite. Plan-final findings repeat Implementer resolution→Reviewer without Tester reassignment; old Tester is not subsequent-fix execution. Separate unresolved Tester remains.
120
152
 
121
153
  Scope/document/approval records preserve history. `data.affectedTaskIds` invalidates those tasks/dependents and task/check/acceptance evidence; omitted IDs hold all. Final evidence becomes stale. Preserve unaffected independent evidence. Orchestrator determines semantic impact. Affected tasks need new current-scope approval/contracts before preparation, not revived old approvals; fresh checks/reviews/revalidation too. Current evidence supersedes failures without deletion. Acceptance/commit/completion stay Orchestrator decisions.
122
154
 
123
155
  <a id="task-acceptance-and-focused-commit-reconciliation-in-the-cooperative-cli"></a>
124
156
  ### Task acceptance and focused commit reconciliation in the cooperative CLI
125
157
 
126
- Plan-mode `prepare` supports `operation: "accept"`/`operation: "commit"`. Acceptance attests `actor.role: "orchestrator"`, taskId and arguments messageRef/same criteria/current exact QA checkIds/all findingIds/current fingerprint. Latest required descriptors MUST be passed/proven and findings closed by fixes/QA. Successful attestation marks accepted; reports/checks alone do not. `operator-attested` means operator confirms semantics/identity.
158
+ Plan-mode `prepare` supports `operation: "accept"`/`operation: "commit"`. Acceptance attests `actor.role: "orchestrator"`, taskId and arguments messageRef/same criteria/current exact Tester checkIds/all findingIds/current fingerprint. Latest required descriptors MUST be passed/proven and findings closed by fixes/Tester. Successful attestation marks accepted; reports/checks alone do not. `operator-attested` means operator confirms semantics/identity.
127
159
 
128
- Acceptance pins actual index tree/staged diff/paths/fingerprint. Stage approved paths beforehand and confirm QA for that index. Unrelated/other-task paths or in-scope unstaged/untracked changes hold. Code cannot identify semantically unrelated same-file hunks; Orchestrator reads diff.
160
+ Acceptance pins actual index tree/staged diff/paths/fingerprint. Stage approved paths beforehand and confirm Tester for that index. Unrelated/other-task paths or in-scope unstaged/untracked changes hold. Code cannot identify semantically unrelated same-file hunks; Orchestrator reads diff.
129
161
 
130
- Commit preparation references `arguments: {"acceptanceId": "acceptance requestId"}`. Check current approval/contract/QA/findings/index match acceptance and persist expected parent/tree/paths/residual paths. CLI stages/commits nothing. Orchestrator makes one matching focused commit.
162
+ Commit preparation references `arguments: {"acceptanceId": "acceptance requestId"}`. Check current approval/contract/Tester/findings/index match acceptance and persist expected parent/tree/paths/residual paths. CLI stages/commits nothing. Orchestrator makes one matching focused commit.
131
163
 
132
164
  Submit intentId/`actor.role: "orchestrator"` and `result: {"status": "succeeded", "messageRef": "actual result evidence", "data": {"commit": "full OID"}}` through reconcile/result. CLI rereads local object/parent/tree/paths/HEAD/index/residual changes. Only complete match updates target HEAD/committed. Preserve failed/unknown/mismatch/history; never arbitrary target updates. Same request/completed intent permits no repeated effect. Inspect/resolve/reconcile existing intent after failure.
133
165
 
134
- NEVER rewrite QA fingerprints after commit. Separate post-commit observations detect changes. Final review needs current task evidence/final fingerprint. RuntimeHash drift keeps existing stale/hold without automatic version update.
166
+ NEVER rewrite Tester fingerprints after commit. Separate post-commit observations detect changes. Final review needs current task evidence/final fingerprint. RuntimeHash drift keeps existing stale/hold without automatic version update.
135
167
 
136
168
  [ARC role policy: contract begin]
137
169
  Generated from lib/policy/role-policy.json; do not edit this managed section manually.
138
170
  - [git.orchestrator-accept-commit] Only Orchestrator accepts work and performs Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied. Orchestrator accepts, then includes that task's own progress records made after task completion (checkboxes, notes, results, evidence and status) with its implementation work in that commit, without a separate docs/fixup commit or planning-commit amendment for those records. Exclude other tasks; pending approved spec/plan revisions follow planning.plan-revision and preserve the no-change path without empty commits. Plan-level progress records (final verification results, final Reviewer verdicts and finding dispositions, overall completion status) are the sole exception: include them in the plan's next task acceptance or final Reviewer follow-up commit; when no implementation work remains and no standalone closing commit for pending revisions is made, keep them only in the canonical handoff record without changing the plan document or creating a commit. Orchestrator commits without separate user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership; verify the resulting SHA, content, HEAD and remaining changes. Existing small-task direct and plan-omission paths remain unchanged.
139
- - [review.significant-no-plan] Significant/high-risk work without a plan follows Implementer → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. DO NOT omit Reviewer because no plan exists. This adds no plan obligation.
140
- - [review.significant-plan] Significant/high-risk plan work follows Implementer → required fresh QA → Orchestrator acceptance and focused commit for each task. After all tasks are accepted and required QA is complete, Reviewer reviews the final full change once. Reviewer is not a per-task or per-commit gate. Preserve required checks and necessary finding rechecks.
141
- - [review.final-plan-recheck] Complete required QA and QA failure rechecks before the initial final overall Reviewer review. Once that review begins on plan work, every final Reviewer finding, including behavior, follows Implementer → Reviewer without QA reassignment until resolved. Keep corrections uncommitted through Reviewer rechecks, then accept and create one focused follow-up commit. Separate QA findings and new failures from final verification, which may run concurrently with the final Reviewer, follow Implementer → QA; Reviewer evidence for affected files then needs a refreshed-diff recheck. Preserve required QA outside this final Reviewer exception.
171
+ - [review.significant-no-plan] Significant/high-risk work without a plan follows Implementer → Tester and required Tester rechecks → Reviewer of the final full change → Orchestrator acceptance. DO NOT omit Reviewer because no plan exists. This adds no plan obligation.
172
+ - [review.significant-plan] Significant/high-risk plan work follows Implementer → required fresh Tester → Orchestrator acceptance and focused commit for each task. After all tasks are accepted and required Tester is complete, Reviewer reviews the final full change once. Reviewer is not a per-task or per-commit gate. Preserve required checks and necessary finding rechecks.
173
+ - [review.final-plan-recheck] Complete required Tester and Tester failure rechecks before the initial final overall Reviewer review. Once that review begins on plan work, every final Reviewer finding, including behavior, follows Implementer → Reviewer without Tester reassignment until resolved. Keep corrections uncommitted through Reviewer rechecks, then accept and create one focused follow-up commit. Separate Tester findings and new failures from final verification, which may run concurrently with the final Reviewer, follow Implementer → Tester; Reviewer evidence for affected files then needs a refreshed-diff recheck. Preserve required Tester outside this final Reviewer exception.
142
174
  - [planning.plan-revision] Task progress records (checkboxes, notes, results, evidence and status) preserving the approved contract need no new user approval; Orchestrator includes the completed task's own records in its accepted implementation commit and records classification, reason and actual time as applicable. Plan-level progress records preserving the approved contract also need no new user approval and alone never trigger the standalone docs(plan) closing commit. All other spec/plan content changes, contract or mechanical, require applicable approval and preparation; changes to goals, scope, criteria, method, risk, dependencies or required verification need revised-version approval, preparation and holds on affected work before it continues, with a fresh Implementer for remaining work. After approval Orchestrator edits the same document, appends a revision-history row and leaves it uncommitted as an Orchestrator-owned pending revision, recording version, content hash, approval reference, actual time, classification, reason, affected tasks and the full approved content in the canonical handoff record. Orchestrator includes all pending revisions with Plan-Revision, Plan-Approved-At and Plan-Reason trailers in the accepted commit of the first top-level task executed or reconfirmed against the revised version, otherwise in a current task or final Reviewer follow-up commit; only when no implementation work remains before overall completion MAY it make one standalone docs(plan) closing commit without implementation files. Exclude revision hunks from commits of independent tasks accepted on a prior version, or hold that commit when separation is unsafe. NEVER amend or rewrite planning or implementation commits, create any other docs/fixup commit or authorize past work retroactively. After commit verify the committed document content matches the latest approved content apart from classified progress records of that commit's task or committed for other tasks after approval, or plan-level progress records carried by that commit, and that no pending revision remains. Follow planning, handoff-prep, commit and verification for the full contract.
143
175
  - [platform.grok] Role restrictions are prompt-level contracts, not a filesystem sandbox. Grok sandboxing, native tool restriction fields, observer hooks and Git guards are unverified, and Grok may continue without its sandbox. Use only available authorized tools; ARC disables Grok Claude compatibility (agents, skills, rules in config.toml; also MCPs and hooks for bridge children), but whether Grok sessions honor these settings is unverified.
144
176
  [ARC role policy: contract end]
@@ -3,6 +3,8 @@
3
3
 
4
4
  Follow the common [managed worktree contract](handoff-worktree.md) only after explicit user selection and verified preparation scope. Preserve the approved source/base, branch candidate, absent destination, unrelated changes and transfer evidence.
5
5
 
6
+ In a worktree session, use the ARC runtime command `node <runtime>/cli.mjs handoff-record write --cwd <abs> --slug <slug> --input -` instead of a file tool. Set `<runtime>` to the installed ARC skill runtime directory and send a JSON object with a nonempty `content` string containing the full Markdown record on stdin. Use the existing inline fallback if the command fails.
7
+
6
8
  Grok native attachment has not been verified. DO NOT substitute Claude EnterWorktree, invent an attachment call or treat Git registration as attachment evidence. Hold managed worktree creation until Orchestrator has an approved, verified attachment method. The current checkout remains available only after explicit target selection.
7
9
 
8
10
  On failure or partial completion, stop dependent work, preserve actual state and return paths, branch/HEAD, registration, completed steps and required resolution. NEVER retry with a different name, remove a worktree, change permissions or bypass the sandbox.
@@ -3,6 +3,7 @@ import {createPlatformRegistry,standaloneProfileFile} from '../runtime/platform-
3
3
  import path from 'node:path';
4
4
  import {inspectPath,TargetConfigurationError} from './targets.mjs';
5
5
  import {inspectCompositeRemoval,parseInstalledRoutingConfig,legacyAnchorPlatform} from './role-routing.mjs';
6
+ import {legacyRoutingNames} from './legacy-profiles.mjs';
6
7
  export function isOwnedStandaloneProfile(bytes,platform,role,context={}){
7
8
  return installerRegistryOf(context).getPlatform(platform)?.profiles.isOwnedStandalone(bytes,role)??false;
8
9
  }
@@ -21,7 +22,8 @@ export function readInstallMode({safeFs,targets,unresolved=[],snapshot=new Map()
21
22
  const marker=path.join(target.home,'arc-role-platform-routing.prepared.json'),found=inspectPath(safeFs,marker,{kind:'file',read:true,snapshot});
22
23
  const paths=found.exists?[marker]:[],agents=path.join(target.home,'agents');
23
24
  inspectPath(safeFs,agents,{kind:'directory',tree:true,allowLinks:true,snapshot});
24
- for(const [filename,value]of snapshot)if(value&&path.dirname(filename)===agents&&path.basename(filename).startsWith('arc-routing-'))paths.push(filename);
25
+ const legacyNames=legacyRoutingNames(id,{platforms});
26
+ for(const [filename,value]of snapshot)if(value&&path.dirname(filename)===agents&&path.basename(filename).startsWith('arc-routing-')&&!legacyNames.includes(path.basename(filename)))paths.push(filename);
25
27
  routing.set(id,paths);homes[id]='standalone';
26
28
  }
27
29
  let config=null,participating=[],anchor=null;
@@ -45,7 +47,7 @@ export function readInstallMode({safeFs,targets,unresolved=[],snapshot=new Map()
45
47
  }
46
48
  for(const [id,paths]of routing)if(!participating.includes(id)&&paths.length)return unverified();
47
49
  for(const id of participating){
48
- const target=targets[id],result=inspectCompositeRemoval({target,safeFs,activeConfigPath:active.path,anchor:target.home===path.dirname(active.path),snapshot,runtimePlatforms});
50
+ const target=targets[id],result=inspectCompositeRemoval({target,safeFs,activeConfigPath:active.path,snapshot,runtimePlatforms,platforms,migrateLegacy:true});
49
51
  if(result.residualPaths.length||!result.removals.length)return unverified();
50
52
  if(routing.get(id).some(filename=>!result.removals.includes(filename)))return unverified();
51
53
  }
@@ -1,7 +1,7 @@
1
1
  import {validatePlanSet} from './plan.mjs';
2
2
  import {installerRegistryOf} from '../platforms/index.mjs';
3
3
  import {assertPlanSnapshot,applyTransaction} from './transaction.mjs';
4
- function pending(plan){return{platform:plan.target.platform,status:'not-started',rollback:'not-needed',residualPaths:[],error:null};}
4
+ function pending(plan){return{platform:plan.target.platform,status:'not-started',rollback:'not-needed',residualPaths:[...(plan.legacyResiduals??[])],legacyResiduals:plan.legacyResiduals??[],error:null};}
5
5
  export async function installTargets(plans,{safeFs,signal,hooks={},platforms}){
6
6
  const registry=installerRegistryOf({platforms}),ordered=[...plans].sort((a,b)=>registry.getPlatform(a.target.platform).runtime.anchorOrder-registry.getPlatform(b.target.platform).runtime.anchorOrder);const results=ordered.map(pending);let interrupted=false;
7
7
  let invalid=false;
@@ -12,7 +12,8 @@ export async function installTargets(plans,{safeFs,signal,hooks={},platforms}){
12
12
  if(results[first].status==='failed'||results[second].status==='failed')continue;
13
13
  try{validatePlanSet([ordered[first],ordered[second]]);}catch(error){results[first]={...results[first],status:'failed',error};results[second]={...results[second],status:'failed',error};invalid=true;}
14
14
  }
15
- if(invalid)return{results,interrupted};
15
+ const legacyResiduals=[...new Set(results.flatMap(item=>item.legacyResiduals))];
16
+ if(invalid)return{results,interrupted,legacyResiduals};
16
17
  for(let index=0;index<ordered.length;index++){
17
18
  const plan=ordered[index];if(signal?.aborted){interrupted=true;break;}
18
19
  let failed=false;
@@ -23,5 +24,5 @@ export async function installTargets(plans,{safeFs,signal,hooks={},platforms}){
23
24
  }catch(error){const cancelled=signal?.aborted||error.code==='ARC_INSTALL_CANCELLED';interrupted=Boolean(cancelled);results[index]={...results[index],status:'failed',rollback:error.rollback??'not-needed',residualPaths:[...results[index].residualPaths,...(error.residualPaths??[])],error};failed=true;}
24
25
  if(failed)break;
25
26
  }
26
- return{results,interrupted};
27
+ return{results,interrupted,legacyResiduals};
27
28
  }
@@ -51,7 +51,7 @@ export function runModePolicy(runMode) {
51
51
  if (validateRunMode(runMode) === 'supervised') {
52
52
  return "**Run mode:** Supervised. Every approval and choice gate in this skill and its references requires the user's explicit answer; Orchestrator does not auto-decide gates.";
53
53
  }
54
- return "**Run mode:** Full Auto. Orchestrator decides the gates listed in [planning](references/planning.md#full-auto-run-mode) itself: it completes that gate's required checks first, then chooses the recommended option; without a recommendation and supporting evidence, it asks the user. New product decisions outside the original request, external actions, failures, partial completion, holds, unknown state, ownership conflicts, preservation-rule Git actions, permission or sandbox approvals, and unknown slots or exhausted capacity still go to the user. Plan depth, local commit rules, QA, Reviewer and acceptance are unchanged. Record each decision as `auto-decided (Full Auto): <gate> → <choice>; reason; alternatives; evidence` in a user-visible progress message and in the canonical handoff record. If the user asks in this chat to stop auto-deciding or to use Supervised, apply Supervised from the next gate; this overrides the installed default, and earlier auto-decisions stay recorded.";
54
+ return "**Run mode:** Full Auto. Orchestrator decides the gates listed in [planning](references/planning.md#full-auto-run-mode) itself: it completes that gate's required checks first, then chooses the recommended option; without a recommendation and supporting evidence, it asks the user. New product decisions outside the original request, external actions, failures, partial completion, holds, unknown state, ownership conflicts, preservation-rule Git actions, permission or sandbox approvals, and unknown slots or exhausted capacity still go to the user. Plan depth, local commit rules, Tester, Reviewer and acceptance are unchanged. Record each decision as `auto-decided (Full Auto): <gate> → <choice>; reason; alternatives; evidence` in a user-visible progress message and in the canonical handoff record. If the user asks in this chat to stop auto-deciding or to use Supervised, apply Supervised from the next gate; this overrides the installed default, and earlier auto-decisions stay recorded.";
55
55
  }
56
56
 
57
57
  export function renderRunModePolicy(bytes, runMode) {
@@ -0,0 +1,51 @@
1
+ import path from 'node:path';
2
+ import {openRoot} from '../safe-fs/index.mjs';
3
+ import {installerRegistryOf} from '../platforms/index.mjs';
4
+ import {standaloneProfileFile,routingProfileFile} from '../runtime/platform-registry.mjs';
5
+ import {inspectPath} from './targets.mjs';
6
+
7
+ export const legacyRole = 'arc_qa';
8
+
9
+ function profileNames(descriptor) {
10
+ const {profile}=descriptor.runtime;
11
+ return {
12
+ standalone: new Set([standaloneProfileFile(descriptor.runtime,legacyRole),`${profile.standaloneName(legacyRole)}.${profile.ext}`]),
13
+ routing: new Set([routingProfileFile(descriptor.runtime,legacyRole),`${profile.routingName(legacyRole)}.${profile.ext}`]),
14
+ };
15
+ }
16
+
17
+ export function legacyProfileNames(platform,{platforms}={}) {
18
+ const descriptor=installerRegistryOf({platforms}).getPlatform(platform);
19
+ if(!descriptor)return [];
20
+ const {standalone,routing}=profileNames(descriptor);
21
+ return [...new Set([...standalone,...routing])];
22
+ }
23
+
24
+ export function legacyRoutingNames(platform,context) {
25
+ const descriptor=installerRegistryOf(context).getPlatform(platform);
26
+ return descriptor?[...profileNames(descriptor).routing]:[];
27
+ }
28
+
29
+ // Planning entry points are synchronous and share the ownership snapshot with the transaction.
30
+ export function inspectLegacyProfiles({platform,agentsDir,mode,safeFs={openRoot},snapshot=new Map(),platforms}) {
31
+ const remove=[],residual=[],descriptor=installerRegistryOf({platforms}).getPlatform(platform);
32
+ if(!descriptor)return {remove,residual};
33
+ const {standalone,routing}=profileNames(descriptor);
34
+ const candidates=new Map();
35
+ for(const name of new Set([...standalone,...routing])) {
36
+ const filename=path.resolve(agentsDir,name);
37
+ const file=inspectPath(safeFs,filename,{kind:'file',read:true,allowLeafLink:true,snapshot:candidates});
38
+ if(!file.exists)continue;
39
+ const metadata=candidates.get(filename);
40
+ snapshot.set(filename,metadata);
41
+ const owned=file.type==='file'&&(routing.has(name)
42
+ ? filename===mode?.profile?.path&&'sha256:'+metadata.sha256===mode.profile.hash
43
+ : descriptor.profiles.isOwnedStandalone(file.bytes,legacyRole,{legacy:true}));
44
+ (owned?remove:residual).push(filename);
45
+ }
46
+ return {remove,residual};
47
+ }
48
+
49
+ export async function classifyLegacyProfiles(options) {
50
+ return inspectLegacyProfiles(options);
51
+ }
@@ -49,7 +49,7 @@ export function verifyPayload({packageRoot,safeFs,payloadMode='auto',platforms,r
49
49
  required.push('shared/skill/runtime/role-policy.json',...RUNTIME_MODULE_PATHS.map(name=>`shared/skill/runtime/${name.slice('lib/runtime/'.length)}`));
50
50
  for(const tuple of ['darwin-arm64','darwin-x64','linux-arm64-gnu','linux-x64-gnu'])required.push(`prebuilds/${tuple}/arc_safe_fs.node`);
51
51
  for(const name of [...COOPERATIVE_RUNTIME_MODULES,'role-policy.json'])required.push(`shared/skill/runtime/${name}`);
52
- const modelInputs={};for(const {runtime,payloadPrefix}of descriptors){const base=`${payloadPrefix}/skill`;required.push(`${base}/SKILL.md`,`${base}/models.toml`,`${base}/references/limits.md`);const profiles=new Map();for(const role of ['scouter','planner','implementer','qa','reviewer']){const name=standaloneProfileFile(runtime,`arc_${role}`),key=`${payloadPrefix}/agents/${name}`;required.push(key);profiles.set(name,files.get(key));}modelInputs[runtime.id]={models:files.get(`${base}/models.toml`),profiles};}
52
+ const modelInputs={};for(const {runtime,payloadPrefix}of descriptors){const base=`${payloadPrefix}/skill`;required.push(`${base}/SKILL.md`,`${base}/models.toml`,`${base}/references/limits.md`);const profiles=new Map();for(const role of ['scouter','planner','implementer','tester','reviewer']){const name=standaloneProfileFile(runtime,`arc_${role}`),key=`${payloadPrefix}/agents/${name}`;required.push(key);profiles.set(name,files.get(key));}modelInputs[runtime.id]={models:files.get(`${base}/models.toml`),profiles};}
53
53
  for(const descriptor of descriptors)for(const name of descriptor.instructionTemplates??[])required.push(`${descriptor.payloadPrefix}/${name}`);
54
54
  for(const name of required)if(!files.has(name))throw Error(`Required runtime asset is missing: ${name}`);
55
55
  const agentRegistry=JSON.parse(files.get('lib/prompts/agent-fragments.json').toString('utf8'));
@@ -1,4 +1,5 @@
1
1
  import {inspectStandaloneProfile} from './install-mode.mjs';
2
+ import {inspectLegacyProfiles} from './legacy-profiles.mjs';
2
3
  import {installerRegistryOf} from '../platforms/index.mjs';
3
4
  import {renderAgentProfile} from '../prompts/render.mjs';
4
5
  import {PayloadValidationError} from './manifest.mjs';
@@ -63,7 +64,7 @@ function renderNativeChanges({target,safeFs,snapshot,skipGlobal,preview,concurre
63
64
  }
64
65
  return globalChanges;
65
66
  }
66
- export function buildInstallPlan({payload,target,roles,profiles:profileMode='write',skipGlobal=false,safeFs,limits,concurrentExplicit=false,limitsPreview,language='en',languagePreview,runMode,modelConfig,verifiedCatalog,platforms,runtimePlatforms}){
67
+ export function buildInstallPlan({payload,target,roles,profiles:profileMode='write',deferLegacyProfiles=profileMode==='omit',skipGlobal=false,safeFs,limits,concurrentExplicit=false,limitsPreview,language='en',languagePreview,runMode,modelConfig,verifiedCatalog,platforms,runtimePlatforms}){
67
68
  validateLanguage(language);
68
69
  if(languagePreview)assertPlanSnapshot({snapshot:languagePreview.snapshot},{safeFs});
69
70
  const languageState=languagePreview??previewLanguage({target,safeFs});
@@ -83,12 +84,13 @@ export function buildInstallPlan({payload,target,roles,profiles:profileMode='wri
83
84
  const externalPaths=[],summary=['Verified packaged Superpowers references will be installed inside ARC'];
84
85
  summary.push(`ARC limits: total ${limits.max_total_subagents}; concurrent ${limits.max_concurrent_subagents} (policy: ${arc}/limits.toml)`);
85
86
  const globalChanges=renderNativeChanges({target,safeFs,snapshot,skipGlobal,preview,concurrentExplicit,limits,summary,language,runMode,platforms});
86
- const managedPaths=[arc,...profilePaths,...globalChanges.map(change=>change.path)];
87
+ const legacy=deferLegacyProfiles?{remove:[],residual:[]}:inspectLegacyProfiles({platform:target.platform,agentsDir:agents,safeFs,snapshot,platforms});
88
+ const managedPaths=[arc,...profilePaths,...legacy.remove,...globalChanges.map(change=>change.path)];
87
89
  for(const [filename,metadata]of preview.snapshot)snapshot.set(filename,metadata);
88
90
  for(const [filename,metadata]of languageState.snapshot)snapshot.set(filename,metadata);
89
91
  summary.push(`ARC output language: ${language}`);
90
92
  for(const item of modelSnapshot)snapshot.set(...item);
91
- const plan={target,language,runMode,roles,skipGlobal,limits,concurrentExplicit,profileWrites,residualPaths,generated:{models:modelBytes,profiles,skill},globalChanges,managedPaths,externalPaths,snapshot,summary};validatePlanSet([plan]);return plan;
93
+ const plan={target,language,runMode,roles,skipGlobal,limits,concurrentExplicit,profileWrites,residualPaths,legacyRemovals:legacy.remove,legacyResiduals:legacy.residual,generated:{models:modelBytes,profiles,skill},globalChanges,managedPaths,externalPaths,snapshot,summary};validatePlanSet([plan]);return plan;
92
94
  }
93
95
  function overlaps(a,b){return a===b||a.startsWith(b+'/')||b.startsWith(a+'/');}
94
96
  export function validatePlanSet(plans){
@@ -3,7 +3,7 @@ import {inspectStandaloneProfile} from './install-mode.mjs';
3
3
  import {inspectPath,TargetConfigurationError} from './targets.mjs';
4
4
  import {loadModelConfig,withRoles,serializeModelConfig,resolveModelSettings,renderProfiles} from '../models/index.mjs';
5
5
  import {assertPlanSnapshot,applyTransaction} from './transaction.mjs';
6
- import {readModelFileVersion} from '../models/config.mjs';
6
+ import {MODEL_SCHEMA_VERSION,readModelFileVersion} from '../models/config.mjs';
7
7
  import {isDeepStrictEqual} from 'node:util';
8
8
  import {assertCatalogRoles} from '../models/catalog.mjs';
9
9
  import {validatePlanSet,renderStandaloneProfiles} from './plan.mjs';
@@ -19,7 +19,7 @@ export function buildPresetPlan({target,roles,safeFs,verifiedCatalog,payload,loa
19
19
  const profileInputs=residualPaths.length?renderStandaloneProfiles({platforms,runtimePlatforms,payload:payload??loadPayload(),target,modelConfig:next,language:parseLanguage(read(path.join(target.home,'skills/arc/settings.toml'))).language}):new Map();
20
20
  for(const entry of originalProfiles)profileInputs.set(...entry);
21
21
  const profiles=renderProfiles(profileInputs,resolveModelSettings(next,{runtimePlatforms}),{runtimePlatforms,renderProfile:installerRegistryOf({platforms}).getPlatform(target.platform).profiles.render}),specs=[];
22
- if(readModelFileVersion(originalModels)<3||!isDeepStrictEqual(config.roles,next.roles))specs.push({path:modelsPath,bytes:Buffer.from(serializeModelConfig(next,{runtimePlatforms}))});
22
+ if(readModelFileVersion(originalModels)<MODEL_SCHEMA_VERSION||!isDeepStrictEqual(config.roles,next.roles))specs.push({path:modelsPath,bytes:Buffer.from(serializeModelConfig(next,{runtimePlatforms}))});
23
23
  for(const[name,bytes]of profiles)if(originalProfiles.has(name)&&!bytes.equals(originalProfiles.get(name)))specs.push({path:path.join(target.home,'agents',name),bytes});
24
24
  return{target,roles:next.roles,snapshot,managedPaths,residualPaths,externalPaths:[],specs};
25
25
  }