@yunhozz/arc 0.2.2 → 0.2.4

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 (117) hide show
  1. package/MANIFEST.sha256 +107 -88
  2. package/README.md +4 -6
  3. package/claude/agents/arc-implementer.md +32 -42
  4. package/claude/agents/arc-planner.md +33 -47
  5. package/claude/agents/arc-qa.md +28 -44
  6. package/claude/agents/arc-reviewer.md +28 -41
  7. package/claude/agents/arc-scouter.md +26 -38
  8. package/claude/skill/SKILL.md +41 -59
  9. package/claude/skill/references/arc-visual-companion.md +28 -0
  10. package/claude/skill/references/commit.md +38 -70
  11. package/claude/skill/references/coordination.md +77 -126
  12. package/claude/skill/references/git-recovery.md +17 -35
  13. package/claude/skill/references/handoff-prep.md +91 -103
  14. package/claude/skill/references/handoff.md +110 -208
  15. package/claude/skill/references/limits.md +19 -31
  16. package/claude/skill/references/planning.md +93 -244
  17. package/claude/skill/references/verification.md +105 -261
  18. package/claude/skill/references/visual-companion.md +293 -15
  19. package/claude/skill/runtime/adapters/claude.mjs +10 -9
  20. package/claude/skill/runtime/adapters/codex.mjs +7 -8
  21. package/claude/skill/runtime/bootstrap.mjs +3 -2
  22. package/claude/skill/runtime/capabilities.mjs +12 -0
  23. package/claude/skill/runtime/cooperative-schema.mjs +3 -2
  24. package/claude/skill/runtime/cooperative.mjs +52 -4
  25. package/claude/skill/runtime/evaluate.mjs +115 -2
  26. package/claude/skill/runtime/identity.mjs +22 -0
  27. package/claude/skill/runtime/role-policy.json +18 -18
  28. package/claude/skill/runtime/schema.mjs +19 -0
  29. package/claude/skill/scripts/model_config.py +3 -79
  30. package/codex/agents/arc-implementer.toml +34 -30
  31. package/codex/agents/arc-planner.toml +27 -23
  32. package/codex/agents/arc-qa.toml +24 -15
  33. package/codex/agents/arc-reviewer.toml +25 -16
  34. package/codex/agents/arc-scouter.toml +20 -26
  35. package/codex/skill/SKILL.md +42 -57
  36. package/codex/skill/references/arc-visual-companion.md +33 -0
  37. package/codex/skill/references/commit.md +35 -81
  38. package/codex/skill/references/coordination.md +76 -104
  39. package/codex/skill/references/git-recovery.md +29 -51
  40. package/codex/skill/references/handoff-prep.md +76 -134
  41. package/codex/skill/references/handoff-worktree.md +32 -66
  42. package/codex/skill/references/handoff.md +111 -271
  43. package/codex/skill/references/limits.md +21 -34
  44. package/codex/skill/references/planning.md +125 -299
  45. package/codex/skill/references/verification.md +90 -272
  46. package/codex/skill/references/visual-companion.md +290 -18
  47. package/codex/skill/runtime/adapters/claude.mjs +10 -9
  48. package/codex/skill/runtime/adapters/codex.mjs +7 -8
  49. package/codex/skill/runtime/bootstrap.mjs +3 -2
  50. package/codex/skill/runtime/capabilities.mjs +12 -0
  51. package/codex/skill/runtime/cooperative-schema.mjs +3 -2
  52. package/codex/skill/runtime/cooperative.mjs +52 -4
  53. package/codex/skill/runtime/evaluate.mjs +115 -2
  54. package/codex/skill/runtime/identity.mjs +22 -0
  55. package/codex/skill/runtime/role-policy.json +18 -18
  56. package/codex/skill/runtime/schema.mjs +19 -0
  57. package/lib/installer/global-config.mjs +1 -0
  58. package/lib/installer/install.mjs +5 -7
  59. package/lib/installer/manifest.mjs +23 -8
  60. package/lib/installer/package-references.mjs +10 -5
  61. package/lib/installer/plan.mjs +1 -4
  62. package/lib/installer/superpowers.mjs +26 -1
  63. package/lib/installer/transaction.mjs +3 -3
  64. package/lib/installer/uninstall.mjs +2 -2
  65. package/lib/installer/upgrade.mjs +2 -9
  66. package/lib/management/operations.mjs +6 -8
  67. package/lib/management/update.mjs +3 -3
  68. package/lib/models/profiles.mjs +1 -40
  69. package/lib/policy/render.mjs +1 -5
  70. package/lib/policy/role-policy.json +18 -18
  71. package/lib/release/artifact.mjs +6 -4
  72. package/lib/runtime/adapters/claude.mjs +10 -9
  73. package/lib/runtime/adapters/codex.mjs +7 -8
  74. package/lib/runtime/bootstrap.mjs +3 -2
  75. package/lib/runtime/capabilities.mjs +12 -0
  76. package/lib/runtime/cooperative-schema.mjs +3 -2
  77. package/lib/runtime/cooperative.mjs +52 -4
  78. package/lib/runtime/evaluate.mjs +115 -2
  79. package/lib/runtime/identity.mjs +22 -0
  80. package/lib/runtime/schema.mjs +19 -0
  81. package/lib/tui/app.mjs +12 -8
  82. package/lib/tui/setup.mjs +5 -8
  83. package/package.json +11 -2
  84. package/scripts/update-manifest.mjs +7 -9
  85. package/claude/skill/hooks/git-policy.json +0 -208
  86. package/claude/skill/hooks/role-git-guard.mjs +0 -18
  87. package/claude/skill/hooks/runtime-gate.mjs +0 -12
  88. package/claude/skill/references/superpowers/brainstorming/visual-companion.md +0 -299
  89. package/codex/skill/hooks/runtime-gate.mjs +0 -10
  90. package/codex/skill/references/superpowers/brainstorming/visual-companion.md +0 -299
  91. package/lib/policy/claude-hook.mjs +0 -80
  92. package/scripts/probe-runtime-hooks.mjs +0 -55
  93. package/scripts/update-superpowers-local.sh +0 -4
  94. /package/claude/skill/references/{superpowers/brainstorming/SKILL.md → brainstorming.md} +0 -0
  95. /package/claude/skill/references/{superpowers/brainstorming/builder-check-prompt.md → builder-check-prompt.md} +0 -0
  96. /package/claude/skill/references/{superpowers/brainstorming/scripts → scripts}/frame-template.html +0 -0
  97. /package/claude/skill/references/{superpowers/brainstorming/scripts → scripts}/helper.js +0 -0
  98. /package/claude/skill/references/{superpowers/brainstorming/scripts → scripts}/server.cjs +0 -0
  99. /package/claude/skill/references/{superpowers/brainstorming/scripts → scripts}/start-server.sh +0 -0
  100. /package/claude/skill/references/{superpowers/brainstorming/scripts → scripts}/stop-server.sh +0 -0
  101. /package/claude/skill/references/{superpowers/LICENSE → superpowers-LICENSE} +0 -0
  102. /package/claude/skill/references/{superpowers/provenance.json → superpowers-provenance.json} +0 -0
  103. /package/claude/skill/references/{superpowers/test-driven-development/SKILL.md → test-driven-development.md} +0 -0
  104. /package/claude/skill/references/{superpowers/test-driven-development/writing-good-tests.md → writing-good-tests.md} +0 -0
  105. /package/claude/skill/references/{superpowers/writing-plans/SKILL.md → writing-plans.md} +0 -0
  106. /package/codex/skill/references/{superpowers/brainstorming/SKILL.md → brainstorming.md} +0 -0
  107. /package/codex/skill/references/{superpowers/brainstorming/builder-check-prompt.md → builder-check-prompt.md} +0 -0
  108. /package/codex/skill/references/{superpowers/brainstorming/scripts → scripts}/frame-template.html +0 -0
  109. /package/codex/skill/references/{superpowers/brainstorming/scripts → scripts}/helper.js +0 -0
  110. /package/codex/skill/references/{superpowers/brainstorming/scripts → scripts}/server.cjs +0 -0
  111. /package/codex/skill/references/{superpowers/brainstorming/scripts → scripts}/start-server.sh +0 -0
  112. /package/codex/skill/references/{superpowers/brainstorming/scripts → scripts}/stop-server.sh +0 -0
  113. /package/codex/skill/references/{superpowers/LICENSE → superpowers-LICENSE} +0 -0
  114. /package/codex/skill/references/{superpowers/provenance.json → superpowers-provenance.json} +0 -0
  115. /package/codex/skill/references/{superpowers/test-driven-development/SKILL.md → test-driven-development.md} +0 -0
  116. /package/codex/skill/references/{superpowers/test-driven-development/writing-good-tests.md → writing-good-tests.md} +0 -0
  117. /package/codex/skill/references/{superpowers/writing-plans/SKILL.md → writing-plans.md} +0 -0
@@ -1,305 +1,139 @@
1
+ <a id="verification-contract"></a>
1
2
  # Verification contract
2
3
 
3
- Orchestrator reads before verification design, QA/Reviewer assignment, correction rechecks, or UI acceptance checks.
4
- QA and
5
- Reviewer contracts are in their profiles; they read this file only for sections the brief explicitly cites.
6
- Visual companion design discussion is distinct from QA UI acceptance.
4
+ 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.
7
5
 
8
- For Orchestrator, **Evidence verdict**: each criterion is proven, unmet, or unverified; passing runs, reports, or disposition never turn unverified into proven; reports keep unverified scope visible.
6
+ **Evidence verdict:** Criteria are proven, unmet or unverified. Passing runs/reports/dispositions never convert unverified to proven; retain gaps.
9
7
 
10
- ## Visual Evidence and Adjudication
8
+ <a id="visual-evidence-and-adjudication"></a>
9
+ ## Visual evidence and adjudication
11
10
 
12
- Each visual criterion requires the exact location, version, approval, and access state of the approved visual source; criterion IDs, properties, and comparison method; and evidence linking the actual output to its revision. An Implementer report does not replace fresh QA's direct comparison. Record results as pass, mismatch, or unverified and connect them to the existing proven/unmet/unverified criterion verdicts. Use pass only when accessible evidence meets the visual criterion; keep unsupported claims unverified. Missing output-to-revision linkage is unverified; a visible difference is a mismatch. Record these separately; do not infer the current branch UI state. Hold the comparison if the approved source or actual output is inaccessible or interpretation approval is missing.
11
+ Each criterion needs exact approved source/version/approval/access, IDs/properties/method and output-revision linkage. 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. Inaccessible materials/missing interpretation approval hold comparison.
13
12
 
14
- Static policy, generated-file, and manifest checks are structural evidence. They do not prove actual role behavior, an installed build, Claude Code CLI runtime compliance, or visual fidelity. Reports include actual changes, exclusion rationale, checks run and omitted, each criterion's evidence and limits, and platform availability. Keep baseline failures separate; progress on independent work does not relax required checks or acceptance criteria.
13
+ Policy/generated/manifest checks prove structure, not role behavior, installed builds, Claude Code CLI compliance or fidelity. Report changes/exclusions/run-omitted checks/criterion evidence-limits/platform availability. Separate baseline failures; independent progress relaxes no checks.
15
14
 
15
+ <a id="risk-scaled-execution"></a>
16
16
  ## Risk-scaled execution
17
17
 
18
- Orchestrator assigns edits exclusively to Implementer except under the Orchestrator direct path in [handoff](handoff.md#orchestrator-direct-path-for-small-tasks), and determines affected
19
- behavior, risk, and smallest meaningful verification.
18
+ Edits belong to Implementer except the [small direct path](handoff.md#orchestrator-direct-path-for-small-tasks). Orchestrator determines behavior/risk/minimum meaningful checks.
20
19
 
21
20
  | Risk | Minimum flow |
22
21
  |---|---|
23
- | Small, low risk | Implementer, or Orchestrator direct path → Orchestrator's focused checks → acceptance |
22
+ | Small, low risk | Implementer or direct edit → Orchestrator focused checks → acceptance |
24
23
  | Ordinary behavior | Implementer → independent QA → acceptance |
25
- | Significant/high risk | Implementer → QA → independent Reviewer of the final full change → acceptance; with a plan, each plan task Implementer → FRESH QA → acceptance/commit satisfies the QA step, then independent Reviewer once on the final full change after all plan tasks |
26
-
27
- Ordinary and significant plan tasks need a FRESH QA before acceptance; only small, low-risk tasks may be accepted on
28
- Orchestrator focused checks. Small, low risk means narrow, understood, readily reversible, and verifiable by focused
29
- checks. Ordinary behavior fails those conditions without a significant-risk trigger. Significant risk includes shared
30
- role/behavior contracts, shared state, lifecycle/integration order, security/permissions, data loss/migration, public interfaces, or costly
31
- installation/deployment/rollback. Substantial behavior or contract changes are significant regardless of file count.
32
- When risk is unclear, investigate or use the higher flow. Environment failure does not waive checks or determine design depth.
33
-
34
- Do not add per-task QA or review gates solely because a task boundary exists. Reviewer is never a plan-task acceptance
35
- prerequisite; for significant work with a plan, it reviews the final full change once after all plan tasks are accepted
36
- with their risk-scaled checks, following the last plan task's required checks and any QA recheck at the final relevant
37
- state; significant work without a plan keeps Reviewer after QA before acceptance. Preserve specific approved
38
- obligations. If the next task depends on a still-unverified risky contract, complete applicable QA at that dependency
39
- boundary and resolve or explicitly disposition findings before dependent implementation.
40
- Reuse evidence only when scope, relevant state, independence, freshness, and flow
41
- position satisfy each covered requirement; changes, failures, or missing/conflicting evidence invalidate affected reuse.
42
- QA checks independently without edits; Reviewer reviews without QA, planning, edits, delegation, or completion
43
- decisions. Orchestrator routes fixes to Implementer (a failed direct-path check returns to the normal flow),
44
- obtains affected QA rechecks outside the final plan Reviewer correction exception and required final review, and accepts after findings/evidence gaps are resolved or
45
- explicitly dispositioned.
46
-
47
- Criterion verdicts follow the Evidence verdict.
48
-
49
- Fresh-per-task rules apply to Implementer and QA, not Reviewer. Orchestrator may reuse a Reviewer only while independent
50
- of implementation and self-review, relevant assignment context remains valid, and refreshed review scope, target
51
- state, and evidence are provided; otherwise assign another independent Reviewer. Reusing a Reviewer does not reuse
52
- an earlier verdict or waive required review timing or coverage.
24
+ | Significant/high risk, no plan | Implementer → QA/rechecks → final full-change Reviewer → acceptance |
25
+ | 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 |
53
26
 
54
- ### Final plan Reviewer correction loop
27
+ 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.
55
28
 
56
- For a plan's final overall Reviewer findings, including behavior findings, Orchestrator assigns
57
- Implementer → Reviewer recheck with no QA reassignment. Repeat corrections and Reviewer rechecks until findings are resolved;
58
- the initial single full review does not prohibit necessary rechecks. Before the initial final overall Reviewer,
59
- risk-required checks and QA execution failures or unmet criteria still require Implementer correction → QA recheck.
60
- This exception applies only to findings from the final overall Reviewer of work with a plan.
61
- Work without a plan retains its existing verification flow. Scope expansion, separate mandatory obligations,
62
- or unresolved evidence gaps hold affected work for Orchestrator to resolve and obtain required approvals.
63
- Orchestrator assigns corrections/rechecks and decides acceptance. Reviewer remains read-only, must not run QA
64
- checks or decide acceptance. Previous QA evidence must not be presented as post-fix execution evidence;
65
- report only checks actually performed, their actor, target state, results and remaining limits.
29
+ - 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.
30
+ - Preserve specific commitments. Risky unverified dependencies need QA/resolved or explicitly dispositioned findings before implementation.
31
+ - Reuse evidence only for matching scope/state/independence/freshness/flow position. Changes/failures/missing-conflicting evidence invalidate affected reuse.
32
+ - 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.
33
+ - 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.
66
34
 
35
+ 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.
67
36
 
37
+ Separate environment/code failure and report exact limits/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.
68
38
 
69
- Authorization evidence and probe/combined scope are owned by [planning](planning.md#authorization-and-scope);
70
- valid reuse and actual-state refresh by [handoff](handoff.md#authorization-continuity).
71
- After gates hold, continue approved scope without saved documents through required checks and Orchestrator acceptance under
72
- Completion continuity below; a role report alone does not complete the work.
39
+ <a id="final-plan-reviewer-correction-loop"></a>
40
+ ### Final plan Reviewer correction loop
73
41
 
42
+ 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.
74
43
 
44
+ 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.
75
45
 
76
- The Risk-scaled execution section above holds the risk table, risk definitions, evidence-reuse rule, and role order,
77
- including Reviewer timing. Product/test edits belong exclusively to Implementer except under the Orchestrator direct path;
78
- Orchestrator may inspect/run checks but routes code corrections to Implementer. Determine the minimum
79
- flow from risk and any specific instruction or approved commitment, and record which requirements each check or review
80
- satisfies. For small, low-risk work with clear scope and acceptance evidence and no such requirement,
81
- Orchestrator's focused checks suffice; do not call QA or Reviewer automatically. Significant/high-risk work requires
82
- independent review of the full change at the final relevant state after the required QA/focused checks and any QA recheck.
46
+ <a id="evidence-after-plan-history-rewrite"></a>
47
+ ## Evidence after plan history rewrite
83
48
 
84
- Metadata file count alone does not imply significant risk; a one-file permission or data-loss rule may. A vague request to delete unnecessary files does not establish low risk; reclassify when installer,
85
- manifest, or other contracts are affected. For a verified ignore-pattern or metadata cleanup, confirm the targets are
86
- unused, required project materials are unaffected, ignore patterns cover only intended paths, and the diff matches the
87
- approved scope; Orchestrator's focused checks then suffice without automatically calling QA or Reviewer.
88
- An environment failure is distinct from a code failure; report the exact limitation and any remaining evidence gap to Orchestrator.
49
+ Verify new HEAD/approved plan content-version/old→new SHAs, descendant implementation/task boundaries and remaining staged/unstaged/untracked state. Preserve chronology/recoverable contents. New content in old commits proves no early approval.
89
50
 
90
- Use additional Planner/Scouter only for unresolved planning/discovery questions. Reviewer covers substantial changes and
91
- correctness, factual, security, data, or interface risks. Orchestrator may use Planner/Scouter/Reviewer when justified
92
- and assigns all Implementer/QA work. Specialists report unresolved questions to Orchestrator, who assigns support only when needed.
51
+ SHA change alone invalidates no entire evidence set. Determine whether exact-HEAD/document/policy evidence links to new state. If not or semantically affected, repeat affected checks/rechecks. Preserve runtime/exact-state rules; never rewrite old fingerprints to suggest execution at new HEAD. Refresh briefs/gates before dependencies. Structure proves neither live compliance nor successful replay.
93
52
 
94
- QA runs applicable existing functional/test checks, or approved structural/consistency checks for policy and
95
- configuration changes. Reviewer reads the assigned diff/source for correctness, factual accuracy, and security. Outside the final plan Reviewer correction exception, after a
96
- behavior fix QA reruns affected checks, and Reviewer rechecks only when warranted. Reuse a Reviewer only when
97
- independent of the work and self-review and when evidence meets required scope and freshness.
98
- Before completion, resolve or explicitly disposition findings and confirm acceptance evidence. Claim checks only
99
- with verified output.
53
+ <a id="task-acceptance-and-final-plan-acceptance"></a>
54
+ <a id="reviewer-timing-and-task-acceptance"></a>
55
+ ## Task acceptance and final plan acceptance
100
56
 
101
- ## Evidence after plan history rewrite
57
+ 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. Same-task rechecks default to current QA while scope/workspace/ownership/context remain valid.
102
58
 
103
- After an approved execution-time plan rewrite, verify new HEAD, approved plan version/content and old-to-new SHA mapping;
104
- descendant implementation content and task boundaries; and remaining staged/unstaged/untracked state. Preserve the actual
105
- approval chronology and recoverable previous contents in the canonical handoff record. The latest version in the original
106
- commit does not establish approval before its actual approval time.
59
+ 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 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.
107
60
 
108
- SHA change alone does not invalidate all prior acceptance evidence. Check whether evidence bound to an exact HEAD,
109
- document or policy can be linked to the new state. If it cannot be linked, or its meaning is affected, repeat affected
110
- checks and required rechecks. Preserve existing runtime evidence invalidation and exact-state requirements; do not rewrite
111
- old fingerprints to imply a run against the new HEAD. Refresh affected briefs and gates before dependent work.
112
- Structural checks establish written-contract alignment, not live agent compliance or successful Git history replay.
61
+ 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.
113
62
 
114
- ## Task acceptance and final plan acceptance
115
63
 
116
- Task-local acceptance is distinct from overall final plan verification and acceptance. Orchestrator connects each task's
117
- acceptance criteria to actual evidence, currently required checks and findings before accepting it; checkbox
118
- completion, an Implementer report or passing commands alone do not establish acceptance.
119
-
120
- Task acceptance and its focused commit require only the task's risk-scaled evidence: a FRESH QA instance per task that
121
- needs QA (default to the current QA for post-fix rechecks of the same task while the approved scope, workspace,
122
- ownership, and relevant assignment context remain valid), or Orchestrator focused checks for small, low-risk tasks;
123
- Reviewer timing and task-boundary gates follow the Risk-scaled execution section above. For an independently acceptable task,
124
- do not delay its acceptance/commit solely for later final plan verification. Currently required task checks must not
125
- be deferred to final verification to accept early. State the scope and timing of final-only integration criteria in
126
- the plan; with a plan, the required final whole-change review is final plan verification.
127
-
128
- A task commit record does not prove unperformed final verification complete. Orchestrator still decides final plan
129
- acceptance using final QA/Reviewer/integration evidence and findings, preserving unverified scope and explicit dispositions.
130
- Valid evidence may cover both task and plan requirements only under the existing scope/state/independence/freshness/flow
131
- rules. For final Reviewer findings on already committed plan work, Orchestrator defines a follow-up task and required
132
- planning/approvals. Implementer leaves corrections uncommitted during rechecks. Orchestrator refreshes the latest committed
133
- state plus uncommitted diff and changed-file list in the Reviewer artifact/brief. Reuse an independent Reviewer or
134
- assign another independent Reviewer as needed. Repeat Implementer → Reviewer without QA reassignment until findings are
135
- resolved; Orchestrator then accepts the corrections and creates one focused follow-up commit.
136
- Final QA findings retain Implementer correction and QA recheck before a new focused commit.
137
- Do not automatically amend/reset or duplicate the original task commit. Scope expansion keeps existing new
138
- planning and approval obligations.
139
64
 
65
+ <a id="ui-browser-acceptance-checks"></a>
140
66
  ### UI browser acceptance checks
141
67
 
142
- Only when assigned UI acceptance criteria and the brief supplies the workspace, existing launch command or URL,
143
- required account and test-data scope, and permitted interactions, QA may use the existing approved test environment
144
- to launch the app or open the URL with available approved browser tools. Follow tool instructions and any applicable
145
- installed browser skill. This permission does not authorize source/document/test/configuration editing, installing
146
- dependencies, or changing environment configuration. Report missing prerequisites to Orchestrator and leave affected
147
- criteria unverified. For each criterion record the command or URL, test state and viewport (or not applicable),
148
- interaction steps, expected and observed results, and accessible evidence. App startup, page load, and static checks alone do not prove
149
- complete UI behavior. For unavailable test environment or browser tools, report the exact limitation and affected
150
- unverified criteria. Clean up only QA-created processes and sessions; preserve existing shared services and sessions.
151
- When assigning UI acceptance criteria, Orchestrator cites this section with its accessible path in the QA brief.
68
+ With assigned criteria/cited prerequisites, QA may use available approved browser tools for apps/URLs.
152
69
 
70
+ 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.
71
+
72
+ 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.
73
+
74
+ <a id="criterion-evidence-and-finding-handoff"></a>
153
75
  ### Criterion evidence and finding handoff
154
76
 
155
- QA reports every acceptance criterion from the brief by identifier, or original wording when no identifier exists.
156
- Each criterion records method and scope, run status, accessible evidence, criterion verdict, and unverified reason
157
- and remaining scope. Run status is passed, failed, not run, or environment blocked; criterion verdict is proven,
158
- unmet, or unverified. Passing a check alone does not prove a criterion: evidence must connect its conditions and
159
- expected result to actual observations. Preserve partial confirmation and out-of-scope, missing-check, or environment
160
- blocked gaps as unverified; omit no criteria. PASS, if used, means only run status and cannot replace criterion
161
- verdicts.
162
- Structural checks prove only structural criteria, not actual behavior, installation, or live agent runtime compliance.
163
-
164
- For QA execution failure or an unmet criterion within the current task, Orchestrator defaults to the current Implementer
165
- for correction and the current QA for a post-fix recheck, subject to the context, task-boundary and amendment rules in
166
- [coordination](coordination.md). The finding alone does not create a new task. QA reruns the
167
- reproduction path and invalidated related checks before Reviewer, reporting the actual actor, target state, outcomes, and limitations,
168
- and the prior finding resolved, unresolved, or unverified with evidence. Reusing QA does not reuse stale evidence.
169
- An unresolved finding returns to Implementer correction and another QA recheck before Reviewer.
170
- Environment blocks, missing checks, and out-of-scope criteria are evidence gaps, not presumed code defects; Orchestrator
171
- handles those gaps under the existing disposition policy without substituting Reviewer review for QA evidence.
172
-
173
- For an acceptance-linked behavior finding, Reviewer reports the criterion, expected behavior, observed problem, related
174
- source, reproduction conditions and steps, and evidence to Orchestrator, distinguishing source-inferred reproduction
175
- from execution-observed results without running QA tests. Outside the final plan Reviewer correction exception,
176
- Orchestrator routes it to Implementer correction and QA post-fix recheck. Outside the required final plan correction loop,
177
- Orchestrator decides when a Reviewer recheck is warranted by the changed scope and independence. Reviewer continues handling
178
- structure, design, factual, and security findings that execution checks cannot settle; observable security/interface
179
- issues may require both QA verification and Reviewer source review.
180
-
181
- Orchestrator accepts using criterion verdicts, findings, recheck evidence, and remaining gaps, rather than an overall
182
- run result.
183
- Explicit disposition does not turn unverified into proven; completion reports preserve remaining unverified scope.
184
- For low-risk work without QA, Orchestrator's focused checks likewise connect each criterion to evidence.
185
-
186
-
187
- Read brief-cited `references/superpowers/test-driven-development/SKILL.md`; retain ARC exceptions.
77
+ 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.
78
+
79
+ 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.
188
80
 
81
+ 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.
189
82
 
83
+ 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.
84
+
85
+ <a id="completion-continuity"></a>
190
86
  ## Completion continuity
191
87
 
192
- Once applicable authorization, document-depth, execution-target, and handoff conditions hold for the approved scope,
193
- continue through execution, correction, reverification, required QA and Reviewer, findings disposition, Orchestrator
194
- acceptance, and the result report. Apply risk-scaled timing above; this adds no per-task Reviewer or new QA obligation.
195
- Role reports, probe findings, or passing commands do not establish overall completion while approved work remains.
196
- Do not present remaining approved execution as an optional suggestion awaiting a user response. A probe-only scope
197
- ends at its approved question's evidence and limits; a combined scope continues under planning's scope rules.
198
- Document omission changes neither verification risk nor acceptance responsibility. Hold only affected work for an
199
- actual unmet condition and report what is needed to resume. Structural evidence does not prove live agent compliance.
88
+ 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.
200
89
 
90
+ <a id="verification-lifecycle-in-the-cooperative-cli"></a>
201
91
  ## Verification lifecycle in the cooperative CLI
202
92
 
203
- The supported `workflow` path is an approved complete spec+plan. No-plan, small-task and document omission paths remain
204
- `cooperative.unsupported`; this outcome does not imply a violation of existing ARC policy or a new obligation to write documents.
205
- The CLI does not execute checks or invoke Reviewer. All actors, results and verdicts are `operator-attested`; they do not prove
206
- identity, actual independence, semantic sufficiency or enforced execution.
207
-
208
- An Orchestrator actor (`actor.role: "orchestrator"`) registers a verification contract by recording
209
- `data: {kind: "task", task: {...}}` in `acceptance-evidence` through `record`. The task specifies `id`, absolute `paths`,
210
- `criteria`, `requiredChecks`, `dependencies`, `approvalRef`, `approvalVersion`, `documentVersion`,
211
- `scopeVersion` and `targetVersion`. Only pending tasks can be registered; this record is neither acceptance nor a commit.
212
- Each requiredChecks descriptor is `{executable, args, cwd, env, outputs}`; executable, cwd and outputs are absolute paths.
213
- cwd and outputs must be within the workspace. Do not include Reviewer in task requiredChecks.
214
-
215
- `changeFingerprints.tasks[taskId]` and `changeFingerprints.final` in `status` are independent observations.
216
- They include read-only Git inventory/index observations and current regular-file bytes, modes and deletions. Task fingerprints
217
- cover owned paths; the final fingerprint covers the whole repository snapshot. Unsupported observations such as symlinks,
218
- submodules and unmerged indexes cause a hold. This is not a sandbox that atomically locks observation and execution.
219
- Leave runtimeHash drift as stale/hold; do not automatically update the stored version or convert it through migration or renewed approval.
220
-
221
- `operation: "check"` in `prepare` accepts `taskId` and
222
- `arguments: {scope: "task", actor: {id, role: "qa"}, descriptor, changeFingerprint, findingIds?}`.
223
- Actor ID attestations must be independent of Implementer and Orchestrator; QA/Implementer reuse across tasks is rejected. The descriptor must
224
- exactly match the registered requiredChecks. After the intent is persisted, the responsible role executes within its existing approved scope.
225
- `result` or `reconcile` records `intentId` and `{status, messageRef, data}`. data specifies the same
226
- `actor`, `descriptor` and `scope` as the intent, `taskId` for tasks, `changeFingerprint`, and
227
- `verdict: "proven" | "unmet" | "unverified"`. Even a succeeded/proven result is valid only for that change version.
228
- This is an operator verdict record; it does not replace semantic proof of a criterion or Orchestrator acceptance.
229
- Failures, unknown, mismatch and unverified outcomes are not passing evidence. Preserve previous results and failure records.
230
-
231
- A failed check/review leaves an open finding. Link a separate finding to an existing check/review through `record` with
232
- `data: {action: "open", id, checkId, message}`. After an Implementer fix, record
233
- `data: {action: "resolve", id, actor: {id, role: "implementer"}, changeFingerprint}` and the fix evidence messageRef.
234
- The actor must be the Implementer assigned to that task, or a relevant task for an overall finding. This marks the finding resolved;
235
- it becomes closed only when a subsequent prepare includes it in `findingIds` and revalidation passes for the same change version.
236
- Earlier QA failures retain the Implementer→QA recheck requirement.
237
-
238
- `operation: "review"` uses `scope: "final"`, `actor.role: "reviewer"` and
239
- `descriptor: {kind: "source-review", paths: [...]}`, without taskId. The initial final review requires acceptance of all tasks
240
- and current required task QA evidence. Reviewer is not a prerequisite gate for task acceptance or focused commits.
241
- For final Reviewer findings in supported plan work, repeat Implementer resolution→Reviewer revalidation without QA reassignment.
242
- Do not present earlier QA evidence as execution evidence for a subsequent fix. This exception does not omit separate unresolved QA failures.
243
-
244
- Scope, document and approval change records do not overwrite history. Specifying `data.affectedTaskIds` invalidates task,
245
- verification and acceptance evidence for those tasks and their dependency chain; omitting it holds all tasks. Final evidence also becomes stale.
246
- Preserve evidence for unaffected independent tasks. Orchestrator determines semantic impact. Affected tasks require a new approval record
247
- for the current scope and an updated task contract before preparation; earlier approvals cannot revive them. New checks/reviews and
248
- finding revalidation are also required. Current evidence supersedes earlier failures without deleting them; acceptance, commits and final completion remain Orchestrator decisions.
93
+ 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.
94
+
95
+ 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.
96
+ 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.
97
+ 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.
98
+ 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.
99
+
100
+ 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.
249
101
 
102
+ 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.
103
+
104
+ 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.
105
+
106
+ <a id="task-acceptance-and-focused-commit-reconciliation-in-the-cooperative-cli"></a>
250
107
  ### Task acceptance and focused commit reconciliation in the cooperative CLI
251
108
 
252
- In the current plan mode, `prepare` supports `operation: "accept"` and `operation: "commit"`.
253
- Acceptance is an Orchestrator attestation specifying `actor.role: "orchestrator"`, `taskId`, and, in `arguments`,
254
- `messageRef`, the same `criteria` as the task, exact `checkIds` for current required QA, all task
255
- `findingIds` and the current `changeFingerprint`. The latest QA result for each required descriptor must be
256
- passed/proven, and findings must be closed through Implementer fixes and QA rechecks.
257
- A successful attestation marks the task accepted; passing commands or Implementer reports alone do not constitute acceptance.
258
- The provenance is `operator-attested`; the operator confirms semantic criterion satisfaction and actor identities.
259
-
260
- At acceptance, the code pins the actual index tree, staged diff, paths and task fingerprint together. Orchestrator stages only
261
- approved task paths beforehand and confirms required QA for that index state. Unrelated paths, changes from another registered
262
- task, or unstaged/untracked changes within scope cause a hold. The code cannot automatically distinguish semantically unrelated
263
- hunks within the same file; Orchestrator reads the actual diff to confirm them.
264
-
265
- `operation: "commit"` in `prepare` references the exact acceptance through `arguments: {"acceptanceId": "acceptance requestId"}`.
266
- The code checks that the current approval, task contract, QA, findings and index match acceptance, then persists a durable intent
267
- with the expected parent, tree, paths and residual paths. The CLI does not stage or commit.
268
- Orchestrator creates one focused implementation commit matching these expectations.
269
-
270
- Then submit `intentId`, `actor.role: "orchestrator"`, and
271
- `result: {"status": "succeeded", "messageRef": "actual result evidence", "data": {"commit": "full OID"}}`
272
- through `reconcile` or result-form `result`. The CLI rereads the actual commit object, parent, tree, paths, HEAD, index and residual changes from local Git.
273
- Only a complete match updates target HEAD and marks the task committed. Failure, unknown and mismatch observations and actual
274
- history are preserved; the target is not updated arbitrarily. Reusing the same request or a completed intent does not authorize
275
- a second effect. After a failure, read the actual state, resolve the cause and reconcile the existing intent.
276
-
277
- Do not rewrite earlier QA fingerprints after a successful commit. Separate post-commit file/index observations detect subsequent
278
- changes. Under the existing rules, final review requires current task evidence and the final fingerprint.
279
- A changed runtimeHash follows the existing stale/hold rules; the stored version is not automatically updated.
109
+ 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.
110
+
111
+ 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.
112
+
113
+ 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.
114
+
115
+ 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.
116
+
117
+ 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.
280
118
 
281
119
  [ARC role policy: contract begin]
282
120
  Generated from lib/policy/role-policy.json; do not edit this managed section manually.
283
- - [git.orchestrator-accept-commit] Only Orchestrator accepts work and executes Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied; Orchestrator accepts then commits without additional user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership and verify the resulting SHA, included content, HEAD and remaining changes. Existing small-task direct and plan-omission paths are unchanged.
284
- - [review.significant-no-plan] For significant/high-risk work without a plan: Implementer → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer because no plan exists. This creates no new plan obligation.
285
- - [review.significant-plan] For significant/high-risk plan work: each task uses Implementer → fresh QA as required → Orchestrator acceptance and focused commit. Reviewer reviews the final full change once after all tasks are accepted and required QA is complete. Reviewer is NOT a per-task or per-commit required gate. Preserve required checks and necessary finding rechecks.
286
- - [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Implementer → Reviewer without QA reassignment; repeat until resolved. This exception applies only at the final plan stage. Preserve required QA and QA failure rechecks before initial final review and outside this exception.
287
- - [planning.plan-amend] During approved task execution, mechanical plan progress records need no new user approval; changed goals, scope, criteria, method, risk, dependencies or required verification require revised-version approval and preparation before affected work. In both cases Orchestrator amends the original planning-document commit at a safe boundary, without a separate document or fixup commit. Preserve actual approval chronology, recoverable old/new contents, hashes, versions and SHA mappings; never retroactively authorize earlier work. Rewrite only unpublished, unshared local linear history with clear ownership and no merges; stop on unknown publication, ownership, unexpected state or replay conflicts, without force push or a fallback document commit. Preserve implementation task boundaries and revalidate affected evidence. See planning, handoff-prep, commit and verification for the full contract.
288
- - [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Implementer and QA need shell for approved checks.
121
+ - [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 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.
122
+ - [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.
123
+ - [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.
124
+ - [review.final-plan-recheck] Final overall Reviewer findings on plan work, including behavior findings, follow Implementer → Reviewer without QA reassignment until resolved. This exception applies only at the final plan stage. Preserve required QA and QA failure rechecks before the initial final review and outside this exception.
125
+ - [planning.plan-amend] Mechanical plan progress records during approved execution need no new user approval. Changes to goals, scope, criteria, method, risk, dependencies or required verification need revised-version approval and preparation before affected work. In both cases Orchestrator amends the original planning-document commit at a safe boundary, with no separate document or fixup commit. Preserve actual approval chronology, recoverable old/new content, hashes, versions and SHA mappings; never authorize past work retroactively. Rewrite only unpublished, unshared local linear history with clear ownership and no merges. Unknown publication/ownership, unexpected state or replay conflicts stop rewriting; no force push or fallback document commit. Preserve implementation task boundaries and revalidate affected evidence. Follow planning, handoff-prep, commit and verification for the full contract.
126
+ - [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. ARC supplies no native observer hook or role-specific Git guard. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Implementer and QA need shell for approved checks.
289
127
  [ARC role policy: contract end]
290
128
 
291
-
129
+ <a id="external-operations-and-recovery-in-the-cooperative-cli"></a>
292
130
  ## External operations and recovery in the cooperative CLI
293
131
 
294
- The three phases support state, documents and assignment; scope, verification, acceptance and focused commits; and external approval, results and audit recovery.
295
- Use `status.support` to inspect all nine areas and their limits. The supported mode is `plan` with spec+plan; no-plan and omission are unsupported. The CLI does not execute native/provider calls or push, merge, deploy or publish.
296
- User approvals and execution results confirmed by the operator are `operator-attested`, with `nativeVerified: false` and
297
- `remoteVerified: false`. Blocking direct calls outside the CLI and independent remote verification are not provided.
132
+ 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.
133
+
134
+ Operator-confirmed approvals/results are `operator-attested`, `nativeVerified: false`, `remoteVerified: false`; no outside-call blocking or independent remote verification.
298
135
 
299
- Orchestrator records an explicit approval it has already confirmed through `record` with
300
- `evidence: {kind: "external-approval", messageRef, data: {operation, scope, descriptor}}`.
301
- `scope` is an array of unique absolute paths within the checkout. Local commit approval does not authorize external operations.
302
- Include the exact action, scope and target in the approval, and record every descriptor field below.
136
+ 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:
303
137
 
304
138
  | operation | descriptor fields |
305
139
  |---|---|
@@ -308,26 +142,10 @@ Include the exact action, scope and target in the approval, and record every des
308
142
  | deploy | service, project, environment, artifactId, destination |
309
143
  | publish | service, namespace, name, version, artifactHash, destination |
310
144
 
311
- Git OIDs are full 40/64-character lowercase hex values; artifactHash is `sha256:<64-hex>`. Without a remote observation,
312
- an OID is an expected value asserted by the user, not verified remote state. destination must be an identifier without secrets.
313
- Do not submit URL userinfo, query or fragment components, or authentication information such as passwords, tokens or credentials.
314
- The CLI rejects recognized credential inputs before persistence, but cannot determine whether every arbitrary string contains a secret.
315
-
316
- Pass `{requestId, expectedRevision, actor: {id, role: "orchestrator"}, operation,
317
- arguments: {approvalRef, scope, descriptor}}` to `prepare`. approvalRef matches the external approval messageRef.
318
- An intent is persisted only when the exact approval, scope/target versions and runtime version match and no effect is unresolved.
319
- After confirming `allow` and `persisted: true`, Orchestrator performs the external operation within its separately approved scope.
320
- This CLI does not expand that execution authority.
321
-
322
- `result`/`reconcile` accepts `{requestId, expectedRevision, actor, intentId,
323
- result: {status, messageRef, data: {operation, scope, descriptor}}}`. intentId is the prepare requestId.
324
- Target mismatches, unknown outcomes and stale results cause a hold while preserving earlier attestations. After an interruption,
325
- use `status` to inspect the intent, `state.requests`, `state.audit` and `state.results`, and investigate whether the effect occurred.
326
- Reconcile the investigation result against the same intent rather than preparing again or reusing the same approval to execute again.
327
- Cancellation additionally requires a `notExecutedEvidence: {messageRef}` attestation that the operation was not executed.
328
- The approval remains consumed after cancellation. Do not resolve version drift through automatic updates, migration or renewed permission.
329
- Report the cause of the hold to Orchestrator.
330
-
331
- Even succeeded results are operator attestations, not independent remote verification. `audit` retains the
332
- request→decision→intent→result→resolution linkage, but is a locally editable record rather than tamper-proof security evidence.
333
- Do not retry while the actual external outcome is uncertain.
145
+ 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.
146
+
147
+ `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.
148
+
149
+ `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.
150
+
151
+ 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.