@yunhozz/arc 0.1.4 → 0.1.6

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 (49) hide show
  1. package/MANIFEST.sha256 +48 -35
  2. package/README.md +11 -0
  3. package/bin/arc-upgrade.mjs +3 -0
  4. package/claude/agents/arc-coder.md +1 -1
  5. package/claude/agents/arc-qa.md +2 -2
  6. package/claude/skill/SKILL.md +8 -8
  7. package/claude/skill/references/commit.md +4 -8
  8. package/claude/skill/references/coordination.md +6 -6
  9. package/claude/skill/references/git-recovery.md +3 -2
  10. package/claude/skill/references/handoff-prep.md +4 -2
  11. package/claude/skill/references/handoff.md +6 -7
  12. package/claude/skill/references/limits.md +1 -1
  13. package/claude/skill/references/planning.md +19 -40
  14. package/claude/skill/references/verification.md +8 -28
  15. package/claude/skill/references/visual-companion.md +1 -1
  16. package/codex/agents/arc-coder.toml +1 -0
  17. package/codex/agents/arc-planner.toml +2 -0
  18. package/codex/agents/arc-qa.toml +2 -0
  19. package/codex/agents/arc-reviewer.toml +2 -0
  20. package/codex/agents/arc-scouter.toml +2 -0
  21. package/codex/skill/SKILL.md +10 -11
  22. package/codex/skill/references/commit.md +9 -21
  23. package/codex/skill/references/coordination.md +5 -7
  24. package/codex/skill/references/git-recovery.md +21 -18
  25. package/codex/skill/references/handoff-prep.md +14 -16
  26. package/codex/skill/references/handoff-worktree.md +10 -12
  27. package/codex/skill/references/handoff.md +27 -44
  28. package/codex/skill/references/limits.md +1 -1
  29. package/codex/skill/references/planning.md +34 -61
  30. package/codex/skill/references/verification.md +22 -50
  31. package/codex/skill/references/visual-companion.md +6 -8
  32. package/lib/cli/choices.mjs +4 -4
  33. package/lib/cli/completion.mjs +10 -8
  34. package/lib/cli/index.mjs +5 -5
  35. package/lib/cli/postinstall.mjs +17 -0
  36. package/lib/cli/root.mjs +2 -1
  37. package/lib/cli/terminal.mjs +19 -0
  38. package/lib/cli/upgrade.mjs +57 -0
  39. package/lib/installer/plan.mjs +3 -2
  40. package/lib/installer/upgrade-state.mjs +29 -0
  41. package/lib/installer/upgrade.mjs +34 -0
  42. package/lib/npm/context.mjs +36 -0
  43. package/lib/npm/process.mjs +17 -0
  44. package/lib/npm/upgrade.mjs +29 -0
  45. package/lib/release/artifact.mjs +163 -0
  46. package/package.json +3 -2
  47. package/scripts/pack-release.mjs +9 -0
  48. package/scripts/postinstall.mjs +4 -0
  49. package/scripts/verify-release.mjs +6 -0
@@ -1,8 +1,7 @@
1
1
  # Handoff contract
2
2
 
3
3
  Orchestrator reads before every Coder first start or restart preparation. Coder trusts the Orchestrator-verified facts
4
- in the brief under
5
- the Coder profile and reads this file only for sections the brief explicitly cites. First-start preparation
4
+ in the brief under the Coder profile and reads this file only for sections the brief explicitly cites. First-start preparation
6
5
  (execution-target choice request, preparation Git mutations, planning-document commit) is in
7
6
  [handoff-prep.md](handoff-prep.md); the new managed worktree path is in [handoff-worktree.md](handoff-worktree.md).
8
7
 
@@ -11,8 +10,7 @@ the Coder profile and reads this file only for sections the brief explicitly cit
11
10
  ### Checkout approval
12
11
 
13
12
  Before every Coder first start and restart, Orchestrator confirms the supplied absolute workspace is accessible and
14
- belongs
15
- to the intended Git repository; record its actual absolute path, current branch or detached HEAD, HEAD, and staged,
13
+ belongs to the intended Git repository; record its actual absolute path, current branch or detached HEAD, HEAD, and staged,
16
14
  unstaged, and untracked changes. Stop if the workspace is inaccessible, is not the intended repository, or HEAD
17
15
  cannot be resolved. Do not initialize Git or switch to another repository automatically.
18
16
 
@@ -28,9 +26,8 @@ drafting or preparation and does not require document completion. Never fall bac
28
26
  After initial design approval, obtain and record an explicit user choice for the first start under the
29
27
  Explicit choice rule: use the current checkout, create a new task branch from the verified base HEAD in that same
30
28
  checkout, or create a new managed worktree and task branch (selection target under handoff-prep.md; contract in
31
- handoff-worktree.md after selection). Without an
32
- explicit execution-target choice or verified valid reuse under the choice-lifetime rules below, wait and do not start or
33
- restart Coder.
29
+ handoff-worktree.md after selection). Without an explicit execution-target choice or verified valid reuse under the
30
+ choice-lifetime rules below, wait and do not start or restart Coder.
34
31
 
35
32
  ### Coder handoff gate
36
33
 
@@ -51,13 +48,11 @@ Orchestrator may start or restart Coder only after all of these conditions are v
51
48
  failure or partial completion.
52
49
  7. The brief includes these preparation and final-verification facts and evidence.
53
50
 
54
- Before a Orchestrator direct edit, Orchestrator verifies the same conditions, with the approved scope record as the
55
- applicable approval,
56
- and records them in the brief.
51
+ Before an Orchestrator direct edit, Orchestrator verifies the same conditions, with the approved scope record as the
52
+ applicable approval, and records them in the brief.
57
53
 
58
54
  A missing or failed condition blocks handoff. Orchestrator may continue read-only investigation and authorized
59
- preparation
60
- or recovery, but cannot start Coder early. Reverify affected evidence when approved content, execution target, branch,
55
+ preparation or recovery, but cannot start Coder early. Reverify affected evidence when approved content, execution target, branch,
61
56
  HEAD, or relevant state changes. Coder's conflict reporting is in its profile; Orchestrator
62
57
  resolves preparation and passes the gate again before Coder resumes.
63
58
 
@@ -79,12 +74,10 @@ Record the Complete planning-document set fields from planning.md, confirming no
79
74
  writing/approval.
80
75
  Distinguish reused commits from the batch preparation commit, or record valid document absence.
81
76
  Record applicable approvals and the initial explicit execution-target choice or verified reuse for each first start or
82
- restart. Give all five
83
- roles (Coder, QA, Planner, Reviewer, Scouter) the same actual workspace and selected execution checkout or absolute
84
- worktree path, preparation
85
- evidence, and absolute artifact paths. Each
86
- role stays in the supplied workspace, reports missing, inaccessible, or conflicting paths and unexpected branch state to
87
- Orchestrator before dependent work, and does not create or switch workspaces or branches.
77
+ restart. Give all five roles (Coder, QA, Planner, Reviewer, Scouter) the same actual workspace and selected execution checkout or absolute
78
+ worktree path, preparation evidence, and absolute artifact paths. Each role stays in the supplied workspace, reports
79
+ missing, inaccessible, or conflicting paths and unexpected branch state to Orchestrator before dependent work, and does
80
+ not create or switch workspaces or branches.
88
81
 
89
82
  ### Task readiness at every assignment
90
83
 
@@ -107,8 +100,7 @@ Unexpected HEAD or ownership changes stop affected work for Orchestrator resolut
107
100
 
108
101
  For the same approved scope, workspace, repository, and execution target, reuse the initial explicit choice only
109
102
  when its evidence is accessible and still valid. On every first start and restart, Orchestrator rechecks actual Git
110
- state
111
- against the current brief: absolute workspace and repository identity, branch or detached HEAD, HEAD,
103
+ state against the current brief: absolute workspace and repository identity, branch or detached HEAD, HEAD,
112
104
  staged/unstaged/untracked changes, preservation and edit ownership, applicable approvals and artifacts,
113
105
  planning-document SHA/message/paths/content or valid no-document rationale, and Orchestrator's final state verification
114
106
  (Coder handoff gate items 1-7); a reused choice never waives any gate. A restart without document changes reuses
@@ -119,14 +111,12 @@ verify that they match approved work, ownership, and the intended target. A work
119
111
  evidence; target HEAD need not remain at that base; source preservation and unexpected-state checks still apply.
120
112
  Link the approved plan version, task ID and commit SHA/content/validity with current Git state and edit ownership in
121
113
  the restart brief under Orchestrator's full handoff gate. Verify/reuse successful task commits without duplication and
122
- keep planning-document preparation
123
- evidence distinct; task commits do not require repeating valid document preparation.
114
+ keep planning-document preparation evidence distinct; task commits do not require repeating valid document preparation.
124
115
 
125
116
  If scope, workspace, repository, target, or approved branch candidate changes, obtain a fresh explicit choice before dependent drafting or preparation; reselection does not require document completion. If an invalidating failure means the old target cannot be trusted,
126
117
  obtain a fresh explicit choice after Orchestrator resolves preparation. State mismatches and unresolved failures block
127
118
  editing until Orchestrator resolves and revalidates the full gate; resolution does not automatically require a new
128
- choice
129
- unless it invalidates the old target. Do not fall back automatically; apply the Explicit choice rule.
119
+ choice unless it invalidates the old target. Do not fall back automatically; apply the Explicit choice rule.
130
120
 
131
121
  Keep one canonical initial handoff record accessible to each assigned role, containing the approved scope/version,
132
122
  repository/workspace identity, and the Handoff evidence fields above; do not create a separate storage service.
@@ -135,8 +125,7 @@ Markdown file at `<git-common-dir>/arc/handoff/<plan-or-task-slug>.md` (slug uni
135
125
  stem, or a spec/task slug when no plan exists; never overwrite another plan's record; resolve with
136
126
  `git rev-parse --path-format=absolute --git-common-dir`; outside the working tree and shared by linked worktrees; not a
137
127
  Git mutation, never staged or committed; contains no secrets), gives its absolute path in every brief, and restart
138
- briefs cite it. If
139
- the write is denied or unavailable, each Coder brief states why and includes the full record inline, with no delta;
128
+ briefs cite it. If the write is denied or unavailable, each Coder brief states why and includes the full record inline, with no delta;
140
129
  that inline record satisfies the accessible record requirement. Do not delete it automatically.
141
130
 
142
131
  Restart brief: supply only verified deltas and mark unchanged fields; `unchanged` means unchanged relative to the record
@@ -166,8 +155,8 @@ Before any exception judgment, Orchestrator reads [Risk-scaled execution](verifi
166
155
 
167
156
  ## Common handoff gate
168
157
 
169
- Before every Coder first start/restart, Orchestrator passes the full gate in
170
- [handoff](handoff.md): applicable approvals/artifacts or valid omissions, explicit execution-target choice
158
+ Before every Coder first start/restart, Orchestrator passes the full gate:
159
+ applicable approvals/artifacts or valid omissions, explicit execution-target choice
171
160
  or verified reuse, intended accessible repository/workspace, actual Git identity/state, preservation/ownership,
172
161
  verified document commits or valid absence, and no unresolved failure/partial completion.
173
162
  Missing evidence, mismatches, unclear ownership or unresolved preparation block handoff and require Orchestrator
@@ -175,7 +164,7 @@ resolution and full revalidation. Handoff owns the evidence fields, canonical ha
175
164
  and reuse. Coder trusts the Orchestrator-verified brief and reports actual conflicts under its self-contained profile;
176
165
  never replace its local guards with a requirement to load Orchestrator procedures.
177
166
  Depth-2 roles use the supplied workspace and report path/state conflicts; they cannot create/switch workspaces or
178
- branches. The same conditions apply before a Orchestrator direct edit.
167
+ branches. The same conditions apply before an Orchestrator direct edit.
179
168
  For a selected worktree, handoff requires common directory, registration, app-managed current-chat attachment,
180
169
  approved branch, and source preservation; prepare only through the selected managed-worktree contract.
181
170
 
@@ -200,12 +189,10 @@ generalize it to behavior work.
200
189
  ## Orchestrator direct path for small tasks
201
190
 
202
191
  Orchestrator may make a task's edits directly, without Planner brainstorming or Coder, only when every small,
203
- low-risk criterion
204
- holds, every plan-skip criterion holds
205
- (one local change, no dependent stages, no cross-component shared state, lifecycle, or integration-order concerns,
206
- and one
207
- focused verification path), and no significant-risk trigger applies. Spike, architectural, ordinary-behavior,
208
- significant/high-risk, unclear-risk work, and edits overlapping files assigned to a running Coder are not eligible.
192
+ low-risk criterion holds, every plan-skip criterion holds (one local change, no dependent stages, no cross-component shared state,
193
+ lifecycle, or integration-order concerns, and one focused verification path), and no significant-risk trigger applies.
194
+ Spike, architectural, ordinary-behavior, significant/high-risk, unclear-risk work, and edits overlapping files assigned
195
+ to a running Coder are not eligible.
209
196
 
210
197
  Before editing, Orchestrator records a scope record (not a brainstorming design) with scope and files,
211
198
  why every criterion holds, acceptance criteria, and focused verification. Apply authorization in
@@ -213,23 +200,19 @@ why every criterion holds, acceptance criteria, and focused verification. Apply
213
200
  that scope; no duplicate approval is needed. Otherwise present the scope record to the user and obtain explicit
214
201
  approval before editing. Silence, an ambiguous response, or approval of other work is not approval.
215
202
  Orchestrator then passes the Coder handoff gate in handoff,
216
- with the
217
- approved scope record as the applicable approval, before the first edit. Orchestrator edits only the approved files,
218
- preserves others' edits, makes surgical edits in
219
- the local style without unrelated refactoring or speculative additions, and does not install dependencies without
220
- authorization.
203
+ with the approved scope record as the applicable approval, before the first edit. Orchestrator edits only the approved files,
204
+ preserves others' edits, makes surgical edits in the local style without unrelated refactoring or speculative additions,
205
+ and does not install dependencies without authorization.
221
206
 
222
207
  Behavior edits follow Coder TDD and constraints; when TDD applies, Orchestrator follows local
223
208
  `test-driven-development`.
224
209
  After editing, Orchestrator records the changed files, runs the focused checks, connects each acceptance criterion to
225
- evidence,
226
- and preserves unverified scope. Orchestrator is not independent of its own edit; assign QA when the evidence is
210
+ evidence, and preserves unverified scope. Orchestrator is not independent of its own edit; assign QA when the evidence is
227
211
  incomplete.
228
212
  After a failed focused check or a QA finding, Orchestrator routes the correction to Coder and obtains a recheck.
229
213
 
230
214
  If scope expands, risk becomes unclear, or a criterion stops holding, Orchestrator stops editing, records the changes
231
- already
232
- made, and reclassifies; further work follows the normal Planner/Coder flow with Coder owning subsequent edits. Do not
215
+ already made, and reclassifies; further work follows the normal Planner/Coder flow with Coder owning subsequent edits. Do not
233
216
  automatically revert, reset, stash, or clean those changes. Like other plan-skip paths, there is no automatic task
234
217
  commit; commits follow applicable guidance and user requests.
235
218
 
@@ -30,7 +30,7 @@ Serialize work when a batch does not fit. There are no reserved role slots.
30
30
 
31
31
  Preserve the ledger through continuation, resume and context compaction; reconcile actual instance
32
32
  IDs before dispatch. Ledger loss must never reset counters to zero. If reconstruction is incomplete,
33
- hold creation and report the unknown budget; use a conservative bound only with sufficient evidence.
33
+ hold creation and report the unknown budget; use a conservative upper bound only when the reconstructed records support it.
34
34
  Completion frees confirmed active capacity; it does not restore the total-created budget. Exhaustion holds new
35
35
  creation and requires reporting remaining work and budgets. It does not authorize skipping required
36
36
  QA or Reviewer, role freshness, approval, ownership, dependency or same-file edit gates.
@@ -29,11 +29,12 @@ a well-supported infeasibility result can complete it. Probe-only authorization
29
29
  or subsequent implementation. Record question, method/scope, criteria, and constraints; a sufficiently specific probe
30
30
  request can supply that approval. Match checks to probe purpose/risk and do not report probe evidence as product proof.
31
31
 
32
- If the user explicitly requests both a probe and implementation and the whole scope is sufficiently specified,
33
- classify the entire scope. When the entire scope meets Bounded conditions, the probe is an internal investigation
34
- with no new approval boundary at its report. Unknown implementation is not blanket authorization: hold affected
35
- implementation if findings materially change scope, method, or risk, or leave a new material decision. Reassess depth
36
- and obtain any required design/spec/plan approvals before that implementation. A probe-only request remains separate.
32
+ If the user explicitly requests both a probe and implementation and the whole scope is sufficiently specified, classify
33
+ the entire scope. When the entire scope meets the Bounded path criteria in Design path and plan depth, the probe is an
34
+ internal investigation with no new approval boundary at its report. Unknown implementation is not blanket authorization:
35
+ hold affected implementation if findings materially change scope, method, or risk, or leave a new material decision.
36
+ Reassess depth and obtain any required design/spec/plan approvals before that implementation. A probe-only request
37
+ remains separate.
37
38
 
38
39
  ## Formal drafting boundary
39
40
 
@@ -69,7 +70,7 @@ call cap; never accept an incomplete draft to minimize calls. Do not add call-co
69
70
 
70
71
  `brainstorming` and `writing-plans` are instructions for existing roles, not extra agents. This ARC controls
71
72
  routing/approval gates even if a called skill names another executor. Follow local ARC reference instructions and user
72
- constraints; report missing required local references before that stage. Integrate means save, route, and obtain approval;
73
+ constraints; report a missing required skill or local reference before that stage; it blocks that stage. Integrate means save, route, and obtain approval;
73
74
  never author.
74
75
 
75
76
  When the request or task brief is in Korean, Planner writes spec and plan titles and explanatory prose in Korean unless
@@ -83,15 +84,15 @@ approved obligations separately.
83
84
 
84
85
  1. Before software feature, design, or behavior changes, Orchestrator assigns Planner the local `brainstorming`
85
86
  skill with
86
- the brief/evidence. Planner explores context and proposes the spike/bounded/architectural path (Orchestrator
87
- decides), design/options,
87
+ the brief/evidence. Planner explores context. Planner proposes, Orchestrator decides the spike/bounded/architectural path; Planner also
88
+ proposes design/options,
88
89
  trade-offs, acceptance criteria, assumptions, and focused questions. Orchestrator integrates, announces scope,
89
90
  routes user
90
91
  answers/revisions back, and obtains approvals; Orchestrator never runs brainstorming or writing-plans itself
91
92
  (SKILL.md Role gate);
92
93
  the direct path uses only a scope record.
93
94
  2. Spike: apply Probe scope above; distinguish probe-only authorization from a sufficiently specified combined scope.
94
- Bounded: approve a short design before Coder or a Orchestrator direct edit (Planner's design
95
+ Bounded: approve a short design before Coder or an Orchestrator direct edit (Planner's design
95
96
  before Coder; a direct edit uses only an approved scope record). Architectural: approve
96
97
  design, then Planner returns complete spec draft and self-review findings; Orchestrator integrates, saves,
97
98
  self-reviews, and obtains written-spec approval
@@ -110,17 +111,15 @@ approved obligations separately.
110
111
  self-reviews,
111
112
  then obtains plan approval before Coder.
112
113
  5. Every Coder first start and restart requires all applicable design/spec/plan approvals and passing
113
- the common handoff gate in SKILL.md and handoff.md, with approved artifacts, brief, and relevant findings.
114
+ the Common handoff gate in SKILL.md and handoff.md, with approved artifacts, brief, and relevant findings.
114
115
  Non-behavior
115
116
  configuration/documentation may skip inapplicable design/planning stages, but still requires the handoff gate.
116
- A Orchestrator direct edit requires its approved scope record and the same gate conditions before the first edit.
117
+ An Orchestrator direct edit requires its approved scope record and the same gate conditions before the first edit.
117
118
 
118
119
  When a Bounded written spec is required by Orchestrator's recorded plan-depth judgment, record that necessity and scope
119
- and
120
- use the approved short design as its basis. Planner returns a proportional complete spec draft and self-review;
120
+ and use the approved short design as its basis. Planner returns a proportional complete spec draft and self-review;
121
121
  Orchestrator integrates, saves, self-reviews, and obtains individual written-spec approval before dependent plan
122
- drafting
123
- and execution preparation. This applies that judgment, not a new spec-necessity rule.
122
+ drafting and execution preparation. This applies that judgment, not a new spec-necessity rule.
124
123
 
125
124
  Design, spec, plan, and brainstorming drafts are authored only by Planner.
126
125
  Orchestrator must not substitute an independently authored spec or plan for Planner's complete draft.
@@ -134,13 +133,11 @@ implementation goal/scope and target files, preceding tasks and dependencies, ac
134
133
  checks and evidence before acceptance, and hold conditions; each task independently implementable, verifiable and
135
134
  acceptable, with changes that cannot be independently verified (including policy/profile/tests/manifest sharing one
136
135
  contract) in one task from the outset; and final overall plan verification stated separately from task acceptance
137
- prerequisites, with scope and timing. Never list Reviewer as a per-task required check (Reviewer timing: SKILL.md
138
- Risk-scaled execution). RED/GREEN and individual
136
+ prerequisites, with scope and timing. Never list Reviewer as a per-task required check (Reviewer timing: [Risk-scaled execution](verification.md#risk-scaled-execution)). RED/GREEN and individual
139
137
  commands do not create commit units; one task is one focused commit under commit.md, which also covers no-change, hold
140
138
  and resume. Do not combine different approved tasks into one commit during execution; if inseparability appears later,
141
139
  stop affected work and have Orchestrator handle revised scope, planning and applicable approvals.
142
- These requirements apply to
143
- required plans; existing plan-omission paths gain no new plan obligation.
140
+ These requirements apply to required plans; existing plan-omission paths gain no new plan obligation.
144
141
 
145
142
  ### Dependency and readiness record
146
143
 
@@ -156,13 +153,16 @@ A task is ready only when all applicable approvals and execution preparation are
156
153
  are available and settled, predecessors have required evidence and Orchestrator acceptance plus verified focused
157
154
  commits (or accepted no-change records), ownership/resources do not conflict, its required check/QA path is available,
158
155
  and a subagent slot exists under both the configured ARC full-tree cap shared by all roles and any lower actual runtime
159
- limit. Report runtime limits. Start all ready independent tasks with fresh Coders concurrently within capacity;
160
- record each hold or serialization reason instead of silently following list order. Preserve existing risk gates.
156
+ limit (see [limits](limits.md)). Report runtime limits; ARC's cap is not a claim of runtime capability. Start all ready
157
+ independent tasks with fresh Coders concurrently within capacity; record each hold or serialization reason instead of
158
+ silently following list order. Preserve existing risk gates, risk-scaled QA/Reviewer timing and execution-target
159
+ restrictions.
161
160
 
162
161
  Update the map on completion, check evidence, acceptance, commit, slot return and new conflicts. Completion reports
163
162
  alone do not release dependents. Reevaluate newly ready tasks immediately without waiting for unrelated batch members;
164
163
  failed or ambiguous predecessors hold their dependent chain, while unaffected ready tasks may proceed. Dispatch still
165
- passes handoff.md for each task; commits and shared Git mutations follow commit.md. This record does not authorize
164
+ passes [handoff](handoff.md) for each task, refreshing assignment evidence there; commits, shared-checkout Git
165
+ coordination and shared Git mutations follow [commit](commit.md). This record does not authorize
166
166
  Orchestrator to rewrite Planner's approved task boundaries or waive approvals.
167
167
 
168
168
  For example, with A → B → C and independent D and two slots, start A and D. After A's required checks,
@@ -194,14 +194,12 @@ If evidence is missing or mismatched in either gate, stop the affected save and
194
194
 
195
195
  The applicable document set means all specs and plans required for the current approved execution scope, not future
196
196
  project work. Orchestrator records scope, design/plan depth, absolute document paths and coverage, approved
197
- versions/status,
198
- plan dependencies and execution order, skipped stages with rationale, and documents still awaiting writing or approval
197
+ versions/status, plan dependencies and execution order, skipped stages with rationale, and documents still awaiting writing or approval
199
198
  in the shared brief. The set is complete only when every required document is written and individually approved and
200
199
  no unresolved scope or dependency decision requires another document. Do not omit required documents from the list.
201
200
 
202
201
  A required plan does not itself require a written spec. Bounded uses Orchestrator's recorded plan-depth judgment to
203
- determine
204
- whether a written spec is required; do not infer one from plan necessity. Spec steps apply only to Architectural and
202
+ determine whether a written spec is required; do not infer one from plan necessity. Spec steps apply only to Architectural and
205
203
  required Bounded specs, and plan steps only to required plans. These gates add no new spec obligation to Spike,
206
204
  Bounded plan-skip, or non-behavior documentation/configuration paths; preserve existing omission rationales.
207
205
 
@@ -225,17 +223,16 @@ are not permission for document commits during planning or for starting Coder.
225
223
 
226
224
  | Path | Applicable approvals and preparation |
227
225
  |------|--------------------------------------|
228
- | Spike probe | Approve the feasibility question, probe method/scope, acceptance criteria, and constraints. Do not force specs/plans for still-unknown implementation; no new spec obligation is added by this gate. If Coder executes the probe, pass the common handoff gate after probe approval. Read-only Orchestrator/Planner investigation without Coder does not trigger that gate. |
229
- | Bounded, plan skipped | Approve the short design and record the existing plan-skip criteria/rationale; this gate adds no new spec obligation. Complete applicable approvals, select the target, prepare any actual approved documents, or record valid document absence, then pass the common gate. |
230
- | Bounded, plan required | Approve the short design and every required plan; write a spec only when Orchestrator's recorded plan-depth judgment requires it, then obtain its individual written-spec approval before dependent plan drafting. Select and prepare the target before formal drafting; complete all applicable artifacts before one docs batch and the common gate. |
231
- | Architectural | Approve design, then written spec, then every required plan using `writing-plans`; select and prepare the target before formal drafting; complete the document set before batch preparation, final verification, and the common gate. |
232
- | Non-behavior documentation/configuration | Record scope, acceptance criteria, and why design/planning stages are inapplicable; this gate adds no new spec obligation. Still select the target, verify Git state, prepare actual approved documents or record absence, and pass the common gate. |
226
+ | Spike probe | Approve the feasibility question, probe method/scope, acceptance criteria, and constraints. Do not force specs/plans for still-unknown implementation; no new spec obligation is added by this gate. If Coder executes the probe, pass the Common handoff gate after probe approval. Read-only Orchestrator/Planner investigation without Coder does not trigger that gate. |
227
+ | Bounded, plan skipped | Approve the short design and record the existing plan-skip criteria/rationale; this gate adds no new spec obligation. Complete applicable approvals, select the target, prepare any actual approved documents, or record valid document absence, then pass the Common handoff gate. |
228
+ | Bounded, plan required | Approve the short design and every required plan; write a spec only when Orchestrator's recorded plan-depth judgment requires it, then obtain its individual written-spec approval before dependent plan drafting. Select and prepare the target before formal drafting; complete all applicable artifacts before one docs batch and the Common handoff gate. |
229
+ | Architectural | Approve design, then written spec, then every required plan using `writing-plans`; select and prepare the target before formal drafting; complete the document set before batch preparation, final verification, and the Common handoff gate. |
230
+ | Non-behavior documentation/configuration | Record scope, acceptance criteria, and why design/planning stages are inapplicable; this gate adds no new spec obligation. Still select the target, verify Git state, prepare actual approved documents or record absence, and pass the Common handoff gate. |
233
231
 
234
232
  Apply Authorization and scope above to probe-only and combined requests; preserve required design/spec/plan gates.
235
233
  These gates add no new spec obligation for Spike, Bounded plan-skip, or non-behavior documentation/configuration paths.
236
234
  Document omission skips only document obligations, never explicit
237
- execution-target
238
- choice, Git state/ownership checks, or handoff evidence.
235
+ execution-target choice, Git state/ownership checks, or handoff evidence.
239
236
 
240
237
  If planning reveals new scope, reassess the list, depth, and dependencies and obtain additional required approvals
241
238
  before dependent drafting or commit. Changed approved documents require approval of the revised version. If implementation reveals new
@@ -248,9 +245,9 @@ lifetime and restart record in [handoff.md](handoff.md).
248
245
 
249
246
  Missing or mismatched evidence, unfinished approvals, unclear ownership, or unresolved failure blocks the affected
250
247
  save, execution-target request, Git mutation, or Coder handoff: stop and report to Orchestrator.
251
- Orchestrator resolves the issue and
252
- reverifies affected evidence before resumption. Reverify evidence when scope, approved versions, paths, target, or
253
- relevant Git state changes. Preserve unrelated changes under handoff rules; read-only investigation remains allowed.
248
+ Orchestrator resolves the issue and reverifies affected evidence before resumption. Reverify evidence when scope,
249
+ approved versions, paths, target, or relevant Git state changes. Preserve unrelated changes under handoff rules;
250
+ read-only investigation remains allowed.
254
251
 
255
252
  Do not retroactively treat an early save or commit as satisfying these gates or as user approval. Record the actual
256
253
  order and any evidence gap. Structural checks prove only the repository's written policy contract, not consuming-agent
@@ -259,7 +256,7 @@ compliance unverified. Do not add runtime infrastructure or modify external skil
259
256
 
260
257
  ### Managed worktree preparation
261
258
 
262
- See [handoff-worktree.md](handoff-worktree.md) for the third-path managed worktree contract.
259
+ See [handoff-worktree.md](handoff-worktree.md) for the managed worktree contract.
263
260
 
264
261
  ## Local planning references
265
262
 
@@ -267,30 +264,6 @@ Orchestrator briefs absolute ARC paths `references/superpowers/brainstorming/SKI
267
264
  `references/superpowers/writing-plans/SKILL.md`. Planner reads them directly; resolve relative references within each
268
265
  skill. Missing files stop the stage; report paths without global fallback. Keep ARC approval and ownership gates.
269
266
 
270
- ## Dependency analysis and parallel dispatch
271
-
272
- Before the first Coder assignment for an approved plan, Orchestrator records its dependency/readiness map and
273
- initial ready batch under [planning](planning.md), which owns record fields and readiness conditions.
274
- File separation alone never proves independence. Pass the full approval/preparation and handoff gates for every
275
- assignment; unresolved dependencies, shared contracts, or ownership conflicts hold affected work.
276
- Start all ready independent tasks concurrently with fresh Coders within capacity under [limits](limits.md)
277
- and any lower actual runtime limit; record capacity and serialization reasons. Same-file concurrent Coder edits are
278
- prohibited, even on different lines. ARC's cap is not a claim of runtime capability.
279
-
280
- Reassess readiness after completion reports, new check evidence, acceptance, commit, slot return, or a new conflict.
281
- Coder completion alone does not release dependents: require predecessor checks, Orchestrator acceptance and verified
282
- focused commit, or accepted no-change evidence under [commit](commit.md). Start newly ready tasks without
283
- waiting for unrelated batch members; failures hold affected dependents while unaffected ready work may continue.
284
- Preserve risk-scaled QA/Reviewer timing and execution-target restrictions. Shared-checkout Git coordination belongs to
285
- commit.md; refresh assignment evidence under [handoff](handoff.md).
286
-
287
-
288
- Design and plan depth are independent of verification risk. Planner alone uses local brainstorming/writing-plans
289
- (Role gate); Planner proposes, Orchestrator decides the path and plan depth;
290
- Orchestrator integrates complete drafts and obtains applicable approvals. Architectural specs and Bounded written specs
291
- required by Orchestrator's recorded plan-depth judgment (planning item 3) use planning save gates; a required plan alone
292
- does not require a spec. Obtain explicit execution-target choice and verify actual target preparation before formal drafting
293
- and saving. Complete all current-scope individual document approvals before the batch docs commit. A missing required skill blocks its stage.
294
267
 
295
268
 
296
269
  [ARC role policy: contract begin]
@@ -10,8 +10,7 @@ For Orchestrator, **Evidence verdict**: each criterion is proven, unmet, or unve
10
10
  ## Risk-scaled execution
11
11
 
12
12
  Orchestrator assigns edits exclusively to Coder except under the Orchestrator direct path in [handoff](handoff.md#orchestrator-direct-path-for-small-tasks), and determines affected
13
- behavior, risk,
14
- and smallest meaningful verification.
13
+ behavior, risk, and smallest meaningful verification.
15
14
 
16
15
  | Risk | Minimum flow |
17
16
  |---|---|
@@ -21,9 +20,8 @@ and smallest meaningful verification.
21
20
 
22
21
  Ordinary and significant plan tasks need a FRESH QA before acceptance; only small, low-risk tasks may be accepted on
23
22
  Orchestrator focused checks. Small, low risk means narrow, understood, readily reversible, and verifiable by focused
24
- checks. Ordinary behavior
25
- fails those conditions without a significant-risk trigger. Significant risk includes shared role/behavior contracts,
26
- shared state, lifecycle/integration order, security/permissions, data loss/migration, public interfaces, or costly
23
+ checks. Ordinary behavior fails those conditions without a significant-risk trigger. Significant risk includes shared
24
+ role/behavior contracts, shared state, lifecycle/integration order, security/permissions, data loss/migration, public interfaces, or costly
27
25
  installation/deployment/rollback. Substantial behavior or contract changes are significant regardless of file count.
28
26
  When risk is unclear, investigate or use the higher flow. Environment failure does not waive checks or determine design depth.
29
27
 
@@ -59,33 +57,29 @@ report only checks actually performed, their actor, target state, results and re
59
57
 
60
58
  Authorization evidence and probe/combined scope are owned by [planning](planning.md#authorization-and-scope);
61
59
  valid reuse and actual-state refresh by [handoff](handoff.md#authorization-continuity).
62
- After gates hold, continue approved no-doc scope through required checks and Orchestrator acceptance under
63
- [verification](verification.md#completion-continuity); a role report alone does not complete the work.
60
+ After gates hold, continue approved scope without saved documents through required checks and Orchestrator acceptance under
61
+ Completion continuity below; a role report alone does not complete the work.
64
62
 
65
63
 
66
64
 
67
65
  The Risk-scaled execution section above holds the risk table, risk definitions, evidence-reuse rule, and role order,
68
66
  including Reviewer timing. Product/test edits belong exclusively to Coder except under the Orchestrator direct path;
69
- Orchestrator may inspect/run checks but
70
- routes code corrections to Coder. Determine the minimum
67
+ Orchestrator may inspect/run checks but routes code corrections to Coder. Determine the minimum
71
68
  flow from risk and any specific instruction or approved commitment, and record which requirements each check or review
72
69
  satisfies. For small, low-risk work with clear scope and acceptance evidence and no such requirement,
73
- Orchestrator's focused
74
- checks suffice; do not call QA or Reviewer automatically. Significant/high-risk work requires independent review of the
75
- full change at the final relevant state after the required QA/focused checks and any QA recheck.
70
+ Orchestrator's focused checks suffice; do not call QA or Reviewer automatically. Significant/high-risk work requires
71
+ independent review of the full change at the final relevant state after the required QA/focused checks and any QA recheck.
76
72
 
77
73
  Many known metadata files are not significant solely because there are many, and a one-file permission or data-loss
78
74
  rule may be. A vague request to delete unnecessary files does not establish low risk; reclassify when installer,
79
75
  manifest, or other contracts are affected. For a verified ignore-pattern or metadata cleanup, confirm the targets are
80
76
  unused, required project materials are unaffected, ignore patterns cover only intended paths, and the diff matches the
81
77
  approved scope; Orchestrator's focused checks then suffice without automatically calling QA or Reviewer.
82
- An environment failure
83
- is distinct from a code failure; report the exact limitation and any remaining evidence gap to Orchestrator.
78
+ An environment failure is distinct from a code failure; report the exact limitation and any remaining evidence gap to Orchestrator.
84
79
 
85
80
  Use additional Planner/Scouter only for unresolved planning/discovery questions. Reviewer covers substantial changes and
86
81
  correctness, factual, security, data, or interface risks. Orchestrator may use Planner/Scouter/Reviewer when justified
87
- and assigns
88
- all Coder/QA work. Specialists report unresolved questions to Orchestrator, who assigns support only when needed.
82
+ and assigns all Coder/QA work. Specialists report unresolved questions to Orchestrator, who assigns support only when needed.
89
83
 
90
84
  QA runs applicable existing functional/test checks, or approved structural/consistency checks for policy and
91
85
  configuration changes. Reviewer reads the assigned diff/source for correctness, factual accuracy, and security. Outside the final plan Reviewer correction exception, after a
@@ -102,14 +96,13 @@ completion, a Coder report or passing commands alone do not establish acceptance
102
96
 
103
97
  Task acceptance and its focused commit require only the task's risk-scaled evidence: a FRESH QA instance per task that
104
98
  needs QA (same-task rechecks may reuse), or Orchestrator focused checks for small, low-risk tasks;
105
- Reviewer timing and task-boundary gates follow SKILL.md Risk-scaled execution. For an independently acceptable task,
99
+ Reviewer timing and task-boundary gates follow the Risk-scaled execution section above. For an independently acceptable task,
106
100
  do not delay its acceptance/commit solely for later final plan verification. Currently required task checks must not
107
101
  be deferred to final verification to accept early. State the scope and timing of final-only integration criteria in
108
102
  the plan; with a plan, the required final whole-change review is final plan verification.
109
103
 
110
104
  A task commit record does not mark unperformed final verification complete. Orchestrator still decides final plan
111
- acceptance
112
- using final QA/Reviewer/integration evidence and findings, preserving unverified scope and explicit dispositions.
105
+ acceptance using final QA/Reviewer/integration evidence and findings, preserving unverified scope and explicit dispositions.
113
106
  Valid evidence may cover both task and plan requirements only under the existing scope/state/independence/freshness/flow
114
107
  rules. For final Reviewer findings on already committed plan work, Orchestrator defines a follow-up task and required
115
108
  planning/approvals. Coder leaves corrections uncommitted during rechecks. Orchestrator refreshes the latest committed
@@ -127,10 +120,8 @@ required account and test-data scope, and permitted interactions, QA may use the
127
120
  to launch the app or open the URL with available approved browser tools. Follow tool instructions and any applicable
128
121
  installed browser skill. This permission does not authorize source/document/test/configuration editing, installing
129
122
  dependencies, or changing environment configuration. Report missing prerequisites to Orchestrator and leave affected
130
- criteria
131
- unverified. For each criterion record the command or URL, test state and viewport (or not applicable),
132
- interaction steps,
133
- expected and observed results, and accessible evidence. App startup, page load, and static checks alone do not prove
123
+ criteria unverified. For each criterion record the command or URL, test state and viewport (or not applicable),
124
+ interaction steps, expected and observed results, and accessible evidence. App startup, page load, and static checks alone do not prove
134
125
  complete UI behavior. For unavailable test environment or browser tools, report the exact limitation and affected
135
126
  unverified criteria. Clean up only QA-created processes and sessions; preserve existing shared services and sessions.
136
127
  When assigning UI acceptance criteria, Orchestrator cites this section with its accessible path in the QA brief.
@@ -147,23 +138,17 @@ verdicts.
147
138
  Structural checks prove structural criteria only; they do not prove actual behavior, installation, or live agent runtime
148
139
  compliance.
149
140
 
150
- For QA execution failure or an unmet criterion, Orchestrator assigns Coder correction and obtains a QA recheck before
151
- Reviewer.
152
- Do not enter Reviewer until QA reports the finding as resolved, unresolved, or unverified with evidence; unresolved
153
- execution failures or unmet criteria require correction and another QA recheck before that stage. QA rechecks the defect
154
- reproduction path and related checks invalidated by the fix. Environment blocks, missing checks, and out-of-scope
155
- criteria
156
- are evidence gaps, not presumed code defects; Orchestrator handles those gaps under the existing disposition policy
157
- without
158
- substituting Reviewer review for QA evidence.
141
+ For QA execution failure or an unmet criterion, Orchestrator assigns Coder correction and a QA recheck of the
142
+ reproduction path and invalidated related checks before Reviewer; QA reports the prior finding resolved, unresolved, or
143
+ unverified with evidence. An unresolved finding returns to Coder correction and another QA recheck before Reviewer.
144
+ Environment blocks, missing checks, and out-of-scope criteria are evidence gaps, not presumed code defects; Orchestrator
145
+ handles those gaps under the existing disposition policy without substituting Reviewer review for QA evidence.
159
146
 
160
147
  For an acceptance-linked behavior finding, Reviewer reports the criterion, expected behavior, observed problem, related
161
148
  source, reproduction conditions and steps, and evidence to Orchestrator, distinguishing source-inferred reproduction
162
- from
163
- execution-observed results without running QA tests. Outside the final plan Reviewer correction exception, Orchestrator routes it to Coder correction and QA post-fix recheck.
164
- Outside that exception, for significant/high-risk work, Reviewer then reviews the final full change once after QA recheck (the same Reviewer
165
- rechecks the same scope after a fix), or, for already committed
166
- plan work, rechecks only the affected findings when warranted. Reviewer continues handling
149
+ from execution-observed results without running QA tests. Outside the final plan Reviewer correction exception,
150
+ Orchestrator routes it to Coder correction and QA post-fix recheck. Outside the required final plan correction loop,
151
+ Orchestrator decides when a Reviewer recheck is warranted by the changed scope and independence. Reviewer continues handling
167
152
  structure, design, factual, and security findings that execution checks cannot settle; observable security/interface
168
153
  issues may require both QA verification and Reviewer source review.
169
154
 
@@ -176,19 +161,6 @@ For low-risk work without QA, Orchestrator's focused checks likewise connect eac
176
161
  Read brief-cited `references/superpowers/test-driven-development/SKILL.md`; retain ARC exceptions.
177
162
 
178
163
 
179
- ### Final plan Reviewer correction loop
180
-
181
- For a plan's final overall Reviewer findings, including behavior findings, Orchestrator assigns
182
- Coder → Reviewer recheck with no QA reassignment. Repeat corrections and Reviewer rechecks until findings are resolved;
183
- the initial single full review does not prohibit necessary rechecks. Before the initial final overall Reviewer,
184
- risk-required checks and QA execution failures or unmet criteria still require Coder correction → QA recheck.
185
- This exception applies only to findings from the final overall Reviewer of work with a plan.
186
- Work without a plan retains its existing verification flow. Scope expansion, separate mandatory obligations,
187
- or unresolved evidence gaps hold affected work for Orchestrator to resolve and obtain required approvals.
188
- Orchestrator assigns corrections/rechecks and decides acceptance. Reviewer remains read-only, must not run QA
189
- checks or decide acceptance. Previous QA evidence must not be presented as post-fix execution evidence;
190
- report only checks actually performed, their actor, target state, results and remaining limits.
191
-
192
164
  ## Completion continuity
193
165
 
194
166
  Once applicable authorization, document-depth, execution-target, and handoff conditions hold for the approved scope,
@@ -8,14 +8,12 @@ Visual companion design discussion is distinct from QA UI acceptance checks unde
8
8
 
9
9
  Planner identifies a genuinely visual question, explains why a visual helps, and returns options, the user decision,
10
10
  and a complete content draft; Planner does not write screens, start a server, operate a browser, or request approval.
11
- Orchestrator makes a just-in-time
12
- offer as its own message only when a question is clearer visually, then waits for acceptance. If declined, continue in
13
- text and do not offer again unless the user raises it. If accepted, decide per question whether to use the companion.
14
- Orchestrator owns its guide, server/browser, workspace paths, live-session checks, complete keyed URL, screens,
15
- session state,
16
- feedback/events, stale-screen clearing when returning to text, and cleanup. Check the server before showing a screen;
17
- after the user's reply, treat terminal text as primary and events as supplemental. A UI topic or accepted companion
18
- alone does not route every question through a browser.
11
+ Orchestrator makes a just-in-time offer as its own message only when a question is clearer visually, then waits for
12
+ acceptance. If declined, continue in text and do not offer again unless the user raises it. If accepted, decide per
13
+ question whether to use the companion. Orchestrator owns its guide, server/browser, workspace paths, live-session
14
+ checks, complete keyed URL, screens, session state, feedback/events, stale-screen clearing when returning to text, and
15
+ cleanup. Check the server before showing a screen; after the user's reply, treat terminal text as primary and events as
16
+ supplemental. A UI topic or accepted companion alone does not route every question through a browser.
19
17
 
20
18
 
21
19
  Upstream guide/scripts: `<installed ARC>/references/superpowers/brainstorming/visual-companion.md` and adjacent `scripts/`.
@@ -13,10 +13,10 @@ export async function selectChoices(options,{input=process.stdin,output=process.
13
13
  try{return await new Promise((resolve,reject)=>{
14
14
  abort=()=>reject(cancelled());onEnd=abort;onError=reject;
15
15
  onKey=(str,key={})=>{try{if(key.name==='c'&&key.ctrl||key.name==='d'&&key.ctrl)return abort();if(key.name==='up'||key.name==='down'){index=(index+(key.name==='up'?-1:1)+menus[menu][1].length)%menus[menu][1].length;draw(true);}else if(key.name==='return'||key.name==='enter'){const [name,,values]=menus[menu];options[name]=values[index];output.write('\n');if(++menu===menus.length){keys.removeListener('keypress',onKey);resolve(options);}else{index=menus[menu][3];draw();}}}catch(error){reject(error);}};
16
- keys.on('keypress',onKey);readline.emitKeypressEvents(keys);onData=chunk=>keys.emit('data',chunk);input.on('data',onData);input.once('end',onEnd);input.once('error',onError);process.once('SIGINT',abort);
16
+ keys.on('keypress',onKey);readline.emitKeypressEvents(keys);onData=chunk=>keys.emit('data',chunk);input.on('data',onData);input.once('end',onEnd);input.once('close',onEnd);input.once('error',onError);process.once('SIGINT',abort);process.once('SIGTERM',abort);
17
17
  if(input.setRawMode)input.setRawMode(true);input.resume();draw();
18
18
  });}finally{
19
- keys.removeAllListeners();input.removeListener('data',onData);input.removeListener('end',onEnd);input.removeListener('error',onError);process.removeListener('SIGINT',abort);
19
+ keys.removeAllListeners();input.removeListener('data',onData);input.removeListener('end',onEnd);input.removeListener('close',onEnd);input.removeListener('error',onError);process.removeListener('SIGINT',abort);process.removeListener('SIGTERM',abort);
20
20
  for(const [event,before]of listeners)for(const listener of input.listeners(event))if(!before.includes(listener))input.removeListener(event,listener);
21
21
  if(input.setRawMode)input.setRawMode(Boolean(wasRaw));if(wasFlowing!==true)input.pause();
22
22
  }
@@ -36,9 +36,9 @@ export async function selectLimits(options,selections,{input=process.stdin,outpu
36
36
  if(name==='maxConcurrentSubagents')options.concurrentSelected=true;output.write('\n');value='';if(++index===fields.length){input.removeListener('keypress',onKey);resolve(options);}else draw();
37
37
  }else if(key.name==='backspace'){value=value.slice(0,-1);output.write('\b \b');}else if(str&&!key.ctrl&&!key.meta){value+=str;output.write(str);}};
38
38
  onData=chunk=>{for(const character of chunk.toString()){if(index===fields.length)break;const name=character==='\r'||character==='\n'?'return':character==='\x03'?'c':character==='\x04'?'d':character==='\x7f'||character==='\b'?'backspace':undefined;onKey(character,{name,ctrl:character==='\x03'||character==='\x04'});}};
39
- input.on('data',onData);input.once('end',onEnd);input.once('error',onError);process.once('SIGINT',abort);if(input.setRawMode)input.setRawMode(true);input.resume();draw();
39
+ input.on('data',onData);input.once('end',onEnd);input.once('close',onEnd);input.once('error',onError);process.once('SIGINT',abort);process.once('SIGTERM',abort);if(input.setRawMode)input.setRawMode(true);input.resume();draw();
40
40
  });}finally{
41
- input.removeListener('data',onData);input.removeListener('end',onEnd);input.removeListener('error',onError);process.removeListener('SIGINT',abort);
41
+ input.removeListener('data',onData);input.removeListener('end',onEnd);input.removeListener('close',onEnd);input.removeListener('error',onError);process.removeListener('SIGINT',abort);process.removeListener('SIGTERM',abort);
42
42
  for(const[event,before]of listeners)for(const listener of input.listeners(event))if(!before.includes(listener))input.removeListener(event,listener);
43
43
  if(input.setRawMode)input.setRawMode(Boolean(wasRaw));if(wasFlowing!==true)input.pause();
44
44
  }