@yunhozz/arc 0.5.6 → 0.6.0

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 (130) hide show
  1. package/MANIFEST.sha256 +124 -110
  2. package/README.md +37 -113
  3. package/claude/agents/arc-architect.md +44 -0
  4. package/claude/agents/arc-implementer.md +2 -2
  5. package/claude/agents/arc-planner.md +5 -5
  6. package/claude/agents/arc-reviewer.md +1 -1
  7. package/claude/agents/arc-scouter.md +1 -1
  8. package/claude/agents/arc-tester.md +1 -1
  9. package/claude/skill/SKILL.md +6 -6
  10. package/claude/skill/models.toml +5 -1
  11. package/claude/skill/references/arc-visual-companion.md +2 -21
  12. package/claude/skill/references/commit.md +5 -32
  13. package/claude/skill/references/coordination.md +29 -134
  14. package/claude/skill/references/git-recovery.md +3 -3
  15. package/claude/skill/references/handoff-prep.md +9 -24
  16. package/claude/skill/references/handoff.md +19 -108
  17. package/claude/skill/references/limits.md +4 -15
  18. package/claude/skill/references/planning.md +32 -119
  19. package/claude/skill/references/verification.md +17 -119
  20. package/claude/skill/references/worktree-creation.md +1 -1
  21. package/claude/skill/scripts/model_config.py +24 -11
  22. package/codex/agents/arc-architect.md +36 -0
  23. package/codex/agents/{arc-implementer.toml → arc-implementer.md} +10 -5
  24. package/codex/agents/{arc-planner.toml → arc-planner.md} +14 -7
  25. package/codex/agents/{arc-reviewer.toml → arc-reviewer.md} +13 -4
  26. package/codex/agents/{arc-scouter.toml → arc-scouter.md} +13 -4
  27. package/codex/agents/{arc-tester.toml → arc-tester.md} +13 -4
  28. package/codex/skill/SKILL.md +6 -6
  29. package/codex/skill/models.toml +5 -1
  30. package/codex/skill/references/arc-visual-companion.md +3 -27
  31. package/codex/skill/references/commit.md +5 -32
  32. package/codex/skill/references/coordination.md +25 -131
  33. package/codex/skill/references/git-recovery.md +2 -7
  34. package/codex/skill/references/handoff-prep.md +9 -24
  35. package/codex/skill/references/handoff.md +19 -108
  36. package/codex/skill/references/limits.md +5 -16
  37. package/codex/skill/references/planning.md +32 -119
  38. package/codex/skill/references/verification.md +16 -118
  39. package/codex/skill/scripts/apply-models.py +5 -5
  40. package/codex/skill/scripts/model_config.py +23 -12
  41. package/gemini/GEMINI.md +1 -1
  42. package/gemini/agents/arc-architect.md +39 -0
  43. package/gemini/agents/arc-implementer.md +1 -1
  44. package/gemini/agents/arc-planner.md +4 -4
  45. package/gemini/instructions.md +1 -1
  46. package/gemini/skill/SKILL.md +6 -6
  47. package/gemini/skill/models.toml +5 -1
  48. package/gemini/skill/references/arc-visual-companion.md +2 -21
  49. package/gemini/skill/references/commit.md +5 -32
  50. package/gemini/skill/references/coordination.md +32 -137
  51. package/gemini/skill/references/git-recovery.md +3 -3
  52. package/gemini/skill/references/handoff-prep.md +9 -24
  53. package/gemini/skill/references/handoff.md +19 -108
  54. package/gemini/skill/references/limits.md +4 -15
  55. package/gemini/skill/references/planning.md +32 -119
  56. package/gemini/skill/references/verification.md +17 -119
  57. package/grok/AGENTS.md +1 -1
  58. package/grok/agents/arc-architect.md +39 -0
  59. package/grok/agents/arc-implementer.md +1 -1
  60. package/grok/agents/arc-planner.md +4 -4
  61. package/grok/instructions.md +1 -1
  62. package/grok/skill/SKILL.md +5 -5
  63. package/grok/skill/models.toml +5 -1
  64. package/grok/skill/references/arc-visual-companion.md +2 -21
  65. package/grok/skill/references/commit.md +5 -32
  66. package/grok/skill/references/coordination.md +30 -135
  67. package/grok/skill/references/git-recovery.md +3 -3
  68. package/grok/skill/references/handoff-prep.md +9 -24
  69. package/grok/skill/references/handoff.md +19 -108
  70. package/grok/skill/references/limits.md +4 -15
  71. package/grok/skill/references/planning.md +32 -119
  72. package/grok/skill/references/verification.md +17 -119
  73. package/lib/installer/global-config.mjs +1 -1
  74. package/lib/installer/manifest.mjs +20 -3
  75. package/lib/installer/role-routing.mjs +6 -3
  76. package/lib/installer/targets.mjs +1 -1
  77. package/lib/installer/upgrade-state.mjs +3 -2
  78. package/lib/models/config.mjs +22 -5
  79. package/lib/models/profiles.mjs +6 -1
  80. package/lib/platforms/agent-templates.mjs +1 -0
  81. package/lib/platforms/codex.mjs +2 -0
  82. package/lib/platforms/formats/codex-markdown.mjs +58 -0
  83. package/lib/platforms/formats/gemini-markdown.mjs +3 -2
  84. package/lib/platforms/formats/grok-markdown.mjs +3 -2
  85. package/lib/platforms/formats/markdown.mjs +3 -2
  86. package/lib/platforms/formats/toml.mjs +3 -2
  87. package/lib/policy/placement.mjs +1 -1
  88. package/lib/policy/render.mjs +6 -5
  89. package/lib/policy/role-policy.json +36 -7
  90. package/lib/prompts/agent-fragments.json +107 -24
  91. package/lib/prompts/render.mjs +69 -19
  92. package/lib/runtime/adapters/codex.mjs +1 -1
  93. package/lib/runtime/evaluate.mjs +4 -3
  94. package/lib/runtime/identity.mjs +1 -1
  95. package/lib/runtime/operations.mjs +2 -2
  96. package/lib/runtime/role-bridge-args.mjs +5 -3
  97. package/lib/runtime/role-bridge.mjs +24 -2
  98. package/lib/runtime/role-dispatch-policy.mjs +2 -1
  99. package/lib/runtime/role-dispatch-store.mjs +44 -1
  100. package/lib/runtime/role-observe.mjs +12 -4
  101. package/lib/runtime/role-routing-config.mjs +9 -4
  102. package/lib/runtime/role-supervisor.mjs +16 -2
  103. package/lib/tui/diagram.mjs +2 -3
  104. package/lib/tui/setup.mjs +13 -11
  105. package/lib/watch/labels.mjs +1 -1
  106. package/lib/watch/model.mjs +2 -2
  107. package/lib/watch/render.mjs +2 -2
  108. package/package.json +1 -1
  109. package/scripts/update-manifest.mjs +1 -1
  110. package/shared/skill/references/arc-visual-companion-common.md +39 -0
  111. package/shared/skill/references/commit-common.md +45 -0
  112. package/shared/skill/references/coordination-common.md +200 -0
  113. package/shared/skill/references/git-recovery-common.md +15 -0
  114. package/shared/skill/references/handoff-common.md +182 -0
  115. package/shared/skill/references/handoff-prep-common.md +53 -0
  116. package/shared/skill/references/limits-common.md +34 -0
  117. package/shared/skill/references/planning-common.md +185 -0
  118. package/shared/skill/references/verification-common.md +172 -0
  119. package/shared/skill/runtime/adapters/codex.mjs +1 -1
  120. package/shared/skill/runtime/evaluate.mjs +4 -3
  121. package/shared/skill/runtime/identity.mjs +1 -1
  122. package/shared/skill/runtime/operations.mjs +2 -2
  123. package/shared/skill/runtime/role-bridge-args.mjs +5 -3
  124. package/shared/skill/runtime/role-bridge.mjs +24 -2
  125. package/shared/skill/runtime/role-dispatch-policy.mjs +2 -1
  126. package/shared/skill/runtime/role-dispatch-store.mjs +44 -1
  127. package/shared/skill/runtime/role-observe.mjs +12 -4
  128. package/shared/skill/runtime/role-policy.json +36 -7
  129. package/shared/skill/runtime/role-routing-config.mjs +9 -4
  130. package/shared/skill/runtime/role-supervisor.mjs +16 -2
@@ -0,0 +1,185 @@
1
+ # Planning and approval — shared text
2
+
3
+ This file holds text shared by every platform's planning.md. Each part belongs to the section that links to it and has the same force there.
4
+
5
+ <a id="authorization-and-scope"></a>
6
+ ## Authorization and scope
7
+
8
+ Use the [fast gate and envelope](handoff.md#orchestrator-direct-path-for-small-tasks) alongside these existing scope and approval rules; reuse valid approvals and hold changed scope under these rules.
9
+
10
+ An explicit execution request authorizes only sufficiently specified scope from that request or a description the user explicitly references. Confirm intent/outcome/constraints/document depth/verification risk and no unresolved material behavior/method/risk decision. Record approval evidence, scope, criteria, constraints and depth. Orchestrator MAY choose routine execution/check details, not unapproved product behavior/material scope. Restating/handoff/restart of unchanged scope needs no new approval.
11
+
12
+ Silence, ambiguous assent, other-work approval and vague blanket improvements are insufficient. The drafting role's new material choices are not automatically approved. Request missing decisions through Orchestrator. Required specs/plans retain separate ordered approval.
13
+
14
+ Hold affected work for material changes to scope, method or risk, and report the missing decision, evidence and remaining scope. Target change, unclear ownership, unexpected state, unresolved failure or missing inputs also hold under [handoff](handoff.md)/[recovery](git-recovery.md). Distinguish new authorization from existing-scope execution issues; routine correction/reverification needs no duplicate approval. Revalidate after resolution.
15
+
16
+ <a id="probe-scope"></a>
17
+ ### Probe scope
18
+
19
+ Probe-only work ends with approved-question findings/evidence/limits/uncertainty, including well-supported infeasibility. It authorizes neither product retention nor subsequent implementation. Record question/method/scope/criteria/constraints; a specific request MAY approve them. Match checks to purpose/risk, not product-proof claims.
20
+
21
+ If explicitly requested probe+implementation is fully specified, classify the whole scope. Under Bounded conditions, probing is internal with no new report-time approval boundary. Unknown implementation is not blanket authorization. Materially changed scope/method/risk or new decisions hold implementation for reassessment and required design/spec/plan approvals. Probe-only remains separate.
22
+
23
+ <a id="formal-drafting-boundary"></a>
24
+ ## Formal drafting boundary
25
+
26
+ Initial design/brainstorming MAY precede target choice. On the Architectural path, [start confirmation](planning.md#architectural-start-confirmation) supplies the approved scope/depth/document set and the explicit choice that the next sentence requires. Before the first required spec/plan draft, record verified source workspace/repository, branch/HEAD, changes/ownership, explicit choice, approved scope/depth/document set and planned relative paths. The drafting role (Architect or Planner) returns the complete first draft and self-review in chat before target preparation. Revalidate source and selected target at the focused preparation gate, prepare the chosen target, compare actual target and preservation, then review and save in the verified prepared target. Planned paths prove no preparation. Missing or mismatched evidence holds affected work; preparation alone never starts Implementer.
27
+
28
+ Small-task direct edits follow only [handoff](handoff.md#orchestrator-direct-path-for-small-tasks), stopping/reclassifying changed scope/risk. Otherwise follow this reference. `brainstorming`/`writing-plans` instruct existing roles, not extra agents; ARC routing/approval overrides alternate executors. Missing required skills block their stage. Integration includes saving, reviewing and directly revising the same spec or plan after the Architect returns a complete spec draft or the Planner returns a complete plan draft; design/brainstorming retain their Architect drafting path.
29
+
30
+ For Korean requests and briefs, the drafting role uses Korean titles and prose unless another language is requested, preserving identifiers, skill/API names, code, paths, commands and literals. Orchestrator preserves agreed language when saving.
31
+
32
+ <a id="planner-drafting-preparation-and-consolidated-feedback"></a>
33
+ ## Drafting preparation and consolidated feedback
34
+
35
+ The drafting role (Architect or Planner) reports initial/revision progress only to Orchestrator: brief stage/feedback/blocker/next step, never body/excerpts/incremental drafts. Return complete draft/self-review. Raw responses may appear in app/tool surfaces; prompt policy cannot hide them. User updates stay brief/status-based without draft content. At approval present integrated/saved/reviewed Markdown without repeating its body in chat.
36
+
37
+ Before dispatching a drafting role, evaluate F1–F8 direct-path eligibility and Bounded plan-omission eligibility independently. Enter each path only when all of that path's existing conditions are proven; if neither path qualifies, use normal full evaluation. Orchestrator can read a few already identified files directly; route material research and broad static exploration to Scouter.
38
+
39
+ 1. Preflight relevant policy/references/profiles/tests/parity/manifest/conflicts. Apply formal-target and coordination provenance/input/local-skill gates, including required paths, approved bounded read alternatives and return conditions. Missing inputs/conflicts hold drafting. Read recovery grants no preparation/check/write/approval authority.
40
+ 2. Maintain a compact ledger of original requirements/IDs, approved/open decisions, exclusions and scope deltas. Consolidate intervening user changes into one brief delta. Separate approvals, path/line-verified facts, assumptions and open decisions.
41
+ 3. Reuse the same Architect only within the design/brainstorming stage while role, context and source remain valid. Within the design/brainstorming stage, reuse one Architect instance for every [design conversation](planning.md#design-conversation) response, the final design, its consolidated correction and any eligible further call. On the Architectural path, the Architect returns the start summary instead of a final design and, after [start confirmation](planning.md#architectural-start-confirmation), continues as the spec author through a spec-stage delta brief while role, context and source remain valid. Assign a fresh Architect for the spec stage if the design Architect is unavailable or its role, context or source is no longer valid. Assign a fresh Planner for each plan stage and reuse it only for a budget-hold delta within that stage. Each fresh instance's initial brief contains every required field plus saved document paths and approved versions (for the Architectural plan stage, the reviewed spec path, version and SHA-256), and cites a prior brief only when that brief is an accessible file. Send one complete stage-specific initial brief. Include verified source/HEAD/ownership, selected target intent and planned paths (or prepared target for later stages), and scope/exclusions/depth/dependencies/shared contracts/criteria/checks/evidence/holds. Include preceding approved versions and paths, current behavior and connected source/generated/runtime/installer/docs, policy conflicts/resolution direction and exact deliverable. Visual work includes approved sources/versions/criteria/open interpretations. Follow-up briefs send changed fields and cite an accessible prior brief for unchanged fields; inaccessible conversations or hashes alone cannot replace required inputs. Reuse evidence only for the same source set, absolute locator, resolved path, content fingerprint, purpose, approval scope and accessible context. When source, target or scope changed, reconfirm affected inputs.
42
+ 4. The drafting role returns the complete proportional first draft and self-review. Bounded plan density follows the Planner profile's ARC adaptation (per task ID/title, goal/scope/files, predecessors, criteria and required checks; short self-review checklist), while Architectural plans keep full writing-plans.md density. Briefs carry the Read/Grep exploration budget and MAY set a handback size limit. A return that stops at the exploration budget with a Scouter request is an input hold, not a missing or failed first draft; resend the stage brief as a delta with the Scouter evidence to the same drafting role instance. In the design stage, [design conversation](planning.md#design-conversation) responses are expected returns and use no correction opportunity. Orchestrator saves and reviews it against the fixed checklist: scope/evidence; targets/ownership/paths; policy/conflicts; task boundaries/dependencies/criteria; checks/evidence/holds; roles/approval/commit boundaries; completeness; inventory/scope notation (final design, Architectural start summary and Architectural spec: complete [decision inventory](planning.md#decision-inventory); every document: every file or contract marked change or no change (reason), no ambiguous scope wording). For spec or plan, Orchestrator directly revises the same document, including substantive omissions, before requesting approval. New product decisions outside approved scope require user input first; Orchestrator then revises the document. Missing or failed first drafts stop the stage and do not transfer initial authorship.
43
+ 5. For design and brainstorming, finish the checklist on the final design before one consolidated correction covering every substantive omission with criterion/defect/evidence/expected fix. Use deltas/`unchanged`; NEVER split by omission. Further calls after correction need approved material scope/evidence changes or concrete unmet checklist items plus meaningful new input/criterion progress. State changed input/target criterion/expected artifact/progress. Existing-scope omissions need no renewed scope approval. Repeated unmet criteria without new input/evidence/progress hold the stage; report criterion/observation/exact unblock decision. DO NOT repeat resolved questions or count rewording/agent replacement as progress.
44
+
45
+ For design and brainstorming, converse under [design conversation](planning.md#design-conversation) and allow one consolidated correction on the final design. On the Architectural path the conversation ends with the start summary instead of a final design; the summary receives no consolidated correction, and Orchestrator's review and direct revision apply to the spec draft. Orchestrator handles reformatting, re-expression, save and patch errors without calling either drafting role. Separate substantive work uses normal gates. Design, spec and plan stages remain separately ordered: Architectural plan drafting starts only after the spec is saved, reviewed and revised and its reviewed path, version and SHA-256 are fixed; NEVER draft spec and plan concurrently. Add no fixed call cap/profile count condition or incomplete-draft acceptance.
46
+
47
+ <a id="architectural-start-confirmation"></a>
48
+ ### Architectural start confirmation
49
+
50
+ 1. Scope: on the Architectural path there is no design document and no design approval. Bounded keeps its design approval; Spike, the direct path (F1–F8) and non-behavior paths are unchanged.
51
+ 2. Start summary: when the [design conversation](planning.md#design-conversation) ends, the Architect returns a short start summary instead of a final design: scope to change, user decisions, author judgments, already-answered items, open checks, path/depth/risk judgment, document set with planned relative paths, and every file or contract marked change or no change (reason). It carries the [decision inventory](planning.md#decision-inventory).
52
+ 3. Confirmation: Orchestrator checks the summary's decision inventory and scope notation, presents it and, in one confirmation, obtains the user's scope confirmation and explicit target choice under [handoff](handoff.md). The summary is neither saved nor committed. The confirmed summary supplies the approved scope/depth/document set and explicit choice required by the [formal drafting boundary](planning.md#formal-drafting-boundary).
53
+ 4. Continuation: Orchestrator sends the same Architect a spec-stage delta brief with verified source/branch/HEAD/ownership, the target choice, confirmed scope/depth, document set, planned paths and exploration budget; that Architect returns the complete first spec draft and self-review. If that Architect is unavailable or its role, context or source is no longer valid, assign a fresh Architect with a complete initial brief.
54
+ 5. Records: every Architectural spec includes a `Decision Record` section (its heading written in the document language) for user decisions and important Architect author judgments. Each entry records the decision, the chosen option, the alternatives rejected and why, and the result and impact. The Bounded short design uses its Approaches section for this purpose. A genuinely new decision during spec or plan drafting goes to the user; Orchestrator records the answer in the spec, rechecks spec↔plan consistency and redrafts affected documents. No design approval is requested.
55
+ 6. Full Auto: under [Full Auto](planning.md#full-auto-run-mode), scope confirmation within the original request MAY be auto-decided; target choice follows the Execution-target choice row; [approval.run-mode] limits apply unchanged.
56
+
57
+ <a id="design-path-and-plan-depth"></a>
58
+ ## Design path and plan depth
59
+
60
+ Record depth separately from risk. Risk controls checks/review, not design paths/plan approval. Bounded/omission is not low risk; Architectural adds no Tester/Reviewer at every stage. Apply risk rules and specific obligations.
61
+
62
+ 1. Before feature/design/behavior work, assign brief/evidence/local `brainstorming` to Architect. Architect proposes context/path/options/tradeoffs/criteria/assumptions/questions; Orchestrator selects path, integrates, announces scope, routes revisions and obtains approval. NEVER run drafting skills itself. Direct path uses scope record only.
63
+ 2. Spike distinguishes probe-only from specific combined scope. For Bounded work, Architect drafts the short design and Orchestrator obtains design approval before assigning a fresh Planner for any required plan or an Implementer for execution. Direct edits use an approved scope record. Architectural replaces design approval with one [start confirmation](planning.md#architectural-start-confirmation), then complete Architect spec/self-review and Orchestrator save/review/revision without a separate spec approval request; a fresh plan Planner then drafts from the reviewed spec, and the spec and every plan receive one [combined approval](planning.md#architectural-combined-approval). Both drafting roles are read-only and request no approval.
64
+ 3. Assess plan depth after design approval (Architectural: start confirmation) and before Implementer, separately from files/LOC/Bounded label. Architectural always uses `writing-plans` and the combined spec+plan approval regardless of size/locality/risk. Bounded skips only for one local change, no dependent stages/cross-component shared state/lifecycle/integration-order concerns and one verification path. Otherwise require a plan. Labels/no-plan requests do not bypass judgment.
65
+ 4. Record dependencies/depth reasons; also post the design path, depth and risk judgments in the SKILL.md Pre-action gate record. Planner returns complete plan/assumptions/open decisions/checks/self-review. Orchestrator saves/reviews/obtains approval before Implementer at user path or `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`. Default spec path is `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`.
66
+ 5. Every Implementer first start/restart needs applicable approvals/artifacts/brief/findings and full handoff. Non-behavior docs/config omit only inapplicable stages. Direct edits need approved scope record and same first-edit gates.
67
+
68
+ Bounded has no spec stage, spec approval or spec-necessity record. If Bounded work appears to need a spec-level document, DO NOT write one inside Bounded: reassess the design path as Architectural, inform the user and obtain the path-change approval required by existing rules before dependent drafting. Required plans alone imply no written spec.
69
+
70
+ Only Architect authors the first complete spec draft and self-review. Only Planner authors the first complete plan draft and self-review. Orchestrator reviews and directly revises the same document before approval. An unavailable or failed drafting role stops first drafting rather than transferring authorship. Design approval or start confirmation does not transfer initial authorship.
71
+
72
+ <a id="architectural-combined-approval"></a>
73
+ ## Architectural combined approval
74
+
75
+ For initial fast judgment apply the [fast gate](handoff.md#orchestrator-direct-path-for-small-tasks); its sufficient conditions do not change these depth decisions.
76
+
77
+ <a id="top-level-plan-tasks"></a>
78
+ ## Top-level plan tasks
79
+
80
+ Apply Planner rules: ID/title, goal/scope/files, predecessors/dependencies, criteria, required pre-acceptance Tester/checks/evidence and holds. Tasks MUST be independently implementable/verifiable/acceptable. Inseparable policy/profile/tests/manifest contracts start in one task. If inseparability appears later, stop for revised scope/planning/approvals; NEVER merge distinct approved tasks during execution. Each task also lists the consumers that pin what it changes (tests, fixtures, golden files, manifests and generated outputs), citing lookup evidence.
81
+
82
+ <a id="top-level-plan-tasks-2"></a>
83
+ ## Top-level plan tasks
84
+
85
+ Include the provisional trigger judgment with the substitute-check list and reasons in the plan's final verification section.
86
+
87
+ <a id="dependency-and-readiness-record"></a>
88
+ ## Dependency and readiness record
89
+
90
+ After approval and before first assignment, canonically link every task ID to plan version. Record explicit/implicit predecessors, inputs/outputs/shared contracts, files/conflicting resources, check/Tester paths, ready/held/reasons, initial ready batch and capacity/serialization reasons. Analyze shared APIs/contracts/generated artifacts/resources even across files. Unsettled contracts/incomplete dependencies block affected tasks; same-file concurrent Implementers are forbidden even on different lines. File separation/list order proves no independence.
91
+
92
+ Ready requires approvals/preparation, settled inputs/contracts, predecessor checks/Orchestrator acceptance/verified commits or accepted no-change, nonconflicting ownership/resources, available checks/Tester and slots under both full-tree ARC and lower actual runtime limits. Read [limits](limits.md); report runtime constraints without claiming capability. Start ready independent tasks concurrently with fresh Implementers within capacity. On the bridge route, independent Implementers that share one checkout MAY run in parallel only when their `allowedPaths` do not overlap, and otherwise run one at a time; no bridge dispatch shares a checkout in which a native Implementer writes, under [coordination](coordination.md#bridge-target-rules). Record holds/serialization rather than silently following order. Preserve risk/Tester/Reviewer/target gates.
93
+
94
+ Update on reports/checks/acceptance/commit/slot return/conflicts. Completion alone releases no dependent. Immediately reassess newly ready tasks without waiting for unrelated batches. Failed/uncertain predecessors hold only their chains. Refresh handoff each dispatch; shared Git follows commit rules. This map cannot rewrite approved boundaries or waive approval.
95
+
96
+ Example: with A → B → C, independent D and two slots, start A/D. After A's checks/acceptance/verified commit, B MAY start while D continues. A failure holds B/C, not unaffected D.
97
+
98
+ <a id="document-save-evidence-gates"></a>
99
+ ## Document-save evidence gates
100
+
101
+ Before the first Architectural spec save or any plan save, read this and record accessible brief/canonical evidence. Saving creates reviewable files, not approval/commits.
102
+
103
+ | Save | Required evidence |
104
+ |---|---|
105
+ | Spec | Confirmed start scope/evidence ([start confirmation](planning.md#architectural-start-confirmation)), complete Architect draft/self-review, Orchestrator integration/save/review ownership and absolute path. Architectural only |
106
+ | Plan | Bounded: approved design; Architectural: confirmed start scope and the reviewed spec path/version/SHA-256 and review evidence; depth judgment, plan list/dependencies, complete Planner draft/self-review, ownership and absolute path |
107
+
108
+ Saving for review requires no prior document approval, but does require valid target choice/actual preparation. The reviewed Architectural spec enters the document set before dependent planning; approval follows once for the full set. NEVER call uncommitted files committed. Missing or mismatched evidence stops the affected save.
109
+
110
+ <a id="complete-planning-document-set"></a>
111
+ ## Complete planning-document set
112
+
113
+ Include all current-scope required specs/plans, excluding future projects. Record scope/depth/absolute paths/coverage/versions/status/dependencies/order/omissions/reasons/pending drafting and approvals. Complete means every required document written and approved (Architectural: one combined spec+plan approval; Bounded: plan approval) and no unresolved decision requiring another document. Omit no required artifact.
114
+
115
+ A required plan implies no spec. Spec stages cover Architectural only; plan stages cover required plans only. Add no spec duty to Spike/plan-skip/non-behavior paths.
116
+
117
+ Order: initial design approval → explicit target and source snapshot → first required draft/self-review → focused preparation gate → actual preparation/comparison → save/review/revision → Architectural: dependent plan drafting/save/review/revision → spec↔plan consistency check → one combined approval; Bounded: plan approval → full set → verify existing commits/batch remaining approvals → final Git → Implementer. On the Architectural path, [start confirmation](planning.md#architectural-start-confirmation) takes the place of initial design approval in this order and carries the explicit target choice. Omission skips only inapplicable documents with rationale. Complete documents precede staging/commit/handoff, not initial preparation/choice request. Partial approvals authorize no early implementation.
118
+
119
+ Defer local `brainstorming`'s early spec commit: save/self-review/review the uncommitted spec, draft/save/review all plans, obtain the combined approval, then final batch. Modify no external skill. `writing-plans` implementation commits grant neither planning-document commits nor early Implementer.
120
+
121
+ | Path | Approval/preparation |
122
+ |---|---|
123
+ | Spike | Approve question/method/scope/criteria/constraints; no forced unknown-implementation docs. Implementer probes require handoff; read-only Orchestrator or drafting-role probes without Implementer do not trigger it |
124
+ | Bounded, plan skipped | Approve short design; record omission conditions. Complete approvals, target choice, actual docs or valid absence, then handoff |
125
+ | Bounded, plan required | Approve design and all required plans; no spec. Draft the first required plan before target preparation; complete set before batch/handoff |
126
+ | Architectural | Start confirmation → reviewed written spec → all `writing-plans` plans → one combined spec+plan approval. First spec draft before target preparation; full set before batch/final checks/handoff |
127
+ | Non-behavior docs/config | Record scope/criteria/inapplicability. Preserve target/Git/docs-or-absence/handoff |
128
+
129
+ New planning scope requires list/depth/dependency reassessment and approvals before dependent drafting/commit. Approved-body changes need revised approval except task progress records below. New implementation scope holds execution until docs/approvals/preparation complete. Running Implementer stops before newly dependent edits; inspect actual changes/Git without retrospective preparation claims. Reflect approved versions through pending revisions below. Unchanged-document restarts follow handoff lifetime.
130
+
131
+ <a id="plan-updates-during-execution"></a>
132
+ ## Plan updates during execution
133
+
134
+ Task progress records (checkboxes, notes, results, evidence and completion status) preserving the approved contract need no new approval; record classification/reason/actual time. Plan-level progress records (final verification results, final Reviewer round verdicts and finding dispositions with user-decision references, and overall completion status) follow [commit](commit.md#execution-time-plan-document-updates): they ride the plan's next task acceptance or final Reviewer follow-up commit, or a standalone closing commit made for pending revisions; otherwise they stay only in the canonical record. After task completion Orchestrator includes that task's own records with its accepted implementation work in the same focused commit, excluding other tasks. DO NOT amend the original planning commit or create a separate docs/fixup commit for those records. Accepted no-change tasks follow the no-change path without empty commits. Removing checks, invented success, unsupported acceptance or mixed scope changes are not progress records.
135
+
136
+ Changes to goals, task boundaries, scope, criteria, method, risk, dependencies or checks require revised approval before affected work. Hold, obtain the applicable design approval (Bounded; Architectural records the new decision in the revised spec) and document approvals below and prepare target/ownership/checks/handoff. Other body corrections follow version approval; classify typos/paths/commands/explanations by semantic effect. Every non-progress content change, including a mechanical correction, is a plan revision requiring applicable approval/preparation. A contract revision requires a fresh Implementer for remaining work.
137
+
138
+ Execution-time document revisions take this approval: a spec change with affected plans needs one combined revision approval for the spec and those plans; a plan-only change needs plan approval; a spec-only change needs spec approval after Orchestrator records why no plan is affected. Partial approvals never carry over.
139
+
140
+ After approval Orchestrator edits the same file, appends a revision-history row and leaves the revision uncommitted. Apply cumulative revisions to that file and append another row. At document end use `Version | Approval time | Classification | Affected tasks | Reason`; keep rows append-only, with no SHA. Add v1 at the first revision using the actual initial approval time. Preserve actual approval chronology, not retroactive authorization; later committed content proves no earlier approval.
141
+
142
+ Keep all approved spec/plan revisions pending for the accepted commit of the first top-level task executed or reconfirmed against the revised version. Otherwise include them in a current task acceptance or final Reviewer follow-up commit. Only when no implementation work remains before overall completion MAY Orchestrator make one standalone `docs(plan)` closing commit: record that evidence canonically, include all pending revisions and no implementation files. No separate docs/fixup commit is allowed outside this sole closing exception. Plan-level progress records alone never trigger it. Overall completion requires no pending revisions. Exclude revision hunks from independent tasks accepted on a prior version; hold that commit if safe separation is impossible.
143
+
144
+ NEVER amend planning or implementation commits, reset, replay or rewrite their history. Preserve canonical pending revisions, approved content copies, versions/hashes, approval references/actual times, classification/reason, affected tasks and hold/preparation/resume evidence under [preparation](handoff-prep.md#execution-time-plan-revision). NEVER overwrite old approvals/content. Follow [commit](commit.md#execution-time-plan-document-updates) and [verification](verification.md#evidence-after-plan-revision-commit). Add no Git automation/runtime enforcement/authority/check exemptions.
145
+
146
+ <a id="evidence-refresh-and-limits"></a>
147
+ ## Evidence refresh and limits
148
+
149
+ Missing/mismatched evidence, unfinished approvals, unclear ownership or unresolved failures block affected save/choice request/Git mutation/handoff. Resolve/reverify before resume and on changed scope/version/path/target/Git state. Preserve unrelated changes; read-only investigation remains allowed.
150
+
151
+ <a id="local-planning-references"></a>
152
+ ## Local planning references
153
+
154
+ Brief absolute installed `references/brainstorming.md`/`references/writing-plans.md`. Architect reads the former and Planner reads the latter, resolving relatives from installed `references/`. Missing paths stop the stage without global fallback. Preserve ARC approval/ownership.
155
+
156
+ <a id="instruction-and-input-provenance"></a>
157
+ ## Instruction and input provenance
158
+
159
+ Supply exact skill/reference paths/access state. Separate user instructions/discovered files, approved versions/open questions. Visual criteria link approved source/version/access/IDs/method. Missing inputs/unapproved interpretation hold dependent drafting. Optional alternatives follow [handoff](handoff.md#instruction-sources-bounded-read-recovery-visual-evidence-and-resumption). Both drafting roles stay draft-only in recovery.
160
+
161
+ <a id="managed-worktree-preparation"></a>
162
+ ### Managed worktree preparation
163
+
164
+ Follow [handoff-worktree](handoff-worktree.md).
165
+
166
+ <a id="approved-cooperative-execution-path-within-the-repository"></a>
167
+ ## Approved cooperative execution path within the repository
168
+
169
+ Installed workflow connects plan-mode document commits to initial Implementer assignment. Resolve `<target-home>/skills/arc/runtime/cli.mjs` from the actual loaded skill selected by the installer, including custom homes. Pass path/options as separate `node` arguments. Shell uses safely assigned/quoted `node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`. Follow [handoff](handoff.md) invocation/continuity.
170
+
171
+ Entry updates migrate no state/renew no approvals; drift requires current evidence. Scope is repository cooperative decisions/records, not native hook/provider/installer installation or blocking direct tools. `no-plan`/omission stays unsupported through Phases 2/3, implying neither policy violation nor new document duty.
172
+
173
+ Record approved planning-document SHA-256 (Architectural spec and plans; Bounded plans), shared docs-only commit and document/approval versions. CLI verifies exact Git-object paths/current bytes before assignment intent. New workflows/late commits prove no past compliance. Prior history/outside execution stays unverified. Approval/native results are `operator-attested`; agent IDs are not authenticated identity.
174
+
175
+ <a id="full-auto-run-mode"></a>
176
+ ## Full Auto run mode
177
+
178
+ Records:
179
+ - Each auto decision: user-visible progress message `auto-decided (Full Auto): <gate> → <choice>; reason; alternatives; evidence`, plus the same entry in the canonical handoff record.
180
+ - Pre-action gate record: `run` field (`supervised` or `full-auto`).
181
+ - Revision-history `Approval time`: `auto-approved (Full Auto) <time>`.
182
+ - Runtime `approvalRef` (free text): `full-auto:<doc>@<version>`.
183
+ - Completion report: list every auto decision.
184
+
185
+ Stopping: a user request in this chat to stop or switch to Supervised overrides the installed default and applies from the next gate; earlier auto decisions remain recorded.
@@ -0,0 +1,172 @@
1
+ # Verification and acceptance — shared text
2
+
3
+ This file holds text shared by every platform's verification.md. Each part belongs to the section that links to it and has the same force there.
4
+
5
+ <a id="test-scope-and-result-comparison"></a>
6
+ ## Test scope and result comparison
7
+
8
+ Tester briefs MUST include the required field `mode: task | final | baseline`. One assignment performs one mode; the only exception is the approved full regression follow-up in final mode.
9
+
10
+ **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.
11
+
12
+ **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. A new failure from final verification follows Implementer → Tester. The final Reviewer starts only after final-mode Tester work concludes: the final Tester report is delivered, every new failure is resolved through Implementer → Tester recheck, every new-failure candidate and intermittent candidate is dispositioned, any approved full regression is complete and every undeterminable-scope item is dispositioned under **Undeterminable scope** below. Reviewer output produced before that point is not the initial final review.
13
+
14
+ **Command execution:** Implementer and Tester briefs MUST NOT prescribe detached execution such as `&`, `nohup` or `setsid`; they require long commands to run in the foreground and be waited on in the same session until an exit code. Orchestrator does not run a Tester's assigned suites in its place unless Tester reports an environment block with evidence and the user chooses that run. Tester briefs that assign suite runs MUST name the temporary location for logs, outside the execution target worktree and the base worktree. Tester redirects the standard output and standard error of each suite command to its own log file there, uses a per-test reporter when the runner already has one (for Node, `--test-reporter=tap`), and reports totals, failing test names and failure excerpts read from those log files, not from the returned tool output. If that location cannot be written, Tester reports an environment block. A failing test or check is a result, not a stop condition: Tester finishes every assigned check that does not depend on the failed one, then classifies and reports all failures together, and stops early only for a missing required input, an authority or target mismatch, or unknown state under `scope.non-escalation`.
15
+
16
+ **Suite parallelism:** A Tester runs each multi-file suite command with the test runner's built-in parallel mode inside that one foreground command; a parallel mode that needs a package or plugin not already installed counts as no parallel mode. It runs a suite sequentially only when its tests are known to interfere with each other or the runner has no parallel mode, and reports the reason. Briefs MUST NOT split a suite into sequential groups for any other reason; splitting across Testers follows **Full regression shards** below. This changes how a command runs, not which tests run.
17
+
18
+ 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.
19
+
20
+ **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.
21
+
22
+ 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.
23
+
24
+ | Trigger | Substitute check | Undeterminable when |
25
+ | --- | --- | --- |
26
+ | (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. |
27
+ | (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. |
28
+ | (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. |
29
+ | (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. |
30
+ | (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. |
31
+
32
+ Select substitute checks in this impact procedure order:
33
+
34
+ 1. Reuse evidence for the same commit or tree hash and record the basis.
35
+ 2. Use the project's affected tool under the final-mode conditions above.
36
+ 3. Trace reverse dependencies and record why steps 1 and 2 were not used.
37
+ 4. If the affected set remains unclear, expand the boundary one step to the nearest package manifest directory, otherwise the test directory.
38
+ 5. If the scope still cannot be determined, report as undeterminable (unverified).
39
+
40
+ A suspected dynamic reference goes directly to step 5.
41
+
42
+ **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 and the final Reviewer are held, while independent work continues. Resolution of unknown state is never auto-decided in Full Auto. A disposition as unverified does not turn a criterion into proven.
43
+
44
+ **Approved full regression** requires explicit user approval, and the current final-mode Tester runs it as a follow-up; no new Tester is assigned except shard Testers under **Full regression shards** below. 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. If HEAD changes before the final Reviewer starts, an expired approval needs re-approval and a rerun at the new HEAD, or a fresh disposition under **Undeterminable scope**, before the Reviewer starts. The approved full regression runs once per approval. Approved full regression failures follow the base check below.
45
+
46
+ **Full regression shards:** Orchestrator MAY split an approved full regression into shards only when, from recorded prior run times, it is likely to exceed one Tester's time limit for its route, such as the bridge `arc_tester` 60-minute lease, or when independent suites, such as a sequential Python suite and a Node suite, can run at the same time; it records the reason. A shard is one whole suite command or a set of whole test files, never a subset of test names. Before dispatch Orchestrator lists every test file and suite command of the approved full regression at the verified HEAD as the inventory and writes a shard manifest that assigns each item to exactly one shard, so that the shards do not overlap and their union equals the inventory. Tests known to share state, such as fixed ports, the same temporary or workspace paths, the git common directory or global configuration, go in one shard. The current final-mode Tester runs one shard as its follow-up; each other shard goes to a fresh Tester whose `mode: final` brief adds `shard: <id> of <n>`, the shard's files or command and the manifest. The current final-mode Tester's follow-up brief also adds `shard: <id> of <n>` and its shard's files or command. Each shard Tester runs only its shard with no other final-mode checks, reports the files it actually ran and classifies failures only by the static check under **Baseline** below. All shards run at the same verified HEAD in the same workspace; each Tester records `git status --porcelain` at start and end, and no one writes in that workspace until every shard ends. Orchestrator reserves the whole shard batch under [limits](limits.md#counting-and-reservations) and serializes shards that do not fit; each shard Tester is a created and active instance, and the follow-up adds none. When the runner has a parallelism option, Orchestrator sets it per shard so that the combined workers stay within the host's available parallelism. After every shard has reported, Orchestrator sends the shard failures that need a base run to the current final-mode Tester, which reruns each alone at HEAD, with no other test command running in that workspace, up to the brief's isolated rerun limit; a pass alone is an intermittent candidate, and a failure alone follows the base check below; this rerun classifies the failure and is not the intermittency check under **Result comparison**. A rerun at HEAD that the environment blocks leaves that failure a new-failure candidate for Orchestrator disposition. Orchestrator merges the shard results and verifies that every inventory item has complete results exactly once; an item without complete results is a new-failure candidate and leaves the run incomplete. A blocked or timed-out shard follows the resume rule above; its items stay unverified, and the user decides whether a new Tester runs only the items without complete results. Sharding splits the one approved run and adds no run. The approved full regression is complete only when every shard has reported, coverage is verified and every shard failure is classified or dispositioned. Record the reason, inventory, manifest, Tester IDs and per-shard results with the approved full regression record.
47
+
48
+ **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.
49
+
50
+ **Baseline:** No baseline run is recorded in advance, and no base worktree is prepared in advance, except for a plan-approved capture under **Baseline mode** below. 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. If the environment blocks running tests at that path, Orchestrator MAY instead prepare the same worktree at a path outside every repository working tree and every managed worktree directory, recording that path in the brief and in the canonical handoff record; the same reuse and removal rules apply. 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.
51
+
52
+ **Baseline mode:** A plan MAY name a pre-change capture, such as test results or rendered outputs at the approved base, as an approved plan step with its exact commands and expected outputs only when an acceptance criterion requires comparison against pre-change output and that output cannot be regenerated later from the base commit or generating it later would block task acceptance; the step states which of these conditions it meets. Otherwise the plan names no capture and failures are classified under **Baseline** above. Orchestrator assigns that step to a fresh Tester with `mode: baseline` and, before the first Implementer of the dependent task starts, prepares the base worktree under **Baseline** above and cites its path and prerequisite state in the brief. The baseline Tester runs only those commands in the base worktree; it runs a full suite only when the user separately approved full regression for that workflow, and plan approval alone does not authorize one; it records `git status --porcelain` there at start and end, writes logs and captures only to the brief's temporary location outside every worktree, edits nothing and reports each capture with its command, exit code and output path. If the base worktree needs prerequisites or the environment blocks the run, it installs or generates nothing and reports an environment block. A capture records base state only: it classifies no failure and replaces neither task-mode or final-mode checks nor the base check above. Because the base worktree is a separate checkout, the baseline Tester MAY run while an Implementer writes in the execution target worktree.
53
+
54
+ <a id="risk-scaled-execution"></a>
55
+ ## Risk-scaled execution
56
+
57
+ The [fast gate](handoff.md#orchestrator-direct-path-for-small-tasks) references this risk definition; refresh affected evidence when inputs change and preserve independent verification boundaries.
58
+
59
+ <a id="risk-scaled-execution-2"></a>
60
+ ## Risk-scaled execution
61
+
62
+ 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.
63
+
64
+ - 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 and concluded final-mode Tester work; no-plan Reviewer follows Tester before acceptance.
65
+ - Preserve specific commitments. Risky unverified dependencies need Tester/resolved or explicitly dispositioned findings before implementation.
66
+ - Reuse evidence only for matching scope/state/independence/freshness/flow position. Changes/failures/missing-conflicting evidence invalidate affected reuse.
67
+ - 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.
68
+ - 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.
69
+
70
+ 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.
71
+
72
+ 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.
73
+
74
+ <a id="final-plan-reviewer-correction-loop"></a>
75
+ ### Final plan Reviewer correction loop
76
+
77
+ 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/final-mode Tester work/Tester failures/unmet criteria still need Implementer → Tester and conclude. No-plan flow remains unchanged.
78
+
79
+ 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.
80
+
81
+ <a id="evidence-after-plan-revision-commit"></a>
82
+ ## Evidence after plan revision commit
83
+
84
+ Verify every committed document blob against its latest approved content hash and full approved copy. If no progress records have been committed since approval, the SHA-256 of the committed document content (not the Git blob OID) MUST equal the latest approved `contentHash`. Otherwise the diff from the latest approved copy MUST contain only classified progress records belonging to that commit's task or committed for other tasks after approval (including R-8 separation), or classified plan-level progress records carried by that commit. Record the SHA-256 of the expected content used for this comparison in the canonical record; NEVER overwrite approved copies. Verify each pending revision's status is `committed` and no pending revision remains before overall completion. Link commit SHA in the canonical record only, not the document. Preserve actual approval chronology; later committed content proves no earlier approval.
85
+
86
+ Existing commit evidence links remain valid because history is unchanged. For a contract revision, affected checks and rechecks MUST be rerun against the revised version. Stale evidence from plan-file changes requires refresh under existing rules. Preserve exact-HEAD/document/policy/fingerprint requirements; NEVER rewrite old fingerprints to suggest execution at a new state. Refresh briefs/gates before dependencies. Structure proves no live compliance.
87
+
88
+ <a id="reviewer-timing-and-task-acceptance"></a>
89
+ ## Task acceptance and final plan acceptance
90
+
91
+ 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](verification.md#final-plan-reviewer-correction-loop).
92
+
93
+ <a id="reviewer-timing-and-task-acceptance-2"></a>
94
+ ## Task acceptance and final plan acceptance
95
+
96
+ 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.
97
+
98
+ <a id="ui-browser-acceptance-checks"></a>
99
+ ### UI browser acceptance checks
100
+
101
+ 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.
102
+
103
+ <a id="criterion-evidence-and-finding-handoff"></a>
104
+ ### Criterion evidence and finding handoff
105
+
106
+ 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.
107
+
108
+ 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.
109
+
110
+ 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.
111
+
112
+ 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.
113
+
114
+ <a id="completion-continuity"></a>
115
+ ## Completion continuity
116
+
117
+ 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.
118
+
119
+ <a id="verification-lifecycle-in-the-cooperative-cli"></a>
120
+ ## Verification lifecycle in the cooperative CLI
121
+
122
+ Supported `workflow` is approved complete spec+plan. No-plan/small-task/omission is `cooperative.unsupported`, not policy violation/new documents. CLI executes no checks/Reviewer. Actors/results/verdicts are `operator-attested`, not identity/independence/semantic/enforcement proof.
123
+
124
+ 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.
125
+ 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.
126
+ 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.
127
+ 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.
128
+
129
+ 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.
130
+
131
+ 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.
132
+
133
+ 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/concluded final-mode Tester work, 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.
134
+
135
+ 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.
136
+
137
+ <a id="task-acceptance-and-focused-commit-reconciliation-in-the-cooperative-cli"></a>
138
+ ### Task acceptance and focused commit reconciliation in the cooperative CLI
139
+
140
+ 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.
141
+
142
+ 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.
143
+
144
+ 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.
145
+
146
+ 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.
147
+
148
+ 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.
149
+
150
+ <a id="external-operations-and-recovery-in-the-cooperative-cli"></a>
151
+ ## External operations and recovery in the cooperative CLI
152
+
153
+ Three phases cover state/documents/assignment; scope/verification/acceptance/focused commits; external approval/results/audit recovery. Inspect nine areas/limits with `status.support`. Support is spec+plan `plan`, not no-plan/omission. CLI executes no native/provider/push/merge/deploy/publish calls.
154
+
155
+ Operator-confirmed approvals/results are `operator-attested`, `nativeVerified: false`, `remoteVerified: false`; no outside-call blocking or independent remote verification.
156
+
157
+ Record already confirmed external approval using `evidence: {kind: "external-approval", messageRef, data: {operation, scope, descriptor}}`. `scope` is unique absolute checkout paths. Local commit approval grants no external approval. Record exact action/scope/target and all descriptor fields:
158
+
159
+ | operation | descriptor fields |
160
+ |---|---|
161
+ | push | repository, destination, refspec, sourceOid, expectedRemoteOid |
162
+ | merge | repository, changeRef, targetRef, expectedTargetOid |
163
+ | deploy | service, project, environment, artifactId, destination |
164
+ | publish | service, namespace, name, version, artifactHash, destination |
165
+
166
+ Git OIDs are full lowercase 40/64-character hex; artifactHash is `sha256:<64-hex>`. Without remote observation OIDs are asserted expectations, not verified state. Destination is secret-free. No URL userinfo/query/fragment/password/token/credentials. Recognized secrets are rejected before persistence, but arbitrary-string secrecy cannot be guaranteed.
167
+
168
+ `prepare` accepts `{requestId, expectedRevision, actor: {id, role: "orchestrator"}, operation, arguments: {approvalRef, scope, descriptor}}`; approvalRef matches external approval messageRef. Persist only exact approval/scope/target/runtime versions with no unresolved effects. After `allow`/`persisted: true`, Orchestrator executes separately approved scope; CLI expands no authority.
169
+
170
+ `result`/`reconcile` accept `{requestId, expectedRevision, actor, intentId, result: {status, messageRef, data: {operation, scope, descriptor}}}`, with prepare requestId as intentId. Mismatch/unknown/stale outcomes hold while preserving attestations. After interruption inspect intent/`state.requests`/`state.audit`/`state.results` through `status` and investigate actual effects. Reconcile that same intent, not fresh preparation or replayed approvals.
171
+
172
+ Cancellation also requires `notExecutedEvidence: {messageRef}`; approval remains consumed. No automatic update/migration/renewed permission to fix drift. Report holds. Succeeded results remain attestations, not remote proof. `audit` links request→decision→intent→result→resolution but is locally editable, not tamper-proof. NEVER retry uncertain external outcomes.
@@ -22,7 +22,7 @@ export function normalizeCodexEvent(input,context={}){
22
22
  if(typeof context.describeTool!=='function')throw Error('Trusted semantic tool provider unavailable');
23
23
  const semantic=context.describeTool(structuredClone(input));
24
24
  if(!object(semantic)||!text(semantic.operation)||!Array.isArray(semantic.paths)||!object(semantic.descriptor))throw Error('Complete semantic tool descriptor required');
25
- if(['Agent','spawn_agent'].includes(input.tool_name)&&semantic.operation!=='assign-agent')throw Error('Agent tool requires assignment validation');
25
+ if(['Agent','spawn_agent'].includes(input.tool_name)&&semantic.operation!=='assign-agent')throw Error(toolPath+' tool requires assignment validation');
26
26
  return {request:{requestId:context.requestId,platform:'codex',actorRef:context.actorRef,taskId:context.taskId,cwd:input.cwd,toolName:input.tool_name,arguments:structuredClone(input.tool_input),operation:semantic.operation,paths:structuredClone(semantic.paths),descriptor:structuredClone(semantic.descriptor)},coverage};
27
27
  }
28
28
  /** Only documented PreToolUse fields are emitted. hold is a native deny. */
@@ -28,7 +28,7 @@ export function evaluate(policy, state, request, evidence){
28
28
  const actor=state.identities.find(i=>i.actorRef===request.actorRef);
29
29
  if(!actor)return result('hold','runtime.identity','platform identity unresolved',['platform-identity']);
30
30
  const role=actor.role;
31
- const roleRule={orchestrator:'role.orchestrator-boundary',scouter:'role.scouter-read-only',planner:'role.planner-draft-only',implementer:'role.implementer-implementation',tester:'role.tester-verification',reviewer:'role.reviewer-independent'}[role]??'runtime.identity';
31
+ const roleRule={orchestrator:'role.orchestrator-boundary',scouter:'role.scouter-read-only',architect:'role.architect-draft-only',planner:'role.planner-draft-only',implementer:'role.implementer-implementation',tester:'role.tester-verification',reviewer:'role.reviewer-independent'}[role]??'runtime.identity';
32
32
  if(!ROLE_OPERATIONS[role]?.includes(request.operation))return result('deny',GIT_OPERATIONS.includes(request.operation)?'git.specialists-deny':roleRule,'operation forbidden for assigned role');
33
33
  const lease=state.leases.find(l=>l.actorRef===actor.actorRef);
34
34
  if(lease?.status==='retired')return result('deny','runtime.identity','retired identity');
@@ -84,11 +84,12 @@ export function evaluate(policy, state, request, evidence){
84
84
  if(d.temporary&&!same(d.temporary,approval.scope.temporary))return result('hold','runtime.assignment','delegated temporary scope not approved',['delegated-temporary-scope']);
85
85
  if(state.assignments.some(a=>a.assignmentId===request.requestId||a.correlationRef===d.correlationRef))return result('hold','runtime.identity','assignment correlation already registered',['new-assignment-correlation']);
86
86
  const next=structuredClone(stored);
87
- if(d.role==='planner'){
87
+ if(d.role==='planner'||d.role==='architect'){
88
88
  const stage=state.plannerLedger?.stages.find(s=>s.id===d.plannerCall?.stageId),proof=fact('planner-call');
89
89
  const contract=stage&&{document:stage.document,inputVersion:stage.inputVersion,criteriaVersion:stage.criteriaVersion,scopeVersion:stage.scopeVersion};
90
90
  if(!stage||stage.workflowId!==state.workflowId||stage.approvalRef!==approval.id||!same(approval.scope.plannerStage,contract)||!d.paths.includes(stage.document.path)||proof?.sourceRef!==correlation.sourceRef||!same({stageId:proof?.data.stageId,inputVersion:proof?.data.inputVersion,criteriaVersion:proof?.data.criteriaVersion,scopeVersion:proof?.data.scopeVersion},{stageId:stage.id,inputVersion:stage.inputVersion,criteriaVersion:stage.criteriaVersion,scopeVersion:stage.scopeVersion}))return result('hold','runtime.planner-call','Current approved Planner stage and provider evidence required',['planner-stage-ledger','planner-call-evidence']);
91
91
  if(state.planningDepth==='Bounded'&&stage.document.kind==='spec')return result('hold','runtime.planner-call','Bounded depth has no spec stage',['approved-spec']);
92
+ if((d.role==='architect')!==(stage.document.kind==='spec'))return result('hold','runtime.planner-call','Architect binds only spec stages and Planner only plan stages',['planner-stage-role']);
92
93
  if(stage.document.kind==='plan'&&state.planningDepth!=='Bounded'){
93
94
  const reviewedSpecStage=state.plannerLedger.stages.some(s=>s.workflowId===state.workflowId&&s.document.kind==='spec'&&s.ready===true&&s.review.full===true&&s.review.complete===true&&s.scopeVersion===stage.scopeVersion);
94
95
  const approvedSpec=reviewedSpecStage||state.documents.some(doc=>doc.kind==='spec'&&state.approvals.some(a=>a.id===doc.approvalRef&&a.contentHash===doc.contentHash&&evidence.provenance.some(p=>p.id===a.id&&p.messageRef===a.messageRef&&p.contentHash===doc.contentHash&&p.verification.sourceRef===a.messageRef)));
@@ -98,7 +99,7 @@ export function evaluate(policy, state, request, evidence){
98
99
  if(planner.decision!=='allow')return planner;
99
100
  next.plannerLedger.stages[next.plannerLedger.stages.findIndex(s=>s.id===stage.id)]=planner.proposedTransition;
100
101
  }
101
- next.assignments.push({assignmentId:request.requestId,requestId:request.requestId,requestedBy:request.actorRef,status:'pending',actorRef:null,platform:request.platform,correlationRef:d.correlationRef,role:d.role,taskId:d.taskId,paths:[...d.paths],operations:[...d.operations],approvalRef:d.approvalRef,...(d.role==='planner'?{plannerStageId:d.plannerCall.stageId}:{}),...(d.checks?{checks:structuredClone(d.checks)}:{}),...(d.temporary?{temporary:structuredClone(d.temporary)}:{})});
102
+ next.assignments.push({assignmentId:request.requestId,requestId:request.requestId,requestedBy:request.actorRef,status:'pending',actorRef:null,platform:request.platform,correlationRef:d.correlationRef,role:d.role,taskId:d.taskId,paths:[...d.paths],operations:[...d.operations],approvalRef:d.approvalRef,...((d.role==='planner'||d.role==='architect')?{plannerStageId:d.plannerCall.stageId}:{}),...(d.checks?{checks:structuredClone(d.checks)}:{}),...(d.temporary?{temporary:structuredClone(d.temporary)}:{})});
102
103
  try{validateWorkflowState(next);}catch{return result('hold','runtime.assignment','invalid pending assignment scope',['valid-assignment']);}
103
104
  return {...result('allow','runtime.assignment','pending assignment authorized; observed spawn result still required'),proposedTransition:next};
104
105
  }
@@ -41,7 +41,7 @@ export async function recordPlannerAgentObservation({statePath,expectedRevision,
41
41
  lock=await fs.open(statePath+'.lock','wx',0o600);const stat=await fs.lstat(statePath);if(!stat.isFile()||stat.isSymbolicLink())throw Error('Observation state must be regular file');
42
42
  const state=validateWorkflowState(JSON.parse(await fs.readFile(statePath,'utf8')),{preserveStoredOperations:true}),eventHash=fingerprintRequest({input,observation:observation??null});
43
43
  if(state.plannerObservations?.some(o=>o.eventHash===eventHash))return {decision:'hold',reason:'Observation replay',proposedTransition:null,replayed:true};
44
- const candidates=state.assignments.filter(a=>a.status==='pending'&&a.role==='planner');
44
+ const candidates=state.assignments.filter(a=>a.status==='pending'&&(a.role==='planner'||a.role==='architect'));
45
45
  let decision={decision:'hold',reason:'Raw event lacks verified assignment correlation',proposedTransition:null};
46
46
  if(state.revision!==expectedRevision)decision.reason='Stale provider context cannot bind identity';
47
47
  else if(observation?.actorRef===input.agent_id&&observation.platform===platform)decision=registerAgentObservation(state,observation);
@@ -1,11 +1,11 @@
1
1
  /** Canonical semantic operations, independent of platform tool aliases. */
2
- export const ROLES = Object.freeze(['orchestrator','scouter','planner','implementer','tester','reviewer']);
2
+ export const ROLES = Object.freeze(['orchestrator','scouter','architect','planner','implementer','tester','reviewer']);
3
3
  export const GIT_OPERATIONS = Object.freeze(['stage','commit','push','merge','rebase','reset','branch-create','branch-switch','worktree-create','worktree-remove']);
4
4
  export const EXTERNAL_OPERATIONS = Object.freeze(['push','merge','deploy','publish','external-message']);
5
5
  export const OPERATIONS = Object.freeze(['read','draft','write','check','test','review','temporary-write','operational-query','install','prepare-target','request-approval','assign-agent','accept','transition','scope-expansion','indirect-bypass',...new Set([...GIT_OPERATIONS,...EXTERNAL_OPERATIONS])]);
6
6
  export const LEGACY_OPERATIONS = Object.freeze({qa: 'test'});
7
7
  export const LEGACY_COOPERATIVE_ROLES = Object.freeze({qa: 'tester'});
8
- export const ROLE_OPERATIONS = Object.freeze({orchestrator:['read','write','check','prepare-target','request-approval','assign-agent','accept','transition','install',...GIT_OPERATIONS,...EXTERNAL_OPERATIONS],scouter:['read'],planner:['read','draft'],implementer:['read','write','check'],tester:['read','check','temporary-write'],reviewer:['read','review']});
8
+ export const ROLE_OPERATIONS = Object.freeze({orchestrator:['read','write','check','prepare-target','request-approval','assign-agent','accept','transition','install',...GIT_OPERATIONS,...EXTERNAL_OPERATIONS],scouter:['read'],architect:['read','draft'],planner:['read','draft'],implementer:['read','write','check'],tester:['read','check','temporary-write'],reviewer:['read','review']});
9
9
 
10
10
  /** Compare a stored role without rewriting historical evidence. */
11
11
  export function canonicalCooperativeRole(role) {
@@ -6,27 +6,29 @@ import {GEMINI_CONTRACT} from './gemini-stream.mjs';
6
6
  import {CODEX_PROFILE_ARGS_FORM, CODEX_PROFILE_GIT_ENTRIES, DEFAULT_POLICY, effectiveClaudeSandboxSettings} from './role-dispatch-policy.mjs';
7
7
  import {TOOL_PATHS, TOOL_UNIX_SOCKETS} from './tool-access.mjs';
8
8
 
9
- const ROLES = ['arc_scouter', 'arc_planner', 'arc_implementer', 'arc_tester', 'arc_reviewer'];
9
+ const ROLES = ['arc_scouter', 'arc_architect', 'arc_planner', 'arc_implementer', 'arc_tester', 'arc_reviewer'];
10
10
  const deepFreeze = value => { for (const child of Object.values(value)) if (child && typeof child === 'object') deepFreeze(child); return Object.freeze(value); };
11
11
  export const ROLE_BRIDGE_PERMISSIONS = deepFreeze({
12
12
  claude: {
13
13
  arc_scouter: {permissionMode: 'default', sandbox: false, allowedTools: ['WebFetch', 'WebSearch']},
14
+ arc_architect: {permissionMode: 'default', sandbox: false},
14
15
  arc_planner: {permissionMode: 'default', sandbox: false},
15
16
  arc_implementer: {permissionMode: 'acceptEdits', sandbox: true}, arc_tester: {permissionMode: 'default', sandbox: true}, arc_reviewer: {permissionMode: 'default', sandbox: false}
16
17
  },
17
18
  gemini: {
18
- arc_scouter: {approvalMode: 'plan', sandbox: false}, arc_planner: {approvalMode: 'plan', sandbox: false},
19
+ arc_scouter: {approvalMode: 'plan', sandbox: false}, arc_architect: {approvalMode: 'plan', sandbox: false}, arc_planner: {approvalMode: 'plan', sandbox: false},
19
20
  arc_implementer: {approvalMode: 'auto_edit', sandbox: true}, arc_tester: {approvalMode: 'auto_edit', sandbox: true}, arc_reviewer: {approvalMode: 'plan', sandbox: false}
20
21
  },
21
22
  grok: {
22
23
  arc_scouter: {permissionMode: 'plan', sandbox: 'read-only', deny: GROK_CONTRACT.readOnlyDeny},
24
+ arc_architect: {permissionMode: 'plan', sandbox: 'read-only', deny: GROK_CONTRACT.readOnlyDeny},
23
25
  arc_planner: {permissionMode: 'plan', sandbox: 'read-only', deny: GROK_CONTRACT.readOnlyDeny},
24
26
  arc_reviewer: {permissionMode: 'plan', sandbox: 'read-only', deny: GROK_CONTRACT.readOnlyDeny},
25
27
  arc_implementer: {permissionMode: 'acceptEdits', sandbox: 'custom', deny: []},
26
28
  arc_tester: {permissionMode: 'acceptEdits', sandbox: 'custom', deny: []},
27
29
  },
28
30
  codex: {
29
- arc_scouter: {sandboxMode: 'read-only', search: true}, arc_planner: {sandboxMode: 'read-only', search: false},
31
+ arc_scouter: {sandboxMode: 'read-only', search: true}, arc_architect: {sandboxMode: 'read-only', search: false}, arc_planner: {sandboxMode: 'read-only', search: false},
30
32
  arc_implementer: {sandboxMode: 'workspace-write', search: false}, arc_tester: {sandboxMode: 'workspace-write', search: false}, arc_reviewer: {sandboxMode: 'read-only', search: false}
31
33
  }
32
34
  });