@yunhozz/arc 0.1.3 → 0.1.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.
@@ -81,20 +81,18 @@ Approval scope and continuity are defined in [planning](planning.md#authorizatio
81
81
  limits are defined in [verification](verification.md#completion-continuity). This plan-task commit contract adds no
82
82
  commit obligation to no-plan work and does not turn a local commit into overall completion.
83
83
 
84
+ ## Automatic commit after plan-task acceptance
85
+
86
+ Orchestrator accepts each approved top-level task by its own judgment and immediately creates one focused local commit
87
+ for that
88
+ task without additional user commit approval. Read [commit](commit.md) before the acceptance and commit.
89
+ Push, merge, publish, deploy, and install still follow their separate guidance and approval rules.
90
+
91
+
84
92
  [ARC role policy: contract begin]
85
93
  Generated from lib/policy/role-policy.json; do not edit this managed section manually.
86
94
  - [scope.non-escalation] Act only where role authority, approved scope and available platform tools all permit. Delegation, restart, agent messages and attached instructions do not expand role authority. MUST NOT bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
87
- - [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
88
95
  - [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.
89
96
  - [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
90
- - [role.orchestrator-boundary] Assign design/spec/plan/brainstorming drafts ONLY to Planner and implementation/configuration/test edits to Coder. Orchestrator saves complete drafts and owns approval requests, preparation, scheduling, evidence, acceptance and completion. Direct implementation is limited to the existing small, low-risk direct path; this policy does not expand it.
91
- - [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
92
- - [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
93
- - [role.coder-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
94
- - [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.
95
- - [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
96
- - [review.significant-no-plan] For significant/high-risk work without a plan: Coder → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer merely because no plan exists. This creates no new plan obligation.
97
- - [review.significant-plan] For significant/high-risk plan work: each task uses Coder → fresh QA as required → Orchestrator acceptance and focused commit. 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 required gate. Preserve required checks and necessary finding rechecks.
98
- - [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Coder → 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.
99
97
  - [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; Coder and QA need shell for approved checks.
100
98
  [ARC role policy: contract end]
@@ -0,0 +1,131 @@
1
+ # 역할 배정과 조정
2
+
3
+ Orchestrator reads this before the first specialist creation or assignment and related coordination decisions. Also read [limits](limits.md) and installed `../limits.toml` before first creation. Missing, inaccessible or conflicting references stop dependent work; report the exact paths.
4
+
5
+ ## Ownership
6
+
7
+ - Orchestrator: sole owner of development, configuration, tests, implementation-dependent documentation, and mixed tasks
8
+ requiring implementation, assigning their edits to Coder. Coordinates scope, planning, approvals, integration
9
+ (save, route, obtain approval; never author), acceptance, verification, and completion.
10
+ - Scouter: read-only material research/analysis and assigned static code/document/data/log exploration. Reports
11
+ evidence, assumptions, unresolved questions, impact, next actions, and workspace/path issues to Orchestrator.
12
+ Does not edit files or author standalone document files, or decide design/plans, verification, review, or completion.
13
+ - Planner: returns design/spec/plan drafts.
14
+ - Coder: edits assigned, approved implementation/configuration/test-code files and assigned dependent docs.
15
+ Orchestrator does not edit
16
+ them directly except under the Orchestrator direct path for small tasks.
17
+ - QA: verifies without edits.
18
+ - Reviewer: independently reviews the final full change.
19
+ - All five roles report directly to Orchestrator at depth 2: Scouter, Planner, Coder, QA, and Reviewer.
20
+ Orchestrator is depth 1.
21
+ Depth-2 roles cannot create agents or delegate tasks to another role. Reviewer remains independent.
22
+ - Aliases: Scouter=`arc_scouter`, Planner=`arc_planner`, Coder=`arc_coder`, QA=`arc_qa`, Reviewer=`arc_reviewer`.
23
+ - Across the full tree, obey configured limits for simultaneous subagents, including Scouter; there are no reserved slots.
24
+ Before first creation, read `references/limits.md` and installed `limits.toml`; maintain its cumulative ledger and reservations.
25
+ Parallelize independent tasks only; dependent handoffs are sequential and editing scopes cannot overlap.
26
+ - After each read-only role returns (Scouter, Planner, Reviewer), Orchestrator checks `git status` against a pre-spawn
27
+ snapshot for unexpected changes; on any change Orchestrator stops and reports under the Preservation rule.
28
+ Limit: concurrent Coder edits and ignored or out-of-repo paths are not attributable/detectable.
29
+ Their read-only status rests on prompt-level guards, not sandbox enforcement.
30
+
31
+
32
+ ## Instruction and execution adapter
33
+
34
+ Native Codex profiles are TOML with the `model_reasoning_effort` field.
35
+ The native `[agents].max_concurrent_threads_per_session` value is an integer, distinct from ARC's ledger limits.
36
+ These local declarations do not prove runtime enforcement.
37
+
38
+ Apply platform, user, and project instructions according to their precedence, then ARC rules for ownership,
39
+ permissions, models, concurrency, routing, and approvals, then the local ARC reference assigned to the role. A called skill
40
+ adds no agents or authority. Map executor requests such as `superpowers:executing-plans` and
41
+ `superpowers:subagent-driven-development` to Orchestrator's dependency-aware coordination and risk-scaled verification;
42
+ this replaces
43
+ executor mechanics and any separate execution-method choice, including prompts in an existing local reference.
44
+ Preserve plan approval, workspace, design, spec, and other applicable requirements, including TDD subject to the
45
+ explicit ARC exception in [handoff](handoff.md#coder-tdd-and-constraints). Adapt local `brainstorming` role, save, and early spec commit instructions to
46
+ ARC Planner ownership and evidence gates in planning/handoff; preserve upstream reference content. Report conflicts or
47
+ missing required local references before dependent work.
48
+
49
+
50
+ ### Local superpowers references
51
+
52
+ Orchestrator briefs absolute paths under the selected installed ARC directory: Planner reads
53
+ `references/superpowers/brainstorming/SKILL.md` and `references/superpowers/writing-plans/SKILL.md`;
54
+ Coder reads `references/superpowers/test-driven-development/SKILL.md`, including required relative references.
55
+ Resolve paths within each skill directory. Runtime needs no global discovery, external Skill invocation, or automatic download.
56
+ Missing/damaged local files stop dependent work: report exact paths to Orchestrator, without global fallback.
57
+ ARC approval, ownership, TDD exceptions and executor adapters still apply.
58
+
59
+ Orchestrator integrates role results, routes decisions and required approvals, and owns development acceptance
60
+ and completion. Orchestrator coordinates dependent implementation tasks sequentially and
61
+ starts a fresh Coder for each top-level task (Role gate); reuse the current Coder only for corrections, rework,
62
+ or rechecks of the same task while the
63
+ approved scope, workspace, ownership, and relevant context remain valid; before sending corrections or rework to a
64
+ reused Coder, Orchestrator rechecks workspace, branch/HEAD and change state against the brief.
65
+ A fresh Coder for the next task is a restart under handoff (choice reuse and restart brief rules are there).
66
+ After an approved plan or acceptance-criteria amendment, start a fresh Coder for
67
+ the remaining work even within the same task; it is also a restart under handoff. Task-boundary gates
68
+ follow [Risk-scaled execution](verification.md#risk-scaled-execution).
69
+
70
+
71
+ ## Token discipline and handoffs
72
+
73
+ - Only Orchestrator calls agents or assigns specialist tasks. Every `spawn_agent` call must explicitly set a descriptive
74
+ lowercase snake_case `task_name` in the form
75
+ `<role>_<short_task>` (for example `planner_scope_review` or `qa_installer_checks`). Do not use arbitrary or random
76
+ names. `task_name` identifies the run; `agent_type` and its configured profile determine the role and model.
77
+
78
+ - Keep one shared brief with fixed field order: Goal; Criteria (IDs); Exact scope/ownership (absolute workspace,
79
+ branch or detached HEAD and HEAD, handoff record path, when one exists, files);
80
+ Constraints/decisions; Evidence (paths/lines, commands, artifact links); Prior findings; Exact next objective (one
81
+ bounded objective); Return format (conclusion, evidence locations, unresolved points, next step). On follow-ups
82
+ send only changed fields and mark the rest `unchanged` (relative to a brief the recipient received);
83
+ restart briefs follow handoff; a fresh specialist gets every other field in full. Send only the
84
+ self-contained subset needed by the next role and links to accessible artifacts; omit full history, repeated
85
+ instructions, and raw logs. No findings may be brief; requested deliverables such as complete plan drafts remain
86
+ complete. Cite paths/lines/pages/commands/links instead of logs; investigate gaps only.
87
+ - Every specialist spawn sets `fork_turns="none"`; full-history forks are not allowed. Supply that brief.
88
+ Reuse an existing specialist for related follow-up with only changed facts/objective when its context
89
+ remains relevant; start fresh for unrelated or bloated context. Coder and QA freshness follow the Role gate.
90
+ - `request_user_input` questions use only `title` and `options` fields, never `question`.
91
+ - In Coder briefs, cite the plan/spec path with the task section's line range and include only the needed excerpts,
92
+ acceptance criteria, and constraints; do not ask Coder to read whole plans or specs.
93
+ - Before optional calls, name the unresolved question and expected artifact. Skip calls whose questions are resolved
94
+ by available evidence or direct inspection.
95
+ - Wait for a specialist with `wait_agent` using the maximum supported timeout, repeating only until it completes; a
96
+ timeout is not a reason to poll or check status in between. Do not poll with `list_agents`, `sleep`, or repeated short
97
+ waits; use `list_agents` only to resolve an unknown agent name or state. Send each specialist one complete brief per
98
+ objective and batch related corrections or follow-ups into one message. Do not poll long-running commands with
99
+ repeated `sleep` or short status checks; use a single blocking wait with the tool's longest yield.
100
+ - Read only the needed ranges of files and outputs (for example `rg -n`, `sed -n`, `head`/`tail`) and cap long command
101
+ output. Do not re-read files or outputs already in context unless they changed. A mandatory reference already read in
102
+ this context and unchanged need not be re-read, and this skill file, once read in this context and unchanged,
103
+ is not re-read on follow-up turns;
104
+ this does not shorten any triggered mandatory reference read.
105
+ - When a plan completes or before starting another plan in a session with long history, Orchestrator records the
106
+ canonical
107
+ handoff state in the handoff record file and recommends that the user continue in a new session.
108
+ - Before handoff, post one short update with role/objective/expected output; after return, combine findings and next
109
+ stage concisely. Do not expose hidden reasoning or raw prompts.
110
+
111
+
112
+ ## Models
113
+
114
+ `models.toml` beside this skill is the source of truth for role model and reasoning-effort settings.
115
+ Orchestrator uses the current conversation model. Use configured role settings without substitution or effort
116
+ reduction; report unavailable settings.
117
+ Local declarations do not prove runtime provider support, account access, alias resolution, actual model or effort
118
+ application, concurrency or depth enforcement.
119
+ New sessions reload profiles; running agents retain their current settings and parent relationships. Configuration
120
+ changes do not automatically reparent running agents or prove runtime parent behavior.
121
+
122
+ [ARC role policy: contract begin]
123
+ Generated from lib/policy/role-policy.json; do not edit this managed section manually.
124
+ - [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
125
+ - [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
126
+ - [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
127
+ - [role.coder-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
128
+ - [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.
129
+ - [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
130
+ - [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; Coder and QA need shell for approved checks.
131
+ [ARC role policy: contract end]
@@ -139,14 +139,5 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
139
139
  - [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
140
140
  - [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.
141
141
  - [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
142
- - [role.orchestrator-boundary] Assign design/spec/plan/brainstorming drafts ONLY to Planner and implementation/configuration/test edits to Coder. Orchestrator saves complete drafts and owns approval requests, preparation, scheduling, evidence, acceptance and completion. Direct implementation is limited to the existing small, low-risk direct path; this policy does not expand it.
143
- - [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
144
- - [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
145
- - [role.coder-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
146
- - [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.
147
- - [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
148
- - [review.significant-no-plan] For significant/high-risk work without a plan: Coder → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer merely because no plan exists. This creates no new plan obligation.
149
- - [review.significant-plan] For significant/high-risk plan work: each task uses Coder → fresh QA as required → Orchestrator acceptance and focused commit. 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 required gate. Preserve required checks and necessary finding rechecks.
150
- - [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Coder → 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.
151
142
  - [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; Coder and QA need shell for approved checks.
152
143
  [ARC role policy: contract end]
@@ -162,18 +162,82 @@ under its profile. Material scope/method/risk changes and invalid target evidenc
162
162
  planning and the choice-lifetime rules above. Report the missing condition and resume evidence rather than asking
163
163
  for an approval already valid for that scope.
164
164
 
165
+ Before any exception judgment, Orchestrator reads [Risk-scaled execution](verification.md#risk-scaled-execution) and [planning](planning.md) for the full risk and plan-depth conditions.
166
+
167
+ ## Common handoff gate
168
+
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
171
+ or verified reuse, intended accessible repository/workspace, actual Git identity/state, preservation/ownership,
172
+ verified document commits or valid absence, and no unresolved failure/partial completion.
173
+ Missing evidence, mismatches, unclear ownership or unresolved preparation block handoff and require Orchestrator
174
+ resolution and full revalidation. Handoff owns the evidence fields, canonical handoff record, restart brief, choice lifetime
175
+ and reuse. Coder trusts the Orchestrator-verified brief and reports actual conflicts under its self-contained profile;
176
+ never replace its local guards with a requirement to load Orchestrator procedures.
177
+ 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.
179
+ For a selected worktree, handoff requires common directory, registration, app-managed current-chat attachment,
180
+ approved branch, and source preservation; prepare only through the selected managed-worktree contract.
181
+
182
+
183
+ ## Coder TDD and constraints
184
+
185
+ Before feature, bug-fix, or behavior edits, Coder follows local `test-driven-development` unless the explicit
186
+ ARC exception applies; the Coder profile holds Coder's full TDD rules. TDD is waived only when every small,
187
+ low-risk criterion (Risk-scaled execution) and every plan-skip criterion (Orchestrator direct path) holds.
188
+ Before Coder starts,
189
+ Orchestrator records the scope, why every criterion is met, acceptance criteria, and focused verification in the brief.
190
+ An explicit user or task-specific TDD request overrides
191
+ this waiver. For qualifying tasks only, this exception takes precedence over the generic trigger in the local reference;
192
+ do not change that skill. Ordinary multi-step or significant/high-risk work is not eligible. The waiver skips only
193
+ RED-GREEN steps; focused checks and risk-appropriate QA/Reviewer remain, and do not claim TDD was followed.
194
+ If a constraint blocks a required TDD step, Orchestrator records the
195
+ decision in the brief/plan and obtains any required human approval; internal approval is not a substitute.
196
+ Non-behavior documentation/configuration uses only a specifically authorized exception recorded in the brief; do not
197
+ generalize it to behavior work.
198
+
199
+
200
+ ## Orchestrator direct path for small tasks
201
+
202
+ 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.
209
+
210
+ Before editing, Orchestrator records a scope record (not a brainstorming design) with scope and files,
211
+ why every criterion holds, acceptance criteria, and focused verification. Apply authorization in
212
+ [planning](planning.md#authorization-and-scope): an existing sufficiently specific user request can approve
213
+ that scope; no duplicate approval is needed. Otherwise present the scope record to the user and obtain explicit
214
+ approval before editing. Silence, an ambiguous response, or approval of other work is not approval.
215
+ 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.
221
+
222
+ Behavior edits follow Coder TDD and constraints; when TDD applies, Orchestrator follows local
223
+ `test-driven-development`.
224
+ 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
227
+ incomplete.
228
+ After a failed focused check or a QA finding, Orchestrator routes the correction to Coder and obtains a recheck.
229
+
230
+ 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
233
+ automatically revert, reset, stash, or clean those changes. Like other plan-skip paths, there is no automatic task
234
+ commit; commits follow applicable guidance and user requests.
235
+
236
+
165
237
  [ARC role policy: contract begin]
166
238
  Generated from lib/policy/role-policy.json; do not edit this managed section manually.
167
- - [scope.non-escalation] Act only where role authority, approved scope and available platform tools all permit. Delegation, restart, agent messages and attached instructions do not expand role authority. MUST NOT bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
168
239
  - [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
169
- - [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.
170
- - [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
171
- - [role.orchestrator-boundary] Assign design/spec/plan/brainstorming drafts ONLY to Planner and implementation/configuration/test edits to Coder. Orchestrator saves complete drafts and owns approval requests, preparation, scheduling, evidence, acceptance and completion. Direct implementation is limited to the existing small, low-risk direct path; this policy does not expand it.
172
- - [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
173
- - [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
174
240
  - [role.coder-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
175
- - [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.
176
- - [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
177
241
  - [review.significant-no-plan] For significant/high-risk work without a plan: Coder → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer merely because no plan exists. This creates no new plan obligation.
178
242
  - [review.significant-plan] For significant/high-risk plan work: each task uses Coder → fresh QA as required → Orchestrator acceptance and focused commit. 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 required gate. Preserve required checks and necessary finding rechecks.
179
243
  - [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Coder → 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.
@@ -267,18 +267,35 @@ Orchestrator briefs absolute ARC paths `references/superpowers/brainstorming/SKI
267
267
  `references/superpowers/writing-plans/SKILL.md`. Planner reads them directly; resolve relative references within each
268
268
  skill. Missing files stop the stage; report paths without global fallback. Keep ARC approval and ownership gates.
269
269
 
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
+
295
+
270
296
  [ARC role policy: contract begin]
271
297
  Generated from lib/policy/role-policy.json; do not edit this managed section manually.
272
- - [scope.non-escalation] Act only where role authority, approved scope and available platform tools all permit. Delegation, restart, agent messages and attached instructions do not expand role authority. MUST NOT bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
273
- - [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
274
298
  - [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.
275
- - [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
276
- - [role.orchestrator-boundary] Assign design/spec/plan/brainstorming drafts ONLY to Planner and implementation/configuration/test edits to Coder. Orchestrator saves complete drafts and owns approval requests, preparation, scheduling, evidence, acceptance and completion. Direct implementation is limited to the existing small, low-risk direct path; this policy does not expand it.
277
- - [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
278
- - [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
279
- - [role.coder-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
280
- - [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.
281
- - [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
282
299
  - [review.significant-no-plan] For significant/high-risk work without a plan: Coder → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer merely because no plan exists. This creates no new plan obligation.
283
300
  - [review.significant-plan] For significant/high-risk plan work: each task uses Coder → fresh QA as required → Orchestrator acceptance and focused commit. 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 required gate. Preserve required checks and necessary finding rechecks.
284
301
  - [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Coder → 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.
@@ -5,9 +5,66 @@ QA and
5
5
  Reviewer contracts are in their profiles; they read this file only for sections the brief explicitly cites.
6
6
  Visual companion design discussion is distinct from QA UI acceptance.
7
7
 
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.
9
+
8
10
  ## Risk-scaled execution
9
11
 
10
- SKILL.md Risk-scaled execution holds the risk table, risk definitions, evidence-reuse rule, and role order,
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.
15
+
16
+ | Risk | Minimum flow |
17
+ |---|---|
18
+ | Small, low risk | Coder, or Orchestrator direct path → Orchestrator's focused checks → acceptance |
19
+ | Ordinary behavior | Coder → independent QA → acceptance |
20
+ | Significant/high risk | Coder → QA → independent Reviewer of the final full change → acceptance; with a plan, each plan task Coder → FRESH QA → acceptance/commit satisfies the QA step, then independent Reviewer once on the final full change after all plan tasks |
21
+
22
+ Ordinary and significant plan tasks need a FRESH QA before acceptance; only small, low-risk tasks may be accepted on
23
+ 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
27
+ installation/deployment/rollback. Substantial behavior or contract changes are significant regardless of file count.
28
+ When risk is unclear, investigate or use the higher flow. Environment failure does not waive checks or determine design depth.
29
+
30
+ Do not add per-task QA or review gates solely because a task boundary exists. Reviewer is never a plan-task acceptance
31
+ prerequisite; for significant work with a plan, it reviews the final full change once after all plan tasks are accepted
32
+ with their risk-scaled checks, following the last plan task's required checks and any QA recheck at the final relevant
33
+ state; significant work without a plan keeps Reviewer after QA before acceptance. Preserve specific approved
34
+ obligations. If the next task depends on a still-unverified risky contract, complete applicable QA at that dependency
35
+ boundary and resolve or explicitly disposition findings before dependent implementation.
36
+ Reuse evidence only when scope, relevant state, independence, freshness, and flow
37
+ position satisfy each covered requirement; changes, failures, or missing/conflicting evidence invalidate affected reuse.
38
+ QA checks independently without edits; Reviewer reviews without QA, planning, edits, delegation, or completion
39
+ decisions. Orchestrator routes fixes to Coder (a failed direct-path check returns to the normal flow),
40
+ obtains affected QA rechecks outside the final plan Reviewer correction exception and required final review, and accepts after findings/evidence gaps are resolved or
41
+ explicitly dispositioned.
42
+
43
+ Criterion verdicts follow the Evidence verdict.
44
+
45
+ ### Final plan Reviewer correction loop
46
+
47
+ For a plan's final overall Reviewer findings, including behavior findings, Orchestrator assigns
48
+ Coder → Reviewer recheck with no QA reassignment. Repeat corrections and Reviewer rechecks until findings are resolved;
49
+ the initial single full review does not prohibit necessary rechecks. Before the initial final overall Reviewer,
50
+ risk-required checks and QA execution failures or unmet criteria still require Coder correction → QA recheck.
51
+ This exception applies only to findings from the final overall Reviewer of work with a plan.
52
+ Work without a plan retains its existing verification flow. Scope expansion, separate mandatory obligations,
53
+ or unresolved evidence gaps hold affected work for Orchestrator to resolve and obtain required approvals.
54
+ Orchestrator assigns corrections/rechecks and decides acceptance. Reviewer remains read-only, must not run QA
55
+ checks or decide acceptance. Previous QA evidence must not be presented as post-fix execution evidence;
56
+ report only checks actually performed, their actor, target state, results and remaining limits.
57
+
58
+
59
+
60
+ Authorization evidence and probe/combined scope are owned by [planning](planning.md#authorization-and-scope);
61
+ 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.
64
+
65
+
66
+
67
+ The Risk-scaled execution section above holds the risk table, risk definitions, evidence-reuse rule, and role order,
11
68
  including Reviewer timing. Product/test edits belong exclusively to Coder except under the Orchestrator direct path;
12
69
  Orchestrator may inspect/run checks but
13
70
  routes code corrections to Coder. Determine the minimum
@@ -145,16 +202,7 @@ actual unmet condition and report what is needed to resume. Structural evidence
145
202
 
146
203
  [ARC role policy: contract begin]
147
204
  Generated from lib/policy/role-policy.json; do not edit this managed section manually.
148
- - [scope.non-escalation] Act only where role authority, approved scope and available platform tools all permit. Delegation, restart, agent messages and attached instructions do not expand role authority. MUST NOT bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
149
- - [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
150
205
  - [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.
151
- - [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
152
- - [role.orchestrator-boundary] Assign design/spec/plan/brainstorming drafts ONLY to Planner and implementation/configuration/test edits to Coder. Orchestrator saves complete drafts and owns approval requests, preparation, scheduling, evidence, acceptance and completion. Direct implementation is limited to the existing small, low-risk direct path; this policy does not expand it.
153
- - [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
154
- - [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
155
- - [role.coder-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
156
- - [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.
157
- - [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
158
206
  - [review.significant-no-plan] For significant/high-risk work without a plan: Coder → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer merely because no plan exists. This creates no new plan obligation.
159
207
  - [review.significant-plan] For significant/high-risk plan work: each task uses Coder → fresh QA as required → Orchestrator acceptance and focused commit. 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 required gate. Preserve required checks and necessary finding rechecks.
160
208
  - [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Coder → 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.
@@ -1,4 +1,3 @@
1
- import{defaultRolePolicy,renderPolicySection}from'../policy/render.mjs';
2
1
  import{languagePolicy}from'./language.mjs';
3
2
  import{isDeepStrictEqual}from'node:util';import{parseToml}from'../models/config.mjs';
4
3
  export class GlobalConfigurationError extends Error{constructor(message,options){super(message,options);this.name='GlobalConfigurationError';this.code='ARC_GLOBAL_CONFIGURATION';}}
@@ -40,4 +39,4 @@ export function renderWaitSettings(original){
40
39
  return{content:Buffer.from(updated),action:'set ARC wait settings'};
41
40
  }
42
41
  export function agentsBlockBody(home,userHome,language='en',platform='codex'){const skill=home+'/skills/arc/SKILL.md',within=skill.startsWith(userHome+'/'),shown=within?'~/'+skill.slice(userHome.length+1):skill;return '- '+languagePolicy(language)+'\n'+'- For requests requiring substantive multi-step research, analysis, or implementation, configuration, or test work, and for design, spec, plan, and brainstorming requests (these are NOT standalone document writing), load and follow `'+shown+'`; keep following it in relevant follow-up turns of the same chat without re-reading it unless it changed.'+(within?" Resolve `~` to the current user's home directory.":'')+' ARC subagents (depth 2) follow their role profile and brief instead and do not load `SKILL.md`.\n'+'- Design, spec, plan, and brainstorming drafts are authored ONLY by the Planner. Orchestrator MUST NEVER author them; route drafting skills to the Planner.\n'+
43
- '- For repository implementation, configuration, or test work, Orchestrator owns coordination and acceptance; assign file edits and other work to the other roles according to their defined responsibilities. Orchestrator must not edit implementation, configuration, or test-code files directly, except under the ARC Orchestrator direct path for small, low-risk tasks.\n'+'\n[ARC role policy: global begin]\n'+renderPolicySection(defaultRolePolicy,{platform,audience:'orchestrator',section:'contract',skillPath:shown})+'\n[ARC role policy: global end]\n';}
42
+ '- For repository implementation, configuration, or test work, Orchestrator owns coordination and acceptance; assign file edits and other work to the other roles according to their defined responsibilities. Orchestrator must not edit implementation, configuration, or test-code files directly, except under the ARC Orchestrator direct path for small, low-risk tasks.\n';}
@@ -0,0 +1,25 @@
1
+ // Instruction placement only; runtime policy and role authority remain canonical.
2
+ const reviews = ['review.significant-no-plan', 'review.significant-plan', 'review.final-plan-recheck'];
3
+ export const POLICY_PROJECTIONS = Object.freeze(Object.fromEntries(Object.entries({
4
+ core: ['scope.non-escalation', 'external.explicit-user-authority', 'role.orchestrator-boundary'],
5
+ assignment: ['git.specialists-deny', 'role.scouter-read-only', 'role.planner-draft-only', 'role.coder-implementation', 'role.qa-verification', 'role.reviewer-independent'],
6
+ planning: ['git.orchestrator-accept-commit', ...reviews],
7
+ handoff: ['git.specialists-deny', 'role.coder-implementation', ...reviews],
8
+ preparation: ['scope.non-escalation', 'git.specialists-deny', 'git.orchestrator-accept-commit', 'external.explicit-user-authority'],
9
+ verification: ['git.orchestrator-accept-commit', ...reviews],
10
+ commit: ['scope.non-escalation', 'git.orchestrator-accept-commit', 'external.explicit-user-authority'],
11
+ }).map(([name, ids]) => [name, Object.freeze(ids)])));
12
+
13
+ export function validatePolicyProjections(policy, projections = POLICY_PROJECTIONS) {
14
+ const canonical = new Set(policy.rules.map(rule => rule.id));
15
+ const covered = new Set();
16
+ for (const [name, ids] of Object.entries(projections)) {
17
+ const seen = new Set();
18
+ for (const id of ids) {
19
+ if (!canonical.has(id)) throw new Error(`Role policy: unknown projection rule ${id} in ${name}`);
20
+ if (seen.has(id)) throw new Error(`Role policy: duplicate projection rule ${id} in ${name}`);
21
+ seen.add(id); covered.add(id);
22
+ }
23
+ }
24
+ for (const id of canonical) if (!covered.has(id)) throw new Error(`Role policy: uncovered projection rule ${id}`);
25
+ }
@@ -1,4 +1,5 @@
1
1
  import {renderSourceClaudeHook} from './claude-hook.mjs';
2
+ import {POLICY_PROJECTIONS, validatePolicyProjections} from './placement.mjs';
2
3
  import {validateGitPolicy} from '../../claude/skill/hooks/role-git-guard.mjs';
3
4
  import source from './role-policy.json' with {type: 'json'};
4
5
  const ROLES = ['orchestrator','scouter','planner','coder','qa','reviewer'];
@@ -28,15 +29,22 @@ export function validateRolePolicy(input) {
28
29
  }
29
30
  export const defaultRolePolicy = source;
30
31
  export const POLICY_TARGETS = ['codex','claude'].flatMap(platform => [
31
- {path:`${platform}/skill/SKILL.md`,platform,audience:'orchestrator'},
32
+ {path:`${platform}/skill/SKILL.md`,platform,audience:'orchestrator',projection:'core'},
32
33
  ...ROLES.slice(1).map(audience=>({path:`${platform}/agents/arc-${audience}.${platform==='codex'?'toml':'md'}`,platform,audience})),
33
- ...['planning','handoff','handoff-prep','commit','verification'].map(name=>({path:`${platform}/skill/references/${name}.md`,platform,audience:'orchestrator'})),
34
+ ...Object.entries({coordination:'assignment',planning:'planning',handoff:'handoff','handoff-prep':'preparation',commit:'commit',verification:'verification'}).map(([name,projection])=>({path:`${platform}/skill/references/${name}.md`,platform,audience:'orchestrator',projection})),
34
35
  ]);
35
36
  POLICY_TARGETS.splice(POLICY_TARGETS.length-1,0,{path:'claude/skill/hooks/git-policy.json',platform:'claude',audience:'specialists',asset:'git'});
36
- export function renderPolicySection(policy, {platform, audience, section = 'contract', skillPath} = {}) {
37
+ export function renderPolicySection(policy, {platform, audience, section = 'contract', skillPath, projection = 'full'} = {}) {
37
38
  validateRolePolicy(policy);
38
39
  if (!['codex','claude'].includes(platform) || !ROLES.includes(audience) || !['contract','global'].includes(section)) fail('unknown render target');
39
- const rules = policy.rules.filter(rule=>section === 'global' || audience === 'orchestrator' || rule.roles.includes(audience));
40
+ let selected;
41
+ if (projection !== 'full') {
42
+ if (!Object.hasOwn(POLICY_PROJECTIONS, projection)) fail('unknown policy projection');
43
+ if (audience !== 'orchestrator') fail('specialist rendering requires full projection');
44
+ validatePolicyProjections(policy);
45
+ selected = new Set(POLICY_PROJECTIONS[projection]);
46
+ }
47
+ const rules = policy.rules.filter(rule=>selected ? selected.has(rule.id) : section === 'global' || audience === 'orchestrator' || rule.roles.includes(audience));
40
48
  const lines = ['Generated from lib/policy/role-policy.json; do not edit this managed section manually.', ...rules.map(rule=>`- [${rule.id}] ${rule.text}`), ...(section === 'global' ? [] : [`- [platform.${platform}] ${policy.platforms[platform].notice}`])];
41
49
  if (skillPath !== undefined) { if(typeof skillPath !== 'string' || !skillPath || /[\r\n]/.test(skillPath)) fail('invalid skill path'); lines.push(`- Policy details: \`${skillPath}\`.`); }
42
50
  return lines.join('\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yunhozz/arc",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"