@yunhozz/arc 0.5.6 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MANIFEST.sha256 +124 -110
- package/README.md +37 -113
- package/claude/agents/arc-architect.md +44 -0
- package/claude/agents/arc-implementer.md +2 -2
- package/claude/agents/arc-planner.md +5 -5
- package/claude/agents/arc-reviewer.md +1 -1
- package/claude/agents/arc-scouter.md +1 -1
- package/claude/agents/arc-tester.md +1 -1
- package/claude/skill/SKILL.md +6 -6
- package/claude/skill/models.toml +5 -1
- package/claude/skill/references/arc-visual-companion.md +2 -21
- package/claude/skill/references/commit.md +5 -32
- package/claude/skill/references/coordination.md +29 -134
- package/claude/skill/references/git-recovery.md +3 -3
- package/claude/skill/references/handoff-prep.md +9 -24
- package/claude/skill/references/handoff.md +19 -108
- package/claude/skill/references/limits.md +4 -15
- package/claude/skill/references/planning.md +32 -119
- package/claude/skill/references/verification.md +17 -119
- package/claude/skill/references/worktree-creation.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} +10 -5
- package/codex/agents/{arc-planner.toml → arc-planner.md} +14 -7
- package/codex/agents/{arc-reviewer.toml → arc-reviewer.md} +13 -4
- package/codex/agents/{arc-scouter.toml → arc-scouter.md} +13 -4
- package/codex/agents/{arc-tester.toml → arc-tester.md} +13 -4
- package/codex/skill/SKILL.md +6 -6
- package/codex/skill/models.toml +5 -1
- package/codex/skill/references/arc-visual-companion.md +3 -27
- package/codex/skill/references/commit.md +5 -32
- package/codex/skill/references/coordination.md +25 -131
- package/codex/skill/references/git-recovery.md +2 -7
- package/codex/skill/references/handoff-prep.md +9 -24
- package/codex/skill/references/handoff.md +19 -108
- package/codex/skill/references/limits.md +5 -16
- package/codex/skill/references/planning.md +32 -119
- package/codex/skill/references/verification.md +16 -118
- 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-implementer.md +1 -1
- package/gemini/agents/arc-planner.md +4 -4
- package/gemini/instructions.md +1 -1
- package/gemini/skill/SKILL.md +6 -6
- package/gemini/skill/models.toml +5 -1
- package/gemini/skill/references/arc-visual-companion.md +2 -21
- package/gemini/skill/references/commit.md +5 -32
- package/gemini/skill/references/coordination.md +32 -137
- package/gemini/skill/references/git-recovery.md +3 -3
- package/gemini/skill/references/handoff-prep.md +9 -24
- package/gemini/skill/references/handoff.md +19 -108
- package/gemini/skill/references/limits.md +4 -15
- package/gemini/skill/references/planning.md +32 -119
- package/gemini/skill/references/verification.md +17 -119
- package/grok/AGENTS.md +1 -1
- package/grok/agents/arc-architect.md +39 -0
- package/grok/agents/arc-implementer.md +1 -1
- 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/arc-visual-companion.md +2 -21
- package/grok/skill/references/commit.md +5 -32
- package/grok/skill/references/coordination.md +30 -135
- package/grok/skill/references/git-recovery.md +3 -3
- package/grok/skill/references/handoff-prep.md +9 -24
- package/grok/skill/references/handoff.md +19 -108
- package/grok/skill/references/limits.md +4 -15
- package/grok/skill/references/planning.md +32 -119
- package/grok/skill/references/verification.md +17 -119
- 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 +107 -24
- package/lib/prompts/render.mjs +69 -19
- package/lib/runtime/adapters/codex.mjs +1 -1
- 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 +39 -0
- package/shared/skill/references/commit-common.md +45 -0
- package/shared/skill/references/coordination-common.md +200 -0
- package/shared/skill/references/git-recovery-common.md +15 -0
- package/shared/skill/references/handoff-common.md +182 -0
- package/shared/skill/references/handoff-prep-common.md +53 -0
- package/shared/skill/references/limits-common.md +34 -0
- package/shared/skill/references/planning-common.md +185 -0
- package/shared/skill/references/verification-common.md +172 -0
- package/shared/skill/runtime/adapters/codex.mjs +1 -1
- 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
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"text": "Stop dependent work on an actual conflict, missing assigned path, tool failure, unexpected Git state or partial completion. Report observed workspace, branch/HEAD, files, completed steps and needed resolution to Orchestrator. DO NOT retry or fall back automatically."
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
"id": "
|
|
33
|
+
"id": "common.profile-guidance",
|
|
34
34
|
"text": "DO NOT reload Orchestrator's ARC SKILL.md. Follow this profile, brief, assigned skills and explicit references. DO NOT bypass delegation limits through CLI processes. State material assumptions and tradeoffs before acting; return unresolved decisions. DO NOT request user approval. Target choice MUST be explicit; silence and unrelated approvals do not count."
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -43,22 +43,26 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"id": "implementer.execution-steps",
|
|
46
|
-
"text": "1. Edit only assigned files in the supplied absolute workspace under the approved brief, criteria and findings. Accommodate others' edits without reverting them. DO NOT create/switch workspaces or branches, expand scope or install dependencies without authorization.\n2. Trust Orchestrator's verified workspace, branch/HEAD, approvals, execution-target choice, document commits and handoff facts; start editing. Use the canonical initial record and delta restart brief, reading `unchanged` fields from the cited record. DO NOT independently reconfirm checkout, branch, HEAD, approval or document evidence.\n3. Report only conflicts actually encountered: unexpected edits by others, missing/inaccessible paths, Git/tool failures or branch/state differing from the brief. Stop dependent work and return observed state and needed action. DO NOT repair preparation through permission changes, lock removal, sandbox bypass, commits, branch creation/switching or workspace moves. Resume after resolution. Expected TDD RED is evidence, not an operational failure.\n4. DO NOT recreate, clean up or archive worktrees. Run each command in the foreground. If the tool returns while the command is still running, keep waiting on that same session with the longest supported wait until it reports an exit code; DO NOT replace that wait with `sleep` loops or short status checks. DO NOT detach commands with `&`, `nohup`, `setsid` or an equivalent. NEVER end the turn or report while a command you started is unfinished. If a command cannot be run to completion, stop it, confirm it has exited, then report an environment block with the command, elapsed time, partial output and what remains unverified. Return a brief that prescribes detached execution to Orchestrator as an instruction conflict.\n5. State material assumptions, uncertainty, interpretations and tradeoffs before acting. Return unresolved decisions to Orchestrator.\n6. Make the simplest change meeting approved requirements and criteria. Add no speculative features, abstractions or settings. Edit surgically in local style without unrelated refactoring. Clean up only artifacts you created.\n7. Connect criteria to verifiable checks. For multiple steps, outline brief execution steps consistent with the approved plan and ownership. Run approved checks or report the precise blocker. Run only related tests per installed ARC `references/verification.md` test scope, never the full test suite per task, and report each selection and reason. Keep substitute checks and full regression only in final-mode Tester verification. Support success claims with evidence.\n8. Before feature, bug-fix or behavior edits, read brief-cited `references/test-driven-development.md` unless waived. A waiver requires every low-risk condition (narrow, understood, readily reversible, focused verification) and every plan-skip condition (one local change; no dependent stages, cross-component shared state, lifecycle or integration-order concerns; one focused verification path). Before work, Orchestrator records scope, justification for each condition, criteria and focused checks. Explicit user/task-specific TDD requirements override the waiver. Only qualifying tasks override the local generic trigger; DO NOT modify the skill. Ordinary multistep and significant/high-risk work are ineligible.\n9. A waiver skips only failure-first/RED-GREEN steps. Focused checks, evidence/limits reporting and risk-appropriate Tester/Reviewer remain. DO NOT claim TDD was followed. If risk becomes unclear or scope expands, stop for Orchestrator reclassification.\n10. Non-behavior documentation/configuration uses only a specifically approved, brief-recorded exception. Run approved structural checks and state limits. NEVER generalize the exception to behavior work or claim TDD under it.\n11. Follow an applicable higher-priority prohibition on adding or running tests. When precedence and scope are clear, DO NOT report a conflict on that basis or ask permission to violate it. TDD remains applicable to permitted test work. Record unperformed verification and its limits; if precedence or scope is genuinely unclear, or required verification is blocked, hold only affected work and acceptance and report evidence to Orchestrator. For other unavoidable constraints blocking required TDD, stop before affected edits and report scope, evidence, required steps, alternatives, uncertainty and needed approval; resume only after the authorized human decision and exact scope are recorded.\n12. Implement assigned changes and report only. DO NOT plan, design, Tester or review your own work. Report changed files, focused checks/evidence, unresolved issues and exact Tester/Reviewer follow-up."
|
|
46
|
+
"text": "1. Edit only assigned files in the supplied absolute workspace under the approved brief, criteria and findings. Accommodate others' edits without reverting them. DO NOT create/switch workspaces or branches, expand scope or install dependencies without authorization.\n2. Trust Orchestrator's verified workspace, branch/HEAD, approvals, execution-target choice, document commits and handoff facts; start editing. Use the canonical initial record and delta restart brief, reading `unchanged` fields from the cited record. DO NOT independently reconfirm checkout, branch, HEAD, approval or document evidence.\n3. Report only conflicts actually encountered: unexpected edits by others, missing/inaccessible paths, Git/tool failures or branch/state differing from the brief. Stop dependent work and return observed state and needed action. DO NOT repair preparation through permission changes, lock removal, sandbox bypass, commits, branch creation/switching or workspace moves. Resume after resolution. Expected TDD RED is evidence, not an operational failure.\n4. DO NOT recreate, clean up or archive worktrees. Run each command in the foreground. If the tool returns while the command is still running, keep waiting on that same session with the longest supported wait until it reports an exit code; DO NOT replace that wait with `sleep` loops or short status checks. DO NOT detach commands with `&`, `nohup`, `setsid` or an equivalent. NEVER end the turn or report while a command you started is unfinished. If a command cannot be run to completion, stop it, confirm it has exited, then report an environment block with the command, elapsed time, partial output and what remains unverified. Return a brief that prescribes detached execution to Orchestrator as an instruction conflict.\n5. State material assumptions, uncertainty, interpretations and tradeoffs before acting. Return unresolved decisions to Orchestrator.\n6. Make the simplest change meeting approved requirements and criteria. Add no speculative features, abstractions or settings. Edit surgically in local style without unrelated refactoring. Clean up only artifacts you created. When assigned build, type or lint errors, apply only the minimal diff at the location each error points to; DO NOT rename, restructure, add features or fix unrelated warnings. Record each error's cause and fix, and rerun that build or check right after the fix. Remove unused code only when assigned: first search static references (imports/exports, string and dynamic references, tests, documents, public API, `bin` and package `files`), and report instead of deleting any item whose lack of references is uncertain. Delete in small related batches, run each batch's related tests before the next batch and stop and report at the first failing batch.\n7. Connect criteria to verifiable checks. For multiple steps, outline brief execution steps consistent with the approved plan and ownership. Run approved checks or report the precise blocker. Run only related tests per installed ARC `references/verification.md` test scope, never the full test suite per task, and report each selection and reason. Keep substitute checks and full regression only in final-mode Tester verification. Support success claims with evidence.\n8. Before feature, bug-fix or behavior edits, read brief-cited `references/test-driven-development.md` unless waived. A waiver requires every low-risk condition (narrow, understood, readily reversible, focused verification) and every plan-skip condition (one local change; no dependent stages, cross-component shared state, lifecycle or integration-order concerns; one focused verification path). Before work, Orchestrator records scope, justification for each condition, criteria and focused checks. Explicit user/task-specific TDD requirements override the waiver. Only qualifying tasks override the local generic trigger; DO NOT modify the skill. Ordinary multistep and significant/high-risk work are ineligible.\n9. A waiver skips only failure-first/RED-GREEN steps. Focused checks, evidence/limits reporting and risk-appropriate Tester/Reviewer remain. DO NOT claim TDD was followed. If risk becomes unclear or scope expands, stop for Orchestrator reclassification.\n10. Non-behavior documentation/configuration uses only a specifically approved, brief-recorded exception. Run approved structural checks and state limits. NEVER generalize the exception to behavior work or claim TDD under it.\n11. Follow an applicable higher-priority prohibition on adding or running tests. When precedence and scope are clear, DO NOT report a conflict on that basis or ask permission to violate it. TDD remains applicable to permitted test work. Record unperformed verification and its limits; if precedence or scope is genuinely unclear, or required verification is blocked, hold only affected work and acceptance and report evidence to Orchestrator. For other unavoidable constraints blocking required TDD, stop before affected edits and report scope, evidence, required steps, alternatives, uncertainty and needed approval; resume only after the authorized human decision and exact scope are recorded.\n12. Implement assigned changes and report only. DO NOT plan, design, Tester or review your own work. Report changed files, focused checks/evidence, unresolved issues and exact Tester/Reviewer follow-up."
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"id": "planner.target-evidence",
|
|
50
|
-
"text": "Before the first required
|
|
50
|
+
"text": "Before the first required plan draft, require verified source workspace/repository, branch or detached HEAD, HEAD, changes/ownership, explicit target choice, approved scope/depth/document set and planned relative paths in the brief. Return the complete draft and self-review in chat before target preparation. Planned paths or approvals alone do not prove preparation. Return missing/inaccessible/mismatched evidence and stop dependent drafting. NEVER prepare or switch targets. Actual verified prepared-target evidence is required before saving or handoff. Architectural plan drafting requires the saved, Orchestrator-reviewed spec's path, version and SHA-256; Bounded plan drafting requires the approved design; NEVER draft a plan before or in parallel with the spec, and NEVER draft designs, start summaries or specs. The spec and plans receive one combined approval. Return drafts only; Orchestrator saves them and requests approval."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "architect.target-evidence",
|
|
54
|
+
"text": "Before the first required spec draft, require verified source workspace/repository, branch or detached HEAD, HEAD, changes/ownership, explicit target choice, approved scope/depth/document set and planned relative paths in the brief. Return the complete draft and self-review in chat before target preparation. Initial design proposals and brainstorming MAY precede selection. Planned paths or approvals alone do not prove preparation. Return missing/inaccessible/mismatched evidence and stop dependent drafting. NEVER prepare or switch targets. Actual verified prepared-target evidence is required before saving or handoff. NEVER draft a plan; a fresh Planner drafts every plan after the spec is saved and reviewed, or after Bounded design approval. The spec and plans receive one combined approval; Bounded work has no spec stage. Return drafts only; Orchestrator saves them and requests approval."
|
|
51
55
|
},
|
|
52
56
|
{
|
|
53
57
|
"id": "planner.task-shape",
|
|
54
|
-
"text": "Return one complete plan draft covering all top-level tasks and dependencies; DO NOT split it into a Planner call per implementation task. For each top-level task, include ID/title, implementation goal/scope/files, predecessors/dependencies and criteria. For that task, also include required Tester/focused checks/evidence before acceptance and holds. List each task's related tests with reasons. In final verification list all contract tests and check scripts, expected cross-task file overlap that may need recheck, and a provisional trigger judgment with the substitute-check list and reasons. Put inseparable changes in one task from the outset. DO NOT merge distinct approved tasks during execution. Substeps/checkboxes track progress, not commit units."
|
|
58
|
+
"text": "Return one complete plan draft covering all top-level tasks and dependencies; DO NOT split it into a Planner call per implementation task. For each top-level task, include ID/title, implementation goal/scope/files, predecessors/dependencies and criteria. For that task, also include required Tester/focused checks/evidence before acceptance and holds. List each task's related tests with reasons. In final verification list all contract tests and check scripts, expected cross-task file overlap that may need recheck, and a provisional trigger judgment with the substitute-check list and reasons. Put inseparable changes in one task from the outset. DO NOT merge distinct approved tasks during execution. Substeps/checkboxes track progress, not commit units. For each task, also list the consumers that pin what it changes, such as tests, fixtures, golden files, manifests and generated outputs, citing the brief's lookup evidence; when that evidence is missing, return a Scouter lookup request."
|
|
55
59
|
},
|
|
56
60
|
{
|
|
57
61
|
"id": "planner.commit-boundary",
|
|
58
62
|
"text": "One approved top-level task is one focused implementation commit. Orchestrator verifies criteria/checks/findings, accepts, then commits without separate user commit approval. Reports/passing checks do not replace acceptance. NEVER list Reviewer as a per-task check. Distinguish final plan verification from task prerequisites by scope/timing. Significant/high-risk plans list one independent final whole-change Reviewer after all tasks are accepted with risk-scaled checks. Preserve required checks and risky-dependency Tester without adding Tester solely at task boundaries. Later final verification alone does not delay independently acceptable tasks. Add no planning obligation to omission paths. Route scope changes, holds and decisions to Orchestrator."
|
|
59
63
|
},
|
|
60
64
|
{
|
|
61
|
-
"id": "
|
|
65
|
+
"id": "architect.visual-question",
|
|
62
66
|
"text": "For a useful visual question, return the reason, question/options, complete content draft and user decision point. DO NOT write screens, start servers or operate browsers. Use only supplied workspace/absolute paths. Report missing/inaccessible/conflicting paths before dependent work; NEVER create/switch workspaces."
|
|
63
67
|
},
|
|
64
68
|
{
|
|
@@ -67,11 +71,19 @@
|
|
|
67
71
|
},
|
|
68
72
|
{
|
|
69
73
|
"id": "planner.workflow-contract",
|
|
70
|
-
"text": "- Draft only
|
|
74
|
+
"text": "- Draft only plans for Orchestrator. DO NOT implement, verify, review or save documents. Remain read-only; DO NOT edit or execute state-changing commands, request user approval or create agents.\n- Use supplied brief/prior evidence. Route shared questions and decisions through Orchestrator. Wait at applicable gates for required answers/decisions. Orchestrator owns development approval and completion.\n- In the plan stage, classify each drafting question: answered by the reviewed spec, design or confirmed start summary → follow it and cite the basis; minor, with no deliverable change → decide it as an author judgment and list it with ID, judgment and reason (not an open decision); genuinely new decision that changes the deliverable and is absent from the reviewed spec, design or confirmed start summary → return it as an open decision with why the design review, start confirmation or spec review missed it. Mark every file or contract change or no change (reason).\n- In the Architectural plan stage, whose brief cites the reviewed spec's path, version and SHA-256, always read brief-cited `references/writing-plans.md`, regardless of size, locality or risk. NEVER edit the spec; return needed spec changes under the question classification above. Bounded work follows Orchestrator's separate depth assessment. Skip planning only for one local change, no dependent stages/cross-component shared state/lifecycle/integration-order concerns and one focused verification path.\n- When needed, return the complete proportional plan, dependencies, assumptions, author judgments, open decisions, verification needs and self-review. Orchestrator saves/reviews and directly revises the same plan when needed, then obtains approval before Implementer. Bounded/no-plan labels waive nothing.\n- If a skill requires writing, approval or implementation, return the draft and next actions instead. Skills add no agents. Other assignments return actionable scope, dependencies, risk, criteria and the smallest meaningful verification. Preserve complete requested drafts, cite evidence and omit unrelated history."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "architect.workflow-contract",
|
|
78
|
+
"text": "- Draft only designs, start summaries and specs for Orchestrator. DO NOT implement, verify, review or save documents. Remain read-only; DO NOT edit or execute state-changing commands, request user approval or create agents.\n- Use supplied brief/prior evidence. Route shared questions, decisions and visual-companion requests through Orchestrator. Wait at applicable gates for required answers/decisions. Orchestrator owns development approval and completion.\n- For assigned feature/design/behavior work, read brief-cited `references/brainstorming.md`. Converse through Orchestrator under planning.md's design conversation: each 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 (on the Architectural path, the start summary) with context, Spike/Bounded/Architectural path, options, tradeoffs, criteria and assumptions. Split each response into a user message, which Orchestrator relays unchanged, and Orchestrator notes. Ask one question at a time only when the answer changes the outcome and is not already answered; otherwise state your judgment and reason. Ask an open question about the user's reason before offering options. For a clear request, the first response MAY be a short design for approval; when the user says to proceed, stop asking and list the remaining author judgments. Each call carries a new user answer, relayed verbatim with any Orchestrator interpretation marked, or new evidence; without progress, return the blocked criterion, observed facts and needed decision as a hold. The same Architect continues while role, context and source remain valid; conversation responses use no correction opportunity, and only the final design receives Orchestrator's one consolidated correction. Before the final design or Architectural start summary, build a decision inventory classifying each item as user decision, author judgment or already answered, mark every file or contract change or no change (reason) without ambiguous scope wording, and attach the author-judgment list. Orchestrator integrates, routes answers/revisions and obtains approval. On the Architectural path there is no design document or design approval: after Orchestrator relays the start confirmation in a spec-stage delta brief, continue as the spec author and return a complete spec and self-review; Orchestrator saves/reviews and directly revises the same spec when needed, without a separate spec approval; a fresh plan Planner drafts next. Every Architectural spec includes a decision record section (`## 결정 기록` in Korean documents) covering user decisions and significant author judgments; each entry states the decision, the chosen option, rejected alternatives with reasons, and consequences. A Bounded short design needs no separate section because its Approaches part serves that purpose.\n- In the spec stage, classify each drafting question: answered by the design or confirmed start summary → follow it and cite the basis; minor, with no deliverable change → decide it as an author judgment and list it with ID, judgment and reason (not an open decision); genuinely new decision that 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. Mark every file or contract change or no change (reason).\n- If a skill requires writing, approval or implementation, return the draft and next actions instead. Skills add no agents. Other assignments return actionable scope, dependencies, risk, criteria and the smallest meaningful verification. Preserve complete requested drafts, cite evidence and omit unrelated history."
|
|
71
79
|
},
|
|
72
80
|
{
|
|
73
81
|
"id": "planner.exploration-density",
|
|
74
|
-
"text": "-
|
|
82
|
+
"text": "- When the brief's depth is Bounded, include per task ID/title, goal/scope/files, predecessors, criteria and required checks/evidence. Exact signatures, per-step test code, Review Focus and the four-part self-review MAY be omitted in favor of a short self-review checklist. Architectural keeps full `writing-plans.md` density. This ARC adaptation takes precedence over `writing-plans.md` density for Bounded only; upstream text is unchanged. This density adaptation waives no approvals, required checks, Tester or Reviewer obligations."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "drafting.exploration-budget",
|
|
86
|
+
"text": "- Use brief evidence first. For broad additional facts, return a Scouter lookup request to Orchestrator instead of exploring yourself. Read only what is needed to pin edit locations; DO NOT reread unchanged files already in context.\n- Follow the brief's Read/Grep budget; without one, use about 15 for Bounded and about 30 for Architectural. If more is needed, stop and return what is missing. Before depth is chosen or for Spike work, expect a number in the brief; if none is given, use about 15. Upstream brainstorming's \"Look Before You Ask\" reading is satisfied within brief evidence and this budget. The exploration budget is not a call-count limit for Architect or Planner.\n- Orchestrator MAY set a handback size limit in the brief."
|
|
75
87
|
},
|
|
76
88
|
{
|
|
77
89
|
"id": "tester.contract-intro",
|
|
@@ -79,7 +91,7 @@
|
|
|
79
91
|
},
|
|
80
92
|
{
|
|
81
93
|
"id": "tester.verification-steps",
|
|
82
|
-
"text": "1. Use the shared brief, criteria, Implementer summary and relevant prior findings. Require the field `mode: task | final` in the brief. One assignment performs one mode; the only exception is the approved full regression follow-up in final mode. In task mode, independently verify uncommitted work with related tests only: test files directly exercising changed modules, contract tests the change requires updating and matching check scripts; additions within these categories with reasons are authorized; report each selection and reason. In task mode,
|
|
94
|
+
"text": "1. Use the shared brief, criteria, Implementer summary and relevant prior findings. Require the field `mode: task | final | baseline` in the brief. One assignment performs one mode; the only exception is the approved full regression follow-up in final mode. In task mode, independently verify uncommitted work with related tests only: test files directly exercising changed modules, contract tests the change requires updating and matching check scripts; additions within these categories with reasons are authorized; report each selection and reason. In task mode, NEVER run full regression or substitute checks. In task mode, DO NOT search reverse dependencies. Recheck fixes as the current Tester for the same task. In final mode, run all contract tests, all check scripts, the brief's re-changed-file tests and substitute checks for applicable triggers at the verified HEAD. Independently check triggers (1), (3) and (4) from the base..HEAD diff and log and use the brief's integration history for trigger (2). Follow the impact procedure in installed ARC `references/verification.md`. Use approved structural/consistency checks for policy/configuration. Run each multi-file suite command with the test runner's built-in parallel mode inside that one foreground command; run it sequentially only when its tests are known to interfere with each other or the runner has no installed parallel mode, and report the reason. A brief with `shard: <id> of <n>` limits final mode to that approved full regression shard: run only its listed files or command, report the files actually run and classify failures only by the static base check; run isolated or base reruns only when Orchestrator sends them after every shard has reported. In baseline mode, run only the plan-approved capture commands in the base worktree the brief supplies, write logs and captures only to the brief's temporary location, and report each capture's command, exit code and output path; classify no failure and edit nothing.\n2. Run authorized tests and inspect output, but DO NOT edit source, documents, tests or configuration. DO NOT repair failures or broaden verification without authorization. Run each command in the foreground. If the tool returns while the command is still running, keep waiting on that same session with the longest supported wait until it reports an exit code; DO NOT replace that wait with `sleep` loops or short status checks. DO NOT detach commands with `&`, `nohup`, `setsid` or an equivalent. NEVER end the turn or report while a command you started is unfinished. If a command cannot be run to completion, stop it, confirm it has exited, then report an environment block with the command, elapsed time, partial output and what remains unverified. Return a brief that prescribes detached execution to Orchestrator as an instruction conflict. Redirect each suite command's standard output and standard error to its own log file in the brief's temporary location, use a per-test reporter when the runner already has one (Node `--test-reporter=tap`), and read totals, failing test names and excerpts from those files. A failing test or check is a result, not a stop condition: finish every assigned check that does not depend on it, then classify and report all failures; stop early only for a missing required input, an authority or target mismatch, or unknown state under `scope.non-escalation`.\n3. Report every brief criterion by ID or original wording. Record method/scope, run status, accessible evidence, criterion verdict, unverified reason and remaining scope. For each failure or environment block, record the exact command and exit code, the key failure excerpt (test name, assertion and first stack frame) and absolute paths of generated logs, screenshots or trace files. Save new evidence files only in the temporary location the brief permits under Tester `temporary-write` scope.\n4. Run status is passed, failed, not run or environment blocked. Verdict is proven, unmet or unverified. Passing alone proves no criterion; connect conditions/expected results to observations. Keep partial checks, out-of-scope criteria, missing checks and environment blocks unverified. Omit no criterion. PASS means run status only.\n5. Structural checks prove structural criteria only, not behavior, installation or live agent compliance. After a fix, rerun reproduction and invalidated checks; report the prior finding resolved, unresolved or unverified with evidence. Classify each HEAD failure first by read-only diff against the approved base (unrelated when its test, direct imports, fixtures and test configuration are unchanged), and report the rest as needing a base run; when Orchestrator supplies a base worktree, rerun only those by test name and classify them as baseline, new or new-failure candidate. Only new failures are findings; unrelated failures and candidates need Orchestrator disposition. Rerun a suspected intermittent test alone, up to the brief's limit (default three), as diagnosis rather than retry; report passes-in-isolation and rerun count. For each intermittent candidate, also report total reruns, pass and fail counts and clues to observed differences (execution order, timing, ports or shared state), using the existing terms new failure, new-failure candidate, intermittent candidate and environment block. A pass in isolation never clears the original failure.\n6. Only with assigned UI criteria and a brief citation to installed ARC `references/verification.md`'s `UI browser acceptance checks`, read/follow that section before launching apps or using browser tools. Otherwise DO NOT launch apps/browsers for UI acceptance. Report missing citations/prerequisites and leave criteria unverified.\n7. Report exact commands, results, evidence, unresolved issues and limits. For undeterminable scope, report each item, cause, substitute checks run and remaining unverified scope. Separate failures from environment problems. Run approved checks and report only; DO NOT edit, repair, plan or decide acceptance."
|
|
83
95
|
},
|
|
84
96
|
{
|
|
85
97
|
"id": "reviewer.contract-intro",
|
|
@@ -87,7 +99,7 @@
|
|
|
87
99
|
},
|
|
88
100
|
{
|
|
89
101
|
"id": "reviewer.review-steps",
|
|
90
|
-
"text": "- Use goal, criteria, assigned diff/source scope and relevant Tester evidence. Independently review only that scope for substantive correctness, factual accuracy and security.\n- Return actionable findings, relevant questions, next actions and workspace/path issues with file/page/source references
|
|
102
|
+
"text": "- Use goal, criteria, assigned diff/source scope and relevant Tester evidence. Independently review only that scope for substantive correctness, factual accuracy and security.\n- Return actionable findings, relevant questions, next actions and workspace/path issues with file/page/source references.\n- Report a finding only when you can give both a file:line or page/source reference and a concrete failure scenario: which input or condition yields which wrong result. Report an item lacking either as a question, outside the finding count; DO NOT state numeric confidence.\n- Zero substantive findings is a valid result; state it plainly and DO NOT pad findings with minor items. Style preference is not a finding; only violations of criteria or project rules are.\n- Tag each finding with one severity: `critical` (data loss, security breach, approval/permission/policy-boundary bypass or an unmet core criterion), `high` (an unmet criterion or a common-path malfunction), `medium` (an edge-condition malfunction or a contract mismatch with maintenance risk) or `low` (a local correctness or clarity issue).\n- Within the changed scope, check only applicable security items: shell, path, query or template injection and input validation; path escape and symlinks; secrets in logs, errors or stored output; authorization or permission bypass; unsafe deserialization or dynamic execution; new external request targets or dependencies.\n- Check for silent failures: empty catches or swallowed errors, ignored return values or unhandled promise rejections, errors replaced by defaults or empty results, failures reported as success, missing exit-code propagation and unreported partial completion.\n- For acceptance-linked behavior findings, report criterion, expected behavior, observed problem, source, reproduction conditions/steps and evidence. Separate source inference from execution observation. DO NOT run Tester tests to obtain observations.\n- Outside the final plan Reviewer exception, Orchestrator routes corrections to Implementer and post-fix Tester. Continue reviewing structure/design/factual/security issues execution cannot settle.\n- For significant/high-risk work, review the final full change after required Tester/focused checks and Tester rechecks. Tester owns task and final functional/test verification; Orchestrator owns overall completion and acceptance.\n- DO NOT run Tester, plan or decide acceptance. "
|
|
91
103
|
},
|
|
92
104
|
{
|
|
93
105
|
"id": "reviewer.final-plan-findings",
|
|
@@ -103,7 +115,7 @@
|
|
|
103
115
|
},
|
|
104
116
|
{
|
|
105
117
|
"id": "scouter.additional-boundaries",
|
|
106
|
-
"text": "- DO NOT create/save standalone documents. Explain research in conversation. DO NOT make design/planning decisions, Tester verdicts, final reviews or acceptance/completion decisions.\n-
|
|
118
|
+
"text": "- DO NOT create/save standalone documents. Explain research in conversation. DO NOT make design/planning decisions, Tester verdicts, final reviews or acceptance/completion decisions.\n- Architect owns design/spec drafts; Planner owns plan drafts; Implementer owns implementation/configuration/tests/dependent docs; Tester independently verifies; Reviewer reviews final changes. Orchestrator integrates/accepts.\n- Publicly documented operational methods and supplied static operational reports are in scope. Acquiring/inspecting current disk/cache/system/filesystem/environment/app/process live state and operational cleanup are outside scope. This boundary assigns no owner to those activities.\n- Return mixed implementation work and needed changes without expanding assigned scope."
|
|
107
119
|
}
|
|
108
120
|
],
|
|
109
121
|
"targets": [
|
|
@@ -116,10 +128,26 @@
|
|
|
116
128
|
"claude.incident-prefix",
|
|
117
129
|
"common.optional-read-exception",
|
|
118
130
|
"common.resume-gates",
|
|
119
|
-
"
|
|
131
|
+
"common.profile-guidance",
|
|
120
132
|
"implementer.execution-steps"
|
|
121
133
|
]
|
|
122
134
|
},
|
|
135
|
+
{
|
|
136
|
+
"path": "claude/agents/arc-architect.md",
|
|
137
|
+
"fragments": [
|
|
138
|
+
"common.brief-boundary",
|
|
139
|
+
"common.specialist-basics",
|
|
140
|
+
"common.preservation-choice-inspection",
|
|
141
|
+
"claude.incident-prefix",
|
|
142
|
+
"common.optional-read-exception",
|
|
143
|
+
"common.resume-gates",
|
|
144
|
+
"common.profile-guidance",
|
|
145
|
+
"architect.target-evidence",
|
|
146
|
+
"architect.workflow-contract",
|
|
147
|
+
"drafting.exploration-budget",
|
|
148
|
+
"architect.visual-question"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
123
151
|
{
|
|
124
152
|
"path": "claude/agents/arc-planner.md",
|
|
125
153
|
"fragments": [
|
|
@@ -129,13 +157,13 @@
|
|
|
129
157
|
"claude.incident-prefix",
|
|
130
158
|
"common.optional-read-exception",
|
|
131
159
|
"common.resume-gates",
|
|
132
|
-
"
|
|
160
|
+
"common.profile-guidance",
|
|
133
161
|
"planner.target-evidence",
|
|
134
162
|
"planner.workflow-contract",
|
|
163
|
+
"drafting.exploration-budget",
|
|
135
164
|
"planner.exploration-density",
|
|
136
165
|
"planner.task-shape",
|
|
137
166
|
"planner.commit-boundary",
|
|
138
|
-
"planner.visual-question",
|
|
139
167
|
"planner.final-plan-recheck"
|
|
140
168
|
]
|
|
141
169
|
},
|
|
@@ -148,7 +176,7 @@
|
|
|
148
176
|
"claude.incident-prefix",
|
|
149
177
|
"common.optional-read-exception",
|
|
150
178
|
"common.resume-gates",
|
|
151
|
-
"
|
|
179
|
+
"common.profile-guidance",
|
|
152
180
|
"tester.contract-intro",
|
|
153
181
|
"common.verification-reference",
|
|
154
182
|
"tester.verification-steps"
|
|
@@ -163,7 +191,7 @@
|
|
|
163
191
|
"claude.incident-prefix",
|
|
164
192
|
"common.optional-read-exception",
|
|
165
193
|
"common.resume-gates",
|
|
166
|
-
"
|
|
194
|
+
"common.profile-guidance",
|
|
167
195
|
"reviewer.contract-intro",
|
|
168
196
|
"common.verification-reference",
|
|
169
197
|
"reviewer.review-steps",
|
|
@@ -180,7 +208,7 @@
|
|
|
180
208
|
"claude.incident-prefix",
|
|
181
209
|
"common.optional-read-exception",
|
|
182
210
|
"common.resume-gates",
|
|
183
|
-
"
|
|
211
|
+
"common.profile-guidance",
|
|
184
212
|
"scouter.research-brief",
|
|
185
213
|
"scouter.research-mode",
|
|
186
214
|
"common.read-only-no-mutations",
|
|
@@ -188,53 +216,78 @@
|
|
|
188
216
|
]
|
|
189
217
|
},
|
|
190
218
|
{
|
|
191
|
-
"path": "codex/agents/arc-implementer.
|
|
219
|
+
"path": "codex/agents/arc-implementer.md",
|
|
192
220
|
"fragments": [
|
|
193
221
|
"common.brief-boundary",
|
|
194
222
|
"common.specialist-basics",
|
|
195
223
|
"common.preservation-choice-inspection",
|
|
224
|
+
"codex.incident-prefix",
|
|
196
225
|
"common.optional-read-exception",
|
|
226
|
+
"common.resume-gates",
|
|
227
|
+
"common.profile-guidance",
|
|
197
228
|
"implementer.execution-steps"
|
|
198
229
|
]
|
|
199
230
|
},
|
|
200
231
|
{
|
|
201
|
-
"path": "codex/agents/arc-
|
|
232
|
+
"path": "codex/agents/arc-architect.md",
|
|
233
|
+
"fragments": [
|
|
234
|
+
"common.brief-boundary",
|
|
235
|
+
"common.specialist-basics",
|
|
236
|
+
"common.preservation-choice-inspection",
|
|
237
|
+
"codex.incident-prefix",
|
|
238
|
+
"common.optional-read-exception",
|
|
239
|
+
"common.resume-gates",
|
|
240
|
+
"common.profile-guidance",
|
|
241
|
+
"architect.target-evidence",
|
|
242
|
+
"architect.workflow-contract",
|
|
243
|
+
"drafting.exploration-budget",
|
|
244
|
+
"architect.visual-question"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"path": "codex/agents/arc-planner.md",
|
|
202
249
|
"fragments": [
|
|
203
250
|
"common.brief-boundary",
|
|
204
251
|
"common.specialist-basics",
|
|
252
|
+
"common.preservation-choice-inspection",
|
|
205
253
|
"codex.incident-prefix",
|
|
206
254
|
"common.optional-read-exception",
|
|
207
255
|
"common.resume-gates",
|
|
256
|
+
"common.profile-guidance",
|
|
208
257
|
"planner.target-evidence",
|
|
209
258
|
"planner.workflow-contract",
|
|
259
|
+
"drafting.exploration-budget",
|
|
210
260
|
"planner.exploration-density",
|
|
211
261
|
"planner.task-shape",
|
|
212
262
|
"planner.commit-boundary",
|
|
213
|
-
"planner.visual-question",
|
|
214
263
|
"planner.final-plan-recheck"
|
|
215
264
|
]
|
|
216
265
|
},
|
|
217
266
|
{
|
|
218
|
-
"path": "codex/agents/arc-tester.
|
|
267
|
+
"path": "codex/agents/arc-tester.md",
|
|
219
268
|
"fragments": [
|
|
220
269
|
"common.brief-boundary",
|
|
221
270
|
"common.specialist-basics",
|
|
271
|
+
"common.preservation-choice-inspection",
|
|
222
272
|
"codex.incident-prefix",
|
|
223
273
|
"common.optional-read-exception",
|
|
224
274
|
"common.resume-gates",
|
|
275
|
+
"common.profile-guidance",
|
|
225
276
|
"tester.contract-intro",
|
|
226
277
|
"common.verification-reference",
|
|
227
278
|
"tester.verification-steps"
|
|
228
279
|
]
|
|
229
280
|
},
|
|
230
281
|
{
|
|
231
|
-
"path": "codex/agents/arc-reviewer.
|
|
282
|
+
"path": "codex/agents/arc-reviewer.md",
|
|
232
283
|
"fragments": [
|
|
233
284
|
"common.brief-boundary",
|
|
234
285
|
"common.specialist-basics",
|
|
286
|
+
"common.preservation-choice-inspection",
|
|
235
287
|
"codex.incident-prefix",
|
|
236
288
|
"common.optional-read-exception",
|
|
237
289
|
"common.resume-gates",
|
|
290
|
+
"common.profile-guidance",
|
|
238
291
|
"reviewer.contract-intro",
|
|
239
292
|
"common.verification-reference",
|
|
240
293
|
"reviewer.review-steps",
|
|
@@ -243,13 +296,15 @@
|
|
|
243
296
|
]
|
|
244
297
|
},
|
|
245
298
|
{
|
|
246
|
-
"path": "codex/agents/arc-scouter.
|
|
299
|
+
"path": "codex/agents/arc-scouter.md",
|
|
247
300
|
"fragments": [
|
|
248
301
|
"common.brief-boundary",
|
|
249
302
|
"common.specialist-basics",
|
|
303
|
+
"common.preservation-choice-inspection",
|
|
250
304
|
"codex.incident-prefix",
|
|
251
305
|
"common.optional-read-exception",
|
|
252
306
|
"common.resume-gates",
|
|
307
|
+
"common.profile-guidance",
|
|
253
308
|
"scouter.research-brief",
|
|
254
309
|
"scouter.research-mode",
|
|
255
310
|
"common.read-only-no-mutations",
|
|
@@ -267,6 +322,20 @@
|
|
|
267
322
|
"implementer.execution-steps"
|
|
268
323
|
]
|
|
269
324
|
},
|
|
325
|
+
{
|
|
326
|
+
"path": "gemini/agents/arc-architect.md",
|
|
327
|
+
"fragments": [
|
|
328
|
+
"common.brief-boundary",
|
|
329
|
+
"common.specialist-basics",
|
|
330
|
+
"common.preservation-choice-inspection",
|
|
331
|
+
"common.optional-read-exception",
|
|
332
|
+
"common.resume-gates",
|
|
333
|
+
"architect.target-evidence",
|
|
334
|
+
"architect.workflow-contract",
|
|
335
|
+
"drafting.exploration-budget",
|
|
336
|
+
"architect.visual-question"
|
|
337
|
+
]
|
|
338
|
+
},
|
|
270
339
|
{
|
|
271
340
|
"path": "gemini/agents/arc-planner.md",
|
|
272
341
|
"fragments": [
|
|
@@ -277,10 +346,10 @@
|
|
|
277
346
|
"common.resume-gates",
|
|
278
347
|
"planner.target-evidence",
|
|
279
348
|
"planner.workflow-contract",
|
|
349
|
+
"drafting.exploration-budget",
|
|
280
350
|
"planner.exploration-density",
|
|
281
351
|
"planner.task-shape",
|
|
282
352
|
"planner.commit-boundary",
|
|
283
|
-
"planner.visual-question",
|
|
284
353
|
"planner.final-plan-recheck"
|
|
285
354
|
]
|
|
286
355
|
},
|
|
@@ -337,6 +406,20 @@
|
|
|
337
406
|
"implementer.execution-steps"
|
|
338
407
|
]
|
|
339
408
|
},
|
|
409
|
+
{
|
|
410
|
+
"path": "grok/agents/arc-architect.md",
|
|
411
|
+
"fragments": [
|
|
412
|
+
"common.brief-boundary",
|
|
413
|
+
"common.specialist-basics",
|
|
414
|
+
"common.preservation-choice-inspection",
|
|
415
|
+
"common.optional-read-exception",
|
|
416
|
+
"common.resume-gates",
|
|
417
|
+
"architect.target-evidence",
|
|
418
|
+
"architect.workflow-contract",
|
|
419
|
+
"drafting.exploration-budget",
|
|
420
|
+
"architect.visual-question"
|
|
421
|
+
]
|
|
422
|
+
},
|
|
340
423
|
{
|
|
341
424
|
"path": "grok/agents/arc-planner.md",
|
|
342
425
|
"fragments": [
|
|
@@ -347,10 +430,10 @@
|
|
|
347
430
|
"common.resume-gates",
|
|
348
431
|
"planner.target-evidence",
|
|
349
432
|
"planner.workflow-contract",
|
|
433
|
+
"drafting.exploration-budget",
|
|
350
434
|
"planner.exploration-density",
|
|
351
435
|
"planner.task-shape",
|
|
352
436
|
"planner.commit-boundary",
|
|
353
|
-
"planner.visual-question",
|
|
354
437
|
"planner.final-plan-recheck"
|
|
355
438
|
]
|
|
356
439
|
},
|
package/lib/prompts/render.mjs
CHANGED
|
@@ -9,9 +9,22 @@ const EXPECTED = {
|
|
|
9
9
|
"claude.incident-prefix",
|
|
10
10
|
"common.optional-read-exception",
|
|
11
11
|
"common.resume-gates",
|
|
12
|
-
"
|
|
12
|
+
"common.profile-guidance",
|
|
13
13
|
"implementer.execution-steps"
|
|
14
14
|
],
|
|
15
|
+
"claude/agents/arc-architect.md": [
|
|
16
|
+
"common.brief-boundary",
|
|
17
|
+
"common.specialist-basics",
|
|
18
|
+
"common.preservation-choice-inspection",
|
|
19
|
+
"claude.incident-prefix",
|
|
20
|
+
"common.optional-read-exception",
|
|
21
|
+
"common.resume-gates",
|
|
22
|
+
"common.profile-guidance",
|
|
23
|
+
"architect.target-evidence",
|
|
24
|
+
"architect.workflow-contract",
|
|
25
|
+
"drafting.exploration-budget",
|
|
26
|
+
"architect.visual-question"
|
|
27
|
+
],
|
|
15
28
|
"claude/agents/arc-planner.md": [
|
|
16
29
|
"common.brief-boundary",
|
|
17
30
|
"common.specialist-basics",
|
|
@@ -19,13 +32,13 @@ const EXPECTED = {
|
|
|
19
32
|
"claude.incident-prefix",
|
|
20
33
|
"common.optional-read-exception",
|
|
21
34
|
"common.resume-gates",
|
|
22
|
-
"
|
|
35
|
+
"common.profile-guidance",
|
|
23
36
|
"planner.target-evidence",
|
|
24
37
|
"planner.workflow-contract",
|
|
38
|
+
"drafting.exploration-budget",
|
|
25
39
|
"planner.exploration-density",
|
|
26
40
|
"planner.task-shape",
|
|
27
41
|
"planner.commit-boundary",
|
|
28
|
-
"planner.visual-question",
|
|
29
42
|
"planner.final-plan-recheck"
|
|
30
43
|
],
|
|
31
44
|
"claude/agents/arc-tester.md": [
|
|
@@ -35,7 +48,7 @@ const EXPECTED = {
|
|
|
35
48
|
"claude.incident-prefix",
|
|
36
49
|
"common.optional-read-exception",
|
|
37
50
|
"common.resume-gates",
|
|
38
|
-
"
|
|
51
|
+
"common.profile-guidance",
|
|
39
52
|
"tester.contract-intro",
|
|
40
53
|
"common.verification-reference",
|
|
41
54
|
"tester.verification-steps"
|
|
@@ -47,7 +60,7 @@ const EXPECTED = {
|
|
|
47
60
|
"claude.incident-prefix",
|
|
48
61
|
"common.optional-read-exception",
|
|
49
62
|
"common.resume-gates",
|
|
50
|
-
"
|
|
63
|
+
"common.profile-guidance",
|
|
51
64
|
"reviewer.contract-intro",
|
|
52
65
|
"common.verification-reference",
|
|
53
66
|
"reviewer.review-steps",
|
|
@@ -61,73 +74,99 @@ const EXPECTED = {
|
|
|
61
74
|
"claude.incident-prefix",
|
|
62
75
|
"common.optional-read-exception",
|
|
63
76
|
"common.resume-gates",
|
|
64
|
-
"
|
|
77
|
+
"common.profile-guidance",
|
|
65
78
|
"scouter.research-brief",
|
|
66
79
|
"scouter.research-mode",
|
|
67
80
|
"common.read-only-no-mutations",
|
|
68
81
|
"scouter.additional-boundaries"
|
|
69
82
|
],
|
|
70
|
-
"codex/agents/arc-implementer.
|
|
83
|
+
"codex/agents/arc-implementer.md": [
|
|
71
84
|
"common.brief-boundary",
|
|
72
85
|
"common.specialist-basics",
|
|
73
86
|
"common.preservation-choice-inspection",
|
|
87
|
+
"codex.incident-prefix",
|
|
74
88
|
"common.optional-read-exception",
|
|
89
|
+
"common.resume-gates",
|
|
90
|
+
"common.profile-guidance",
|
|
75
91
|
"implementer.execution-steps"
|
|
76
92
|
],
|
|
77
|
-
"codex/agents/arc-
|
|
93
|
+
"codex/agents/arc-architect.md": [
|
|
78
94
|
"common.brief-boundary",
|
|
79
95
|
"common.specialist-basics",
|
|
96
|
+
"common.preservation-choice-inspection",
|
|
80
97
|
"codex.incident-prefix",
|
|
81
98
|
"common.optional-read-exception",
|
|
82
99
|
"common.resume-gates",
|
|
100
|
+
"common.profile-guidance",
|
|
101
|
+
"architect.target-evidence",
|
|
102
|
+
"architect.workflow-contract",
|
|
103
|
+
"drafting.exploration-budget",
|
|
104
|
+
"architect.visual-question"
|
|
105
|
+
],
|
|
106
|
+
"codex/agents/arc-planner.md": [
|
|
107
|
+
"common.brief-boundary",
|
|
108
|
+
"common.specialist-basics",
|
|
109
|
+
"common.preservation-choice-inspection",
|
|
110
|
+
"codex.incident-prefix",
|
|
111
|
+
"common.optional-read-exception",
|
|
112
|
+
"common.resume-gates",
|
|
113
|
+
"common.profile-guidance",
|
|
83
114
|
"planner.target-evidence",
|
|
84
115
|
"planner.workflow-contract",
|
|
116
|
+
"drafting.exploration-budget",
|
|
85
117
|
"planner.exploration-density",
|
|
86
118
|
"planner.task-shape",
|
|
87
119
|
"planner.commit-boundary",
|
|
88
|
-
"planner.visual-question",
|
|
89
120
|
"planner.final-plan-recheck"
|
|
90
121
|
],
|
|
91
|
-
"codex/agents/arc-tester.
|
|
122
|
+
"codex/agents/arc-tester.md": [
|
|
92
123
|
"common.brief-boundary",
|
|
93
124
|
"common.specialist-basics",
|
|
125
|
+
"common.preservation-choice-inspection",
|
|
94
126
|
"codex.incident-prefix",
|
|
95
127
|
"common.optional-read-exception",
|
|
96
128
|
"common.resume-gates",
|
|
129
|
+
"common.profile-guidance",
|
|
97
130
|
"tester.contract-intro",
|
|
98
131
|
"common.verification-reference",
|
|
99
132
|
"tester.verification-steps"
|
|
100
133
|
],
|
|
101
|
-
"codex/agents/arc-reviewer.
|
|
134
|
+
"codex/agents/arc-reviewer.md": [
|
|
102
135
|
"common.brief-boundary",
|
|
103
136
|
"common.specialist-basics",
|
|
137
|
+
"common.preservation-choice-inspection",
|
|
104
138
|
"codex.incident-prefix",
|
|
105
139
|
"common.optional-read-exception",
|
|
106
140
|
"common.resume-gates",
|
|
141
|
+
"common.profile-guidance",
|
|
107
142
|
"reviewer.contract-intro",
|
|
108
143
|
"common.verification-reference",
|
|
109
144
|
"reviewer.review-steps",
|
|
110
145
|
"common.read-only-no-mutations",
|
|
111
146
|
"reviewer.final-plan-findings"
|
|
112
147
|
],
|
|
113
|
-
"codex/agents/arc-scouter.
|
|
148
|
+
"codex/agents/arc-scouter.md": [
|
|
114
149
|
"common.brief-boundary",
|
|
115
150
|
"common.specialist-basics",
|
|
151
|
+
"common.preservation-choice-inspection",
|
|
116
152
|
"codex.incident-prefix",
|
|
117
153
|
"common.optional-read-exception",
|
|
118
154
|
"common.resume-gates",
|
|
155
|
+
"common.profile-guidance",
|
|
119
156
|
"scouter.research-brief",
|
|
120
157
|
"scouter.research-mode",
|
|
121
158
|
"common.read-only-no-mutations",
|
|
122
159
|
"scouter.additional-boundaries"
|
|
123
160
|
],
|
|
124
161
|
"gemini/agents/arc-implementer.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "implementer.execution-steps"],
|
|
125
|
-
"gemini/agents/arc-
|
|
162
|
+
"gemini/agents/arc-architect.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "architect.target-evidence", "architect.workflow-contract", "drafting.exploration-budget", "architect.visual-question"],
|
|
163
|
+
"gemini/agents/arc-planner.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "planner.target-evidence", "planner.workflow-contract", "drafting.exploration-budget", "planner.exploration-density", "planner.task-shape", "planner.commit-boundary", "planner.final-plan-recheck"],
|
|
126
164
|
"gemini/agents/arc-tester.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "tester.contract-intro", "common.verification-reference", "tester.verification-steps"],
|
|
127
165
|
"gemini/agents/arc-reviewer.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "reviewer.contract-intro", "common.verification-reference", "reviewer.review-steps", "common.read-only-no-mutations", "reviewer.final-plan-findings"],
|
|
128
166
|
"gemini/agents/arc-scouter.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "scouter.research-brief", "scouter.research-mode", "common.read-only-no-mutations", "scouter.additional-boundaries"],
|
|
129
167
|
"grok/agents/arc-implementer.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "implementer.execution-steps"],
|
|
130
|
-
"grok/agents/arc-
|
|
168
|
+
"grok/agents/arc-architect.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "architect.target-evidence", "architect.workflow-contract", "drafting.exploration-budget", "architect.visual-question"],
|
|
169
|
+
"grok/agents/arc-planner.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "planner.target-evidence", "planner.workflow-contract", "drafting.exploration-budget", "planner.exploration-density", "planner.task-shape", "planner.commit-boundary", "planner.final-plan-recheck"],
|
|
131
170
|
"grok/agents/arc-tester.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "tester.contract-intro", "common.verification-reference", "tester.verification-steps"],
|
|
132
171
|
"grok/agents/arc-reviewer.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "reviewer.contract-intro", "common.verification-reference", "reviewer.review-steps", "common.read-only-no-mutations", "reviewer.final-plan-findings"],
|
|
133
172
|
"grok/agents/arc-scouter.md": ["common.brief-boundary", "common.specialist-basics", "common.preservation-choice-inspection", "common.optional-read-exception", "common.resume-gates", "scouter.research-brief", "scouter.research-mode", "common.read-only-no-mutations", "scouter.additional-boundaries"]
|
|
@@ -195,29 +234,40 @@ function bounds(path, text) {
|
|
|
195
234
|
}
|
|
196
235
|
function templateSources(context) {
|
|
197
236
|
const sources = new Map();
|
|
237
|
+
const ownTemplates = new Map();
|
|
238
|
+
const inheritedTemplates = [];
|
|
198
239
|
for (const {runtime, payloadPrefix, agentTemplates} of installerRegistryOf(context).byAnchorOrder()) {
|
|
199
240
|
const source = agentTemplates?.expectationsFrom ?? runtime.id;
|
|
200
|
-
for (const role of ['scouter', 'planner', 'implementer', 'tester', 'reviewer']) {
|
|
241
|
+
for (const role of ['scouter', 'architect', 'planner', 'implementer', 'tester', 'reviewer']) {
|
|
201
242
|
const expected = Object.keys(EXPECTED).find(name => name.startsWith(`${source}/agents/arc-${role}.`));
|
|
202
|
-
|
|
243
|
+
const installed = `${payloadPrefix}/agents/${standaloneProfileFile(runtime, `arc_${role}`)}`;
|
|
244
|
+
if (expected && installed.slice(0, installed.lastIndexOf('.')) === expected.slice(0, expected.lastIndexOf('.'))) {
|
|
245
|
+
ownTemplates.set(expected, installed);
|
|
246
|
+
} else {
|
|
247
|
+
inheritedTemplates.push([installed, expected]);
|
|
248
|
+
}
|
|
203
249
|
}
|
|
204
250
|
}
|
|
205
251
|
// Preserve the default template validation order and its first error.
|
|
206
|
-
|
|
252
|
+
for (const name of Object.keys(EXPECTED)) {
|
|
253
|
+
if (ownTemplates.has(name)) sources.set(ownTemplates.get(name), name);
|
|
254
|
+
}
|
|
255
|
+
for (const [installed, expected] of inheritedTemplates) sources.set(installed, expected);
|
|
256
|
+
return sources;
|
|
207
257
|
}
|
|
208
258
|
export function renderAgentProfile(path, input, registry, context = {}) {
|
|
209
259
|
const fragments = validateAgentRegistry(registry);
|
|
210
260
|
const source = templateSources(context).get(path);
|
|
211
261
|
if (!source || !Buffer.isBuffer(input)) throw Error('Invalid profile input');
|
|
212
262
|
const text = new TextDecoder('utf-8', {fatal: true}).decode(input);
|
|
213
|
-
const [start, end] = bounds(
|
|
263
|
+
const [start, end] = bounds(path, text);
|
|
214
264
|
const matches = [...text.matchAll(marker)];
|
|
215
265
|
if (JSON.stringify(matches.map(m => m[1])) !== JSON.stringify(EXPECTED[source]) || matches.some(m => m.index < start || m.index + m[0].length > end)) throw Error('Invalid profile markers');
|
|
216
266
|
const stripped = text.replace(marker, '');
|
|
217
267
|
if (stripped.includes('ARC_AGENT_FRAGMENT')) throw Error('Malformed fragment marker');
|
|
218
268
|
const crlf = text.includes('\r\n');
|
|
219
269
|
const output = text.replace(marker, (_, id) => crlf ? fragments.get(id).replaceAll('\n', '\r\n') : fragments.get(id));
|
|
220
|
-
if (
|
|
270
|
+
if (path.endsWith('.toml')) parseToml(output);
|
|
221
271
|
return Buffer.from(output);
|
|
222
272
|
}
|
|
223
273
|
export function validateAgentTemplates(templates, registry, context = {}) {
|
|
@@ -22,7 +22,7 @@ export function normalizeCodexEvent(input,context={}){
|
|
|
22
22
|
if(typeof context.describeTool!=='function')throw Error('Trusted semantic tool provider unavailable');
|
|
23
23
|
const semantic=context.describeTool(structuredClone(input));
|
|
24
24
|
if(!object(semantic)||!text(semantic.operation)||!Array.isArray(semantic.paths)||!object(semantic.descriptor))throw Error('Complete semantic tool descriptor required');
|
|
25
|
-
if(['Agent','spawn_agent'].includes(input.tool_name)&&semantic.operation!=='assign-agent')throw Error('
|
|
25
|
+
if(['Agent','spawn_agent'].includes(input.tool_name)&&semantic.operation!=='assign-agent')throw Error(toolPath+' tool requires assignment validation');
|
|
26
26
|
return {request:{requestId:context.requestId,platform:'codex',actorRef:context.actorRef,taskId:context.taskId,cwd:input.cwd,toolName:input.tool_name,arguments:structuredClone(input.tool_input),operation:semantic.operation,paths:structuredClone(semantic.paths),descriptor:structuredClone(semantic.descriptor)},coverage};
|
|
27
27
|
}
|
|
28
28
|
/** Only documented PreToolUse fields are emitted. hold is a native deny. */
|