@yunhozz/arc 0.5.7 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MANIFEST.sha256 +104 -99
- package/README.md +37 -113
- package/claude/agents/arc-architect.md +44 -0
- package/claude/agents/arc-planner.md +4 -4
- package/claude/skill/SKILL.md +5 -5
- package/claude/skill/models.toml +5 -1
- package/claude/skill/references/commit.md +2 -2
- package/claude/skill/references/coordination.md +10 -9
- package/claude/skill/references/git-recovery.md +1 -1
- package/claude/skill/references/handoff-prep.md +2 -2
- package/claude/skill/references/handoff.md +1 -1
- package/claude/skill/references/planning.md +12 -12
- package/claude/skill/references/verification.md +1 -1
- package/claude/skill/scripts/model_config.py +24 -11
- package/codex/agents/arc-architect.md +36 -0
- package/codex/agents/{arc-implementer.toml → arc-implementer.md} +7 -4
- package/codex/agents/{arc-planner.toml → arc-planner.md} +10 -7
- package/codex/agents/{arc-reviewer.toml → arc-reviewer.md} +7 -4
- package/codex/agents/{arc-scouter.toml → arc-scouter.md} +7 -4
- package/codex/agents/{arc-tester.toml → arc-tester.md} +7 -4
- package/codex/skill/SKILL.md +5 -5
- package/codex/skill/models.toml +5 -1
- package/codex/skill/references/commit.md +2 -2
- package/codex/skill/references/coordination.md +6 -5
- package/codex/skill/references/handoff-prep.md +2 -2
- package/codex/skill/references/handoff.md +1 -1
- package/codex/skill/references/planning.md +12 -12
- package/codex/skill/references/verification.md +1 -1
- package/codex/skill/scripts/apply-models.py +5 -5
- package/codex/skill/scripts/model_config.py +23 -12
- package/gemini/GEMINI.md +1 -1
- package/gemini/agents/arc-architect.md +39 -0
- package/gemini/agents/arc-planner.md +4 -4
- package/gemini/instructions.md +1 -1
- package/gemini/skill/SKILL.md +5 -5
- package/gemini/skill/models.toml +5 -1
- package/gemini/skill/references/commit.md +2 -2
- package/gemini/skill/references/coordination.md +10 -9
- package/gemini/skill/references/git-recovery.md +1 -1
- package/gemini/skill/references/handoff-prep.md +2 -2
- package/gemini/skill/references/handoff.md +1 -1
- package/gemini/skill/references/planning.md +12 -12
- package/gemini/skill/references/verification.md +1 -1
- package/grok/AGENTS.md +1 -1
- package/grok/agents/arc-architect.md +39 -0
- package/grok/agents/arc-planner.md +4 -4
- package/grok/instructions.md +1 -1
- package/grok/skill/SKILL.md +5 -5
- package/grok/skill/models.toml +5 -1
- package/grok/skill/references/commit.md +2 -2
- package/grok/skill/references/coordination.md +10 -9
- package/grok/skill/references/git-recovery.md +1 -1
- package/grok/skill/references/handoff-prep.md +2 -2
- package/grok/skill/references/handoff.md +1 -1
- package/grok/skill/references/planning.md +12 -12
- package/grok/skill/references/verification.md +1 -1
- package/lib/installer/global-config.mjs +1 -1
- package/lib/installer/manifest.mjs +20 -3
- package/lib/installer/role-routing.mjs +6 -3
- package/lib/installer/targets.mjs +1 -1
- package/lib/installer/upgrade-state.mjs +3 -2
- package/lib/models/config.mjs +22 -5
- package/lib/models/profiles.mjs +6 -1
- package/lib/platforms/agent-templates.mjs +1 -0
- package/lib/platforms/codex.mjs +2 -0
- package/lib/platforms/formats/codex-markdown.mjs +58 -0
- package/lib/platforms/formats/gemini-markdown.mjs +3 -2
- package/lib/platforms/formats/grok-markdown.mjs +3 -2
- package/lib/platforms/formats/markdown.mjs +3 -2
- package/lib/platforms/formats/toml.mjs +3 -2
- package/lib/policy/placement.mjs +1 -1
- package/lib/policy/render.mjs +6 -5
- package/lib/policy/role-policy.json +36 -7
- package/lib/prompts/agent-fragments.json +90 -18
- package/lib/prompts/render.mjs +53 -14
- package/lib/runtime/evaluate.mjs +4 -3
- package/lib/runtime/identity.mjs +1 -1
- package/lib/runtime/operations.mjs +2 -2
- package/lib/runtime/role-bridge-args.mjs +5 -3
- package/lib/runtime/role-bridge.mjs +24 -2
- package/lib/runtime/role-dispatch-policy.mjs +2 -1
- package/lib/runtime/role-dispatch-store.mjs +44 -1
- package/lib/runtime/role-observe.mjs +12 -4
- package/lib/runtime/role-routing-config.mjs +9 -4
- package/lib/runtime/role-supervisor.mjs +16 -2
- package/lib/tui/diagram.mjs +2 -3
- package/lib/tui/setup.mjs +13 -11
- package/lib/watch/labels.mjs +1 -1
- package/lib/watch/model.mjs +2 -2
- package/lib/watch/render.mjs +2 -2
- package/package.json +1 -1
- package/scripts/update-manifest.mjs +1 -1
- package/shared/skill/references/arc-visual-companion-common.md +2 -2
- package/shared/skill/references/commit-common.md +3 -3
- package/shared/skill/references/coordination-common.md +19 -12
- package/shared/skill/references/handoff-common.md +5 -5
- package/shared/skill/references/handoff-prep-common.md +1 -1
- package/shared/skill/references/planning-common.md +25 -25
- package/shared/skill/references/verification-common.md +5 -3
- package/shared/skill/runtime/evaluate.mjs +4 -3
- package/shared/skill/runtime/identity.mjs +1 -1
- package/shared/skill/runtime/operations.mjs +2 -2
- package/shared/skill/runtime/role-bridge-args.mjs +5 -3
- package/shared/skill/runtime/role-bridge.mjs +24 -2
- package/shared/skill/runtime/role-dispatch-policy.mjs +2 -1
- package/shared/skill/runtime/role-dispatch-store.mjs +44 -1
- package/shared/skill/runtime/role-observe.mjs +12 -4
- package/shared/skill/runtime/role-policy.json +36 -7
- package/shared/skill/runtime/role-routing-config.mjs +9 -4
- package/shared/skill/runtime/role-supervisor.mjs +16 -2
|
@@ -17,22 +17,22 @@ Shared text for this section: [planning-common.md#probe-scope](planning-common.m
|
|
|
17
17
|
Shared text for this section: [planning-common.md#formal-drafting-boundary](planning-common.md#formal-drafting-boundary). It applies here exactly as if written in place.
|
|
18
18
|
|
|
19
19
|
<a id="planner-drafting-preparation-and-consolidated-feedback"></a>
|
|
20
|
-
##
|
|
20
|
+
## Drafting preparation and consolidated feedback
|
|
21
21
|
|
|
22
22
|
Shared text for this section: [planning-common.md#planner-drafting-preparation-and-consolidated-feedback](planning-common.md#planner-drafting-preparation-and-consolidated-feedback). It applies here exactly as if written in place.
|
|
23
23
|
|
|
24
24
|
<a id="design-conversation"></a>
|
|
25
25
|
### Design conversation
|
|
26
26
|
|
|
27
|
-
These rules apply to feature/design/behavior design and brainstorming. Spike, the direct path (F1–F8) and non-behavior paths keep their existing rules and need no conversation.
|
|
27
|
+
These rules apply to feature/design/behavior design and brainstorming. Spike, the direct path (F1–F8) and non-behavior paths keep their existing rules and need no conversation. Architect never talks to the user directly: Architect → Orchestrator → user → Orchestrator → the same Architect.
|
|
28
28
|
|
|
29
|
-
1. Response shape: each
|
|
29
|
+
1. Response shape: each Architect response is exactly one of: one question; 2–3 approaches with a recommendation and a selection question; one design section with a confirmation question; or the final design (Architectural: the start summary). Architect splits each response into a user message and Orchestrator notes; Orchestrator relays the user message unchanged.
|
|
30
30
|
2. When to ask: ask one question at a time, only when the answer changes the outcome and neither the sources nor the conversation already answer it. Otherwise state "my judgment" with its reason so the user can correct it.
|
|
31
31
|
3. Reason first: when the user's reason is unknown, first ask one open question without options; offer options only after hearing the reason.
|
|
32
32
|
4. Short path and opt-out: when the request is clear enough, the first response MAY carry a short design and ask for approval (Architectural: a short start summary and ask for start confirmation). When the user says to just proceed, stop asking, decide the remaining items as author judgments and list them in the final design or start summary.
|
|
33
|
-
5. Relay: Orchestrator relays each user answer verbatim to the same
|
|
33
|
+
5. Relay: Orchestrator relays each user answer verbatim to the same Architect and marks any interpretation it adds separately.
|
|
34
34
|
6. No spinning: every call carries a new user answer or new evidence. DO NOT repeat a question without progress; without progress, report the blocked criterion, observed facts and the decision needed to unblock, and hold.
|
|
35
|
-
7. Reuse and correction: reuse the same
|
|
35
|
+
7. Reuse and correction: reuse the same Architect while role, context and source remain valid. Conversation responses are expected returns, not missing or failed drafts, and use no correction opportunity. Orchestrator's fixed-checklist review and one consolidated correction apply to the final design. On the Architectural path the consolidated correction does not apply to the start summary; Orchestrator checks its decision inventory and scope notation before presenting it, and the spec draft takes Orchestrator's review and direct revision.
|
|
36
36
|
8. Full Auto: under [Full Auto](#full-auto-run-mode), Orchestrator records answers decidable within the original request as auto-decisions and sends only questions that need a new decision to the user; [approval.run-mode] limits apply unchanged.
|
|
37
37
|
|
|
38
38
|
<a id="architectural-start-confirmation"></a>
|
|
@@ -43,10 +43,10 @@ Shared text for this section: [planning-common.md#architectural-start-confirmati
|
|
|
43
43
|
<a id="decision-inventory"></a>
|
|
44
44
|
### Decision inventory and question classification
|
|
45
45
|
|
|
46
|
-
1. Decision inventory: before returning the final design or Architectural start summary,
|
|
46
|
+
1. Decision inventory: before returning the final design or Architectural start summary, Architect lists what spec and plan drafting MUST decide, such as changed files, data formats, table notation, tests and generated artifacts, and classifies each item as a user decision (asked in the conversation; the answer is recorded in the design, or for Architectural in the start summary and then the spec), an author judgment (a minor item that does not change the deliverable; record "my judgment" and the reason) or already answered (cite the existing source or conversation). Bounded short designs carry a proportional inventory of a few lines; the per-file scope notation stays mandatory.
|
|
47
47
|
2. Scope notation: designs, specs and plans mark every file or contract "change" or "no change (reason)". DO NOT use ambiguous scope wording such as "review only" or "if needed".
|
|
48
48
|
3. Final design: the final design and its design approval request attach the author-judgment list. On the Architectural path the start summary and its start-confirmation request attach it, and the spec records the user decisions and author judgments.
|
|
49
|
-
4. Spec and plan questions: spec and plan
|
|
49
|
+
4. Spec and plan questions: the Architect (spec author) and the Planner (plan author) each classify each question raised while drafting. Answered by the design (Architectural: the confirmed start summary): follow it and cite the basis. Minor: decide it as an author judgment and record it in the document's author-judgment list with ID, judgment and reason; it is not an open decision. Genuinely new decision (changes the deliverable and is absent from the design or confirmed start summary): return it as an open decision with why the design review or start confirmation missed it; Orchestrator routes it to the user.
|
|
50
50
|
5. Approval attachments: the Architectural [combined approval](#architectural-combined-approval) request attaches the complete author-judgment lists of the spec and every plan, and the Bounded plan approval request attaches the author judgments made since design approval. The approval unit is unchanged.
|
|
51
51
|
6. Full Auto: author judgments are not open decisions when [Full Auto](#full-auto-run-mode) counts zero open decisions.
|
|
52
52
|
|
|
@@ -59,7 +59,7 @@ Shared text for this section: [planning-common.md#design-path-and-plan-depth](pl
|
|
|
59
59
|
<a id="architectural-combined-approval"></a>
|
|
60
60
|
## Architectural combined approval
|
|
61
61
|
|
|
62
|
-
1. Sequential drafting (R0): Assign the fresh plan Planner only after the spec
|
|
62
|
+
1. Sequential drafting (R0): Assign the fresh plan Planner only after the Architect (spec author) returned the complete draft and self-review, Orchestrator saved it in the prepared target, reviewed it and made needed revisions, and the reviewed spec's path, version and SHA-256 are fixed and cited in the plan brief. NEVER draft a plan early or dispatch the Architect for the spec and the Planner for the plan in parallel. Request no approval between the spec and plan stages.
|
|
63
63
|
2. Approval unit (R1): Before requesting approval, verify spec↔plan consistency: every spec requirement and acceptance criterion maps to plan tasks or final verification, and the plan cites the current spec version and SHA-256. Request one combined approval for the exact versions and SHA-256 of the spec and every in-scope plan, attaching the complete author-judgment lists of the spec and every plan ([decision inventory](#decision-inventory)); record it once and make every document's `approvalRef` cite it.
|
|
64
64
|
3. Partial answers (R2): A reply approving only part of the set, such as approving the spec while asking for plan changes, is a revision request. Orchestrator revises the documents directly, asking the user first for decisions outside approved scope; after any spec change it rechecks spec↔plan consistency; then it requests combined approval for the whole revised set. Partial approvals never carry over.
|
|
65
65
|
4. Invalidation (R3): Any content change to any document after the approval request voids that request; request combined approval again for the current set.
|
|
@@ -127,8 +127,8 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
127
127
|
- [review.significant-no-plan] Significant/high-risk work without a plan follows Implementer → Tester and required Tester rechecks → Reviewer of the final full change → Orchestrator acceptance. DO NOT omit Reviewer because no plan exists. This adds no plan obligation.
|
|
128
128
|
- [review.significant-plan] Significant/high-risk plan work follows Implementer → required fresh Tester → Orchestrator acceptance and focused commit for each task. After all tasks are accepted and required Tester is complete, Reviewer reviews the final full change once. Reviewer is not a per-task or per-commit gate. Preserve required checks and necessary finding rechecks.
|
|
129
129
|
- [review.final-plan-recheck] Complete required Tester, Tester failure rechecks and final-mode Tester work before the initial final overall Reviewer review; final-mode Tester work concludes when its report is delivered, its new failures are resolved through Implementer → Tester recheck, its new-failure and intermittent candidates are dispositioned, any approved full regression is complete and every undeterminable-scope item is dispositioned. Once that review begins on plan work, every final Reviewer finding, including behavior, follows Implementer → Reviewer without Tester reassignment until resolved. Keep corrections uncommitted through Reviewer rechecks, then accept and create one focused follow-up commit. Tester findings and new failures from final verification follow Implementer → Tester before that review begins. Preserve required Tester outside this final Reviewer exception.
|
|
130
|
-
- [planning.plan-revision] Task progress records (checkboxes, notes, results, evidence and status) preserving the approved contract need no new user approval; Orchestrator includes the completed task's own records in its accepted implementation commit and records classification, reason and actual time as applicable. Plan-level progress records preserving the approved contract also need no new user approval and alone never trigger the standalone docs(plan) closing commit. All other spec/plan content changes, contract or mechanical, require applicable approval and preparation; changes to goals, scope, criteria, method, risk, dependencies or required verification need revised-version approval, preparation and holds on affected work before it continues, with a fresh Implementer for remaining work. After approval Orchestrator edits the same document, appends a revision-history row and leaves it uncommitted as an Orchestrator-owned pending revision, recording version, content hash, approval reference, actual time, classification, reason, affected tasks and the full approved content in the canonical handoff record. Orchestrator includes all pending revisions
|
|
131
|
-
- [planning.planner-brief] Follow planning.md's
|
|
130
|
+
- [planning.plan-revision] Task progress records (checkboxes, notes, results, evidence and status) preserving the approved contract need no new user approval; Orchestrator includes the completed task's own records in its accepted implementation commit and records classification, reason and actual time as applicable. Plan-level progress records preserving the approved contract also need no new user approval and alone never trigger the standalone docs(plan) closing commit. All other spec/plan content changes, contract or mechanical, require applicable approval and preparation; changes to goals, scope, criteria, method, risk, dependencies or required verification need revised-version approval, preparation and holds on affected work before it continues, with a fresh Implementer for remaining work. After approval Orchestrator edits the same document, appends a revision-history row and leaves it uncommitted as an Orchestrator-owned pending revision, recording version, content hash, approval reference, actual time, classification, reason, affected tasks and the full approved content in the canonical handoff record. Orchestrator includes all pending revisions in the accepted commit of the first top-level task executed or reconfirmed against the revised version, otherwise in a current task or final Reviewer follow-up commit; only when no implementation work remains before overall completion MAY it make one standalone docs(plan) closing commit without implementation files. Exclude revision hunks from commits of independent tasks accepted on a prior version, or hold that commit when separation is unsafe. NEVER amend or rewrite planning or implementation commits, create any other docs/fixup commit or authorize past work retroactively. After commit verify the committed document content matches the latest approved content apart from classified progress records of that commit's task or committed for other tasks after approval, or plan-level progress records carried by that commit, and that no pending revision remains. Follow planning, handoff-prep, commit and verification for the full contract.
|
|
131
|
+
- [planning.planner-brief] Follow planning.md's drafting preparation and review procedure for the drafting role (Architect or Planner), including preflight, ledger, evidence classification, target preparation, preceding approvals, provenance and reference gates. Before drafting-role dispatch, evaluate F1–F8 direct-path eligibility and Bounded plan-omission eligibility independently. Enter each path only when all of that path's existing conditions are proven; if neither path qualifies, use normal full evaluation. Send one complete stage-specific initial brief. Reuse the same Architect instance only within the design/brainstorming stage while its role, context and source remain valid, except that on the Architectural path that Architect continues as the spec author after start confirmation through a spec-stage delta brief; use a fresh Planner instance for each plan stage, reusing it only for a budget-hold delta within that stage, and a fresh Architect for an Architectural spec stage when that Architect is unavailable or its role, context or source is no longer valid; each fresh instance's initial brief contains every required field, saved document paths and approved versions (for the Architectural plan stage, the reviewed spec path, version and SHA-256). Follow-up briefs send changed fields and cite an accessible prior brief for unchanged fields. Reuse evidence only for the same source set, absolute locator, resolved path, content fingerprint, purpose and approval scope in an accessible matching context. Reconfirm affected inputs when source, target or scope changed. The drafting role returns a complete proportional first draft and self-review. Orchestrator reviews and directly revises the same spec or plan when needed. A missing or failed first draft does not transfer initial authorship to Orchestrator. New product decisions outside approved scope require user input before Orchestrator revises the document. For design and brainstorming, follow planning.md's design conversation: each Architect response is exactly one of one question, 2–3 approaches with a recommendation and a selection question, one design section with a confirmation question, or the final design (Architectural: the start summary). Ask one question at a time only when the answer changes the outcome and is not already answered; otherwise state the judgment and its reason. Ask an open question about the user's reason before offering options. For a clear request, Architect MAY return a short design for approval at once; when the user says to proceed, stop asking and list the remaining author judgments in the final design or start summary. Relay user answers verbatim and mark added interpretation separately. Every call needs a new user answer or new evidence; without progress, report the blocked criterion, observed facts and needed decision, and hold. Conversation responses use no correction opportunity. Orchestrator reviews the final design once with the fixed checklist, including decision-inventory completeness and no ambiguous scope wording, and sends one consolidated correction using changed fields only. On the Architectural path the start summary receives no consolidated correction; Orchestrator checks its decision inventory and scope notation before presenting it, and the spec draft takes Orchestrator's review and direct revision. Further calls require user-approved material scope/evidence changes or concrete unmet checklist items after correction, plus meaningful new input or criterion-state progress. State changed input, target criterion, expected artifact and expected progress. Repeated unmet criteria without new input, evidence or progress hold the stage; report the criterion, observed evidence and exact unblock input/decision. DO NOT split omissions, repeat resolved items or count rewording/agent replacement as progress. DO NOT invoke Architect or Planner only for reformatting, re-expression, save errors or patch-application errors; Orchestrator handles these. Evaluate separate substantive work under the normal drafting-role gate. For Bounded work, Architect drafts the short design; obtain design approval before a fresh Planner drafts any required plan. For Architectural work, obtain one start confirmation (scope and explicit target; no design document or design approval) before spec drafting, let the design Architect continue as the spec author (a fresh Architect when it is unavailable or invalid), then draft the plan with a fresh Planner, assigning the Planner only after the spec is saved and reviewed and its path, version and SHA-256 are fixed; NEVER draft them concurrently; then obtain one combined spec+plan approval. Bounded work has no spec stage; required plans keep their own approval. Add no fixed call cap or profile call-count conditions, and NEVER accept an incomplete draft. Keep user progress brief and based on drafting-role status without relaying draft content. At approval, present the integrated, saved and reviewed Markdown without repeating its body in chat.
|
|
132
132
|
- [platform.grok] Role restrictions are prompt-level contracts, not a filesystem sandbox. Grok sandboxing, native tool restriction fields, observer hooks and Git guards are unverified, and Grok may continue without its sandbox. Use only available authorized tools; ARC disables Grok Claude compatibility (agents, skills, rules in config.toml; also MCPs and hooks for bridge children), but whether Grok sessions honor these settings is unverified.
|
|
133
133
|
[ARC role policy: contract end]
|
|
134
134
|
|
|
@@ -140,13 +140,13 @@ Shared text for this section: [planning-common.md#approved-cooperative-execution
|
|
|
140
140
|
<a id="full-auto-run-mode"></a>
|
|
141
141
|
## Full Auto run mode
|
|
142
142
|
|
|
143
|
-
Applies only when the installed SKILL.md contains `**Run mode:** Full Auto.` and the user has not asked in this chat to stop auto-deciding or to use Supervised. Orchestrator first completes every review obligation of the gate, then selects the recommended option. Without a recommendation and supporting evidence, ask the user (fail-safe). Gates not listed as auto stay with the user. `user` and `unchanged` rows, and user conditions inside an `auto` row's Rule (`→ user`, `otherwise user`), take precedence over `auto` rows: an auto question row (`
|
|
143
|
+
Applies only when the installed SKILL.md contains `**Run mode:** Full Auto.` and the user has not asked in this chat to stop auto-deciding or to use Supervised. Orchestrator first completes every review obligation of the gate, then selects the recommended option. Without a recommendation and supporting evidence, ask the user (fail-safe). Gates not listed as auto stay with the user. `user` and `unchanged` rows, and user conditions inside an `auto` row's Rule (`→ user`, `otherwise user`), take precedence over `auto` rows: an auto question row (`Architect options and questions`, `AskUserQuestion`) answers only questions that none of them covers; otherwise ask the user.
|
|
144
144
|
|
|
145
145
|
| Gate | Full Auto | Rule |
|
|
146
146
|
|---|---|---|
|
|
147
147
|
| Execution-target choice | auto | Clean work tree → new task branch in the current checkout; unrelated changes present → managed worktree; detached HEAD, unknown state or unclear ownership → user |
|
|
148
148
|
| Branch name collision | auto | Next numeric suffix (`-2`, `-3`, …) |
|
|
149
|
-
|
|
|
149
|
+
| Architect options and questions | auto | Recommended option; record assumptions in the brief |
|
|
150
150
|
| Design and short-design approval | auto | After Orchestrator review |
|
|
151
151
|
| Architectural start confirmation | auto | Scope only within the original request, otherwise user; target follows the Execution-target choice row |
|
|
152
152
|
| Architectural spec+plan combined approval | auto | Only with zero open decisions; otherwise user |
|
|
@@ -94,7 +94,7 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
94
94
|
- [review.significant-no-plan] Significant/high-risk work without a plan follows Implementer → Tester and required Tester rechecks → Reviewer of the final full change → Orchestrator acceptance. DO NOT omit Reviewer because no plan exists. This adds no plan obligation.
|
|
95
95
|
- [review.significant-plan] Significant/high-risk plan work follows Implementer → required fresh Tester → Orchestrator acceptance and focused commit for each task. After all tasks are accepted and required Tester is complete, Reviewer reviews the final full change once. Reviewer is not a per-task or per-commit gate. Preserve required checks and necessary finding rechecks.
|
|
96
96
|
- [review.final-plan-recheck] Complete required Tester, Tester failure rechecks and final-mode Tester work before the initial final overall Reviewer review; final-mode Tester work concludes when its report is delivered, its new failures are resolved through Implementer → Tester recheck, its new-failure and intermittent candidates are dispositioned, any approved full regression is complete and every undeterminable-scope item is dispositioned. Once that review begins on plan work, every final Reviewer finding, including behavior, follows Implementer → Reviewer without Tester reassignment until resolved. Keep corrections uncommitted through Reviewer rechecks, then accept and create one focused follow-up commit. Tester findings and new failures from final verification follow Implementer → Tester before that review begins. Preserve required Tester outside this final Reviewer exception.
|
|
97
|
-
- [planning.plan-revision] Task progress records (checkboxes, notes, results, evidence and status) preserving the approved contract need no new user approval; Orchestrator includes the completed task's own records in its accepted implementation commit and records classification, reason and actual time as applicable. Plan-level progress records preserving the approved contract also need no new user approval and alone never trigger the standalone docs(plan) closing commit. All other spec/plan content changes, contract or mechanical, require applicable approval and preparation; changes to goals, scope, criteria, method, risk, dependencies or required verification need revised-version approval, preparation and holds on affected work before it continues, with a fresh Implementer for remaining work. After approval Orchestrator edits the same document, appends a revision-history row and leaves it uncommitted as an Orchestrator-owned pending revision, recording version, content hash, approval reference, actual time, classification, reason, affected tasks and the full approved content in the canonical handoff record. Orchestrator includes all pending revisions
|
|
97
|
+
- [planning.plan-revision] Task progress records (checkboxes, notes, results, evidence and status) preserving the approved contract need no new user approval; Orchestrator includes the completed task's own records in its accepted implementation commit and records classification, reason and actual time as applicable. Plan-level progress records preserving the approved contract also need no new user approval and alone never trigger the standalone docs(plan) closing commit. All other spec/plan content changes, contract or mechanical, require applicable approval and preparation; changes to goals, scope, criteria, method, risk, dependencies or required verification need revised-version approval, preparation and holds on affected work before it continues, with a fresh Implementer for remaining work. After approval Orchestrator edits the same document, appends a revision-history row and leaves it uncommitted as an Orchestrator-owned pending revision, recording version, content hash, approval reference, actual time, classification, reason, affected tasks and the full approved content in the canonical handoff record. Orchestrator includes all pending revisions in the accepted commit of the first top-level task executed or reconfirmed against the revised version, otherwise in a current task or final Reviewer follow-up commit; only when no implementation work remains before overall completion MAY it make one standalone docs(plan) closing commit without implementation files. Exclude revision hunks from commits of independent tasks accepted on a prior version, or hold that commit when separation is unsafe. NEVER amend or rewrite planning or implementation commits, create any other docs/fixup commit or authorize past work retroactively. After commit verify the committed document content matches the latest approved content apart from classified progress records of that commit's task or committed for other tasks after approval, or plan-level progress records carried by that commit, and that no pending revision remains. Follow planning, handoff-prep, commit and verification for the full contract.
|
|
98
98
|
- [platform.grok] Role restrictions are prompt-level contracts, not a filesystem sandbox. Grok sandboxing, native tool restriction fields, observer hooks and Git guards are unverified, and Grok may continue without its sandbox. Use only available authorized tools; ARC disables Grok Claude compatibility (agents, skills, rules in config.toml; also MCPs and hooks for bridge children), but whether Grok sessions honor these settings is unverified.
|
|
99
99
|
[ARC role policy: contract end]
|
|
100
100
|
|
|
@@ -41,7 +41,7 @@ export function renderWaitSettings(original){
|
|
|
41
41
|
|
|
42
42
|
export function agentsBlockBody(home,userHome,language='en',platform='codex',runMode='supervised'){
|
|
43
43
|
const skill=home+'/skills/arc/SKILL.md',within=skill.startsWith(userHome+'/'),shown=within?'~/'+skill.slice(userHome.length+1):skill;
|
|
44
|
-
const body='- '+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 and brainstorming drafts and first complete spec
|
|
44
|
+
const body='- '+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 and brainstorming drafts and first complete spec drafts are authored only by the Architect; first complete plan drafts only by the Planner; route brainstorming and design to the Architect and writing-plans to the Planner. Orchestrator reviews and directly revises the same spec or plan when needed; a missing or failed first draft does not transfer initial authorship. New product decisions outside approved scope require user input first.\n'+
|
|
45
45
|
'- 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';
|
|
46
46
|
if(validateRunMode(runMode)==='full-auto')return body+'- ARC Run mode is Full Auto: Orchestrator auto-decides only the gates listed in the installed ARC skill, records each decision, and asks the user for everything else.\n';
|
|
47
47
|
return body;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {validateAgentTemplates} from '../prompts/render.mjs';
|
|
2
2
|
import {createInstallerRegistry,installerRegistryOf} from '../platforms/index.mjs';
|
|
3
|
+
import {agentTemplateFile} from '../platforms/agent-templates.mjs';
|
|
3
4
|
import {createPlatformRegistry,standaloneProfileFile} from '../runtime/platform-registry.mjs';
|
|
4
5
|
import {COOPERATIVE_RUNTIME_MODULES} from '../runtime/bootstrap.mjs';
|
|
5
6
|
import {RUNTIME_MODULE_PATHS} from './runtime-assets.mjs';
|
|
@@ -10,7 +11,7 @@ import path from 'node:path';import crypto from 'node:crypto';import{loadModelCo
|
|
|
10
11
|
export class PayloadValidationError extends Error{constructor(message,options){super(message,options);this.name='PayloadValidationError';this.code='ARC_PAYLOAD_VALIDATION';}}
|
|
11
12
|
export const LOCAL_UPDATER_PATH='scripts/update-superpowers-local.sh';
|
|
12
13
|
function payloadLayout(registry){const prefixes=registry.byAnchorOrder().map(descriptor=>descriptor.payloadPrefix);return{MUTABLE:new Set(prefixes.map(prefix=>`${prefix}/skill/models.toml`)),ROOTS:['bin','lib','scripts','vendor','prebuilds','shared/skill',...prefixes.flatMap(prefix=>[`${prefix}/skill`,`${prefix}/agents`])],TEMPLATES:registry.byAnchorOrder().flatMap(descriptor=>(descriptor.instructionTemplates??[]).map(name=>`${descriptor.payloadPrefix}/${name}`))};}
|
|
13
|
-
const FIXED=['
|
|
14
|
+
const FIXED=['install.command','package.json','native/binding.c','native/binding.gyp'];
|
|
14
15
|
function safeName(name){return typeof name==='string'&&name.length>0&&!name.includes('\\')&&!name.includes('\0')&&!name.startsWith('/')&&name.split('/').every(p=>p&&p!=='.'&&p!=='..')&&path.posix.normalize(name)===name;}
|
|
15
16
|
function allowed(name,roots,templates=[]){return FIXED.includes(name)||templates.includes(name)||roots.some(root=>name.startsWith(root+'/'));}
|
|
16
17
|
export function renderManifest(files,context={}){const{MUTABLE,ROOTS,TEMPLATES}=payloadLayout(installerRegistryOf(context));return Buffer.from([...files].filter(([name])=>!MUTABLE.has(name)&&name!==LOCAL_UPDATER_PATH&&!name.split('/').includes('.DS_Store')).sort(([a],[b])=>a<b?-1:a>b?1:0).map(([name,bytes])=>{if(!safeName(name)||!allowed(name,ROOTS,TEMPLATES)||!Buffer.isBuffer(bytes))throw Error('Invalid protected manifest file');return crypto.createHash('sha256').update(bytes).digest('hex')+' '+name+'\n';}).join(''));}
|
|
@@ -44,14 +45,30 @@ export function verifyPayload({packageRoot,safeFs,payloadMode='auto',platforms,r
|
|
|
44
45
|
for(const {runtime:{id}}of descriptors)composeSkillSources(files,id,{platforms});
|
|
45
46
|
const referenceTree=validateFlatReferenceFiles(files);
|
|
46
47
|
for(const name of listed.keys())if(!files.has(name))throw Error(`Manifest entry is missing: ${name}`);
|
|
47
|
-
const required=['lib/prompts/agent-fragments.json','lib/prompts/render.mjs','lib/policy/role-policy.json','lib/policy/render.mjs','scripts/update-role-policy.mjs','lib/limits.mjs','lib/installer/limits.mjs','lib/installer/runtime-config.mjs','
|
|
48
|
+
const required=['lib/prompts/agent-fragments.json','lib/prompts/render.mjs','lib/policy/role-policy.json','lib/policy/render.mjs','scripts/update-role-policy.mjs','lib/limits.mjs','lib/installer/limits.mjs','lib/installer/runtime-config.mjs','install.command','package.json','bin/arc.mjs','lib/cli/root.mjs','lib/tui/app.mjs','lib/tui/terminal.mjs','lib/tui/render.mjs','lib/tui/setup.mjs','lib/management/operations.mjs','lib/management/status.mjs','lib/management/update.mjs','lib/management/workflow.mjs','lib/cli/postinstall.mjs','scripts/postinstall.mjs','lib/cli/upgrade.mjs','bin/arc-upgrade.mjs','lib/installer/shell-completion.mjs','lib/installer/manifest.mjs','lib/installer/targets.mjs','lib/installer/global-config.mjs','lib/installer/plan.mjs','lib/safe-fs/index.mjs','lib/safe-fs/native.mjs','lib/models/index.mjs','lib/models/config.mjs','lib/models/profiles.mjs','vendor/toml/LICENSE','vendor/toml/package.json','vendor/toml/provenance.json','vendor/toml/dist/index.js','prebuilds/index.json'];
|
|
48
49
|
required.push('lib/installer/skill-sources.mjs','lib/installer/runtime-assets.mjs',...RUNTIME_MODULE_PATHS);
|
|
49
50
|
required.push('shared/skill/runtime/role-policy.json',...RUNTIME_MODULE_PATHS.map(name=>`shared/skill/runtime/${name.slice('lib/runtime/'.length)}`));
|
|
50
51
|
for(const tuple of ['darwin-arm64','darwin-x64','linux-arm64-gnu','linux-x64-gnu'])required.push(`prebuilds/${tuple}/arc_safe_fs.node`);
|
|
51
52
|
for(const name of [...COOPERATIVE_RUNTIME_MODULES,'role-policy.json'])required.push(`shared/skill/runtime/${name}`);
|
|
52
|
-
const
|
|
53
|
+
const agentRoles=['scouter','architect','planner','implementer','tester','reviewer'].map(role=>`arc_${role}`);
|
|
54
|
+
for(const {payloadPrefix}of descriptors){
|
|
55
|
+
const base=`${payloadPrefix}/skill`;
|
|
56
|
+
required.push(`${base}/SKILL.md`,`${base}/models.toml`,`${base}/references/limits.md`);
|
|
57
|
+
for(const role of agentRoles)required.push(`${payloadPrefix}/agents/${agentTemplateFile(role)}`);
|
|
58
|
+
}
|
|
53
59
|
for(const descriptor of descriptors)for(const name of descriptor.instructionTemplates??[])required.push(`${descriptor.payloadPrefix}/${name}`);
|
|
54
60
|
for(const name of required)if(!files.has(name))throw Error(`Required runtime asset is missing: ${name}`);
|
|
61
|
+
const modelInputs={};
|
|
62
|
+
for(const {runtime,payloadPrefix,agentTemplates}of descriptors){
|
|
63
|
+
const compile=runtime.profile.ext!=='md';
|
|
64
|
+
if(compile&&typeof agentTemplates?.compile!=='function')throw Error(`Agent template compiler is missing: ${runtime.id}`);
|
|
65
|
+
const profiles=new Map();
|
|
66
|
+
for(const role of agentRoles){
|
|
67
|
+
const bytes=files.get(`${payloadPrefix}/agents/${agentTemplateFile(role)}`);
|
|
68
|
+
profiles.set(standaloneProfileFile(runtime,role),compile?agentTemplates.compile(bytes,role):bytes);
|
|
69
|
+
}
|
|
70
|
+
modelInputs[runtime.id]={models:files.get(`${payloadPrefix}/skill/models.toml`),profiles};
|
|
71
|
+
}
|
|
55
72
|
const agentRegistry=JSON.parse(files.get('lib/prompts/agent-fragments.json').toString('utf8'));
|
|
56
73
|
const agentTemplates=new Map();for(const {runtime:{id},payloadPrefix}of descriptors)for(const [name,bytes] of modelInputs[id].profiles)agentTemplates.set(`${payloadPrefix}/agents/${name}`,bytes);
|
|
57
74
|
const payloadRuntime=createPlatformRegistry(descriptors.map(descriptor=>descriptor.runtime));
|
|
@@ -27,6 +27,7 @@ const read=(safeFs,filename,snapshot)=>inspectPath(safeFs,filename,{kind:'file',
|
|
|
27
27
|
const relativeProfile=(target,filename)=>path.relative(target.home,filename).split(path.sep).join('/');
|
|
28
28
|
const matchesProfile=(entry,file,relative)=>exact(entry,['path','hash'])&&entry.path===relative&&file.exists&&entry.hash===digest(file.bytes);
|
|
29
29
|
const hasLegacyRole=bytes=>Object.hasOwn(JSON.parse(bytes.toString('utf8')).roles,legacyRole);
|
|
30
|
+
const lacksArchitectRole=bytes=>!Object.hasOwn(JSON.parse(bytes.toString('utf8')).roles,'arc_architect');
|
|
30
31
|
|
|
31
32
|
export const legacyAnchorPlatform = 'codex';
|
|
32
33
|
// Only installers read the historical v1 order. Runtime activation stays strict.
|
|
@@ -62,8 +63,9 @@ export function prepareCompositeFiles({context,targets,config,platforms=config.p
|
|
|
62
63
|
if(found.exists)try{marker=JSON.parse(found.bytes.toString('utf8'));}catch{fail('Existing composite marker cannot be verified');}
|
|
63
64
|
const oldRoles=marker&&marker.profiles&&typeof marker.profiles==='object'&&!Array.isArray(marker.profiles)?Object.keys(marker.profiles):[];
|
|
64
65
|
const legacy=previousConfig?.roles.arc_tester.platform===platform&&hasLegacyRole(previousFile.bytes);
|
|
65
|
-
const
|
|
66
|
-
|
|
66
|
+
const previousRoles=previousConfig&&lacksArchitectRole(previousFile.bytes)?ROUTING_ROLES.filter(role=>role!=='arc_architect'):ROUTING_ROLES;
|
|
67
|
+
const markerRoles=previousRoles.map(role=>legacy&&role==='arc_tester'?legacyRole:role);
|
|
68
|
+
if(marker&&(!exact(marker,['version','revision','platform','targetHome','activeConfigPath','configHash','runtime','profiles'])||marker.version!==1||typeof marker.revision!=='string'||!marker.revision||marker.platform!==platform||marker.targetHome!==target.home||marker.activeConfigPath!==previousActive||!validHash(marker.configHash)||!exact(marker.runtime,['version','hash','policyHash'])||typeof marker.runtime.version!=='string'||!marker.runtime.version||!validHash(marker.runtime.hash)||!validHash(marker.runtime.policyHash)||oldRoles.some(role=>!markerRoles.includes(role))||previousConfig&&(marker.revision!==previousConfig.revision||marker.configHash!==digest(previousFile.bytes)||!exact(marker.profiles,markerRoles.filter((_,index)=>previousConfig.roles[previousRoles[index]].platform===platform)))))fail('Existing composite marker does not match configuration');
|
|
67
69
|
let legacyProfile;
|
|
68
70
|
if(legacy){
|
|
69
71
|
const inspected=inspectCompositeRemoval({target,safeFs:context.safeFs,activeConfigPath:previousActive,snapshot,runtimePlatforms,platforms:context.platforms,migrateLegacy:true});
|
|
@@ -121,7 +123,8 @@ export function inspectCompositeRemoval({target,safeFs,activeConfigPath,snapshot
|
|
|
121
123
|
if(!activeFile.exists||!markerFile.exists)throw Error('Incomplete composite ownership');
|
|
122
124
|
const config=parseInstalledRoutingConfig(activeFile.bytes.toString('utf8'),{runtimePlatforms}),marker=JSON.parse(markerFile.bytes.toString('utf8')),roles=ROUTING_ROLES.filter(role=>config.roles[role].platform===target.platform);
|
|
123
125
|
const legacy=migrateLegacy&&roles.includes('arc_tester')&&hasLegacyRole(activeFile.bytes);
|
|
124
|
-
const
|
|
126
|
+
const activeRoles=lacksArchitectRole(activeFile.bytes)?roles.filter(role=>role!=='arc_architect'):roles;
|
|
127
|
+
const expectedRoles=legacy?activeRoles.map(role=>role==='arc_tester'?legacyRole:role):activeRoles;
|
|
125
128
|
if(!exact(marker,['version','revision','platform','targetHome','activeConfigPath','configHash','runtime','profiles'])||marker.version!==1||marker.revision!==config.revision||marker.platform!==target.platform||marker.targetHome!==target.home||marker.activeConfigPath!==activeConfigPath||marker.configHash!==digest(activeFile.bytes)||!exact(marker.profiles,expectedRoles))throw Error('Marker mismatch');
|
|
126
129
|
for(const role of ROUTING_ROLES){const entry=marker.profiles[role],file=files[role],relative=relativeProfile(target,profilePath(target,role,runtimePlatforms));if(entry&&!matchesProfile(entry,file,relative)||file.exists&&!entry)throw Error('Profile ownership mismatch');}
|
|
127
130
|
let legacyProfile;
|
|
@@ -9,7 +9,7 @@ export function resolveTarget(platform,{userHome,env={},cwd,platforms}={}){
|
|
|
9
9
|
const registry=installerRegistryOf({platforms}),descriptor=registry.getPlatform(platform);
|
|
10
10
|
if(!descriptor)fail(unknownPlatformMessage(platform,registry.byDisplayOrder().map(({runtime})=>runtime.id)));
|
|
11
11
|
let home;try{home=descriptor.runtime.home.resolve({userHome,env,cwd});}catch(error){fail(error.message);}
|
|
12
|
-
const profileNames=['scouter','planner','implementer','tester','reviewer'].map(role=>standaloneProfileFile(descriptor.runtime,`arc_${role}`));
|
|
12
|
+
const profileNames=['scouter','architect','planner','implementer','tester','reviewer'].map(role=>standaloneProfileFile(descriptor.runtime,`arc_${role}`));
|
|
13
13
|
return Object.freeze({platform,home,userHome:path.resolve(userHome),payloadPrefix:descriptor.payloadPrefix,profileNames:Object.freeze(profileNames),instructionPath:path.join(home,descriptor.instructionFile),runtimeConfigPath:path.join(home,descriptor.runtimeConfigFile),globalPaths:Object.freeze(descriptor.globalPaths.map(name=>path.join(home,name)))});
|
|
14
14
|
}
|
|
15
15
|
export function resolveTargets(context={}){
|
|
@@ -26,9 +26,10 @@ export function collectInstalledState({safeFs,userHome,env={},cwd,platforms,runt
|
|
|
26
26
|
if(!skill.exists){if(profiles.some(item=>item.exists&&item.owned)||managed.changed)fail(`Incomplete ARC installation: ${target.home}`);residualPaths.push(...profiles.filter(item=>item.exists&&!item.owned).map(item=>item.path));continue;}
|
|
27
27
|
function mandatory(name){const found=inspectPath(safeFs,path.join(arc,name),{kind:'file',read:true,snapshot});if(!found.exists||!found.bytes.length)fail(`Incomplete ARC installation: missing ${name} at ${target.home}`);return found.bytes;}
|
|
28
28
|
mandatory('SKILL.md');
|
|
29
|
-
const
|
|
29
|
+
const agentsDir=path.join(target.home,'agents'),descriptor=registry.getPlatform(platform);
|
|
30
|
+
const architect=path.join(agentsDir,standaloneProfileFile(descriptor.runtime,'arc_architect'));
|
|
31
|
+
const missing=profiles.filter(item=>!item.exists&&item.path!==architect);
|
|
30
32
|
if(missing.length){
|
|
31
|
-
const agentsDir=path.join(target.home,'agents'),descriptor=registry.getPlatform(platform);
|
|
32
33
|
const tester=path.join(agentsDir,standaloneProfileFile(descriptor.runtime,'arc_tester'));
|
|
33
34
|
if(missing.length!==1||missing[0].path!==tester)fail(`Incomplete ARC installation: missing profile at ${target.home}`);
|
|
34
35
|
const evidence=new Map(),legacy=inspectLegacyProfiles({platform,agentsDir,safeFs,snapshot:evidence,platforms});
|
package/lib/models/config.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { validRoleValues } from '../runtime/role-routing-config.mjs';
|
|
2
2
|
import { runtimeRegistryOf } from '../runtime/platform-registry.mjs';
|
|
3
3
|
import { parse, stringify } from '../../vendor/toml/dist/index.js';
|
|
4
|
-
export const ROLES = Object.freeze(['arc_scouter', 'arc_planner', 'arc_implementer', 'arc_tester', 'arc_reviewer']);
|
|
5
|
-
export const MODEL_SCHEMA_VERSION =
|
|
4
|
+
export const ROLES = Object.freeze(['arc_scouter', 'arc_architect', 'arc_planner', 'arc_implementer', 'arc_tester', 'arc_reviewer']);
|
|
5
|
+
export const MODEL_SCHEMA_VERSION = 5;
|
|
6
6
|
export const LEGACY_ROLE_KEYS = Object.freeze({arc_qa: 'arc_tester'});
|
|
7
7
|
export class ModelValidationError extends Error {
|
|
8
8
|
constructor(message, options) { super(message, options); this.name = 'ModelValidationError'; this.code = 'ARC_MODEL_VALIDATION'; }
|
|
9
9
|
}
|
|
10
10
|
export function fail(message) { throw new ModelValidationError(message); }
|
|
11
11
|
export function platformOf(config, opts = {}) {
|
|
12
|
-
if (runtimeRegistryOf(opts).isPlatformId(config?.platform) && [1, 2, 3, MODEL_SCHEMA_VERSION].includes(config.version)) return config.platform;
|
|
12
|
+
if (runtimeRegistryOf(opts).isPlatformId(config?.platform) && [1, 2, 3, 4, MODEL_SCHEMA_VERSION].includes(config.version)) return config.platform;
|
|
13
13
|
fail('Unsupported model schema version');
|
|
14
14
|
}
|
|
15
15
|
export function effortField(platform, opts = {}) {
|
|
@@ -40,16 +40,33 @@ function normalizeLegacyRoles(config) {
|
|
|
40
40
|
if (!roles || typeof roles !== 'object' || Array.isArray(roles)) continue;
|
|
41
41
|
for (const [legacy, current] of Object.entries(LEGACY_ROLE_KEYS)) {
|
|
42
42
|
if (!Object.hasOwn(roles, legacy)) continue;
|
|
43
|
-
if (config.version
|
|
43
|
+
if (config.version >= 4) fail(`version ${config.version} must not contain ${legacy}`);
|
|
44
44
|
if (Object.hasOwn(roles, current)) fail(`${field} must not contain both ${legacy} and ${current}`);
|
|
45
45
|
normalized = {...normalized, [field]: Object.fromEntries(Object.entries(roles).map(([role, settings]) => [role === legacy ? current : role, settings]))};
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
return normalized;
|
|
49
49
|
}
|
|
50
|
+
function addArchitectRole(config) {
|
|
51
|
+
if (config.version >= MODEL_SCHEMA_VERSION) return config;
|
|
52
|
+
const normalized = {...config};
|
|
53
|
+
for (const field of ['roles', 'custom']) {
|
|
54
|
+
const roles = config[field];
|
|
55
|
+
if (!roles || typeof roles !== 'object' || Array.isArray(roles)) continue;
|
|
56
|
+
const expanded = {...roles};
|
|
57
|
+
if (!Object.hasOwn(expanded, 'arc_architect') && Object.hasOwn(expanded, 'arc_planner')) {
|
|
58
|
+
expanded.arc_architect = structuredClone(expanded.arc_planner);
|
|
59
|
+
}
|
|
60
|
+
const ordered = [...ROLES.filter(role => Object.hasOwn(expanded, role)),
|
|
61
|
+
...Object.keys(expanded).filter(role => !ROLES.includes(role))];
|
|
62
|
+
normalized[field] = Object.fromEntries(ordered.map(role => [role, expanded[role]]));
|
|
63
|
+
}
|
|
64
|
+
return normalized;
|
|
65
|
+
}
|
|
50
66
|
export function validateModelConfig(config, opts = {}) {
|
|
51
67
|
const platform = platformOf(config, opts);
|
|
52
68
|
config = normalizeLegacyRoles(config);
|
|
69
|
+
config = addArchitectRole(config);
|
|
53
70
|
if (config.version >= 3) {
|
|
54
71
|
exactKeys(config, ['platform', 'version', 'roles'], 'model config');
|
|
55
72
|
return {platform, version: MODEL_SCHEMA_VERSION, roles: validateRoles(config.roles, platform, opts)};
|
|
@@ -73,7 +90,7 @@ export function parseToml(text) {
|
|
|
73
90
|
}
|
|
74
91
|
export function readModelFileVersion(text) {
|
|
75
92
|
const {version} = parseToml(text);
|
|
76
|
-
if (![1n, 2n, 3n, BigInt(MODEL_SCHEMA_VERSION)].includes(version)) fail('Expected integer schema version 1, 2, 3 or
|
|
93
|
+
if (![1n, 2n, 3n, 4n, BigInt(MODEL_SCHEMA_VERSION)].includes(version)) fail('Expected integer schema version 1, 2, 3, 4 or 5; reinstall or update models.toml');
|
|
77
94
|
return Number(version);
|
|
78
95
|
}
|
|
79
96
|
export function loadModelConfig(text, platform, opts = {}) {
|
package/lib/models/profiles.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { parseToml, exactKeys, validateRoles, effortField, ROLES, fail } from '.
|
|
|
2
2
|
import { runtimeRegistryOf } from '../runtime/platform-registry.mjs';
|
|
3
3
|
const tools = {
|
|
4
4
|
arc_scouter: ['Read', 'Grep', 'Glob', 'WebFetch', 'WebSearch'],
|
|
5
|
+
arc_architect: ['Read', 'Grep', 'Glob'],
|
|
5
6
|
arc_planner: ['Read', 'Grep', 'Glob'],
|
|
6
7
|
arc_implementer: ['Read', 'Grep', 'Glob', 'Bash', 'Write', 'Edit'],
|
|
7
8
|
arc_tester: ['Read', 'Grep', 'Glob', 'Bash'],
|
|
@@ -97,13 +98,17 @@ export function renderClaude(text, role, settings) {
|
|
|
97
98
|
for (const key of ['model', 'effort']) { const index = indices[key], eol = /\r?\n$/.exec(lines[index])?.[0] ?? ''; lines[index] = `${key}: ${settings[key]}${eol}`; }
|
|
98
99
|
return Buffer.from(lines.join(''));
|
|
99
100
|
}
|
|
101
|
+
export function hasStandaloneOwnershipMarker(text) {
|
|
102
|
+
return /^\[ARC role policy: contract begin\]\r?$/m.test(text);
|
|
103
|
+
}
|
|
104
|
+
|
|
100
105
|
export function renderProfiles(profileBuffers, config, opts = {}) {
|
|
101
106
|
exactKeys(config, ['platform', 'roles'], 'effective model settings');
|
|
102
107
|
const platform = config.platform, validated = {roles: validateRoles(config.roles, platform, opts)}, extension = runtimeRegistryOf(opts).getPlatform(platform).profile.ext;
|
|
103
108
|
const renderProfile = opts.renderProfile ?? (extension === 'toml' ? renderCodex : renderClaude);
|
|
104
109
|
if (profileBuffers instanceof Map) profileBuffers = Object.fromEntries(profileBuffers);
|
|
105
110
|
const names = ROLES.map(role => `${role.replace('_', '-')}.${extension}`);
|
|
106
|
-
if (!profileBuffers || Object.keys(profileBuffers).length !== names.length || names.some(name => !Object.hasOwn(profileBuffers, name))) fail('Profile set must contain exactly the
|
|
111
|
+
if (!profileBuffers || Object.keys(profileBuffers).length !== names.length || names.some(name => !Object.hasOwn(profileBuffers, name))) fail('Profile set must contain exactly the six platform role files');
|
|
107
112
|
return new Map(names.map((name, index) => {
|
|
108
113
|
const role = ROLES[index], text = decode(profileBuffers[name]);
|
|
109
114
|
return [name, renderProfile(text, role, validated.roles[role])];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const agentTemplateFile = role => `arc-${role.slice(4)}.md`;
|
package/lib/platforms/codex.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import {getPlatform} from '../runtime/platform-registry.mjs';
|
|
3
3
|
import * as format from './formats/toml.mjs';
|
|
4
|
+
import {compile} from './formats/codex-markdown.mjs';
|
|
4
5
|
import {renderWaitSettings} from '../installer/global-config.mjs';
|
|
5
6
|
import {listCodexModelCapabilities} from '../models/codex-catalog.mjs';
|
|
6
7
|
|
|
@@ -11,6 +12,7 @@ export const CODEX_INSTALLER = Object.freeze({
|
|
|
11
12
|
globalPaths: Object.freeze(['AGENTS.md', 'config.toml']),
|
|
12
13
|
models: Object.freeze({staticCatalog: new URL('../models/codex-models.json', import.meta.url), effortField: getPlatform('codex').models.effortField, discover: listCodexModelCapabilities}),
|
|
13
14
|
profiles: Object.freeze({render: format.render, isOwnedStandalone: format.isOwnedStandalone, renameForRouting: format.renameForRouting}),
|
|
15
|
+
agentTemplates: Object.freeze({compile}),
|
|
14
16
|
runtimeConfig: Object.freeze({readConcurrency: format.readConcurrency, renderConcurrency: format.renderConcurrency, extraRender: renderWaitSettings}),
|
|
15
17
|
uninstallSummary: 'Codex config.toml wait settings and native concurrency key are preserved.',
|
|
16
18
|
isolationEnv: work => ({CODEX_HOME: path.join(work, 'codex-runtime')}),
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {parseToml} from '../../models/config.mjs';
|
|
2
|
+
import {TargetConfigurationError} from '../../installer/target-errors.mjs';
|
|
3
|
+
|
|
4
|
+
function frontmatterValue(line, key) {
|
|
5
|
+
const prefix = `${key}: `;
|
|
6
|
+
if (!line?.startsWith(prefix)) {
|
|
7
|
+
throw new TargetConfigurationError(`Expected Codex agent frontmatter key: ${key}`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const value = line.slice(prefix.length);
|
|
11
|
+
if (!value || value !== value.trim() || /[\p{Cc}\u2028\u2029]/u.test(value)
|
|
12
|
+
|| value.includes(': ') || value.includes(' #') || /^["'[\]{},%@`!&*|>]|^[-?:]\s/u.test(value)) {
|
|
13
|
+
throw new TargetConfigurationError(`Invalid Codex agent frontmatter value: ${key}`);
|
|
14
|
+
}
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function compile(bytes, role) {
|
|
19
|
+
let source;
|
|
20
|
+
try {
|
|
21
|
+
source = new TextDecoder('utf-8', {fatal: true, ignoreBOM: true}).decode(bytes);
|
|
22
|
+
} catch (cause) {
|
|
23
|
+
throw new TargetConfigurationError('Codex agent template must be valid UTF-8', {cause});
|
|
24
|
+
}
|
|
25
|
+
if (/[\u0000-\u0008\u000b-\u001f\u007f\ufeff]/u.test(source)) {
|
|
26
|
+
throw new TargetConfigurationError('Codex agent template contains a forbidden character');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const [opening, nameLine, descriptionLine, closing, separator, ...bodyLines] = source.split('\n');
|
|
30
|
+
if (opening !== '---' || closing !== '---' || separator !== '') {
|
|
31
|
+
throw new TargetConfigurationError('Invalid Codex agent frontmatter fences or body separator');
|
|
32
|
+
}
|
|
33
|
+
const name = frontmatterValue(nameLine, 'name');
|
|
34
|
+
const description = frontmatterValue(descriptionLine, 'description');
|
|
35
|
+
if (name !== role || !/^arc_(scouter|architect|planner|implementer|tester|reviewer)$/.test(name)) {
|
|
36
|
+
throw new TargetConfigurationError('Codex agent template name must match a supported role');
|
|
37
|
+
}
|
|
38
|
+
if (!bodyLines[0] || bodyLines.at(-1) !== '') {
|
|
39
|
+
throw new TargetConfigurationError('Codex agent template requires a body after one blank line and a final LF');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const body = bodyLines.join('\n');
|
|
43
|
+
const escapedBody = body.replaceAll('\\', '\\\\').replace(/"{3}/g, '""\\"');
|
|
44
|
+
const output = `name = ${JSON.stringify(name)}\ndescription = ${JSON.stringify(description)}\n`
|
|
45
|
+
+ `developer_instructions = """\n${escapedBody}"""\n`;
|
|
46
|
+
const expected = Object.entries({name, description, developer_instructions: body});
|
|
47
|
+
let parsed;
|
|
48
|
+
try {
|
|
49
|
+
parsed = parseToml(output);
|
|
50
|
+
} catch (cause) {
|
|
51
|
+
throw new TargetConfigurationError('Generated Codex agent TOML could not be parsed', {cause});
|
|
52
|
+
}
|
|
53
|
+
if (Object.keys(parsed).length !== expected.length
|
|
54
|
+
|| expected.some(([key, value]) => !Object.hasOwn(parsed, key) || parsed[key] !== value)) {
|
|
55
|
+
throw new TargetConfigurationError('Generated Codex agent TOML does not match the template');
|
|
56
|
+
}
|
|
57
|
+
return Buffer.from(output);
|
|
58
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {hasStandaloneOwnershipMarker} from '../../models/profiles.mjs';
|
|
1
2
|
import {TargetConfigurationError} from '../../installer/target-errors.mjs';
|
|
2
3
|
import {getPlatform} from '../../runtime/platform-registry.mjs';
|
|
3
4
|
import {revisionTag} from '../../runtime/role-dispatch-policy.mjs';
|
|
4
5
|
|
|
5
6
|
const fail = message => {throw new TargetConfigurationError(message);};
|
|
6
|
-
const validRole = role => /^arc_(scouter|planner|implementer|tester|reviewer)$/.test(role);
|
|
7
|
+
const validRole = role => /^arc_(scouter|architect|planner|implementer|tester|reviewer)$/.test(role);
|
|
7
8
|
const nonStringScalar = /^(?:~|null|true|false|yes|no|on|off|[-+]?(?:\.inf|\.nan|0[xob][0-9a-f_]+|(?:\d[\d_]*(?:\.[\d_]*)?|\.[\d_]+)(?:e[-+]?\d+)?)|\d{4}-\d{2}-\d{2}(?:[Tt ].*)?)$/i;
|
|
8
9
|
// Inline brackets remain valid text for the ARC routing revision tag.
|
|
9
10
|
const validScalar = value => value === value.trim() && !/[\p{Cc}\u2028\u2029{}#&*!|>"']/u.test(value)
|
|
@@ -34,7 +35,7 @@ export function render(text, role, settings) {
|
|
|
34
35
|
export function isOwnedStandalone(bytes, role, {legacy = false} = {}) {
|
|
35
36
|
try {
|
|
36
37
|
const text = bytes.toString('utf8'), {fields} = parse(text);
|
|
37
|
-
return (validRole(role) || legacy && role === 'arc_qa') && fields.name === role.replace('_', '-') &&
|
|
38
|
+
return (validRole(role) || legacy && role === 'arc_qa') && fields.name === role.replace('_', '-') && hasStandaloneOwnershipMarker(text);
|
|
38
39
|
} catch {return false;}
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {hasStandaloneOwnershipMarker} from '../../models/profiles.mjs';
|
|
1
2
|
import {TargetConfigurationError} from '../../installer/target-errors.mjs';
|
|
2
3
|
import {getPlatform} from '../../runtime/platform-registry.mjs';
|
|
3
4
|
import {revisionTag} from '../../runtime/role-dispatch-policy.mjs';
|
|
4
5
|
|
|
5
6
|
const fail = message => {throw new TargetConfigurationError(message);};
|
|
6
|
-
const validRole = role => /^arc_(scouter|planner|implementer|tester|reviewer)$/.test(role);
|
|
7
|
+
const validRole = role => /^arc_(scouter|architect|planner|implementer|tester|reviewer)$/.test(role);
|
|
7
8
|
const nonStringScalar = /^(?:~|null|true|false|yes|no|on|off|[-+]?(?:\.inf|\.nan|0[xob][0-9a-f_]+|(?:\d[\d_]*(?:\.[\d_]*)?|\.[\d_]+)(?:e[-+]?\d+)?)|\d{4}-\d{2}-\d{2}(?:[Tt ].*)?)$/i;
|
|
8
9
|
// Inline brackets remain valid text for the ARC routing revision tag.
|
|
9
10
|
const validScalar = value => value === value.trim() && !/[\p{Cc}\u2028\u2029{}#&*!|>"']/u.test(value)
|
|
@@ -35,7 +36,7 @@ export function render(text, role, settings) {
|
|
|
35
36
|
export function isOwnedStandalone(bytes, role, {legacy = false} = {}) {
|
|
36
37
|
try {
|
|
37
38
|
const text = bytes.toString('utf8'), {fields} = parse(text);
|
|
38
|
-
return (validRole(role) || legacy && role === 'arc_qa') && fields.name === role.replace('_', '-') &&
|
|
39
|
+
return (validRole(role) || legacy && role === 'arc_qa') && fields.name === role.replace('_', '-') && hasStandaloneOwnershipMarker(text);
|
|
39
40
|
} catch {return false;}
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {hasStandaloneOwnershipMarker} from '../../models/profiles.mjs';
|
|
1
2
|
import {TargetConfigurationError} from '../../installer/target-errors.mjs';
|
|
2
3
|
import {revisionTag} from '../../runtime/role-dispatch-policy.mjs';
|
|
3
4
|
export {renderClaude as render} from '../../models/profiles.mjs';
|
|
@@ -6,9 +7,9 @@ export {readClaudeConcurrency as readConcurrency, renderClaudeConcurrency as ren
|
|
|
6
7
|
const fail=message=>{throw new TargetConfigurationError(message);};
|
|
7
8
|
export function isOwnedStandalone(bytes,role,{legacy=false}={}){
|
|
8
9
|
const platform='claude';
|
|
9
|
-
if(!/^arc_(scouter|planner|implementer|tester|reviewer)$/.test(role)&&!(legacy&&role==='arc_qa'))return false;
|
|
10
|
+
if(!/^arc_(scouter|architect|planner|implementer|tester|reviewer)$/.test(role)&&!(legacy&&role==='arc_qa'))return false;
|
|
10
11
|
const text=bytes.toString('utf8'),suffix=role.slice(4);
|
|
11
|
-
if(
|
|
12
|
+
if(!hasStandaloneOwnershipMarker(text))return false;
|
|
12
13
|
if(platform==='claude'){
|
|
13
14
|
const front=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(text);if(!front)return false;
|
|
14
15
|
const names=front[1].match(/^name: .*\r?$/gm)??[];return names.length===1&&new RegExp(`^name: arc-${suffix}\\r?$`).test(names[0]);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {hasStandaloneOwnershipMarker} from '../../models/profiles.mjs';
|
|
1
2
|
import {TargetConfigurationError} from '../../installer/target-errors.mjs';
|
|
2
3
|
import {revisionTag} from '../../runtime/role-dispatch-policy.mjs';
|
|
3
4
|
export {renderCodex as render} from '../../models/profiles.mjs';
|
|
@@ -6,9 +7,9 @@ export {readCodexConcurrency as readConcurrency, renderCodexConcurrency as rende
|
|
|
6
7
|
const fail=message=>{throw new TargetConfigurationError(message);};
|
|
7
8
|
export function isOwnedStandalone(bytes,role,{legacy=false}={}){
|
|
8
9
|
const platform='codex';
|
|
9
|
-
if(!/^arc_(scouter|planner|implementer|tester|reviewer)$/.test(role)&&!(legacy&&role==='arc_qa'))return false;
|
|
10
|
+
if(!/^arc_(scouter|architect|planner|implementer|tester|reviewer)$/.test(role)&&!(legacy&&role==='arc_qa'))return false;
|
|
10
11
|
const text=bytes.toString('utf8'),suffix=role.slice(4);
|
|
11
|
-
if(
|
|
12
|
+
if(!hasStandaloneOwnershipMarker(text))return false;
|
|
12
13
|
if(platform==='claude'){
|
|
13
14
|
const front=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(text);if(!front)return false;
|
|
14
15
|
const names=front[1].match(/^name: .*\r?$/gm)??[];return names.length===1&&new RegExp(`^name: arc-${suffix}\\r?$`).test(names[0]);
|
package/lib/policy/placement.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const reviews = ['review.significant-no-plan', 'review.significant-plan', 'review.final-plan-recheck'];
|
|
3
3
|
export const POLICY_PROJECTIONS = Object.freeze(Object.fromEntries(Object.entries({
|
|
4
4
|
core: ['scope.non-escalation', 'external.explicit-user-authority', 'approval.run-mode', 'role.orchestrator-boundary'],
|
|
5
|
-
assignment: ['git.specialists-deny', 'role.scouter-read-only', 'role.planner-draft-only', 'role.implementer-implementation', 'role.tester-verification', 'role.reviewer-independent'],
|
|
5
|
+
assignment: ['git.specialists-deny', 'role.scouter-read-only', 'role.architect-draft-only', 'role.planner-draft-only', 'role.implementer-implementation', 'role.tester-verification', 'role.reviewer-independent'],
|
|
6
6
|
planning: ['git.orchestrator-accept-commit', ...reviews, 'planning.plan-revision', 'planning.planner-brief', 'approval.run-mode'],
|
|
7
7
|
handoff: ['git.specialists-deny', 'role.implementer-implementation', ...reviews],
|
|
8
8
|
preparation: ['scope.non-escalation', 'git.specialists-deny', 'git.orchestrator-accept-commit', 'external.explicit-user-authority', 'planning.plan-revision'],
|
package/lib/policy/render.mjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {POLICY_PROJECTIONS, validatePolicyProjections} from './placement.mjs';
|
|
2
2
|
import {validateGitPolicy} from '../runtime/git-query.mjs';
|
|
3
|
-
import {platformIds,
|
|
3
|
+
import {platformIds, isPlatformId} from '../runtime/platform-registry.mjs';
|
|
4
|
+
import {agentTemplateFile} from '../platforms/agent-templates.mjs';
|
|
4
5
|
import source from './role-policy.json' with {type: 'json'};
|
|
5
6
|
// Payload targets are declared by policy metadata; registered platforms may have no payload yet.
|
|
6
7
|
const POLICY_PLATFORMS = Object.freeze(Object.keys(source.platforms));
|
|
7
|
-
const ROLES = ['orchestrator','scouter','planner','implementer','tester','reviewer'];
|
|
8
|
+
const ROLES = ['orchestrator','scouter','architect','planner','implementer','tester','reviewer'];
|
|
8
9
|
const CONTROLS = ['prompt','capability','hook'];
|
|
9
10
|
const fail = message => { throw new Error(`Role policy: ${message}`); };
|
|
10
11
|
const object = value => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
11
12
|
const strings = value => Array.isArray(value) && value.length > 0 && value.every(x => typeof x === 'string' && x.length > 0) && new Set(value).size === value.length;
|
|
12
13
|
const same = (a,b) => JSON.stringify(a) === JSON.stringify(b);
|
|
13
14
|
export function validateRolePolicy(input) {
|
|
14
|
-
if (!object(input) || input.schemaVersion !== 1 || !Array.isArray(input.roles) || !same(input.roles.map(x=>x?.id),ROLES) || input.roles.some(x=>typeof x.description !== 'string' || !x.description)) fail('expected
|
|
15
|
+
if (!object(input) || input.schemaVersion !== 1 || !Array.isArray(input.roles) || !same(input.roles.map(x=>x?.id),ROLES) || input.roles.some(x=>typeof x.description !== 'string' || !x.description)) fail('expected seven known roles in canonical order');
|
|
15
16
|
if (!Array.isArray(input.rules) || !input.rules.length) fail('rules are required');
|
|
16
17
|
const ids = new Set();
|
|
17
18
|
for (const rule of input.rules) {
|
|
@@ -20,7 +21,7 @@ export function validateRolePolicy(input) {
|
|
|
20
21
|
if (!strings(rule.roles) || rule.roles.some(x=>!ROLES.includes(x)) || !['allow','deny','require'].includes(rule.effect) || !strings(rule.operations) || !strings(rule.evidence) || !['user','orchestrator'].includes(rule.authority) || typeof rule.text !== 'string' || !rule.text || /[\r\n]/.test(rule.text)) fail(`invalid rule ${rule.id}`);
|
|
21
22
|
if (!object(rule.controls) || !same(Object.keys(rule.controls).sort(),[...platformIds()].sort()) || Object.values(rule.controls).some(x=>!CONTROLS.includes(x))) fail(`invalid control level for ${rule.id}`);
|
|
22
23
|
}
|
|
23
|
-
for (const id of ['scope.non-escalation','git.specialists-deny','git.orchestrator-accept-commit','external.explicit-user-authority','approval.run-mode',...ROLES.map(x=>({orchestrator:'role.orchestrator-boundary',scouter:'role.scouter-read-only',planner:'role.planner-draft-only',implementer:'role.implementer-implementation',tester:'role.tester-verification',reviewer:'role.reviewer-independent'})[x]),'review.significant-no-plan','review.significant-plan','review.final-plan-recheck']) if(!ids.has(id)) fail(`missing required rule ${id}`);
|
|
24
|
+
for (const id of ['scope.non-escalation','git.specialists-deny','git.orchestrator-accept-commit','external.explicit-user-authority','approval.run-mode',...ROLES.map(x=>({orchestrator:'role.orchestrator-boundary',scouter:'role.scouter-read-only',architect:'role.architect-draft-only',planner:'role.planner-draft-only',implementer:'role.implementer-implementation',tester:'role.tester-verification',reviewer:'role.reviewer-independent'})[x]),'review.significant-no-plan','review.significant-plan','review.final-plan-recheck']) if(!ids.has(id)) fail(`missing required rule ${id}`);
|
|
24
25
|
for (const platform of POLICY_PLATFORMS) if (!object(input.platforms?.[platform]) || !CONTROLS.includes(input.platforms[platform].level) || typeof input.platforms[platform].notice !== 'string' || !input.platforms[platform].notice) fail(`invalid ${platform} controls`);
|
|
25
26
|
// These are workflow invariants, not customizable scheduling options.
|
|
26
27
|
const routes = {noPlan:['implementer','tester','reviewer','orchestrator-accept'],planTask:['implementer','fresh-tester','orchestrator-accept','orchestrator-commit'],planFinal:['required-tester','reviewer'],planFinding:['implementer','reviewer']};
|
|
@@ -32,7 +33,7 @@ export function validateRolePolicy(input) {
|
|
|
32
33
|
export const defaultRolePolicy = source;
|
|
33
34
|
export const POLICY_TARGETS = POLICY_PLATFORMS.flatMap(platform => [
|
|
34
35
|
{path:`${platform}/skill/SKILL.md`,platform,audience:'orchestrator',projection:'core'},
|
|
35
|
-
...ROLES.slice(1).map(audience=>({path:`${platform}/agents
|
|
36
|
+
...ROLES.slice(1).map(audience=>({path:`${platform}/agents/${agentTemplateFile(`arc_${audience}`)}`,platform,audience})),
|
|
36
37
|
...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})),
|
|
37
38
|
]);
|
|
38
39
|
export function renderPolicySection(policy, {platform, audience, section = 'contract', skillPath, projection = 'full'} = {}) {
|