@yunhozz/arc 0.1.9 → 0.1.10
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 +85 -60
- package/README.md +1 -1
- package/claude/agents/{arc-coder.md → arc-implementer.md} +7 -7
- package/claude/agents/arc-planner.md +4 -4
- package/claude/agents/arc-qa.md +4 -4
- package/claude/agents/arc-reviewer.md +5 -5
- package/claude/agents/arc-scouter.md +3 -3
- package/claude/skill/SKILL.md +7 -7
- package/claude/skill/models.toml +3 -3
- package/claude/skill/references/commit.md +22 -7
- package/claude/skill/references/coordination.md +25 -18
- package/claude/skill/references/git-recovery.md +1 -1
- package/claude/skill/references/handoff-prep.md +25 -2
- package/claude/skill/references/handoff.md +106 -24
- package/claude/skill/references/planning.md +73 -22
- package/claude/skill/references/verification.md +155 -17
- package/claude/skill/runtime/acceptance.mjs +68 -0
- package/claude/skill/runtime/assignment.mjs +42 -0
- package/claude/skill/runtime/bootstrap.mjs +35 -0
- package/claude/skill/runtime/cooperative-schema.mjs +55 -0
- package/claude/skill/runtime/cooperative.mjs +136 -0
- package/claude/skill/runtime/evaluate.mjs +40 -4
- package/claude/skill/runtime/external.mjs +51 -0
- package/claude/skill/runtime/gate.mjs +7 -7
- package/claude/skill/runtime/git-evidence.mjs +46 -0
- package/claude/skill/runtime/operations.mjs +2 -2
- package/claude/skill/runtime/role-policy.json +64 -19
- package/claude/skill/runtime/schema.mjs +1 -0
- package/claude/skill/runtime/scope.mjs +36 -0
- package/claude/skill/runtime/store.mjs +25 -4
- package/claude/skill/runtime/verification.mjs +123 -0
- package/claude/skill/scripts/model_config.py +2 -2
- package/codex/agents/{arc-coder.toml → arc-implementer.toml} +8 -8
- package/codex/agents/arc-planner.toml +6 -6
- package/codex/agents/arc-qa.toml +6 -6
- package/codex/agents/arc-reviewer.toml +6 -6
- package/codex/agents/arc-scouter.toml +5 -5
- package/codex/skill/SKILL.md +9 -9
- package/codex/skill/models.toml +3 -3
- package/codex/skill/references/commit.md +23 -8
- package/codex/skill/references/coordination.md +25 -18
- package/codex/skill/references/git-recovery.md +2 -2
- package/codex/skill/references/handoff-prep.md +25 -2
- package/codex/skill/references/handoff-worktree.md +4 -4
- package/codex/skill/references/handoff.md +116 -34
- package/codex/skill/references/planning.md +76 -23
- package/codex/skill/references/verification.md +160 -22
- package/codex/skill/runtime/acceptance.mjs +68 -0
- package/codex/skill/runtime/assignment.mjs +42 -0
- package/codex/skill/runtime/bootstrap.mjs +35 -0
- package/codex/skill/runtime/cooperative-schema.mjs +55 -0
- package/codex/skill/runtime/cooperative.mjs +136 -0
- package/codex/skill/runtime/evaluate.mjs +40 -4
- package/codex/skill/runtime/external.mjs +51 -0
- package/codex/skill/runtime/gate.mjs +7 -7
- package/codex/skill/runtime/git-evidence.mjs +46 -0
- package/codex/skill/runtime/operations.mjs +2 -2
- package/codex/skill/runtime/role-policy.json +64 -19
- package/codex/skill/runtime/schema.mjs +1 -0
- package/codex/skill/runtime/scope.mjs +36 -0
- package/codex/skill/runtime/store.mjs +25 -4
- package/codex/skill/runtime/verification.mjs +123 -0
- package/codex/skill/scripts/model_config.py +3 -3
- package/lib/cli/root.mjs +1 -0
- package/lib/cli/workflow.mjs +21 -0
- package/lib/installer/manifest.mjs +1 -1
- package/lib/installer/plan.mjs +27 -13
- package/lib/installer/targets.mjs +1 -1
- package/lib/models/config.mjs +1 -1
- package/lib/models/profiles.mjs +1 -1
- package/lib/policy/placement.mjs +6 -6
- package/lib/policy/render.mjs +3 -3
- package/lib/policy/role-policy.json +64 -19
- package/lib/runtime/acceptance.mjs +68 -0
- package/lib/runtime/assignment.mjs +42 -0
- package/lib/runtime/bootstrap.mjs +35 -0
- package/lib/runtime/cooperative-schema.mjs +55 -0
- package/lib/runtime/cooperative.mjs +136 -0
- package/lib/runtime/evaluate.mjs +40 -4
- package/lib/runtime/external.mjs +51 -0
- package/lib/runtime/gate.mjs +7 -7
- package/lib/runtime/git-evidence.mjs +46 -0
- package/lib/runtime/operations.mjs +2 -2
- package/lib/runtime/schema.mjs +1 -0
- package/lib/runtime/scope.mjs +36 -0
- package/lib/runtime/store.mjs +25 -4
- package/lib/runtime/verification.mjs +123 -0
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ acceptance criteria, currently required checks (Reviewer timing:
|
|
|
11
11
|
creates its focused local Git commit without additional user commit approval.
|
|
12
12
|
After Orchestrator accepts a task, the next action is the required Git state/scope checks, staging, and focused commit.
|
|
13
13
|
Do not commit before task acceptance or defer the task commit until the plan ends.
|
|
14
|
-
Only Orchestrator accepts the task and executes its focused commit;
|
|
15
|
-
Substeps and checkboxes are progress records, not separate commit units. Checkbox completion,
|
|
14
|
+
Only Orchestrator accepts the task and executes its focused commit; Implementer completion does not replace acceptance.
|
|
15
|
+
Substeps and checkboxes are progress records, not separate commit units. Checkbox completion, Implementer reports, and
|
|
16
16
|
passing checks alone do not establish task acceptance: connect criteria's conditions and expected results to actual
|
|
17
17
|
evidence. Existing plan-skip paths have no new plan obligation; their commits follow applicable guidance and user
|
|
18
18
|
requests. Push, merge, publish, deploy, and install still follow their separate guidance and approval rules.
|
|
@@ -42,25 +42,39 @@ fresh state and ownership checks. Task acceptance/commit is distinct from final
|
|
|
42
42
|
QA/Reviewer/integration checks still apply with the timing in verification.
|
|
43
43
|
|
|
44
44
|
For final Reviewer findings on already committed plan work, Orchestrator defines a follow-up task and required
|
|
45
|
-
planning/approvals.
|
|
45
|
+
planning/approvals. Implementer leaves corrections uncommitted during rechecks. Orchestrator refreshes the latest committed
|
|
46
46
|
state plus uncommitted diff and changed-file list in the Reviewer artifact/brief. Reuse an independent Reviewer or
|
|
47
|
-
assign another independent Reviewer as needed. Repeat
|
|
47
|
+
assign another independent Reviewer as needed. Repeat Implementer → Reviewer without QA reassignment until findings are
|
|
48
48
|
resolved; Orchestrator then accepts the corrections and creates one focused follow-up commit.
|
|
49
|
-
Final QA findings retain
|
|
49
|
+
Final QA findings retain Implementer correction and QA recheck before a new focused commit.
|
|
50
50
|
Do not automatically amend/reset or duplicate the original task commit. Scope expansion keeps existing new
|
|
51
51
|
planning and approval obligations.
|
|
52
52
|
|
|
53
|
-
Local commit authority does not authorize early planning-document commits: pre-
|
|
53
|
+
Local commit authority does not authorize early planning-document commits: pre-Implementer document approvals,
|
|
54
54
|
explicit execution-target choice and batch preparation remain unchanged. Historical spec/plan records are not changed
|
|
55
55
|
retroactively. Structural checks of this contract do not prove actual agent runtime compliance.
|
|
56
56
|
Follow Conventional Commits with the message form `<type>(<scope>): <description>`. Use a concise, specific English
|
|
57
57
|
description without a trailing period, a lowercase scope when useful, one top-level task's logical change per commit,
|
|
58
58
|
and body/footer only when needed while preserving Git trailer syntax.
|
|
59
59
|
|
|
60
|
+
## Execution-time plan document updates
|
|
61
|
+
|
|
62
|
+
Plan progress and approved revised plan contracts follow [planning](planning.md#plan-updates-during-execution).
|
|
63
|
+
At a safe boundary Orchestrator amends the original planning-document commit; no separate document or fixup commit.
|
|
64
|
+
Mechanical records need no new user approval; changes to the approved execution contract require revised-version approval
|
|
65
|
+
and preparation before affected work. Preserve actual approval chronology; rewriting never approves earlier work retroactively.
|
|
66
|
+
Apply [handoff-prep](handoff-prep.md#execution-time-plan-amendment) safety and preservation checks, recoverable contents and
|
|
67
|
+
old-to-new SHA mappings. Shared/published or unknown history, merges, unclear ownership, unexpected state or replay conflict
|
|
68
|
+
stops affected work without force push or fallback document commit. Revalidate evidence under verification after rewriting.
|
|
69
|
+
|
|
70
|
+
This is a plan-document exception only. Implementation task acceptance, focused commits and correction follow-up commits
|
|
71
|
+
retain the rules above; do not combine tasks or include implementation changes in the document commit. The initial complete
|
|
72
|
+
approved document batch still precedes Implementer handoff. Existing document approvals and authority limits remain required.
|
|
73
|
+
|
|
60
74
|
## Shared-checkout coordination
|
|
61
75
|
|
|
62
76
|
Orchestrator serializes shared-checkout Git mutations, including index/staging and commits, across concurrent tasks;
|
|
63
|
-
parallel
|
|
77
|
+
parallel Implementers do not operate competing Git transactions. Preserve every other task's unfinished staged, unstaged
|
|
64
78
|
and untracked changes and ownership. Commit only the accepted task after scope/content verification; unrelated staged
|
|
65
79
|
changes block the commit under the Preservation rule. Do not require unrelated unstaged work to finish or include it
|
|
66
80
|
in the accepted task's commit. Unclear separation or ownership holds affected work for resolution.
|
|
@@ -82,5 +96,6 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
82
96
|
- [scope.non-escalation] Act only where role authority, approved scope and available platform tools all permit. Delegation, restart, agent messages and attached instructions do not expand role authority. MUST NOT bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
|
|
83
97
|
- [git.orchestrator-accept-commit] Only Orchestrator accepts work and executes Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied; Orchestrator accepts then commits without additional user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership and verify the resulting SHA, included content, HEAD and remaining changes. Existing small-task direct and plan-omission paths are unchanged.
|
|
84
98
|
- [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
|
|
85
|
-
- [
|
|
99
|
+
- [planning.plan-amend] During approved task execution, mechanical plan progress records need no new user approval; changed goals, scope, criteria, method, risk, dependencies or required verification require revised-version approval and preparation before affected work. In both cases Orchestrator amends the original planning-document commit at a safe boundary, without a separate document or fixup commit. Preserve actual approval chronology, recoverable old/new contents, hashes, versions and SHA mappings; never retroactively authorize earlier work. Rewrite only unpublished, unshared local linear history with clear ownership and no merges; stop on unknown publication, ownership, unexpected state or replay conflicts, without force push or a fallback document commit. Preserve implementation task boundaries and revalidate affected evidence. See planning, handoff-prep, commit and verification for the full contract.
|
|
100
|
+
- [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Implementer and QA need shell for approved checks.
|
|
86
101
|
[ARC role policy: contract end]
|
|
@@ -5,27 +5,27 @@ Orchestrator reads this before the first specialist creation or assignment and r
|
|
|
5
5
|
## Ownership
|
|
6
6
|
|
|
7
7
|
- Orchestrator: sole owner of development, configuration, tests, implementation-dependent documentation, and mixed tasks
|
|
8
|
-
requiring implementation, assigning their edits to
|
|
8
|
+
requiring implementation, assigning their edits to Implementer. Coordinates scope, planning, approvals, integration
|
|
9
9
|
(save, route, obtain approval; never author), acceptance, verification, and completion.
|
|
10
10
|
- Scouter: read-only material research/analysis and assigned static code/document/data/log exploration. Reports
|
|
11
11
|
evidence, assumptions, unresolved questions, impact, next actions, and workspace/path issues to Orchestrator.
|
|
12
12
|
Does not edit files or author standalone document files, or decide design/plans, verification, review, or completion.
|
|
13
13
|
- Planner: returns design/spec/plan drafts.
|
|
14
|
-
-
|
|
14
|
+
- Implementer: edits assigned, approved implementation/configuration/test-code files and assigned dependent docs.
|
|
15
15
|
Orchestrator does not edit
|
|
16
16
|
them directly except under the Orchestrator direct path for small tasks.
|
|
17
17
|
- QA: verifies without edits.
|
|
18
18
|
- Reviewer: independently reviews the final full change.
|
|
19
|
-
- All five roles report directly to Orchestrator at depth 2: Scouter, Planner,
|
|
19
|
+
- All five roles report directly to Orchestrator at depth 2: Scouter, Planner, Implementer, QA, and Reviewer.
|
|
20
20
|
Orchestrator is depth 1.
|
|
21
21
|
Depth-2 roles cannot create agents or delegate tasks to another role. Reviewer remains independent.
|
|
22
|
-
- Aliases: Scouter=`arc_scouter`, Planner=`arc_planner`,
|
|
22
|
+
- Aliases: Scouter=`arc_scouter`, Planner=`arc_planner`, Implementer=`arc_implementer`, QA=`arc_qa`, Reviewer=`arc_reviewer`.
|
|
23
23
|
- Across the full tree, obey configured limits for simultaneous subagents, including Scouter; there are no reserved slots.
|
|
24
24
|
Before first creation, read `references/limits.md` and installed `limits.toml`; maintain its cumulative ledger and reservations.
|
|
25
25
|
Parallelize independent tasks only; dependent handoffs are sequential and editing scopes cannot overlap.
|
|
26
26
|
- After each read-only role returns (Scouter, Planner, Reviewer), Orchestrator checks `git status` against a pre-spawn
|
|
27
27
|
snapshot for unexpected changes; on any change Orchestrator stops and reports under the Preservation rule.
|
|
28
|
-
Limit: concurrent
|
|
28
|
+
Limit: concurrent Implementer edits and ignored or out-of-repo paths are not attributable/detectable.
|
|
29
29
|
Their read-only status rests on prompt-level guards, not sandbox enforcement.
|
|
30
30
|
|
|
31
31
|
|
|
@@ -41,7 +41,7 @@ adds no agents or authority. Map executor requests such as `superpowers:executin
|
|
|
41
41
|
`superpowers:subagent-driven-development` to Orchestrator's dependency-aware coordination and risk-scaled verification;
|
|
42
42
|
this replaces executor mechanics and any separate execution-method choice, including prompts in an existing local reference.
|
|
43
43
|
Preserve plan approval, workspace, design, spec, and other applicable requirements, including TDD subject to the
|
|
44
|
-
explicit ARC exception in [handoff](handoff.md#
|
|
44
|
+
explicit ARC exception in [handoff](handoff.md#implementer-tdd-and-constraints). Adapt local `brainstorming` role, save, and early spec commit instructions to
|
|
45
45
|
ARC Planner ownership and evidence gates in planning/handoff; preserve upstream reference content. Report conflicts or
|
|
46
46
|
missing required local references before dependent work.
|
|
47
47
|
|
|
@@ -50,20 +50,20 @@ missing required local references before dependent work.
|
|
|
50
50
|
|
|
51
51
|
Orchestrator briefs absolute paths under the selected installed ARC directory: Planner reads
|
|
52
52
|
`references/superpowers/brainstorming/SKILL.md` and `references/superpowers/writing-plans/SKILL.md`;
|
|
53
|
-
|
|
53
|
+
Implementer reads `references/superpowers/test-driven-development/SKILL.md`, including required relative references.
|
|
54
54
|
Resolve paths within each skill directory. Runtime needs no global discovery, external Skill invocation, or automatic download.
|
|
55
55
|
Missing/damaged local files stop dependent work: report exact paths to Orchestrator, without global fallback.
|
|
56
56
|
ARC approval, ownership, TDD exceptions and executor adapters still apply.
|
|
57
57
|
|
|
58
58
|
Orchestrator integrates role results, routes decisions and required approvals, and owns development acceptance
|
|
59
59
|
and completion. Orchestrator coordinates dependent implementation tasks sequentially and
|
|
60
|
-
starts a fresh
|
|
60
|
+
starts a fresh Implementer for each top-level task (Role gate); reuse the current Implementer only for corrections, rework,
|
|
61
61
|
or rechecks of the same task while the approved scope, workspace, ownership, and relevant assignment context remain valid;
|
|
62
|
-
default to the current
|
|
63
|
-
a new task. Before sending corrections or rework to a reused
|
|
62
|
+
default to the current Implementer for same-task QA corrections. A QA finding within the current task does not itself create
|
|
63
|
+
a new task. Before sending corrections or rework to a reused Implementer, Orchestrator rechecks workspace, branch/HEAD and change state against the brief.
|
|
64
64
|
Replace or restart a role only when its context is invalid or unavailable, or the task boundary changes, subject to the
|
|
65
|
-
amendment exception below. A fresh
|
|
66
|
-
After an approved plan or acceptance-criteria amendment, start a fresh
|
|
65
|
+
amendment exception below. A fresh Implementer for the next task is a restart under handoff (choice reuse and restart brief rules are in handoff).
|
|
66
|
+
After an approved plan or acceptance-criteria amendment, start a fresh Implementer for
|
|
67
67
|
the remaining work even within the same task; it is also a restart under handoff. Task-boundary gates
|
|
68
68
|
follow [Risk-scaled execution](verification.md#risk-scaled-execution).
|
|
69
69
|
|
|
@@ -86,10 +86,17 @@ follow [Risk-scaled execution](verification.md#risk-scaled-execution).
|
|
|
86
86
|
complete. Cite paths/lines/pages/commands/links instead of logs; investigate gaps only.
|
|
87
87
|
- Every specialist spawn sets `fork_turns="none"`; full-history forks are not allowed. Supply that brief.
|
|
88
88
|
Reuse an existing specialist for related follow-up with only changed facts/objective when its context
|
|
89
|
-
remains relevant; start fresh for unrelated or bloated context.
|
|
89
|
+
remains relevant; start fresh for unrelated or bloated context. Implementer and QA freshness follow the Role gate.
|
|
90
90
|
- `request_user_input` questions use only `title` and `options` fields, never `question`.
|
|
91
|
-
- In
|
|
92
|
-
acceptance criteria, and constraints; do not ask
|
|
91
|
+
- In Implementer briefs, cite the plan/spec path with the task section's line range and include only the needed excerpts,
|
|
92
|
+
acceptance criteria, and constraints; do not ask Implementer to read whole plans or specs.
|
|
93
|
+
- Before formal Planner drafting, complete the stage brief using
|
|
94
|
+
[planning](planning.md#planner-drafting-preparation-and-consolidated-feedback): original requirements/criteria IDs,
|
|
95
|
+
approved and open decisions, actual target/ownership, preceding approved versions and document paths, current behavior
|
|
96
|
+
and connected policy/source/generated/runtime/installer/documentation surfaces, depth, dependencies, checks, holds and
|
|
97
|
+
exact stage deliverable. Preserve the shared brief field order. Review completeness and conflicts together; send one
|
|
98
|
+
consolidated feedback request with changed fields and `unchanged` for the rest. Preserve separate sequential design,
|
|
99
|
+
spec and plan approvals; no fixed call cap, incomplete draft acceptance or extra calls for resolved questions.
|
|
93
100
|
- Before optional calls, name the unresolved question and expected artifact. Skip calls whose questions are resolved
|
|
94
101
|
by available evidence or direct inspection.
|
|
95
102
|
- Wait for a specialist with `wait_agent` using the maximum supported timeout, repeating only until it completes; a
|
|
@@ -124,8 +131,8 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
124
131
|
- [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
|
|
125
132
|
- [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
|
|
126
133
|
- [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
|
|
127
|
-
- [role.
|
|
128
|
-
- [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for
|
|
134
|
+
- [role.implementer-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
|
|
135
|
+
- [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Implementer correction and required QA recheck.
|
|
129
136
|
- [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
|
|
130
|
-
- [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified;
|
|
137
|
+
- [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Implementer and QA need shell for approved checks.
|
|
131
138
|
[ARC role policy: contract end]
|
|
@@ -39,7 +39,7 @@ If existing changes prevent switching or ownership is unclear, stop handoff unti
|
|
|
39
39
|
scope.
|
|
40
40
|
|
|
41
41
|
For an invalid name, branch creation or switching failure, lookup error, or unexpected current branch, inspect and
|
|
42
|
-
record the error and actual Git state, then stop
|
|
42
|
+
record the error and actual Git state, then stop Implementer handoff. A branch created without a successful switch is partial
|
|
43
43
|
completion: report it, do not automatically delete it, and do not treat preparation as complete. Do not automatically
|
|
44
44
|
fall back to the current checkout path after an operational failure. Both operational failure and missing
|
|
45
45
|
execution-target choice block handoff. Orchestrator resolves the problem and rechecks preparation before handoff.
|
|
@@ -48,7 +48,7 @@ execution-target choice block handoff. Orchestrator resolves the problem and rec
|
|
|
48
48
|
### Worktree failures and partial completion
|
|
49
49
|
|
|
50
50
|
Worktree creation, registration, attachment, identity/base verification, checkout, document transfer, staging,
|
|
51
|
-
or commit failure means stop dependent work and
|
|
51
|
+
or commit failure means stop dependent work and Implementer handoff. Partial completion includes branch-only creation, partial
|
|
52
52
|
path creation, registration/actual-path mismatch, wrong base or branch, and partial document transfer. Record source and
|
|
53
53
|
target exact command, error, branch, HEAD, Git common directory, registration, index and files, including target dirty
|
|
54
54
|
state and source preservation. Before any authorized retry, inspect actual state and completed work under the Stop and
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Orchestrator reads before an execution-target choice request and each preparation Git mutation (branch creation/switch,
|
|
4
4
|
staging, commit). The new managed worktree option's selection target is listed in the Execution-target request gate.
|
|
5
|
-
The [
|
|
5
|
+
The [Implementer handoff gate](handoff.md#implementer-handoff-gate), handoff evidence and choice lifetime are in [handoff.md](handoff.md).
|
|
6
6
|
|
|
7
7
|
## Workspace handoff
|
|
8
8
|
|
|
@@ -126,6 +126,28 @@ Skip this commit only when no planning documents were required and none were pro
|
|
|
126
126
|
rules; record that fact and the applicable depth rationale. Uncommitted documents cannot be treated as absent.
|
|
127
127
|
This does not require new documents or bypass checkout choice or any other handoff-gate condition.
|
|
128
128
|
|
|
129
|
+
### Execution-time plan amendment
|
|
130
|
+
|
|
131
|
+
After the initial approved document batch, execution-time plan updates use
|
|
132
|
+
[planning](planning.md#plan-updates-during-execution), including approved scope revisions. Do not batch these as another
|
|
133
|
+
document commit. This exception does not combine historical document commits or rewrite implementation task contents.
|
|
134
|
+
|
|
135
|
+
Before mutation, verify the original planning-document commit is an ancestor of HEAD and identify its current replacement.
|
|
136
|
+
Verify unpublished, unshared local linear history with no merge commits; clear ownership and included plan paths; paused
|
|
137
|
+
role writers and a safe boundary for unfinished changes; complete classification, approval and chronology records.
|
|
138
|
+
Preserve unrelated staged, unstaged and untracked changes under the Preservation rule; unexpected dirty state blocks rewrite.
|
|
139
|
+
Secure recoverable pre-rewrite HEAD, original commits and before/after plan contents before mutation.
|
|
140
|
+
|
|
141
|
+
If the original commit is HEAD, amend the plan paths only; preserve other documents in that commit. With descendant task
|
|
142
|
+
commits, amend the original and reapply descendants in original order preserving task boundaries and implementation contents.
|
|
143
|
+
Create no separate document or intermediate fixup commit. Git changes remain Orchestrator-only.
|
|
144
|
+
|
|
145
|
+
Unknown publication/sharing status, unclear ownership, merge history, unexpected HEAD/change state or replay conflicts
|
|
146
|
+
require a stop of rewriting and affected dependent work. No automatic conflict resolution, force push or fallback separate
|
|
147
|
+
document commit is permitted. Record actual path, branch/HEAD, index/files and completed steps; Orchestrator resolves the
|
|
148
|
+
issue before resuming and revalidates affected gates. Verify new SHA/HEAD, plan version/content, descendant preservation,
|
|
149
|
+
old-to-new SHA mapping and remaining state under [verification](verification.md#evidence-after-plan-history-rewrite).
|
|
150
|
+
|
|
129
151
|
### Recovery prerequisite
|
|
130
152
|
|
|
131
153
|
On branch collisions, Git preparation failures, partial completion, or metadata write denial, read
|
|
@@ -137,5 +159,6 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
137
159
|
- [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
|
|
138
160
|
- [git.orchestrator-accept-commit] Only Orchestrator accepts work and executes Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied; Orchestrator accepts then commits without additional user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership and verify the resulting SHA, included content, HEAD and remaining changes. Existing small-task direct and plan-omission paths are unchanged.
|
|
139
161
|
- [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
|
|
140
|
-
- [
|
|
162
|
+
- [planning.plan-amend] During approved task execution, mechanical plan progress records need no new user approval; changed goals, scope, criteria, method, risk, dependencies or required verification require revised-version approval and preparation before affected work. In both cases Orchestrator amends the original planning-document commit at a safe boundary, without a separate document or fixup commit. Preserve actual approval chronology, recoverable old/new contents, hashes, versions and SHA mappings; never retroactively authorize earlier work. Rewrite only unpublished, unshared local linear history with clear ownership and no merges; stop on unknown publication, ownership, unexpected state or replay conflicts, without force push or a fallback document commit. Preserve implementation task boundaries and revalidate affected evidence. See planning, handoff-prep, commit and verification for the full contract.
|
|
163
|
+
- [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Implementer and QA need shell for approved checks.
|
|
141
164
|
[ARC role policy: contract end]
|
|
@@ -10,7 +10,7 @@ branch work or document transfer. Apply [handoff-prep.md](handoff-prep.md) and [
|
|
|
10
10
|
Before formal drafting and saving, complete actual creation, managed registration, current-chat attachment,
|
|
11
11
|
repository/common directory and base verification, approved branch verification, and source preservation checks below.
|
|
12
12
|
The normal new-document path drafts and saves directly in the verified target. Planned destination paths are not
|
|
13
|
-
preparation evidence. Initial preparation does not authorize
|
|
13
|
+
preparation evidence. Initial preparation does not authorize Implementer or a document commit.
|
|
14
14
|
|
|
15
15
|
Only an explicit user choice of this third path authorizes preparation. Its selection target is the one verified
|
|
16
16
|
under the Execution-target request gate in handoff-prep.md.
|
|
@@ -45,7 +45,7 @@ use mcp__codex_app__get_worktree_creation_status until completed. Preparing/crea
|
|
|
45
45
|
success.
|
|
46
46
|
For registration failure only, retry the returned workspace with mcp__codex_app__attach_worktree. Before completed
|
|
47
47
|
managed registration, current-chat attachment and approved branch verification, perform no formal drafting, saving, document transfer, staging,
|
|
48
|
-
commit or
|
|
48
|
+
commit or Implementer start. If tools are unavailable, reattachment fails or results mismatch, stop and record actual state.
|
|
49
49
|
Do not fall back to raw Git worktree creation, automatically retry other name/ref/path/branch inputs,
|
|
50
50
|
or perform automatic cleanup, delete, prune or archive. See git-recovery.md before dependent recovery.
|
|
51
51
|
|
|
@@ -62,7 +62,7 @@ handoff-prep.md). Do not move a branch pointer, choose another branch or use --f
|
|
|
62
62
|
or -B.
|
|
63
63
|
If the app initially returns the approved branch, verify it and its base rather than repeating completed work.
|
|
64
64
|
Unexpected branch or mismatched HEAD means stop. Verify final approved branch and HEAD before formal drafting, saving, document transfer,
|
|
65
|
-
the batch docs commit, final Git verification and
|
|
65
|
+
the batch docs commit, final Git verification and Implementer handoff.
|
|
66
66
|
|
|
67
67
|
The tool does not copy uncommitted changes. The following transfer rules apply only to legacy or restart cases
|
|
68
68
|
with existing approved documents (including an explicitly selected target change), not the normal new-document path. For untracked approved documents, source HEAD and index paths must be
|
|
@@ -88,4 +88,4 @@ also be absent at the destination. For unexpected changes, do not overwrite; sto
|
|
|
88
88
|
For identical content, verify approved bytes before reuse. After transfer verify bytes match the approved version.
|
|
89
89
|
The canonical record includes each document approval/version/evidence, source and target absolute paths and the common
|
|
90
90
|
relative path plus content verification. Changed content or approval scope requires approval of the revised version.
|
|
91
|
-
Transfer no other files. Failure or partial transfer blocks all dependent staging, commit and
|
|
91
|
+
Transfer no other files. Failure or partial transfer blocks all dependent staging, commit and Implementer handoff.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Handoff contract
|
|
2
2
|
|
|
3
|
-
Orchestrator reads before every
|
|
4
|
-
in the brief under the
|
|
3
|
+
Orchestrator reads before every Implementer first start or restart preparation. Implementer trusts the Orchestrator-verified facts
|
|
4
|
+
in the brief under the Implementer profile and reads this file only for sections the brief explicitly cites. First-start preparation
|
|
5
5
|
(execution-target choice request, preparation Git mutations, planning-document commit) is in
|
|
6
6
|
[handoff-prep.md](handoff-prep.md); the new managed worktree path is in [handoff-worktree.md](handoff-worktree.md).
|
|
7
7
|
|
|
@@ -9,13 +9,13 @@ in the brief under the Coder profile and reads this file only for sections the b
|
|
|
9
9
|
|
|
10
10
|
### Checkout approval
|
|
11
11
|
|
|
12
|
-
Before every
|
|
12
|
+
Before every Implementer first start and restart, Orchestrator confirms the supplied absolute workspace is accessible and
|
|
13
13
|
belongs to the intended Git repository; record its actual absolute path, current branch or detached HEAD, HEAD, and staged,
|
|
14
14
|
unstaged, and untracked changes. Stop if the workspace is inaccessible, is not the intended repository, or HEAD
|
|
15
15
|
cannot be resolved. Do not initialize Git or switch to another repository automatically.
|
|
16
16
|
|
|
17
17
|
Execution-target choice and actual preparation precede formal drafting and saving of required specs/plans.
|
|
18
|
-
Initial design proposals may precede choice. Initial target preparation does not authorize
|
|
18
|
+
Initial design proposals may precede choice. Initial target preparation does not authorize Implementer; all applicable
|
|
19
19
|
approvals, complete documents, verified batch docs commits or valid absence, and final Git verification remain required.
|
|
20
20
|
Record planned document scope/paths and actual preparation separately, followed by actual drafting/save/approval and
|
|
21
21
|
commit results; preserve actual order and evidence gaps. Reuse a valid choice during document drafting and subsequent
|
|
@@ -27,14 +27,14 @@ After initial design approval, obtain and record an explicit user choice for the
|
|
|
27
27
|
Explicit choice rule: use the current checkout, create a new task branch from the verified base HEAD in that same
|
|
28
28
|
checkout, or create a new managed worktree and task branch (selection target under handoff-prep.md; contract in
|
|
29
29
|
handoff-worktree.md after selection). Without an explicit execution-target choice or verified valid reuse under the
|
|
30
|
-
choice-lifetime rules below, wait and do not start or restart
|
|
30
|
+
choice-lifetime rules below, wait and do not start or restart Implementer.
|
|
31
31
|
|
|
32
|
-
###
|
|
32
|
+
### Implementer handoff gate
|
|
33
33
|
|
|
34
|
-
Orchestrator may start or restart
|
|
34
|
+
Orchestrator may start or restart Implementer only after all of these conditions are verified:
|
|
35
35
|
|
|
36
36
|
1. All applicable design/spec/plan approvals are recorded with approved artifact paths or valid depth-omission reasons.
|
|
37
|
-
For a
|
|
37
|
+
For a Implementer Spike probe, record its approved question, method/scope, acceptance criteria, and constraints.
|
|
38
38
|
The complete current-scope document list, approved versions, plan dependencies/order, and absence of unfinished
|
|
39
39
|
applicable documents are verified. Future implementation artifacts are not part of the probe scope or approved by it.
|
|
40
40
|
2. The user explicitly selected the execution target initially, or that initial choice remains valid under the restart
|
|
@@ -52,9 +52,9 @@ Before an Orchestrator direct edit, Orchestrator verifies the same conditions, w
|
|
|
52
52
|
applicable approval, and records them in the brief.
|
|
53
53
|
|
|
54
54
|
A missing or failed condition blocks handoff. Orchestrator may continue read-only investigation and authorized
|
|
55
|
-
preparation or recovery, but cannot start
|
|
56
|
-
HEAD, or relevant state changes.
|
|
57
|
-
resolves preparation and passes the gate again before
|
|
55
|
+
preparation or recovery, but cannot start Implementer early. Reverify affected evidence when approved content, execution target, branch,
|
|
56
|
+
HEAD, or relevant state changes. Implementer's conflict reporting is in its profile; Orchestrator
|
|
57
|
+
resolves preparation and passes the gate again before Implementer resumes.
|
|
58
58
|
|
|
59
59
|
### Handoff evidence
|
|
60
60
|
|
|
@@ -74,7 +74,7 @@ Record the Complete planning-document set fields from planning.md, confirming no
|
|
|
74
74
|
writing/approval.
|
|
75
75
|
Distinguish reused commits from the batch preparation commit, or record valid document absence.
|
|
76
76
|
Record applicable approvals and the initial explicit execution-target choice or verified reuse for each first start or
|
|
77
|
-
restart. Give all five roles (
|
|
77
|
+
restart. Give all five roles (Implementer, QA, Planner, Reviewer, Scouter) the same actual workspace and selected execution checkout or absolute
|
|
78
78
|
worktree path, preparation evidence, and absolute artifact paths. Each role stays in the supplied workspace, reports
|
|
79
79
|
missing, inaccessible, or conflicting paths and unexpected branch state to Orchestrator before dependent work, and does
|
|
80
80
|
not create or switch workspaces or branches.
|
|
@@ -89,7 +89,7 @@ cannot bypass its approval gate.
|
|
|
89
89
|
|
|
90
90
|
Before assignment, apply every readiness condition in
|
|
91
91
|
[planning.md, Dependency and readiness record](planning.md#dependency-and-readiness-record), including predecessor
|
|
92
|
-
checks, Orchestrator acceptance and verified focused commit or accepted no-change evidence. A
|
|
92
|
+
checks, Orchestrator acceptance and verified focused commit or accepted no-change evidence. A Implementer completion report
|
|
93
93
|
alone is insufficient. Verify the linked record is current and capacity and file ownership permit assignment.
|
|
94
94
|
Readiness supplements the full handoff gate and execution-target restrictions; it never waives them.
|
|
95
95
|
For authorized HEAD or state changes, refresh this record and affected briefs, verify preservation and ownership,
|
|
@@ -103,7 +103,7 @@ when its evidence is accessible and still valid. On every first start and restar
|
|
|
103
103
|
state against the current brief: absolute workspace and repository identity, branch or detached HEAD, HEAD,
|
|
104
104
|
staged/unstaged/untracked changes, preservation and edit ownership, applicable approvals and artifacts,
|
|
105
105
|
planning-document SHA/message/paths/content or valid no-document rationale, and Orchestrator's final state verification
|
|
106
|
-
(
|
|
106
|
+
(Implementer handoff gate items 1-7); a reused choice never waives any gate. A restart without document changes reuses
|
|
107
107
|
verified valid planning-document commits without recommitting them and a still-valid initial choice, with fresh
|
|
108
108
|
actual-state checks. Normal authorized HEAD and dirty-state changes, including accepted task commits, docs commits,
|
|
109
109
|
implementation, and approved worktree document transfer, do not by themselves invalidate the choice; record them and
|
|
@@ -125,11 +125,11 @@ Markdown file at `<git-common-dir>/arc/handoff/<plan-or-task-slug>.md` (slug uni
|
|
|
125
125
|
stem, or a spec/task slug when no plan exists; never overwrite another plan's record; resolve with
|
|
126
126
|
`git rev-parse --path-format=absolute --git-common-dir`; outside the working tree and shared by linked worktrees; not a
|
|
127
127
|
Git mutation, never staged or committed; contains no secrets), gives its absolute path in every brief, and restart
|
|
128
|
-
briefs cite it. If the write is denied or unavailable, each
|
|
128
|
+
briefs cite it. If the write is denied or unavailable, each Implementer brief states why and includes the full record inline, with no delta;
|
|
129
129
|
that inline record satisfies the accessible record requirement. Do not delete it automatically.
|
|
130
130
|
|
|
131
131
|
Restart brief: supply only verified deltas and mark unchanged fields; `unchanged` means unchanged relative to the record
|
|
132
|
-
file the fresh
|
|
132
|
+
file the fresh Implementer reads, and every other brief field is in full. Include: initial record location,
|
|
133
133
|
next objective and edit ownership, changed decisions,
|
|
134
134
|
approvals, documents and scope (or explicit no-change confirmation), current Git state and differences, choice
|
|
135
135
|
validity and reuse verification, refreshed commit/artifact checks, Orchestrator final verification, and remaining
|
|
@@ -146,7 +146,7 @@ its scope, criteria, constraints, and valid document-depth omissions alongside e
|
|
|
146
146
|
Reuse valid authorization for the same approved scope and target. A restart or new role assignment does not require
|
|
147
147
|
repeat approval. Reuse never waives verification of actual workspace/repository, branch or detached HEAD, HEAD,
|
|
148
148
|
changes, preservation, ownership, applicable documents, and preparation evidence by Orchestrator. Refresh actual state
|
|
149
|
-
and affected briefs for authorized changes; they alone do not invalidate approval.
|
|
149
|
+
and affected briefs for authorized changes; they alone do not invalidate approval. Implementer trusts the verified brief
|
|
150
150
|
under its profile. Material scope/method/risk changes and invalid target evidence hold affected work; resolve using
|
|
151
151
|
planning and the choice-lifetime rules above. Report the missing condition and resume evidence rather than asking
|
|
152
152
|
for an approval already valid for that scope.
|
|
@@ -155,13 +155,13 @@ Before any exception judgment, Orchestrator reads [Risk-scaled execution](verifi
|
|
|
155
155
|
|
|
156
156
|
## Common handoff gate
|
|
157
157
|
|
|
158
|
-
Before every
|
|
158
|
+
Before every Implementer first start/restart, Orchestrator passes the full gate:
|
|
159
159
|
applicable approvals/artifacts or valid omissions, explicit execution-target choice
|
|
160
160
|
or verified reuse, intended accessible repository/workspace, actual Git identity/state, preservation/ownership,
|
|
161
161
|
verified document commits or valid absence, and no unresolved failure/partial completion.
|
|
162
162
|
Missing evidence, mismatches, unclear ownership or unresolved preparation block handoff and require Orchestrator
|
|
163
163
|
resolution and full revalidation. Handoff owns the evidence fields, canonical handoff record, restart brief, choice lifetime
|
|
164
|
-
and reuse.
|
|
164
|
+
and reuse. Implementer trusts the Orchestrator-verified brief and reports actual conflicts under its self-contained profile;
|
|
165
165
|
never replace its local guards with a requirement to load Orchestrator procedures.
|
|
166
166
|
Depth-2 roles use the supplied workspace and report path/state conflicts; they cannot create/switch workspaces or
|
|
167
167
|
branches. The same conditions apply before an Orchestrator direct edit.
|
|
@@ -169,12 +169,12 @@ For a selected worktree, handoff requires common directory, registration, app-ma
|
|
|
169
169
|
approved branch, and source preservation; prepare only through the selected managed-worktree contract.
|
|
170
170
|
|
|
171
171
|
|
|
172
|
-
##
|
|
172
|
+
## Implementer TDD and constraints
|
|
173
173
|
|
|
174
|
-
Before feature, bug-fix, or behavior edits,
|
|
175
|
-
ARC exception applies; the
|
|
174
|
+
Before feature, bug-fix, or behavior edits, Implementer follows local `test-driven-development` unless the explicit
|
|
175
|
+
ARC exception applies; the Implementer profile holds Implementer's full TDD rules. TDD is waived only when every small,
|
|
176
176
|
low-risk criterion (Risk-scaled execution) and every plan-skip criterion (Orchestrator direct path) holds.
|
|
177
|
-
Before
|
|
177
|
+
Before Implementer starts,
|
|
178
178
|
Orchestrator records the scope, why every criterion is met, acceptance criteria, and focused verification in the brief.
|
|
179
179
|
An explicit user or task-specific TDD request overrides
|
|
180
180
|
this waiver. For qualifying tasks only, this exception takes precedence over the generic trigger in the local reference;
|
|
@@ -188,41 +188,123 @@ generalize it to behavior work.
|
|
|
188
188
|
|
|
189
189
|
## Orchestrator direct path for small tasks
|
|
190
190
|
|
|
191
|
-
Orchestrator may make a task's edits directly, without Planner brainstorming or
|
|
191
|
+
Orchestrator may make a task's edits directly, without Planner brainstorming or Implementer, only when every small,
|
|
192
192
|
low-risk criterion holds, every plan-skip criterion holds (one local change, no dependent stages, no cross-component shared state,
|
|
193
193
|
lifecycle, or integration-order concerns, and one focused verification path), and no significant-risk trigger applies.
|
|
194
194
|
Spike, architectural, ordinary-behavior, significant/high-risk, unclear-risk work, and edits overlapping files assigned
|
|
195
|
-
to a running
|
|
195
|
+
to a running Implementer are not eligible.
|
|
196
196
|
|
|
197
197
|
Before editing, Orchestrator records a scope record (not a brainstorming design) with scope and files,
|
|
198
198
|
why every criterion holds, acceptance criteria, and focused verification. Apply authorization in
|
|
199
199
|
[planning](planning.md#authorization-and-scope): an existing sufficiently specific user request can approve
|
|
200
200
|
that scope; no duplicate approval is needed. Otherwise present the scope record to the user and obtain explicit
|
|
201
201
|
approval before editing. Silence, an ambiguous response, or approval of other work is not approval.
|
|
202
|
-
Orchestrator then passes the
|
|
202
|
+
Orchestrator then passes the Implementer handoff gate in handoff,
|
|
203
203
|
with the approved scope record as the applicable approval, before the first edit. Orchestrator edits only the approved files,
|
|
204
204
|
preserves others' edits, makes surgical edits in the local style without unrelated refactoring or speculative additions,
|
|
205
205
|
and does not install dependencies without authorization.
|
|
206
206
|
|
|
207
|
-
Behavior edits follow
|
|
207
|
+
Behavior edits follow Implementer TDD and constraints; when TDD applies, Orchestrator follows local
|
|
208
208
|
`test-driven-development`.
|
|
209
209
|
After editing, Orchestrator records the changed files, runs the focused checks, connects each acceptance criterion to
|
|
210
210
|
evidence, and preserves unverified scope. Orchestrator is not independent of its own edit; assign QA when the evidence is
|
|
211
211
|
incomplete.
|
|
212
|
-
After a failed focused check or a QA finding, Orchestrator routes the correction to
|
|
212
|
+
After a failed focused check or a QA finding, Orchestrator routes the correction to Implementer and obtains a recheck.
|
|
213
213
|
|
|
214
214
|
If scope expands, risk becomes unclear, or a criterion stops holding, Orchestrator stops editing, records the changes
|
|
215
|
-
already made, and reclassifies; further work follows the normal Planner/
|
|
215
|
+
already made, and reclassifies; further work follows the normal Planner/Implementer flow with Implementer owning subsequent edits. Do not
|
|
216
216
|
automatically revert, reset, stash, or clean those changes. Like other plan-skip paths, there is no automatic task
|
|
217
217
|
commit; commits follow applicable guidance and user requests.
|
|
218
218
|
|
|
219
219
|
|
|
220
|
+
## Cooperative CLI verification handoff
|
|
221
|
+
|
|
222
|
+
For the supported spec+plan path, the verification handoff includes the registered task contract, exact check descriptor,
|
|
223
|
+
task/final scope, `status.changeFingerprints`, independent actor attestations, intent ID, result messageRef and verdict.
|
|
224
|
+
An externally authorized role performs each check/review after `prepare`, and records the actual result through `result`.
|
|
225
|
+
CLI records do not authenticate identities or prove actual agent policy compliance.
|
|
226
|
+
|
|
227
|
+
When scope, documents or approvals change, inspect `affectedTaskIds` and the dependency chain, preserve earlier approval and
|
|
228
|
+
result records, and hand off new approvals and contracts for affected tasks. Do not reuse an old passing check for a different fingerprint.
|
|
229
|
+
Link failed findings to the assigned Implementer's resolution evidence and QA rechecks for that change version. Only final overall Reviewer
|
|
230
|
+
findings use Implementer→Reviewer revalidation. Do not add Reviewer as a prerequisite for individual task acceptance or commits.
|
|
231
|
+
Follow [verification.md](verification.md#verification-lifecycle-in-the-cooperative-cli) for detailed fields and hold conditions.
|
|
232
|
+
An unsupported no-plan/omission path does not imply a policy violation or a requirement to write documents.
|
|
233
|
+
|
|
220
234
|
[ARC role policy: contract begin]
|
|
221
235
|
Generated from lib/policy/role-policy.json; do not edit this managed section manually.
|
|
222
236
|
- [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
|
|
223
|
-
- [role.
|
|
224
|
-
- [review.significant-no-plan] For significant/high-risk work without a plan:
|
|
225
|
-
- [review.significant-plan] For significant/high-risk plan work: each task uses
|
|
226
|
-
- [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use
|
|
227
|
-
- [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified;
|
|
237
|
+
- [role.implementer-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
|
|
238
|
+
- [review.significant-no-plan] For significant/high-risk work without a plan: Implementer → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer merely because no plan exists. This creates no new plan obligation.
|
|
239
|
+
- [review.significant-plan] For significant/high-risk plan work: each task uses Implementer → fresh QA as required → Orchestrator acceptance and focused commit. After all tasks are accepted and required QA is complete, Reviewer reviews the final full change once. Reviewer is NOT a per-task or per-commit required gate. Preserve required checks and necessary finding rechecks.
|
|
240
|
+
- [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Implementer → Reviewer without QA reassignment; repeat until resolved. This exception applies only at the final plan stage. Preserve required QA and QA failure rechecks before initial final review and outside this exception.
|
|
241
|
+
- [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Implementer and QA need shell for approved checks.
|
|
228
242
|
[ARC role policy: contract end]
|
|
243
|
+
|
|
244
|
+
## Initial Implementer assignment through the cooperative CLI
|
|
245
|
+
|
|
246
|
+
In approved plan mode, Orchestrator performs the following sequence. All mutation commands pass JSON through stdin with
|
|
247
|
+
`arc workflow <command> --cwd <absolute-checkout> --workflow <id> --input -`.
|
|
248
|
+
Query `status` without `--input`.
|
|
249
|
+
|
|
250
|
+
1. Prepare the docs-only commit of the approved spec and plan, and verify the exact document set, objects and current files.
|
|
251
|
+
Perform `init`, approval `record` and `prepare` only after this commit verification, even when user approval preceded the document commit.
|
|
252
|
+
2. After document commit verification, pass `mode: "plan"`, `actor: {id: "operator"}` and `selection: {messageRef, contentHash}` to `init` at the final target HEAD.
|
|
253
|
+
3. Use `record` to persist the user approval attestation already confirmed. The input is
|
|
254
|
+
`{requestId, expectedRevision, actor, evidence: {kind: "approval", messageRef, data: {approvalVersion, documentVersion, documents}}}`.
|
|
255
|
+
`documents` contains exactly the spec and plan, each with `{kind, path, gitPath, contentHash, approvalRef, commit}`.
|
|
256
|
+
`contentHash` is `sha256:<hex>`, and `approvalRef` must match the approval `messageRef`.
|
|
257
|
+
On HEAD drift, record a fresh target observation and renewed approval instead of reconnecting an earlier intent.
|
|
258
|
+
4. Pass `{requestId, expectedRevision, actor, operation: "assign-agent", taskId, arguments: {role: "implementer", paths, operations: ["edit"], documents, approvalRef, approvalVersion, documentVersion, correlation}}` to `prepare`.
|
|
259
|
+
Absolute `paths` must be inside the checkout. Confirm `allow`, `persisted: true` and the persisted intent.
|
|
260
|
+
5. Invoke the native assignment with the task, scope and correlation from the persisted intent.
|
|
261
|
+
6. Pass `{requestId, expectedRevision, actor, intentId, result: {status, messageRef, data: {correlation, taskId, agentId}}}` to `result`.
|
|
262
|
+
`intentId` is the prepare requestId. Distinguish success as `succeeded`, failure as `failed`, uncertain execution as `unknown` and a response mismatch as `mismatch`.
|
|
263
|
+
Success requires the returned agent ID. `unknown`/`mismatch` causes a hold; stop duplicate assignments and investigate the actual result.
|
|
264
|
+
|
|
265
|
+
Approval and assignment results on this path are `operator-attested`. They do not authenticate native identities or verify platform events.
|
|
266
|
+
The CLI cannot block direct calls outside it, and a new workflow cannot legitimize omitted past execution. Existing trusted adapter provenance requirements remain in force.
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
## External operations and recovery in the cooperative CLI
|
|
270
|
+
|
|
271
|
+
The three phases support state, documents and assignment; scope, verification, acceptance and focused commits; and external approval, results and audit recovery.
|
|
272
|
+
Use `status.support` to inspect all nine areas and their limits. The supported mode is `plan` with spec+plan; no-plan and omission are unsupported. The CLI does not execute native/provider calls or push, merge, deploy or publish.
|
|
273
|
+
User approvals and execution results confirmed by the operator are `operator-attested`, with `nativeVerified: false` and
|
|
274
|
+
`remoteVerified: false`. Blocking direct calls outside the CLI and independent remote verification are not provided.
|
|
275
|
+
|
|
276
|
+
Orchestrator records an explicit approval it has already confirmed through `record` with
|
|
277
|
+
`evidence: {kind: "external-approval", messageRef, data: {operation, scope, descriptor}}`.
|
|
278
|
+
`scope` is an array of unique absolute paths within the checkout. Local commit approval does not authorize external operations.
|
|
279
|
+
Include the exact action, scope and target in the approval, and record every descriptor field below.
|
|
280
|
+
|
|
281
|
+
| operation | descriptor fields |
|
|
282
|
+
|---|---|
|
|
283
|
+
| push | repository, destination, refspec, sourceOid, expectedRemoteOid |
|
|
284
|
+
| merge | repository, changeRef, targetRef, expectedTargetOid |
|
|
285
|
+
| deploy | service, project, environment, artifactId, destination |
|
|
286
|
+
| publish | service, namespace, name, version, artifactHash, destination |
|
|
287
|
+
|
|
288
|
+
Git OIDs are full 40/64-character lowercase hex values; artifactHash is `sha256:<64-hex>`. Without a remote observation,
|
|
289
|
+
an OID is an expected value asserted by the user, not verified remote state. destination must be an identifier without secrets.
|
|
290
|
+
Do not submit URL userinfo, query or fragment components, or authentication information such as passwords, tokens or credentials.
|
|
291
|
+
The CLI rejects recognized credential inputs before persistence, but cannot determine whether every arbitrary string contains a secret.
|
|
292
|
+
|
|
293
|
+
Pass `{requestId, expectedRevision, actor: {id, role: "orchestrator"}, operation,
|
|
294
|
+
arguments: {approvalRef, scope, descriptor}}` to `prepare`. approvalRef matches the external approval messageRef.
|
|
295
|
+
An intent is persisted only when the exact approval, scope/target versions and runtime version match and no effect is unresolved.
|
|
296
|
+
After confirming `allow` and `persisted: true`, Orchestrator performs the external operation within its separately approved scope.
|
|
297
|
+
This CLI does not expand that execution authority.
|
|
298
|
+
|
|
299
|
+
`result`/`reconcile` accepts `{requestId, expectedRevision, actor, intentId,
|
|
300
|
+
result: {status, messageRef, data: {operation, scope, descriptor}}}`. intentId is the prepare requestId.
|
|
301
|
+
Target mismatches, unknown outcomes and stale results cause a hold while preserving earlier attestations. After an interruption,
|
|
302
|
+
use `status` to inspect the intent, `state.requests`, `state.audit` and `state.results`, and investigate whether the effect occurred.
|
|
303
|
+
Reconcile the investigation result against the same intent rather than preparing again or reusing the same approval to execute again.
|
|
304
|
+
Cancellation additionally requires a `notExecutedEvidence: {messageRef}` attestation that the operation was not executed.
|
|
305
|
+
The approval remains consumed after cancellation. Do not resolve version drift through automatic updates, migration or renewed permission.
|
|
306
|
+
Report the cause of the hold to Orchestrator.
|
|
307
|
+
|
|
308
|
+
Even succeeded results are operator attestations, not independent remote verification. `audit` retains the
|
|
309
|
+
request→decision→intent→result→resolution linkage, but is a locally editable record rather than tamper-proof security evidence.
|
|
310
|
+
Do not retry while the actual external outcome is uncertain.
|