@yunhozz/arc 0.1.4 → 0.1.5
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 +29 -29
- package/claude/agents/arc-coder.md +1 -1
- package/claude/agents/arc-qa.md +2 -2
- package/claude/skill/SKILL.md +8 -8
- package/claude/skill/references/commit.md +4 -8
- package/claude/skill/references/coordination.md +6 -6
- package/claude/skill/references/git-recovery.md +3 -2
- package/claude/skill/references/handoff-prep.md +4 -2
- package/claude/skill/references/handoff.md +6 -7
- package/claude/skill/references/limits.md +1 -1
- package/claude/skill/references/planning.md +19 -40
- package/claude/skill/references/verification.md +8 -28
- package/claude/skill/references/visual-companion.md +1 -1
- package/codex/agents/arc-coder.toml +1 -0
- package/codex/agents/arc-planner.toml +2 -0
- package/codex/agents/arc-qa.toml +2 -0
- package/codex/agents/arc-reviewer.toml +2 -0
- package/codex/agents/arc-scouter.toml +2 -0
- package/codex/skill/SKILL.md +10 -11
- package/codex/skill/references/commit.md +9 -21
- package/codex/skill/references/coordination.md +5 -7
- package/codex/skill/references/git-recovery.md +21 -18
- package/codex/skill/references/handoff-prep.md +14 -16
- package/codex/skill/references/handoff-worktree.md +10 -12
- package/codex/skill/references/handoff.md +27 -44
- package/codex/skill/references/limits.md +1 -1
- package/codex/skill/references/planning.md +34 -61
- package/codex/skill/references/verification.md +22 -50
- package/codex/skill/references/visual-companion.md +6 -8
- package/package.json +1 -1
package/codex/skill/SKILL.md
CHANGED
|
@@ -12,27 +12,25 @@ Orchestrator MUST NEVER author them and MUST NEVER invoke `brainstorming` or `wr
|
|
|
12
12
|
If either auto-triggers in Orchestrator context, Orchestrator stops and routes to Planner, citing that skill's SKILL.md
|
|
13
13
|
path in the brief. A user request to skip questions never waives design or approval gates; Planner returns questions to
|
|
14
14
|
Orchestrator. Each top-level task (a plan task, or the whole request without a plan) gets a FRESH Coder,
|
|
15
|
-
and each task that needs QA
|
|
15
|
+
and each task that needs QA under Risk-scaled execution gets a FRESH QA, never one reused from another task;
|
|
16
16
|
same-task rechecks may reuse.
|
|
17
17
|
|
|
18
18
|
Follow user instructions and project guidance. Orchestrator uses the current chat model and answers simple,
|
|
19
19
|
self-contained questions directly. For substantive multistep work, Orchestrator coordinates implementation, configuration, tests,
|
|
20
20
|
and mixed work.
|
|
21
21
|
Orchestrator handles research directly when the needed material is already in its context or the check is a quick read
|
|
22
|
-
of a few known
|
|
23
|
-
files; all other material research/analysis and bounded exploration (read-only, of static code, documents, data, and
|
|
22
|
+
of a few known files; all other material research/analysis and bounded exploration (read-only, of static code, documents, data, and
|
|
24
23
|
logs/reports) goes to Scouter with its configured settings (a bounded lookup gets a narrow brief: known paths,
|
|
25
24
|
specific facts, no synthesis). Route by object and deliverable, not verbs alone.
|
|
26
25
|
Standalone document writing has no specialist auto-route. Design, spec, plan, and brainstorming drafts are not
|
|
27
26
|
standalone document writing (see Role gate).
|
|
28
27
|
For mixed research/document requests, Orchestrator may explicitly assign only research to Scouter.
|
|
29
|
-
Live operational state
|
|
30
|
-
inspection and operational cleanup are outside Scouter scope and this boundary makes no owner assignment.
|
|
28
|
+
Live operational state inspection and operational cleanup are outside Scouter scope and this boundary makes no owner assignment.
|
|
31
29
|
|
|
32
30
|
## Shared terms
|
|
33
31
|
|
|
34
|
-
The handoff, git-recovery, and commit references and the Coder profile use
|
|
35
|
-
paths, and state checks still apply.
|
|
32
|
+
The coordination, handoff, handoff-prep, git-recovery, verification, and commit references and the Coder profile use
|
|
33
|
+
these terms; context-specific commands, paths, and state checks still apply.
|
|
36
34
|
|
|
37
35
|
- **Preservation rule**: preserve unrelated staged, unstaged, and untracked changes and edit ownership; never
|
|
38
36
|
automatically stash, reset, clean, unstage, discard, amend, or delete branches/worktrees; never change permissions,
|
|
@@ -44,12 +42,13 @@ paths, and state checks still apply.
|
|
|
44
42
|
automatically; revalidate affected gates after resolution.
|
|
45
43
|
- **Evidence verdict**: each criterion is proven, unmet, or unverified; passing runs, reports, or disposition never
|
|
46
44
|
turn unverified into proven; reports keep unverified scope visible.
|
|
45
|
+
- **Common handoff gate**: the full verification Orchestrator passes before every Coder first start/restart and
|
|
46
|
+
Orchestrator direct edit; see [handoff](references/handoff.md#common-handoff-gate).
|
|
47
47
|
|
|
48
48
|
## Mandatory task references
|
|
49
49
|
|
|
50
50
|
Orchestrator and each assigned role must read the applicable references before dependent decisions or actions,
|
|
51
|
-
and Orchestrator must
|
|
52
|
-
include in the role brief the accessible path and section name of each reference section the role must read.
|
|
51
|
+
and Orchestrator must include in the role brief the accessible path and section name of each reference section the role must read.
|
|
53
52
|
Resolve paths relative to this installed skill directory.
|
|
54
53
|
These contracts are conditional on the trigger, mandatory when triggered. Missing, inaccessible, or conflicting
|
|
55
54
|
references must be reported to Orchestrator; stop dependent work until resolved.
|
|
@@ -64,8 +63,8 @@ Do not load all references on every task.
|
|
|
64
63
|
| [handoff-prep](references/handoff-prep.md) | Execution-target choice request, each preparation Git mutation (branch creation/switch, staging, commit) |
|
|
65
64
|
| [handoff-worktree](references/handoff-worktree.md) | After explicit new managed worktree selection, before its creation, branch work or document transfer |
|
|
66
65
|
| [commit](references/commit.md) | Plan-task acceptance and its focused commit, resuming a task with an unclear commit result |
|
|
67
|
-
| [verification](references/verification.md) | Orchestrator's verification design, QA/Reviewer assignment, correction rechecks, UI acceptance checks, risk classification, acceptance and completion;
|
|
68
|
-
| [git-recovery](references/git-recovery.md) | Branch collision, Git preparation failure, partial completion, metadata write denial recovery |
|
|
66
|
+
| [verification](references/verification.md) | Orchestrator's verification design, QA/Reviewer assignment, correction rechecks, UI acceptance checks, risk classification, acceptance and completion; QA and Reviewer use their profiles and only brief-cited sections |
|
|
67
|
+
| [git-recovery](references/git-recovery.md) | Branch collision, Git preparation failure, partial completion, metadata write denial, handoff record write denial recovery |
|
|
69
68
|
| [visual-companion](references/visual-companion.md) | Visual companion offer or operation |
|
|
70
69
|
|
|
71
70
|
Before classifying a small-task, plan-omission, or TDD exception, read the full conditions in [handoff](references/handoff.md), including Coder TDD and constraints and Orchestrator direct path for small tasks; read [planning](references/planning.md) for design/plan-depth judgments and [verification](references/verification.md) for the full risk criteria before deciding eligibility. An exception name or this index alone never establishes eligibility.
|
|
@@ -6,9 +6,8 @@ a task whose commit result is unclear.
|
|
|
6
6
|
## Automatic commit after plan-task acceptance
|
|
7
7
|
|
|
8
8
|
One approved top-level task is the unit of one focused implementation commit. Orchestrator verifies the task's
|
|
9
|
-
acceptance
|
|
10
|
-
|
|
11
|
-
accepts the task by its own judgment, then immediately
|
|
9
|
+
acceptance criteria, currently required checks (Reviewer timing:
|
|
10
|
+
[Risk-scaled execution](verification.md#risk-scaled-execution)), and findings, accepts the task by its own judgment, then immediately
|
|
12
11
|
creates its focused local Git commit without additional user commit approval.
|
|
13
12
|
After Orchestrator accepts a task, the next action is the required Git state/scope checks, staging, and focused commit.
|
|
14
13
|
Do not commit before task acceptance or defer the task commit until the plan ends.
|
|
@@ -16,19 +15,17 @@ Only Orchestrator accepts the task and executes its focused commit; Coder comple
|
|
|
16
15
|
Substeps and checkboxes are progress records, not separate commit units. Checkbox completion, Coder reports, and
|
|
17
16
|
passing checks alone do not establish task acceptance: connect criteria's conditions and expected results to actual
|
|
18
17
|
evidence. Existing plan-skip paths have no new plan obligation; their commits follow applicable guidance and user
|
|
19
|
-
requests.
|
|
18
|
+
requests. Push, merge, publish, deploy, and install still follow their separate guidance and approval rules.
|
|
20
19
|
|
|
21
20
|
Before committing, Orchestrator verifies the approved plan version, task ID and accepted scope, actual absolute
|
|
22
|
-
workspace,
|
|
23
|
-
repository, branch or detached HEAD, HEAD, staged/unstaged/untracked state and edit ownership. Verify staged paths and
|
|
21
|
+
workspace, repository, branch or detached HEAD, HEAD, staged/unstaged/untracked state and edit ownership. Verify staged paths and
|
|
24
22
|
content match only that task, and verify the finalized commit message. If the same file contains other tasks or user
|
|
25
23
|
changes, prove safe separation before committing. Unrelated staged changes stop the commit under the Preservation
|
|
26
24
|
rule. After committing, verify SHA, actual message, included
|
|
27
25
|
paths and content, post-commit HEAD, actual branch and remaining staged/unstaged/untracked state. A successful command exit
|
|
28
26
|
alone does not establish completion. In the accessible canonical record link plan path/version, task ID, acceptance
|
|
29
27
|
evidence and Orchestrator judgment, required checks and findings, commit results and state, hold/no-change/reuse
|
|
30
|
-
reasons,
|
|
31
|
-
and remaining final plan verification.
|
|
28
|
+
reasons, and remaining final plan verification.
|
|
32
29
|
|
|
33
30
|
Hold the task commit for unmet or unresolved criteria, required checks that failed or were not run,
|
|
34
31
|
unresolved findings or evidence gaps without disposition, scope expansion or revised-plan needs, ownership or staged
|
|
@@ -40,8 +37,7 @@ Orchestrator follows git-recovery and reverifies affected evidence after resolvi
|
|
|
40
37
|
|
|
41
38
|
For a no-change task, make no empty commit; record acceptance evidence and no change. On resume, verify the same task's
|
|
42
39
|
existing commit SHA, content and validity, then reuse it; do not duplicate a successful task commit.
|
|
43
|
-
For a missing record,
|
|
44
|
-
inspect the actual result before any retry. Normal accepted task commits retain valid choice reuse under handoff, with
|
|
40
|
+
For a missing record, inspect the actual result before any retry. Normal accepted task commits retain valid choice reuse under handoff, with
|
|
45
41
|
fresh state and ownership checks. Task acceptance/commit is distinct from final plan acceptance; remaining final
|
|
46
42
|
QA/Reviewer/integration checks still apply with the timing in verification.
|
|
47
43
|
|
|
@@ -57,10 +53,9 @@ planning and approval obligations.
|
|
|
57
53
|
Local commit authority does not authorize early planning-document commits: pre-Coder document approvals,
|
|
58
54
|
explicit execution-target choice and batch preparation remain unchanged. Historical spec/plan records are not changed
|
|
59
55
|
retroactively. Structural checks of this contract do not prove actual agent runtime compliance.
|
|
60
|
-
Follow Conventional Commits with the message form
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Git trailer syntax.
|
|
56
|
+
Follow Conventional Commits with the message form `<type>(<scope>): <description>`. Use a concise, specific English
|
|
57
|
+
description without a trailing period, a lowercase scope when useful, one top-level task's logical change per commit,
|
|
58
|
+
and body/footer only when needed while preserving Git trailer syntax.
|
|
64
59
|
|
|
65
60
|
## Shared-checkout coordination
|
|
66
61
|
|
|
@@ -81,13 +76,6 @@ Approval scope and continuity are defined in [planning](planning.md#authorizatio
|
|
|
81
76
|
limits are defined in [verification](verification.md#completion-continuity). This plan-task commit contract adds no
|
|
82
77
|
commit obligation to no-plan work and does not turn a local commit into overall completion.
|
|
83
78
|
|
|
84
|
-
## Automatic commit after plan-task acceptance
|
|
85
|
-
|
|
86
|
-
Orchestrator accepts each approved top-level task by its own judgment and immediately creates one focused local commit
|
|
87
|
-
for that
|
|
88
|
-
task without additional user commit approval. Read [commit](commit.md) before the acceptance and commit.
|
|
89
|
-
Push, merge, publish, deploy, and install still follow their separate guidance and approval rules.
|
|
90
|
-
|
|
91
79
|
|
|
92
80
|
[ARC role policy: contract begin]
|
|
93
81
|
Generated from lib/policy/role-policy.json; do not edit this managed section manually.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Role assignment and coordination
|
|
2
2
|
|
|
3
3
|
Orchestrator reads this before the first specialist creation or assignment and related coordination decisions. Also read [limits](limits.md) and installed `../limits.toml` before first creation. Missing, inaccessible or conflicting references stop dependent work; report the exact paths.
|
|
4
4
|
|
|
@@ -39,8 +39,7 @@ Apply platform, user, and project instructions according to their precedence, th
|
|
|
39
39
|
permissions, models, concurrency, routing, and approvals, then the local ARC reference assigned to the role. A called skill
|
|
40
40
|
adds no agents or authority. Map executor requests such as `superpowers:executing-plans` and
|
|
41
41
|
`superpowers:subagent-driven-development` to Orchestrator's dependency-aware coordination and risk-scaled verification;
|
|
42
|
-
this replaces
|
|
43
|
-
executor mechanics and any separate execution-method choice, including prompts in an existing local reference.
|
|
42
|
+
this replaces executor mechanics and any separate execution-method choice, including prompts in an existing local reference.
|
|
44
43
|
Preserve plan approval, workspace, design, spec, and other applicable requirements, including TDD subject to the
|
|
45
44
|
explicit ARC exception in [handoff](handoff.md#coder-tdd-and-constraints). Adapt local `brainstorming` role, save, and early spec commit instructions to
|
|
46
45
|
ARC Planner ownership and evidence gates in planning/handoff; preserve upstream reference content. Report conflicts or
|
|
@@ -59,10 +58,9 @@ ARC approval, ownership, TDD exceptions and executor adapters still apply.
|
|
|
59
58
|
Orchestrator integrates role results, routes decisions and required approvals, and owns development acceptance
|
|
60
59
|
and completion. Orchestrator coordinates dependent implementation tasks sequentially and
|
|
61
60
|
starts a fresh Coder for each top-level task (Role gate); reuse the current Coder only for corrections, rework,
|
|
62
|
-
or rechecks of the same task while the
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
A fresh Coder for the next task is a restart under handoff (choice reuse and restart brief rules are there).
|
|
61
|
+
or rechecks of the same task while the approved scope, workspace, ownership, and relevant context remain valid; before
|
|
62
|
+
sending corrections or rework to a reused Coder, Orchestrator rechecks workspace, branch/HEAD and change state against the brief.
|
|
63
|
+
A fresh Coder for the next task is a restart under handoff (choice reuse and restart brief rules are in handoff).
|
|
66
64
|
After an approved plan or acceptance-criteria amendment, start a fresh Coder for
|
|
67
65
|
the remaining work even within the same task; it is also a restart under handoff. Task-boundary gates
|
|
68
66
|
follow [Risk-scaled execution](verification.md#risk-scaled-execution).
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
# Git recovery contract
|
|
2
2
|
|
|
3
|
-
Read on branch collision, Git preparation failure, partial completion, or
|
|
3
|
+
Read on branch collision, Git preparation failure, partial completion, metadata write denial, or handoff record write denial.
|
|
4
4
|
Use [handoff-prep.md](handoff-prep.md) for approved branch selection, [handoff-worktree.md](handoff-worktree.md) for the
|
|
5
5
|
managed worktree path, and [handoff.md](handoff.md) for the complete restart gate.
|
|
6
6
|
|
|
7
|
+
## Recovery cases
|
|
8
|
+
|
|
7
9
|
### Git metadata write denial
|
|
8
10
|
|
|
9
11
|
If authorized staging, committing, branch creation, or switching is denied while writing `.git/index.lock` or other
|
|
10
12
|
Git metadata, Orchestrator blocks handoff and safely inspects the exact command, workspace, error, failed path,
|
|
11
|
-
actual Git
|
|
12
|
-
directory, branch, HEAD, index state, and partial completion. Read-only inspection includes lock existence and any
|
|
13
|
+
actual Git directory, branch, HEAD, index state, and partial completion. Read-only inspection includes lock existence and any
|
|
13
14
|
observable related processes, sandbox restrictions, OS permissions/ACLs, and concurrent Git activity. Record supported
|
|
14
15
|
causes and remaining uncertainty; denial of lock creation alone does not prove a stale lock.
|
|
15
16
|
|
|
16
17
|
Apply the Preservation rule: do not delete lock files, use `chmod` or `chown`, bypass the sandbox, or move to another
|
|
17
|
-
workspace. If
|
|
18
|
-
evidence confirms sandbox denial of an already authorized operation, request through the permission system only (not
|
|
18
|
+
workspace. If evidence confirms sandbox denial of an already authorized operation, request through the permission system only (not
|
|
19
19
|
a sandbox bypass) the tool-supported minimum escalation for only the exact single Git command and workspace, never
|
|
20
|
-
broad Git access. Before retrying,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Choosing the final
|
|
25
|
-
message in advance prevents unnecessary amend but does not repair required Git write access; only successful
|
|
20
|
+
broad Git access. Before retrying, recheck branch, HEAD, index, and partial completion; do not repeat work already
|
|
21
|
+
completed. After success verify the commit or branch result and final state, then reevaluate the entire handoff gate.
|
|
22
|
+
Denied escalation or unresolved OS permission/ACL problems keep handoff blocked; report the reason and actual state to Orchestrator/user.
|
|
23
|
+
Choosing the final message in advance prevents unnecessary amend but does not repair required Git write access; only successful
|
|
26
24
|
authorized writes and verified results establish recovery.
|
|
27
25
|
|
|
26
|
+
### Handoff record write denial
|
|
27
|
+
|
|
28
|
+
If writing the canonical handoff record is denied or unavailable, stop that write, report the path and error to
|
|
29
|
+
Orchestrator, and do not change permissions or bypass the sandbox. Use the inline-record fallback in
|
|
30
|
+
[handoff.md](handoff.md).
|
|
31
|
+
|
|
28
32
|
### Existing changes and failures
|
|
29
33
|
|
|
30
34
|
A branch does not isolate uncommitted changes into a separate directory as a worktree does. Record how existing staged,
|
|
@@ -44,15 +48,14 @@ execution-target choice block handoff. Orchestrator resolves the problem and rec
|
|
|
44
48
|
### Worktree failures and partial completion
|
|
45
49
|
|
|
46
50
|
Worktree creation, registration, attachment, identity/base verification, checkout, document transfer, staging,
|
|
47
|
-
or commit failure means stop dependent work
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
completed actions.
|
|
51
|
+
or commit failure means stop dependent work and Coder handoff. Partial completion includes branch-only creation, partial
|
|
52
|
+
path creation, registration/actual-path mismatch, wrong base or branch, and partial document transfer. Record source and
|
|
53
|
+
target exact command, error, branch, HEAD, Git common directory, registration, index and files, including target dirty
|
|
54
|
+
state and source preservation. Before any authorized retry, inspect actual state and completed work under the Stop and
|
|
55
|
+
inspect rule; do not repeat completed actions.
|
|
53
56
|
Do not automatically fallback, retry another path/branch, delete paths, prune registrations with `git worktree prune`,
|
|
54
57
|
or use `--force` or `-B`; apply the Preservation rule.
|
|
55
|
-
Normal worktree preparation after explicit
|
|
58
|
+
Normal worktree preparation after explicit managed-worktree selection is permitted under handoff; moving to an arbitrary
|
|
56
59
|
workspace during recovery remains prohibited. Resolve preparation and revalidate the full gate; a new explicit choice
|
|
57
60
|
follows Choice lifetime and restart record in handoff.md. No automatic cleanup/archive is authorized.
|
|
58
61
|
|
|
@@ -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 Coder
|
|
5
|
+
The [Coder handoff gate](handoff.md#coder-handoff-gate), handoff evidence and choice lifetime are in [handoff.md](handoff.md).
|
|
6
6
|
|
|
7
7
|
## Workspace handoff
|
|
8
8
|
|
|
@@ -22,14 +22,12 @@ For every supported execution-target option, before obtaining the user's choice,
|
|
|
22
22
|
|
|
23
23
|
Obtain explicit choice under the Explicit choice rule before preparation.
|
|
24
24
|
When offering the new managed worktree option, Orchestrator first verifies and then presents its selection target
|
|
25
|
-
(source absolute
|
|
26
|
-
path, intended repository and Git common directory, source branch or detached HEAD, verified full source HEAD SHA,
|
|
25
|
+
(source absolute path, intended repository and Git common directory, source branch or detached HEAD, verified full source HEAD SHA,
|
|
27
26
|
approved branch candidate and collision status, descriptive name, planned document scope and any existing approved document transfer/commit scope). Verification
|
|
28
27
|
validates the approved branch candidate and collision status under New task branch naming rules and checks source state
|
|
29
28
|
(unrelated staged changes; existing approved document HEAD/index/working-tree state) before offering. The app chooses the actual
|
|
30
29
|
destination path: do not ask the user for a destination path or propose one, and do not fetch or substitute a remote
|
|
31
|
-
HEAD
|
|
32
|
-
or default branch for the base. Read [handoff-worktree.md](handoff-worktree.md) only after the user
|
|
30
|
+
HEAD or default branch for the base. Read [handoff-worktree.md](handoff-worktree.md) only after the user
|
|
33
31
|
explicitly selects that option and before its creation, branch work, or document transfer.
|
|
34
32
|
|
|
35
33
|
### Git mutation evidence gate
|
|
@@ -71,7 +69,9 @@ main purpose and a short, specific lowercase kebab-case topic with no spaces. Fo
|
|
|
71
69
|
| revert/ | Revert a prior change |
|
|
72
70
|
|
|
73
71
|
Validate the name and check for collisions before creation. If the base name exists, never automatically substitute a
|
|
74
|
-
suffix; present a new candidate for explicit approval. Never reuse, delete, or overwrite an existing branch
|
|
72
|
+
suffix; present a new candidate for explicit approval. Never reuse, delete, or overwrite an existing branch, except
|
|
73
|
+
that reuse of an approved existing branch on the managed worktree path follows the conditions in
|
|
74
|
+
[handoff-worktree.md](handoff-worktree.md) (Exception for this managed path).
|
|
75
75
|
Distinguish a lookup error from a missing branch.
|
|
76
76
|
Recheck the workspace, current branch or detached HEAD, base HEAD, and candidate before execution. If the approval
|
|
77
77
|
target changes, present the new target and obtain explicit user approval. If the candidate changes because of a new
|
|
@@ -89,9 +89,9 @@ creation.
|
|
|
89
89
|
### Current checkout
|
|
90
90
|
|
|
91
91
|
Only after the user explicitly selects the current checkout for this handoff, or valid reuse is verified,
|
|
92
|
-
confirm the absolute workspace,
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
confirm the absolute workspace, current branch or detached HEAD, HEAD, and existing changes with their preservation and
|
|
93
|
+
edit ownership. Record this state and the choice evidence in the brief. Missing choice, unconfirmed state, or unclear
|
|
94
|
+
ownership blocks handoff.
|
|
95
95
|
|
|
96
96
|
### Planning document commit
|
|
97
97
|
|
|
@@ -100,12 +100,11 @@ Verify complete approved document set, approval evidence and versions before sta
|
|
|
100
100
|
On the new task branch path, verify the successful switch, actual branch, unchanged checkout path, and preserved
|
|
101
101
|
changes first. On the current checkout path, verify the selected branch or detached HEAD, path, and existing changes.
|
|
102
102
|
On the new worktree path, verify the created app-managed worktree, current-chat attachment, identity/base, approved
|
|
103
|
-
branch and direct target documents (or protected
|
|
103
|
+
branch and direct target documents (or protected pre-existing/restart document transfer) before any target docs commit.
|
|
104
104
|
At the target, commit only remaining approved documents once; do not automatically make a source document commit.
|
|
105
105
|
Record the selected base SHA and post-commit HEAD.
|
|
106
106
|
Orchestrator verifies each approved spec/plan already committed for this task by SHA, actual message, included paths,
|
|
107
|
-
and
|
|
108
|
-
content matching the approved version and validity in the selected checkout; reuse valid commits without recommitting
|
|
107
|
+
and content matching the approved version and validity in the selected checkout; reuse valid commits without recommitting
|
|
109
108
|
them.
|
|
110
109
|
|
|
111
110
|
For approved documents still uncommitted, Orchestrator records the approved versions and paths, finalizes the specific
|
|
@@ -119,10 +118,9 @@ MUST NOT commit a generic temporary message and routinely repair it with `git co
|
|
|
119
118
|
|
|
120
119
|
If the docs commit fails or staged content differs, stop handoff and apply the Stop and inspect rule to the actual
|
|
121
120
|
branch, HEAD, index, and partial completion. Resolve the issue before resuming; do not commit implementation instead.
|
|
122
|
-
After success verify SHA, actual
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
or push approval; do not push without a separate explicit user request.
|
|
121
|
+
After success verify SHA, actual message, included paths/content, post-commit HEAD, final branch, and
|
|
122
|
+
staged/unstaged/untracked state in the brief. A successful command exit alone does not prove preparation complete. This
|
|
123
|
+
commit is not implementation acceptance or push approval; do not push without a separate explicit user request.
|
|
126
124
|
|
|
127
125
|
Skip this commit only when no planning documents were required and none were produced under the design/plan depth
|
|
128
126
|
rules; record that fact and the applicable depth rationale. Uncommitted documents cannot be treated as absent.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Managed worktree handoff contract
|
|
2
2
|
|
|
3
3
|
Orchestrator reads after the user explicitly selects the new managed worktree option, before its creation,
|
|
4
|
-
branch work or
|
|
5
|
-
document transfer. Apply [handoff-prep.md](handoff-prep.md) and [handoff.md](handoff.md) gates as well.
|
|
4
|
+
branch work or document transfer. Apply [handoff-prep.md](handoff-prep.md) and [handoff.md](handoff.md) gates as well.
|
|
6
5
|
|
|
7
6
|
## Workspace handoff
|
|
8
7
|
|
|
@@ -27,6 +26,7 @@ and verification, apply Choice lifetime and restart record in handoff.md.
|
|
|
27
26
|
Before calling mcp__codex_app__create_worktree, validate the approved branch candidate and collision state with
|
|
28
27
|
New task branch naming rules in handoff-prep.md. A collision requires a new explicit choice; never automatically
|
|
29
28
|
substitute a suffix.
|
|
29
|
+
Default is the prohibition on reusing an existing branch in handoff-prep.md; only this narrow exception applies.
|
|
30
30
|
Exception for this managed path: an existing approved branch at the same base and not checked out in any worktree
|
|
31
31
|
may be reused; verify both conditions before reuse. An unexpected branch, different base or lookup uncertainty means
|
|
32
32
|
stop.
|
|
@@ -47,19 +47,18 @@ For registration failure only, retry the returned workspace with mcp__codex_app_
|
|
|
47
47
|
managed registration, current-chat attachment and approved branch verification, perform no formal drafting, saving, document transfer, staging,
|
|
48
48
|
commit or Coder 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
|
-
or perform automatic
|
|
51
|
-
cleanup, delete, prune or archive. See git-recovery.md before dependent recovery.
|
|
50
|
+
or perform automatic cleanup, delete, prune or archive. See git-recovery.md before dependent recovery.
|
|
52
51
|
|
|
53
52
|
Verify the returned actual absolute worktree path and app-managed current-chat attachment using app artifacts.
|
|
54
53
|
Record initial branch or detached HEAD, approved branch candidate, final branch, and target HEAD equal to approved ref.
|
|
55
54
|
Verify linked-worktree registration and source/target Git common directory identity, registered path,
|
|
56
|
-
target dirty state,
|
|
57
|
-
and source branch, HEAD, index and files preservation; shared Git metadata additions for the approved target are
|
|
55
|
+
target dirty state, and source branch, HEAD, index and files preservation; shared Git metadata additions for the approved target are
|
|
58
56
|
authorized.
|
|
59
57
|
Linked worktree .git may be a file; do not require the same top-level path or a .git directory for repository identity.
|
|
60
58
|
Verify registration, attachment and base before creating/checking out the approved branch. If initially detached,
|
|
61
59
|
use `git switch -c <approved-branch> <ref>`; if the existing approved branch has the same base and is not checked out
|
|
62
|
-
in any worktree, use `git switch <approved-branch
|
|
60
|
+
in any worktree, use `git switch <approved-branch>` (the exception above to the default no-reuse rule in
|
|
61
|
+
handoff-prep.md). Do not move a branch pointer, choose another branch or use --force
|
|
63
62
|
or -B.
|
|
64
63
|
If the app initially returns the approved branch, verify it and its base rather than repeating completed work.
|
|
65
64
|
Unexpected branch or mismatched HEAD means stop. Verify final approved branch and HEAD before formal drafting, saving, document transfer,
|
|
@@ -77,16 +76,15 @@ For those existing approved documents, use Worktree document transfer before tar
|
|
|
77
76
|
|
|
78
77
|
### Worktree document transfer
|
|
79
78
|
|
|
80
|
-
Use only for existing approved documents in
|
|
79
|
+
Use only for existing approved documents in pre-existing-document or restart/target-change cases.
|
|
81
80
|
|
|
82
81
|
Verify existing approved commits by SHA, message, paths and approved content valid at base and target; reuse them.
|
|
83
82
|
Copy only uncommitted approved spec/plan documents to the target at the same repository-relative path.
|
|
84
83
|
Do not move, delete, or modify the source documents. If a destination resolves outside the worktree, including through
|
|
85
84
|
an escaping symlink, stop. Before transfer verify target HEAD equals the selected source base SHA.
|
|
86
|
-
Before replacing an existing destination,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
For unexpected changes, do not overwrite; stop.
|
|
85
|
+
Before replacing an existing destination, prove its clean base state with no staged/unstaged changes and index and
|
|
86
|
+
working-tree bytes matching the base version; then replace with the approved version. A document absent from base must
|
|
87
|
+
also be absent at the destination. For unexpected changes, do not overwrite; stop.
|
|
90
88
|
For identical content, verify approved bytes before reuse. After transfer verify bytes match the approved version.
|
|
91
89
|
The canonical record includes each document approval/version/evidence, source and target absolute paths and the common
|
|
92
90
|
relative path plus content verification. Changed content or approval scope requires approval of the revised version.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Handoff contract
|
|
2
2
|
|
|
3
3
|
Orchestrator reads before every Coder first start or restart preparation. Coder trusts the Orchestrator-verified facts
|
|
4
|
-
in the brief under
|
|
5
|
-
the Coder profile and reads this file only for sections the brief explicitly cites. First-start preparation
|
|
4
|
+
in the brief under the Coder profile and reads this file only for sections the brief explicitly cites. First-start preparation
|
|
6
5
|
(execution-target choice request, preparation Git mutations, planning-document commit) is in
|
|
7
6
|
[handoff-prep.md](handoff-prep.md); the new managed worktree path is in [handoff-worktree.md](handoff-worktree.md).
|
|
8
7
|
|
|
@@ -11,8 +10,7 @@ the Coder profile and reads this file only for sections the brief explicitly cit
|
|
|
11
10
|
### Checkout approval
|
|
12
11
|
|
|
13
12
|
Before every Coder first start and restart, Orchestrator confirms the supplied absolute workspace is accessible and
|
|
14
|
-
belongs
|
|
15
|
-
to the intended Git repository; record its actual absolute path, current branch or detached HEAD, HEAD, and staged,
|
|
13
|
+
belongs to the intended Git repository; record its actual absolute path, current branch or detached HEAD, HEAD, and staged,
|
|
16
14
|
unstaged, and untracked changes. Stop if the workspace is inaccessible, is not the intended repository, or HEAD
|
|
17
15
|
cannot be resolved. Do not initialize Git or switch to another repository automatically.
|
|
18
16
|
|
|
@@ -28,9 +26,8 @@ drafting or preparation and does not require document completion. Never fall bac
|
|
|
28
26
|
After initial design approval, obtain and record an explicit user choice for the first start under the
|
|
29
27
|
Explicit choice rule: use the current checkout, create a new task branch from the verified base HEAD in that same
|
|
30
28
|
checkout, or create a new managed worktree and task branch (selection target under handoff-prep.md; contract in
|
|
31
|
-
handoff-worktree.md after selection). Without an
|
|
32
|
-
|
|
33
|
-
restart Coder.
|
|
29
|
+
handoff-worktree.md after selection). Without an explicit execution-target choice or verified valid reuse under the
|
|
30
|
+
choice-lifetime rules below, wait and do not start or restart Coder.
|
|
34
31
|
|
|
35
32
|
### Coder handoff gate
|
|
36
33
|
|
|
@@ -51,13 +48,11 @@ Orchestrator may start or restart Coder only after all of these conditions are v
|
|
|
51
48
|
failure or partial completion.
|
|
52
49
|
7. The brief includes these preparation and final-verification facts and evidence.
|
|
53
50
|
|
|
54
|
-
Before
|
|
55
|
-
applicable approval,
|
|
56
|
-
and records them in the brief.
|
|
51
|
+
Before an Orchestrator direct edit, Orchestrator verifies the same conditions, with the approved scope record as the
|
|
52
|
+
applicable approval, and records them in the brief.
|
|
57
53
|
|
|
58
54
|
A missing or failed condition blocks handoff. Orchestrator may continue read-only investigation and authorized
|
|
59
|
-
preparation
|
|
60
|
-
or recovery, but cannot start Coder early. Reverify affected evidence when approved content, execution target, branch,
|
|
55
|
+
preparation or recovery, but cannot start Coder early. Reverify affected evidence when approved content, execution target, branch,
|
|
61
56
|
HEAD, or relevant state changes. Coder's conflict reporting is in its profile; Orchestrator
|
|
62
57
|
resolves preparation and passes the gate again before Coder resumes.
|
|
63
58
|
|
|
@@ -79,12 +74,10 @@ Record the Complete planning-document set fields from planning.md, confirming no
|
|
|
79
74
|
writing/approval.
|
|
80
75
|
Distinguish reused commits from the batch preparation commit, or record valid document absence.
|
|
81
76
|
Record applicable approvals and the initial explicit execution-target choice or verified reuse for each first start or
|
|
82
|
-
restart. Give all five
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
role stays in the supplied workspace, reports missing, inaccessible, or conflicting paths and unexpected branch state to
|
|
87
|
-
Orchestrator before dependent work, and does not create or switch workspaces or branches.
|
|
77
|
+
restart. Give all five roles (Coder, QA, Planner, Reviewer, Scouter) the same actual workspace and selected execution checkout or absolute
|
|
78
|
+
worktree path, preparation evidence, and absolute artifact paths. Each role stays in the supplied workspace, reports
|
|
79
|
+
missing, inaccessible, or conflicting paths and unexpected branch state to Orchestrator before dependent work, and does
|
|
80
|
+
not create or switch workspaces or branches.
|
|
88
81
|
|
|
89
82
|
### Task readiness at every assignment
|
|
90
83
|
|
|
@@ -107,8 +100,7 @@ Unexpected HEAD or ownership changes stop affected work for Orchestrator resolut
|
|
|
107
100
|
|
|
108
101
|
For the same approved scope, workspace, repository, and execution target, reuse the initial explicit choice only
|
|
109
102
|
when its evidence is accessible and still valid. On every first start and restart, Orchestrator rechecks actual Git
|
|
110
|
-
state
|
|
111
|
-
against the current brief: absolute workspace and repository identity, branch or detached HEAD, HEAD,
|
|
103
|
+
state against the current brief: absolute workspace and repository identity, branch or detached HEAD, HEAD,
|
|
112
104
|
staged/unstaged/untracked changes, preservation and edit ownership, applicable approvals and artifacts,
|
|
113
105
|
planning-document SHA/message/paths/content or valid no-document rationale, and Orchestrator's final state verification
|
|
114
106
|
(Coder handoff gate items 1-7); a reused choice never waives any gate. A restart without document changes reuses
|
|
@@ -119,14 +111,12 @@ verify that they match approved work, ownership, and the intended target. A work
|
|
|
119
111
|
evidence; target HEAD need not remain at that base; source preservation and unexpected-state checks still apply.
|
|
120
112
|
Link the approved plan version, task ID and commit SHA/content/validity with current Git state and edit ownership in
|
|
121
113
|
the restart brief under Orchestrator's full handoff gate. Verify/reuse successful task commits without duplication and
|
|
122
|
-
keep planning-document preparation
|
|
123
|
-
evidence distinct; task commits do not require repeating valid document preparation.
|
|
114
|
+
keep planning-document preparation evidence distinct; task commits do not require repeating valid document preparation.
|
|
124
115
|
|
|
125
116
|
If scope, workspace, repository, target, or approved branch candidate changes, obtain a fresh explicit choice before dependent drafting or preparation; reselection does not require document completion. If an invalidating failure means the old target cannot be trusted,
|
|
126
117
|
obtain a fresh explicit choice after Orchestrator resolves preparation. State mismatches and unresolved failures block
|
|
127
118
|
editing until Orchestrator resolves and revalidates the full gate; resolution does not automatically require a new
|
|
128
|
-
choice
|
|
129
|
-
unless it invalidates the old target. Do not fall back automatically; apply the Explicit choice rule.
|
|
119
|
+
choice unless it invalidates the old target. Do not fall back automatically; apply the Explicit choice rule.
|
|
130
120
|
|
|
131
121
|
Keep one canonical initial handoff record accessible to each assigned role, containing the approved scope/version,
|
|
132
122
|
repository/workspace identity, and the Handoff evidence fields above; do not create a separate storage service.
|
|
@@ -135,8 +125,7 @@ Markdown file at `<git-common-dir>/arc/handoff/<plan-or-task-slug>.md` (slug uni
|
|
|
135
125
|
stem, or a spec/task slug when no plan exists; never overwrite another plan's record; resolve with
|
|
136
126
|
`git rev-parse --path-format=absolute --git-common-dir`; outside the working tree and shared by linked worktrees; not a
|
|
137
127
|
Git mutation, never staged or committed; contains no secrets), gives its absolute path in every brief, and restart
|
|
138
|
-
briefs cite it. If
|
|
139
|
-
the write is denied or unavailable, each Coder brief states why and includes the full record inline, with no delta;
|
|
128
|
+
briefs cite it. If the write is denied or unavailable, each Coder brief states why and includes the full record inline, with no delta;
|
|
140
129
|
that inline record satisfies the accessible record requirement. Do not delete it automatically.
|
|
141
130
|
|
|
142
131
|
Restart brief: supply only verified deltas and mark unchanged fields; `unchanged` means unchanged relative to the record
|
|
@@ -166,8 +155,8 @@ Before any exception judgment, Orchestrator reads [Risk-scaled execution](verifi
|
|
|
166
155
|
|
|
167
156
|
## Common handoff gate
|
|
168
157
|
|
|
169
|
-
Before every Coder first start/restart, Orchestrator passes the full gate
|
|
170
|
-
|
|
158
|
+
Before every Coder first start/restart, Orchestrator passes the full gate:
|
|
159
|
+
applicable approvals/artifacts or valid omissions, explicit execution-target choice
|
|
171
160
|
or verified reuse, intended accessible repository/workspace, actual Git identity/state, preservation/ownership,
|
|
172
161
|
verified document commits or valid absence, and no unresolved failure/partial completion.
|
|
173
162
|
Missing evidence, mismatches, unclear ownership or unresolved preparation block handoff and require Orchestrator
|
|
@@ -175,7 +164,7 @@ resolution and full revalidation. Handoff owns the evidence fields, canonical ha
|
|
|
175
164
|
and reuse. Coder trusts the Orchestrator-verified brief and reports actual conflicts under its self-contained profile;
|
|
176
165
|
never replace its local guards with a requirement to load Orchestrator procedures.
|
|
177
166
|
Depth-2 roles use the supplied workspace and report path/state conflicts; they cannot create/switch workspaces or
|
|
178
|
-
branches. The same conditions apply before
|
|
167
|
+
branches. The same conditions apply before an Orchestrator direct edit.
|
|
179
168
|
For a selected worktree, handoff requires common directory, registration, app-managed current-chat attachment,
|
|
180
169
|
approved branch, and source preservation; prepare only through the selected managed-worktree contract.
|
|
181
170
|
|
|
@@ -200,12 +189,10 @@ generalize it to behavior work.
|
|
|
200
189
|
## Orchestrator direct path for small tasks
|
|
201
190
|
|
|
202
191
|
Orchestrator may make a task's edits directly, without Planner brainstorming or Coder, only when every small,
|
|
203
|
-
low-risk criterion
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
focused verification path), and no significant-risk trigger applies. Spike, architectural, ordinary-behavior,
|
|
208
|
-
significant/high-risk, unclear-risk work, and edits overlapping files assigned to a running Coder are not eligible.
|
|
192
|
+
low-risk criterion holds, every plan-skip criterion holds (one local change, no dependent stages, no cross-component shared state,
|
|
193
|
+
lifecycle, or integration-order concerns, and one focused verification path), and no significant-risk trigger applies.
|
|
194
|
+
Spike, architectural, ordinary-behavior, significant/high-risk, unclear-risk work, and edits overlapping files assigned
|
|
195
|
+
to a running Coder are not eligible.
|
|
209
196
|
|
|
210
197
|
Before editing, Orchestrator records a scope record (not a brainstorming design) with scope and files,
|
|
211
198
|
why every criterion holds, acceptance criteria, and focused verification. Apply authorization in
|
|
@@ -213,23 +200,19 @@ why every criterion holds, acceptance criteria, and focused verification. Apply
|
|
|
213
200
|
that scope; no duplicate approval is needed. Otherwise present the scope record to the user and obtain explicit
|
|
214
201
|
approval before editing. Silence, an ambiguous response, or approval of other work is not approval.
|
|
215
202
|
Orchestrator then passes the Coder handoff gate in handoff,
|
|
216
|
-
with the
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
the local style without unrelated refactoring or speculative additions, and does not install dependencies without
|
|
220
|
-
authorization.
|
|
203
|
+
with the approved scope record as the applicable approval, before the first edit. Orchestrator edits only the approved files,
|
|
204
|
+
preserves others' edits, makes surgical edits in the local style without unrelated refactoring or speculative additions,
|
|
205
|
+
and does not install dependencies without authorization.
|
|
221
206
|
|
|
222
207
|
Behavior edits follow Coder TDD and constraints; when TDD applies, Orchestrator follows local
|
|
223
208
|
`test-driven-development`.
|
|
224
209
|
After editing, Orchestrator records the changed files, runs the focused checks, connects each acceptance criterion to
|
|
225
|
-
evidence,
|
|
226
|
-
and preserves unverified scope. Orchestrator is not independent of its own edit; assign QA when the evidence is
|
|
210
|
+
evidence, and preserves unverified scope. Orchestrator is not independent of its own edit; assign QA when the evidence is
|
|
227
211
|
incomplete.
|
|
228
212
|
After a failed focused check or a QA finding, Orchestrator routes the correction to Coder and obtains a recheck.
|
|
229
213
|
|
|
230
214
|
If scope expands, risk becomes unclear, or a criterion stops holding, Orchestrator stops editing, records the changes
|
|
231
|
-
already
|
|
232
|
-
made, and reclassifies; further work follows the normal Planner/Coder flow with Coder owning subsequent edits. Do not
|
|
215
|
+
already made, and reclassifies; further work follows the normal Planner/Coder flow with Coder owning subsequent edits. Do not
|
|
233
216
|
automatically revert, reset, stash, or clean those changes. Like other plan-skip paths, there is no automatic task
|
|
234
217
|
commit; commits follow applicable guidance and user requests.
|
|
235
218
|
|
|
@@ -30,7 +30,7 @@ Serialize work when a batch does not fit. There are no reserved role slots.
|
|
|
30
30
|
|
|
31
31
|
Preserve the ledger through continuation, resume and context compaction; reconcile actual instance
|
|
32
32
|
IDs before dispatch. Ledger loss must never reset counters to zero. If reconstruction is incomplete,
|
|
33
|
-
hold creation and report the unknown budget; use a conservative bound only
|
|
33
|
+
hold creation and report the unknown budget; use a conservative upper bound only when the reconstructed records support it.
|
|
34
34
|
Completion frees confirmed active capacity; it does not restore the total-created budget. Exhaustion holds new
|
|
35
35
|
creation and requires reporting remaining work and budgets. It does not authorize skipping required
|
|
36
36
|
QA or Reviewer, role freshness, approval, ownership, dependency or same-file edit gates.
|