@yunhozz/arc 0.5.5 → 0.5.7
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 +83 -74
- package/claude/agents/arc-implementer.md +2 -2
- package/claude/agents/arc-planner.md +1 -1
- package/claude/agents/arc-reviewer.md +1 -1
- package/claude/agents/arc-scouter.md +1 -1
- package/claude/agents/arc-tester.md +1 -1
- package/claude/skill/SKILL.md +3 -3
- package/claude/skill/references/arc-visual-companion.md +2 -21
- package/claude/skill/references/commit.md +3 -30
- package/claude/skill/references/coordination.md +20 -126
- package/claude/skill/references/git-recovery.md +3 -3
- package/claude/skill/references/handoff-prep.md +9 -24
- package/claude/skill/references/handoff.md +19 -108
- package/claude/skill/references/limits.md +4 -15
- package/claude/skill/references/planning.md +56 -95
- package/claude/skill/references/verification.md +16 -118
- package/claude/skill/references/worktree-creation.md +1 -1
- package/codex/agents/arc-implementer.toml +3 -1
- package/codex/agents/arc-planner.toml +4 -0
- package/codex/agents/arc-reviewer.toml +6 -0
- package/codex/agents/arc-scouter.toml +6 -0
- package/codex/agents/arc-tester.toml +6 -0
- package/codex/skill/SKILL.md +3 -3
- package/codex/skill/references/arc-visual-companion.md +3 -27
- package/codex/skill/references/commit.md +3 -30
- package/codex/skill/references/coordination.md +19 -126
- package/codex/skill/references/git-recovery.md +2 -7
- package/codex/skill/references/handoff-prep.md +9 -24
- package/codex/skill/references/handoff.md +18 -107
- package/codex/skill/references/limits.md +5 -16
- package/codex/skill/references/planning.md +56 -95
- package/codex/skill/references/verification.md +15 -117
- package/gemini/agents/arc-implementer.md +1 -1
- package/gemini/skill/SKILL.md +3 -3
- package/gemini/skill/references/arc-visual-companion.md +2 -21
- package/gemini/skill/references/commit.md +3 -30
- package/gemini/skill/references/coordination.md +23 -129
- package/gemini/skill/references/git-recovery.md +3 -3
- package/gemini/skill/references/handoff-prep.md +9 -24
- package/gemini/skill/references/handoff.md +19 -108
- package/gemini/skill/references/limits.md +4 -15
- package/gemini/skill/references/planning.md +56 -95
- package/gemini/skill/references/verification.md +16 -118
- package/grok/agents/arc-implementer.md +1 -1
- package/grok/skill/SKILL.md +2 -2
- package/grok/skill/references/arc-visual-companion.md +2 -21
- package/grok/skill/references/commit.md +3 -30
- package/grok/skill/references/coordination.md +21 -127
- package/grok/skill/references/git-recovery.md +3 -3
- package/grok/skill/references/handoff-prep.md +9 -24
- package/grok/skill/references/handoff.md +19 -108
- package/grok/skill/references/limits.md +4 -15
- package/grok/skill/references/planning.md +56 -95
- package/grok/skill/references/verification.md +16 -118
- package/lib/policy/role-policy.json +1 -1
- package/lib/prompts/agent-fragments.json +20 -9
- package/lib/prompts/render.mjs +16 -5
- package/lib/runtime/adapters/codex.mjs +1 -1
- package/lib/runtime/assignment.mjs +3 -2
- package/lib/runtime/cooperative.mjs +36 -3
- package/lib/runtime/evaluate.mjs +21 -6
- package/lib/runtime/gate.mjs +2 -1
- package/lib/runtime/schema.mjs +16 -0
- package/lib/runtime/target-preparation.mjs +7 -2
- package/lib/runtime/verification.mjs +1 -1
- package/package.json +1 -1
- package/shared/skill/references/arc-visual-companion-common.md +39 -0
- package/shared/skill/references/commit-common.md +45 -0
- package/shared/skill/references/coordination-common.md +193 -0
- package/shared/skill/references/git-recovery-common.md +15 -0
- package/shared/skill/references/handoff-common.md +182 -0
- package/shared/skill/references/handoff-prep-common.md +53 -0
- package/shared/skill/references/limits-common.md +34 -0
- package/shared/skill/references/planning-common.md +185 -0
- package/shared/skill/references/verification-common.md +170 -0
- package/shared/skill/runtime/adapters/codex.mjs +1 -1
- package/shared/skill/runtime/assignment.mjs +3 -2
- package/shared/skill/runtime/cooperative.mjs +36 -3
- package/shared/skill/runtime/evaluate.mjs +21 -6
- package/shared/skill/runtime/gate.mjs +2 -1
- package/shared/skill/runtime/role-policy.json +1 -1
- package/shared/skill/runtime/schema.mjs +16 -0
- package/shared/skill/runtime/target-preparation.mjs +7 -2
- package/shared/skill/runtime/verification.mjs +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Preserve state after failure — shared text
|
|
2
|
+
|
|
3
|
+
This file holds text shared by every platform's git-recovery.md. Each part belongs to the section that links to it and has the same force there.
|
|
4
|
+
|
|
5
|
+
<a id="branch-collision-and-invalid-names"></a>
|
|
6
|
+
## Branch collisions and invalid names
|
|
7
|
+
|
|
8
|
+
Invalid names, creation/switch failures, lookup errors or unexpected branches require recorded errors/state and stopped handoff. Branch creation without switching is partial completion; report it without automatic deletion or success claims. No branch/checkout fallback. New collision suffixes need approval. Preserve staged/unstaged/untracked changes; blocked switching or unclear ownership waits for Orchestrator.
|
|
9
|
+
|
|
10
|
+
<a id="handoff-record-write-denial"></a>
|
|
11
|
+
## Handoff record write denial
|
|
12
|
+
|
|
13
|
+
In a worktree session, use the ARC runtime command `node <runtime>/cli.mjs handoff-record write --cwd <abs> --slug <slug> --input -` instead of a file tool. Set `<runtime>` to the installed ARC skill runtime directory and send a JSON object with a nonempty `content` string containing the full Markdown record on stdin. Use the existing inline fallback if the command fails.
|
|
14
|
+
|
|
15
|
+
Failed profile reapplication MUST restore replaced bytes/modes. If rollback fails, preserve recovery files/paths; NEVER claim clean state or remove recovery material.
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Implementer handoff — shared text
|
|
2
|
+
|
|
3
|
+
This file holds text shared by every platform's handoff.md. Each part belongs to the section that links to it and has the same force there.
|
|
4
|
+
|
|
5
|
+
<a id="instruction-sources-bounded-read-recovery-visual-evidence-and-resumption"></a>
|
|
6
|
+
## Instruction sources, bounded read recovery, visual evidence and resumption
|
|
7
|
+
|
|
8
|
+
Visual briefs include exact approved source/version/approval/access, criterion IDs/properties/method and actual-output identity/revision/basis. Implementer reports differ from fresh Tester comparison. Report pass/mismatch/unverified with evidence/limits; return new UI interpretations/substitutions.
|
|
9
|
+
|
|
10
|
+
Resume briefs preserve valid approval for unchanged scope, completed work, failures and their resolution, valid and invalid evidence, holds and the next objective. Record changed facts and revalidate gates without repeating completed work. Preserve role/Git/Tester/final Reviewer/acceptance/commit boundaries.
|
|
11
|
+
|
|
12
|
+
<a id="checkout-approval"></a>
|
|
13
|
+
### Checkout approval
|
|
14
|
+
|
|
15
|
+
Before every Implementer start or restart, verify access to the supplied absolute workspace and its intended repository. Record the actual path, branch or detached HEAD, HEAD, and staged, unstaged and untracked state. An inaccessible or wrong repository or unresolved HEAD stops work; DO NOT automatically initialize Git or switch repositories.
|
|
16
|
+
|
|
17
|
+
The first required spec/plan draft follows choice and verified source evidence and precedes actual preparation; saving follows verified preparation. Initial design MAY precede choice. Preparation alone authorizes no Implementer. All approvals/full documents/verified batch or valid absence/final Git checks remain. Separate planned scope/paths, actual preparation and drafting/save/approval/commit, recording chronology/gaps.
|
|
18
|
+
|
|
19
|
+
After initial design approval, or within the Architectural [start confirmation](planning.md#architectural-start-confirmation), record explicit selection: current checkout, new task branch from verified base there, or managed worktree/task branch. Without choice/valid reuse, wait. Reuse through unchanged-scope/target drafting/implementation. Authorized HEAD/dirty changes alone do not invalidate choice; verify preservation/ownership. Changed scope/target requires fresh choice before dependent drafting/preparation without waiting for full documents. NEVER fall back automatically.
|
|
20
|
+
|
|
21
|
+
<a id="implementer-handoff-gate"></a>
|
|
22
|
+
### Implementer handoff gate
|
|
23
|
+
|
|
24
|
+
Orchestrator verifies all before start/restart:
|
|
25
|
+
|
|
26
|
+
1. Applicable design/spec/plan approvals/artifacts or valid omissions; for Spike, approved question/method/scope/criteria/constraints. Verify full current document set/versions/dependencies/order and no unfinished applicable documents. Future implementation artifacts are outside probe approval.
|
|
27
|
+
2. Explicit initial choice or verified valid reuse.
|
|
28
|
+
3. Accessible intended absolute workspace/repository.
|
|
29
|
+
4. Actual branch/detached HEAD/HEAD/change state/preservation/ownership. Preserve unrelated staged files; they block until preparation is resolved.
|
|
30
|
+
5. Verified planning-document commits or required-none/produced-none with depth reasons.
|
|
31
|
+
6. Final path/branch/HEAD/state after mutations; no unresolved failure/partial completion.
|
|
32
|
+
7. Brief preparation/final-verification facts/evidence.
|
|
33
|
+
|
|
34
|
+
Before the first direct edit, use approved scope records and the same gates. Any failure/missing condition blocks handoff, not authorized read-only investigation/preparation/recovery. Revalidate changes to approved content/target/branch/HEAD/state. Implementer reports actual conflicts under its profile; Orchestrator resolves and repasses gates.
|
|
35
|
+
|
|
36
|
+
<a id="handoff-evidence"></a>
|
|
37
|
+
### Handoff evidence
|
|
38
|
+
|
|
39
|
+
Give all five roles the same actual workspace/selected checkout, preparation evidence and absolute artifacts. Roles stay there and report missing/inaccessible/conflicting paths/unexpected branches before dependent work, NEVER create/switch workspaces/branches. Tell Implementer others share the repository and unrelated work MUST be preserved.
|
|
40
|
+
|
|
41
|
+
<a id="task-readiness-at-every-assignment"></a>
|
|
42
|
+
## Task readiness at every assignment
|
|
43
|
+
|
|
44
|
+
Link current approved-plan readiness in canonical record/brief before every start/restart. Valid omission records judgment/reasons, not a new plan/map solely for linking. Absence alone permits no omission or bypass of required-plan approval.
|
|
45
|
+
|
|
46
|
+
Apply all [planning](planning.md#dependency-and-readiness-record) conditions: predecessor checks/Orchestrator acceptance/verified commit or accepted no-change. Reports alone are insufficient. Verify current records/capacity/ownership. Readiness supplements, never replaces handoff/target gates. Authorized HEAD/state changes refresh records/briefs/preservation/gates and [shared-checkout](commit.md#shared-checkout-coordination) readiness. Unexpected HEAD/ownership stops affected work for resolution.
|
|
47
|
+
|
|
48
|
+
<a id="choice-lifetime-and-restart-record"></a>
|
|
49
|
+
## Choice lifetime and restart record
|
|
50
|
+
|
|
51
|
+
Reuse only for unchanged approved scope/workspace/repository/target with accessible valid evidence. Every start/restart compares actual identity/branch/detached HEAD/HEAD/changes/preservation/ownership, approvals/artifacts, document SHA/message/paths/content or absence and final state with the brief. Reuse waives none of gates 1–7.
|
|
52
|
+
|
|
53
|
+
Unchanged-document restarts reuse valid commits/choice with fresh state checks. Accepted task/docs commits and authorized implementation/dirty changes alone invalidate no choice; record matching work/ownership/target. Authorized worktree transfers also preserve reuse. Creation base remains evidence, not a permanent target HEAD constraint; source-preservation/unexpected-state checks remain. Link plan version/task ID/commit content-validity/current Git/ownership in restart brief. NEVER duplicate successful commits or confuse task commits with document preparation; DO NOT repeat valid docs preparation.
|
|
54
|
+
|
|
55
|
+
Changed scope/workspace/repository/target/candidate needs fresh choice before dependent work. Failures invalidating target trust need new choice after resolution. Resolution alone needs none if choice remains valid. Mismatches/unresolved failures hold edits through full revalidation; NEVER fallback.
|
|
56
|
+
|
|
57
|
+
<a id="choice-lifetime-and-restart-record-2"></a>
|
|
58
|
+
## Choice lifetime and restart record
|
|
59
|
+
|
|
60
|
+
In a worktree session, use the ARC runtime command `node <runtime>/cli.mjs handoff-record write --cwd <abs> --slug <slug> --input -` instead of a file tool. Set `<runtime>` to the installed ARC skill runtime directory and send a JSON object with a nonempty `content` string containing the full Markdown record on stdin. Use the existing inline fallback if the command fails. This user-approved ARC runtime command respects `scope.non-escalation` by writing only to `<git-common-dir>/arc/handoff/<slug>.md` and leaving permissions and sandbox settings unchanged.
|
|
61
|
+
|
|
62
|
+
Unavailable/denied record writes require reason/full inline record in every Implementer brief, without deltas or record-file `unchanged`; inline satisfies accessibility.
|
|
63
|
+
|
|
64
|
+
Restart briefs send verified deltas and record-relative `unchanged`; fresh Implementer reads it and gets other fields fully. Include record location, next goal/ownership, changed decisions/approvals/docs/scope or no-change, current Git/differences, choice/reuse validation, refreshed commit/artifact checks, final verification/issues. Inaccessible records, missing evidence or unclear ownership block edits. Prior conversation/inaccessible links are no substitute. Revalidate revised docs/approvals/state; NEVER backdate pre-gate preparation.
|
|
65
|
+
|
|
66
|
+
<a id="authorization-continuity"></a>
|
|
67
|
+
## Authorization continuity
|
|
68
|
+
|
|
69
|
+
Use [planning](planning.md#authorization-and-scope), recording scope/criteria/constraints/valid omissions with target/preparation. Reuse valid unchanged approvals across role restarts without duplicates. Orchestrator still verifies actual workspace/Git/preservation/ownership/docs/preparation; Implementer trusts verified brief. Material scope/method/risk changes or invalid target evidence hold affected work; report missing condition/resume evidence. Before exceptions read full [risk](verification.md#risk-scaled-execution)/[depth](planning.md) conditions.
|
|
70
|
+
|
|
71
|
+
<a id="implementer-tdd-and-constraints"></a>
|
|
72
|
+
## Implementer TDD and constraints
|
|
73
|
+
|
|
74
|
+
Before feature/bug/behavior edits use local `test-driven-development` except explicit ARC exceptions. Full rules live in the profile. Waiver requires all low-risk and plan-skip/direct conditions, recorded scope/justification/criteria/checks before work. User/task-specific TDD overrides it; only qualifying tasks override local generic triggers without changing skills. Ordinary multistep/significant/high-risk work is ineligible.
|
|
75
|
+
|
|
76
|
+
<a id="orchestrator-direct-path-for-small-tasks"></a>
|
|
77
|
+
## Orchestrator direct path for small tasks
|
|
78
|
+
|
|
79
|
+
1. Record scope/files, every condition's justification, criteria/checks, not brainstorming. A specific existing request may authorize under [planning](planning.md#authorization-and-scope); otherwise obtain explicit approval. Silence/ambiguity/other approvals are insufficient.
|
|
80
|
+
2. Read this/[preparation](handoff-prep.md), pass full gate before edit and edit approved files surgically, preserving others. No unrelated refactoring/unapproved dependencies.
|
|
81
|
+
3. Follow Implementer TDD/recorded waivers; explicit TDD still requires local skill. Record files/checks/criterion evidence/gaps. Orchestrator is not independent; assign Tester for incomplete evidence.
|
|
82
|
+
4. Failed checks/Tester findings route to Implementer/recheck, never self-correction. Scope/risk/condition changes stop edits, record work/reclassify and return subsequent edits to normal Planner/Implementer flow.
|
|
83
|
+
|
|
84
|
+
Add no plans/automatic commits to omission paths; follow guidance/user requests.
|
|
85
|
+
|
|
86
|
+
<a id="handoff-fast-gate"></a>
|
|
87
|
+
### Fast gate
|
|
88
|
+
|
|
89
|
+
Security/permissions and public-interface changes are never eligible under the existing significant-risk exclusions. File count, LOC and apparent simplicity prove none of F2–F5. This gate does not replace the first direct edit gate, Implementer start/restart gate, target choice, TDD, independent Tester and Reviewer, acceptance or commit; existing triggers determine whether each gate applies. The fast path does not add untriggered role, Tester/Reviewer, acceptance or commit obligations. Preserve all existing platform restrictions.
|
|
90
|
+
|
|
91
|
+
<a id="handoff-instruction-fingerprint"></a>
|
|
92
|
+
### Instruction fingerprint
|
|
93
|
+
|
|
94
|
+
Record the actual applicable source-set: platform ARC SKILL, these initial reference sections, applicable workspace instructions, and triggered references/skills; record user/platform messages by message and approval reference, not invented file hashes. Record native role profile source/version when assigned; a new role receives actual instructions, profile, needed paths and criteria, not merely a hash. DO NOT assume disk profile changes updated an active role.
|
|
95
|
+
|
|
96
|
+
Distinguish user-provided instructions, workspace instructions, installed references and task inputs by source, applicability and access state: available, absent, inaccessible, conflicting or unverified. For every file record source kind, absolute and resolved path, read sections, available revision, SHA-256 of entire file bytes, access state, observation and read-context references. Neither HEAD nor installer manifest substitutes for actual installed-source hash. Use only already identified source paths; DO NOT search or guess. An uncertain source-set makes F8 `unverified`.
|
|
97
|
+
|
|
98
|
+
Reuse read content only for the same source-set, absolute source locators, resolved paths, hashes, scope and same conversation context with meaning still available. Different absolute locators cannot be reused even if they resolve to the same path. New context, inaccessible record or context loss requires rereading; changed source/hash requires rereading and reassessing affected judgments. Verify the current source-set/hash at a new fast judgment, first-edit or assignment/restart/resumption gate, before acceptance, and on known source changes; reuse observations within the same gate. If hashing fails, DO NOT reuse; follow existing read recovery and hold required inaccessible inputs. When Node is already available, batch identified absolute paths with built-in `node:fs` realpath/readFileSync and `node:crypto` SHA-256; install nothing and print no source content.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
For identified absolute sources only, when Node is already available, this read-only example prints paths and hashes, not contents:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
node --input-type=module -e '
|
|
105
|
+
import fs from "node:fs";
|
|
106
|
+
import crypto from "node:crypto";
|
|
107
|
+
const sources = process.argv.slice(1);
|
|
108
|
+
if (!sources.length) throw new Error("No instruction sources");
|
|
109
|
+
for (const source of sources) {
|
|
110
|
+
const resolvedPath = fs.realpathSync(source);
|
|
111
|
+
const contentHash = "sha256:" + crypto.createHash("sha256").update(fs.readFileSync(resolvedPath)).digest("hex");
|
|
112
|
+
process.stdout.write(JSON.stringify({source, resolvedPath, contentHash}) + "\n");
|
|
113
|
+
}
|
|
114
|
+
' -- '/absolute/identified/source-1' '/absolute/identified/source-2'
|
|
115
|
+
```
|
|
116
|
+
A new conversation or lost context requires reread; unchanged HEAD alone does not prove instruction, file or check evidence current.
|
|
117
|
+
|
|
118
|
+
<a id="handoff-task-envelope"></a>
|
|
119
|
+
### Task envelope
|
|
120
|
+
|
|
121
|
+
Place the compact envelope in the existing canonical handoff record or existing inline scope record, not a new file, store or API. Record task path and outcome; instructions; target; approval; scope and criteria; risk and depth; TDD; verification; refresh. Specifically include task ID/path, source fingerprint/read context, workspace/branch/HEAD/change state/preservation/ownership, scope approval and target choice, edit boundaries/criteria, F1–F8 evidence/risk/depth, TDD or recorded exception, criterion checks/Tester/Reviewer/acceptance, and observations/changes/revalidation/holds. Link accessible records; inaccessible references do not replace required content. Embed it in the existing eight specialist brief fields in their fixed order, without a ninth field or full history.
|
|
122
|
+
|
|
123
|
+
The nine fields are `task`, `instructions`, `target`, `authorization`, `scopeCriteria`, `riskDepth`, `tdd`, `verification`, and `refresh`; task records the task ID/path and selected path `fast-direct` or `full`, and verification includes criteria-specific checks and their evidence.
|
|
124
|
+
|
|
125
|
+
<a id="handoff-evidence-refresh"></a>
|
|
126
|
+
### Evidence refresh
|
|
127
|
+
|
|
128
|
+
Evaluate target choice validity separately from evidence validity. Approved HEAD or expected dirty changes do not invalidate target choice by themselves: record current state, preservation and ownership, and assess affected criteria/checks. Revalidate only affected evidence; a related file change after a check leaves that check unverified until repeated as needed. Changed instructions require reassessing linked fast/risk/TDD/authorization judgments. Preserve unaffected evidence and valid approvals. Unclear impact, missing or inaccessible evidence, ownership conflict, failure or partial/unknown state requires existing hold and recovery; workspace/target change or loss of trust follows target-choice rules. For a target change, obtain a new choice where required and state confirmation before dependent edit. Scope/criteria/method/risk changes follow existing approval and fresh-role rules. A failed direct check or Tester finding returns to existing Implementer/recheck ownership.
|
|
129
|
+
|
|
130
|
+
<a id="cooperative-cli-verification-handoff"></a>
|
|
131
|
+
## Cooperative CLI verification handoff
|
|
132
|
+
|
|
133
|
+
Supported plan-mode handoffs include registered task contract, exact check descriptor, task/final scope, `status.changeFingerprints`, independent actor attestations, intent ID/result messageRef/verdict. Authorized roles execute after `prepare` and record through `result`; CLI records prove no identity/compliance.
|
|
134
|
+
|
|
135
|
+
Include spec/plan paths in cooperative `task.paths` to commit task progress records and pending revisions; missing paths hold the commit until an approved scope revision, and the cooperative CLI does not support the standalone `docs(plan)` closing commit, so include pending revisions in task or follow-up commits. When `task.paths` includes the plan path, the cooperative CLI holds R-8 separation commits (staging progress records without revision hunks) at both preflight and result verification; while revisions are pending, prior-version tasks cannot be committed through the CLI. Plan-level progress records follow the same `task.paths` rule; when no task or follow-up commit follows, they stay only in the canonical record, and the cooperative CLI adds no support for them.
|
|
136
|
+
|
|
137
|
+
On scope/docs/approval changes inspect `affectedTaskIds`/dependencies, preserve history and supply current approval/contracts. NEVER reuse checks across fingerprints. Link findings to same-version Implementer resolution/Tester rechecks; only plan-final Reviewer findings use Implementer→Reviewer. No task-level Reviewer prerequisite. Detailed fields/holds follow [verification](verification.md#verification-lifecycle-in-the-cooperative-cli); unsupported omission is no policy violation/document obligation.
|
|
138
|
+
|
|
139
|
+
<a id="initial-implementer-assignment-through-the-cooperative-cli"></a>
|
|
140
|
+
## Initial Implementer assignment through the cooperative CLI
|
|
141
|
+
|
|
142
|
+
In approved plan mode all mutations pass stdin JSON through `node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`. Resolve `ARC_RUNTIME_ENTRY` as `<target-home>/skills/arc/runtime/cli.mjs` from the actual installer-selected loaded skill, including custom homes, never guessed home/package/checkout/cache entries. Use separate argv for path/checkout/workflow. Safely assign/double-quote shell variables; NEVER interpolate executable paths or `eval`. Query `status` without `--input`.
|
|
143
|
+
|
|
144
|
+
Entry installation/update migrates no common-directory state or approvals. Preserve runtime/hash/target/actor/revision gates; drift holds evidence for current recovery/approval. New workflows prove no historical compliance.
|
|
145
|
+
|
|
146
|
+
1. Verify the approved planning-document docs-only commit (Architectural spec/plan; Bounded plan), exact set/Git objects/current bytes. Only then run `init`, approval `record`, `prepare`, even if approval preceded commit.
|
|
147
|
+
2. At final HEAD `init` with `mode: "plan"`, `actor: {id: "operator"}`, `selection: {messageRef, contentHash}`.
|
|
148
|
+
3. Record confirmed approval as `{requestId, expectedRevision, actor, evidence: {kind: "approval", messageRef, data: {approvalVersion, documentVersion, documents}}}`. `documents` is exactly the prepared document set (spec/plan for Architectural, plan for Bounded) with `{kind, path, gitPath, contentHash, approvalRef, commit}`; `contentHash`=`sha256:<hex>`, `approvalRef` matches approval `messageRef`. HEAD drift needs fresh observation/renewed approval, not reconnection to old intent.
|
|
149
|
+
4. `prepare` with `{requestId, expectedRevision, actor, operation: "assign-agent", taskId, arguments: {role: "implementer", paths, operations: ["edit"], documents, approvalRef, approvalVersion, documentVersion, correlation}}`. Absolute `paths` remain in checkout. Confirm `allow`, `persisted: true` and saved intent.
|
|
150
|
+
5. Assign the Implementer with saved task/scope/correlation. Without `Mixed routing`, invoke native assignment. With `Mixed routing`, after step 4 run `prepare-dispatch` with `role: "arc_implementer"`, the same `taskId` and `allowedPaths` set to the worktree-relative form of saved `paths`, then follow the native or bridge route in [coordination](coordination.md#composite-platform-role-dispatch); the brief carries saved task/scope/correlation.
|
|
151
|
+
6. Record `{requestId, expectedRevision, actor, intentId, result: {status, messageRef, data: {correlation, taskId, agentId}}}`. `intentId` is prepare requestId. Distinguish `succeeded`, `failed`, `unknown`, `mismatch`. Success needs the returned agent ID; on a bridge route it is the `dispatchId`, recorded after `run-dispatch` returns `allow`. A `prepare-dispatch` hold/deny is `failed` after `cancel` of any still-reserved lease. A `run-dispatch` hold/deny or error is `unknown`, because the bridge child may already have started; `cancel` any still-reserved lease and investigate before another assignment. unknown/mismatch holds duplicate assignment for investigation.
|
|
152
|
+
|
|
153
|
+
Approval/assignment are `operator-attested`, not native identity/event authentication. CLI blocks no outside direct call; new workflow legitimizes no historical omission. Preserve trusted-adapter provenance.
|
|
154
|
+
|
|
155
|
+
<a id="external-operations-and-recovery-in-the-cooperative-cli"></a>
|
|
156
|
+
## External operations and recovery in the cooperative CLI
|
|
157
|
+
|
|
158
|
+
Three phases cover state/documents/assignment; scope/verification/acceptance/focused commits; external approval/results/audit recovery. Inspect nine areas/limits with `status.support`. Support is `plan` mode with the Architectural spec+plan or Bounded plan-only set, not no-plan/omission. CLI executes no native/provider/push/merge/deploy/publish calls.
|
|
159
|
+
|
|
160
|
+
Operator-confirmed approvals/results are `operator-attested`, `nativeVerified: false`, `remoteVerified: false`; no outside-call blocking or independent remote verification.
|
|
161
|
+
|
|
162
|
+
Record already confirmed external approval using `evidence: {kind: "external-approval", messageRef, data: {operation, scope, descriptor}}`. `scope` is unique absolute checkout paths. Local commit approval grants no external approval. Record exact action/scope/target and all descriptor fields:
|
|
163
|
+
|
|
164
|
+
| operation | descriptor fields |
|
|
165
|
+
|---|---|
|
|
166
|
+
| push | repository, destination, refspec, sourceOid, expectedRemoteOid |
|
|
167
|
+
| merge | repository, changeRef, targetRef, expectedTargetOid |
|
|
168
|
+
| deploy | service, project, environment, artifactId, destination |
|
|
169
|
+
| publish | service, namespace, name, version, artifactHash, destination |
|
|
170
|
+
|
|
171
|
+
Git OIDs are full lowercase 40/64-character hex; artifactHash is `sha256:<64-hex>`. Without remote observation OIDs are asserted expectations, not verified state. Destination is secret-free. No URL userinfo/query/fragment/password/token/credentials. Recognized secrets are rejected before persistence, but arbitrary-string secrecy cannot be guaranteed.
|
|
172
|
+
|
|
173
|
+
`prepare` accepts `{requestId, expectedRevision, actor: {id, role: "orchestrator"}, operation, arguments: {approvalRef, scope, descriptor}}`; approvalRef matches external approval messageRef. Persist only exact approval/scope/target/runtime versions with no unresolved effects. After `allow`/`persisted: true`, Orchestrator executes separately approved scope; CLI expands no authority.
|
|
174
|
+
|
|
175
|
+
`result`/`reconcile` accept `{requestId, expectedRevision, actor, intentId, result: {status, messageRef, data: {operation, scope, descriptor}}}`, with prepare requestId as intentId. Mismatch/unknown/stale outcomes hold while preserving attestations. After interruption inspect intent/`state.requests`/`state.audit`/`state.results` through `status` and investigate actual effects. Reconcile that same intent, not fresh preparation or replayed approvals.
|
|
176
|
+
|
|
177
|
+
Cancellation also requires `notExecutedEvidence: {messageRef}`; approval remains consumed. No automatic update/migration/renewed permission to fix drift. Report holds. Succeeded results remain attestations, not remote proof. `audit` links request→decision→intent→result→resolution but is locally editable, not tamper-proof. NEVER retry uncertain external outcomes.
|
|
178
|
+
|
|
179
|
+
<a id="composite-bridge-results-and-briefs"></a>
|
|
180
|
+
## Composite bridge results and briefs
|
|
181
|
+
|
|
182
|
+
For a bridge dispatch the result is the child's final message, saved at the `resultPath` returned by `run-dispatch` and `observe`; read it from there and treat it as `operator-attested` text, not as acceptance. The brief sent to `run-dispatch` or `resume` keeps the fixed brief order from [coordination](coordination.md#token-discipline-and-handoffs) and is delivered on stdin only: NEVER put it in argv, environment variables or a positional prompt, and keep it at most 256 KiB. For audit ARC also stores the brief in `<gitCommonDir>/arc/workflows/<workflowId>/dispatches/<dispatchId>/brief.md` (mode 0600); the child still receives it on stdin only. DO NOT include secrets or raw CLI output.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Handoff preparation contract — shared text
|
|
2
|
+
|
|
3
|
+
This file holds text shared by every platform's handoff-prep.md. Each part belongs to the section that links to it and has the same force there.
|
|
4
|
+
|
|
5
|
+
<a id="execution-target-request-gate"></a>
|
|
6
|
+
### Execution-target request gate
|
|
7
|
+
|
|
8
|
+
Obtain explicit choice before preparation.
|
|
9
|
+
|
|
10
|
+
<a id="git-mutation-evidence-gate"></a>
|
|
11
|
+
### Git mutation evidence gate
|
|
12
|
+
|
|
13
|
+
Before branch/worktree preparation, obtain the complete first required draft and self-review and pass the focused source/intent/preservation check. Before every preparation mutation (branch creation/switch, worktree creation, approved-doc staging/commit), read this and record/recheck:
|
|
14
|
+
|
|
15
|
+
1. Explicit choice or verified valid reuse.
|
|
16
|
+
2. Absolute workspace/intended repository, actual branch or detached HEAD and HEAD.
|
|
17
|
+
3. Staged/unstaged/untracked state, preservation and ownership.
|
|
18
|
+
4. Exact command/paths/approved scope; no unresolved failure or partial completion.
|
|
19
|
+
|
|
20
|
+
Missing or mismatched evidence blocks mutation. Initial preparation verifies planned scope/inputs without requiring complete approved documents. Document staging/commit also verifies the full set, applicable approvals (Architectural combined spec+plan approval; Bounded plan approval)/versions/dependencies and actual index. Read-only Git remains allowed. External skills' early commits grant no authority.
|
|
21
|
+
|
|
22
|
+
After branch/commit operations verify path/branch/HEAD/preservation/result before dependent action. After staging verify index paths/diff and finalized message. Unrelated staged paths block changes. Revalidate affected evidence after a change or failure; NEVER retroactively authorize pre-gate actions.
|
|
23
|
+
|
|
24
|
+
<a id="current-checkout"></a>
|
|
25
|
+
### Current checkout
|
|
26
|
+
|
|
27
|
+
After explicit selection or valid reuse, verify absolute workspace, branch/detached HEAD, HEAD and existing changes/preservation/ownership. Record state/choice. Missing choice, uncertain state or unclear ownership blocks handoff.
|
|
28
|
+
|
|
29
|
+
<a id="planning-document-commit"></a>
|
|
30
|
+
### Planning document commit
|
|
31
|
+
|
|
32
|
+
Skip only when depth rules required no documents and none were created; record why. Uncommitted documents are not absent. This adds neither documents nor gate exceptions. Unchanged authorized target/scope needs no repeated choice. NEVER automatically commit or delete other changes to prepare a target; approved planning-document commits are the sole exception, and unrelated dirty files stay preserved.
|
|
33
|
+
|
|
34
|
+
<a id="execution-time-plan-revision"></a>
|
|
35
|
+
### Execution-time plan revision
|
|
36
|
+
|
|
37
|
+
After initial document batching, follow [planning](planning.md#plan-updates-during-execution) for spec/plan revisions and same-task progress records. Orchestrator alone manages pending revisions and Git; preserve unrelated work and actual approval chronology.
|
|
38
|
+
|
|
39
|
+
1. Classify progress records versus contract/mechanical plan revisions. Verify applicable approvals under [planning](planning.md#plan-updates-during-execution) (combined spec+plan revision approval, plan approval, or spec approval with recorded no-plan-impact), actual approval time, preparation and holds; contract revisions require a fresh Implementer for remaining work. NEVER authorize past work retroactively.
|
|
40
|
+
2. After approval edit the same document, append its revision-history row and leave it uncommitted. Record each pending revision with its approved content hash and approval in the canonical `.git/arc/handoff/<workflow>/` record: `gitPath`, `fromVersion`, `toVersion`, `contentHash` (approved content SHA-256), `approvalRef`, `approvedAt` (actual time), `classification` (`contract|mechanical`), `reason`, `affectedTaskIds`, `status` (`pending|committed`). Preserve each full approved version at `.git/arc/handoff/<workflow>/plan-revisions/<flattened-gitPath>.v<N>.md`; NEVER overwrite prior approvals or copies.
|
|
41
|
+
3. In every role brief identify the Orchestrator-owned pending revision, working-tree version and `contentHash`. If another task's progress records were committed after approval, also include in the brief the SHA-256 of the working-tree document content, which is the approved content plus those progress records. Implementer and Tester preserve it untouched as neither their own work nor unrelated user changes.
|
|
42
|
+
4. Include all pending revisions in the accepted commit of the first top-level task executed or reconfirmed against the revised version, otherwise a current task or final Reviewer follow-up commit. Only before overall completion, a standalone `docs(plan)` closing commit MAY include all pending revisions/trailers and no implementation files when no implementation work remains; keep canonical supporting evidence. Exclude pending revision hunks from independent prior-version task commits; hold the commit if separation is unsafe. Add `Plan-Revision: <gitPath> v<from> -> v<to>`, `Plan-Approved-At: <gitPath> v<N> <actual ISO 8601 approval time>` and `Plan-Reason: <gitPath> v<N> <reason>`: one revision trailer per document, approval/reason trailers per version after from through to; repeat keys as needed and preserve existing Git trailers. Use ASCII `->`. Plan-level progress records follow [commit](commit.md#execution-time-plan-document-updates) and alone never justify the closing commit.
|
|
43
|
+
5. After commit verify the SHA-256 of each committed document's content (not the Git blob OID) equals the latest approved `contentHash` if no progress records have been committed since approval. Otherwise compare against the latest approved copy and allow only classified progress records of this commit's task or committed for other tasks after approval (including R-8 separation) and plan-level progress records carried by this commit. Record the SHA-256 of the expected content used for this comparison in the canonical record; NEVER overwrite approved copies. Mark recorded revisions `committed` and verify no pending revisions remain under [verification](verification.md#evidence-after-plan-revision-commit). Link commit SHA only in the canonical record, never the document. NEVER amend/reset/replay/rewrite planning or implementation commits or create other docs/fixup commits.
|
|
44
|
+
|
|
45
|
+
<a id="recovery-prerequisite"></a>
|
|
46
|
+
### Recovery prerequisite
|
|
47
|
+
|
|
48
|
+
Read [git-recovery](git-recovery.md) before dependent collision/failure/partial-completion/metadata-denial recovery. Stop/preservation rules are mandatory.
|
|
49
|
+
|
|
50
|
+
<a id="instruction-and-input-provenance"></a>
|
|
51
|
+
## Instruction and input provenance
|
|
52
|
+
|
|
53
|
+
Distinguish instruction/input sources, versions/approvals and access. Missing root AGENTS.md alone implies no missing user instructions. Optional reads follow only [handoff](handoff.md#instruction-sources-bounded-read-recovery-visual-evidence-and-resumption)'s pre-authorization. This exception never covers Git/generation/preparation failure or partial changes. Verify resolution evidence/gates before resume.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Subagent limits — shared text
|
|
2
|
+
|
|
3
|
+
This file holds text shared by every platform's limits.md. Each part belongs to the section that links to it and has the same force there.
|
|
4
|
+
|
|
5
|
+
<a id="subagent-limits"></a>
|
|
6
|
+
# Subagent limits
|
|
7
|
+
|
|
8
|
+
Before the first creation, Orchestrator reads this reference and the adjacent `../limits.toml` (installed at `skills/arc/limits.toml`). Require `version = 1` and positive safe-integer `max_total_subagents`/`max_concurrent_subagents`. Installation defaults are `100`/`5`. Missing, malformed or unreadable policy blocks creation. Report it without assuming defaults. Freeze settings for one ARC session/tree; reinstalling affects new sessions.
|
|
9
|
+
|
|
10
|
+
<a id="counting-and-reservations"></a>
|
|
11
|
+
## Counting and reservations
|
|
12
|
+
|
|
13
|
+
- Track instance IDs, parent IDs, pending reservations, creation outcomes and active/completed state in the session ledger. Exclude Orchestrator, but count every created descendant, including nested/non-ARC agents.
|
|
14
|
+
- Completion never refunds cumulative creation. A follow-up or resume using the same instance adds nothing; fresh instances, new-instance retries and replacements increment the total.
|
|
15
|
+
- Waiting, blocked, running and resumable idle instances consume concurrency until completion or termination is confirmed. Obey lower actual runtime capacity, including native retention of completed instances. ARC counts do not prove free native slots.
|
|
16
|
+
|
|
17
|
+
Reserve the full proposed parallel batch before dispatch, satisfying both:
|
|
18
|
+
|
|
19
|
+
1. `created + pending reservations + proposed <= max_total_subagents`
|
|
20
|
+
2. `active + pending reservations + proposed <= max_concurrent_subagents`, within actual available runtime capacity.
|
|
21
|
+
|
|
22
|
+
Reserve before each call. Confirmed creation becomes a created/active ID. Release only when failure proves no instance was created. Uncertain results retain capacity until reconciled; NEVER retry blindly. Serialize batches that do not fit. No role has reserved slots.
|
|
23
|
+
|
|
24
|
+
<a id="continuation-and-exhaustion"></a>
|
|
25
|
+
## Continuation and exhaustion
|
|
26
|
+
|
|
27
|
+
Preserve the ledger across continuation, resume and compaction, and reconcile actual IDs before dispatch. NEVER reset lost counters to zero. Incomplete reconstruction holds creation and reports unknown budget; use a conservative upper bound only when records support it.
|
|
28
|
+
|
|
29
|
+
Confirmed completion or termination frees active capacity. Exhaustion holds creation and reports remaining work/budget; it never waives Tester/Reviewer, role freshness, approval, ownership, dependency or same-file edit gates.
|
|
30
|
+
|
|
31
|
+
<a id="continuation-and-exhaustion-2"></a>
|
|
32
|
+
## Continuation and exhaustion
|
|
33
|
+
|
|
34
|
+
Composite platform routes observe these limits and each platform's actual capacity. ARC enforces the bridge limits at `prepare-dispatch`: active bridge dispatches (`reserved`, `starting`, `running`, `unknown`) MUST NOT exceed `max_concurrent_subagents` of the installed `limits.toml`, and the bridge dispatches created per workflow MUST NOT exceed `max_total_subagents`. `resume` rechecks only `max_concurrent_subagents`; it does not increase the cumulative count. Every bridge dispatch also counts as a created instance in the Orchestrator ledger; the native plus bridge total is kept in that ledger (prompt policy). A dispatch in `unknown` keeps its slot until the operator confirms termination; its slot is never released automatically. Role timeouts are fixed: `arc_implementer` 60 minutes, `arc_tester` 60 minutes, others 20 minutes; `limits.toml` format is unchanged. Terminal leases (`completed`, `failed`, `cancelled`) older than 30 days are pruned automatically; non-terminal leases are never pruned.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Planning and approval — shared text
|
|
2
|
+
|
|
3
|
+
This file holds text shared by every platform's planning.md. Each part belongs to the section that links to it and has the same force there.
|
|
4
|
+
|
|
5
|
+
<a id="authorization-and-scope"></a>
|
|
6
|
+
## Authorization and scope
|
|
7
|
+
|
|
8
|
+
Use the [fast gate and envelope](handoff.md#orchestrator-direct-path-for-small-tasks) alongside these existing scope and approval rules; reuse valid approvals and hold changed scope under these rules.
|
|
9
|
+
|
|
10
|
+
An explicit execution request authorizes only sufficiently specified scope from that request or a description the user explicitly references. Confirm intent/outcome/constraints/document depth/verification risk and no unresolved material behavior/method/risk decision. Record approval evidence, scope, criteria, constraints and depth. Orchestrator MAY choose routine execution/check details, not unapproved product behavior/material scope. Restating/handoff/restart of unchanged scope needs no new approval.
|
|
11
|
+
|
|
12
|
+
Silence, ambiguous assent, other-work approval and vague blanket improvements are insufficient. Planner's new material choices are not automatically approved. Request missing decisions through Orchestrator. Required specs/plans retain separate ordered approval.
|
|
13
|
+
|
|
14
|
+
Hold affected work for material changes to scope, method or risk, and report the missing decision, evidence and remaining scope. Target change, unclear ownership, unexpected state, unresolved failure or missing inputs also hold under [handoff](handoff.md)/[recovery](git-recovery.md). Distinguish new authorization from existing-scope execution issues; routine correction/reverification needs no duplicate approval. Revalidate after resolution.
|
|
15
|
+
|
|
16
|
+
<a id="probe-scope"></a>
|
|
17
|
+
### Probe scope
|
|
18
|
+
|
|
19
|
+
Probe-only work ends with approved-question findings/evidence/limits/uncertainty, including well-supported infeasibility. It authorizes neither product retention nor subsequent implementation. Record question/method/scope/criteria/constraints; a specific request may approve them. Match checks to purpose/risk, not product-proof claims.
|
|
20
|
+
|
|
21
|
+
If explicitly requested probe+implementation is fully specified, classify the whole scope. Under Bounded conditions, probing is internal with no new report-time approval boundary. Unknown implementation is not blanket authorization. Materially changed scope/method/risk or new decisions hold implementation for reassessment and required design/spec/plan approvals. Probe-only remains separate.
|
|
22
|
+
|
|
23
|
+
<a id="formal-drafting-boundary"></a>
|
|
24
|
+
## Formal drafting boundary
|
|
25
|
+
|
|
26
|
+
Initial design/brainstorming MAY precede target choice. On the Architectural path, [start confirmation](planning.md#architectural-start-confirmation) supplies the approved scope/depth/document set and the explicit choice that the next sentence requires. Before the first required spec/plan draft, record verified source workspace/repository, branch/HEAD, changes/ownership, explicit choice, approved scope/depth/document set and planned relative paths. Planner returns the complete first draft and self-review in chat before target preparation. Revalidate source and selected target at the focused preparation gate, prepare the chosen target, compare actual target and preservation, then review and save in the verified prepared target. Planned paths prove no preparation. Missing or mismatched evidence holds affected work; preparation alone never starts Implementer.
|
|
27
|
+
|
|
28
|
+
Small-task direct edits follow only [handoff](handoff.md#orchestrator-direct-path-for-small-tasks), stopping/reclassifying changed scope/risk. Otherwise follow this reference. `brainstorming`/`writing-plans` instruct existing roles, not extra agents; ARC routing/approval overrides alternate executors. Missing required skills block their stage. Integration includes saving, reviewing and directly revising the same spec or plan after the complete Planner first draft; design/brainstorming retain their Planner drafting path.
|
|
29
|
+
|
|
30
|
+
For Korean requests and briefs, Planner uses Korean titles and prose unless another language is requested, preserving identifiers, skill/API names, code, paths, commands and literals. Orchestrator preserves agreed language when saving.
|
|
31
|
+
|
|
32
|
+
<a id="planner-drafting-preparation-and-consolidated-feedback"></a>
|
|
33
|
+
## Planner drafting preparation and consolidated feedback
|
|
34
|
+
|
|
35
|
+
Planner reports initial/revision progress only to Orchestrator: brief stage/feedback/blocker/next step, never body/excerpts/incremental drafts. Return complete draft/self-review. Raw responses may appear in app/tool surfaces; prompt policy cannot hide them. User updates stay brief/status-based without draft content. At approval present integrated/saved/reviewed Markdown without repeating its body in chat.
|
|
36
|
+
|
|
37
|
+
Before Planner dispatch, evaluate F1–F8 direct-path eligibility and Bounded plan-omission eligibility independently. Enter each path only when all of that path's existing conditions are proven; if neither path qualifies, use normal full evaluation. Orchestrator can read a few already identified files directly; route material research and broad static exploration to Scouter.
|
|
38
|
+
|
|
39
|
+
1. Preflight relevant policy/references/profiles/tests/parity/manifest/conflicts. Apply formal-target and coordination provenance/input/local-skill gates, including required paths, approved bounded read alternatives and return conditions. Missing inputs/conflicts hold drafting. Read recovery grants no preparation/check/write/approval authority.
|
|
40
|
+
2. Maintain a compact ledger of original requirements/IDs, approved/open decisions, exclusions and scope deltas. Consolidate intervening user changes into one brief delta. Separate approvals, path/line-verified facts, assumptions and open decisions.
|
|
41
|
+
3. NEVER reuse a Planner instance across stages, except the Architectural continuation below. Within the design/brainstorming stage, reuse one Planner instance for every [design conversation](planning.md#design-conversation) response, the final design, its consolidated correction and any eligible further call while role, context and source remain valid; within a spec or plan stage, reuse that stage's Planner only for a budget-hold delta. On the Architectural path, the design Planner returns the start summary instead of a final design and, after [start confirmation](planning.md#architectural-start-confirmation), continues as the spec Planner through a spec-stage delta brief while role, context and source remain valid. Every plan stage, and an Architectural spec stage without that continuation, uses a fresh Planner; its initial brief contains every required field plus saved document paths and approved versions (for the Architectural plan stage, the reviewed spec path, version and SHA-256), and cites a prior brief only when that brief is an accessible file. Send one complete stage-specific initial brief. Include verified source/HEAD/ownership, selected target intent and planned paths (or prepared target for later stages), and scope/exclusions/depth/dependencies/shared contracts/criteria/checks/evidence/holds. Include preceding approved versions and paths, current behavior and connected source/generated/runtime/installer/docs, policy conflicts/resolution direction and exact deliverable. Visual work includes approved sources/versions/criteria/open interpretations. Follow-up briefs send changed fields and cite an accessible prior brief for unchanged fields; inaccessible conversations or hashes alone cannot replace required inputs. Reuse evidence only for the same source set, absolute locator, resolved path, content fingerprint, purpose, approval scope and accessible context. When source, target or scope changed, reconfirm affected inputs.
|
|
42
|
+
4. Planner returns the complete proportional first draft and self-review. Bounded plan density follows the Planner profile's ARC adaptation (per task ID/title, goal/scope/files, predecessors, criteria and required checks; short self-review checklist), while Architectural plans keep full writing-plans.md density. Briefs carry the Read/Grep exploration budget and MAY set a handback size limit. A return that stops at the exploration budget with a Scouter request is an input hold, not a missing or failed first draft; resend the stage brief as a delta with the Scouter evidence to the same stage Planner. In the design stage, [design conversation](planning.md#design-conversation) responses are expected returns and use no correction opportunity. Orchestrator saves and reviews it against the fixed checklist: scope/evidence; targets/ownership/paths; policy/conflicts; task boundaries/dependencies/criteria; checks/evidence/holds; roles/approval/commit boundaries; completeness; inventory/scope notation (final design, Architectural start summary and Architectural spec: complete [decision inventory](planning.md#decision-inventory); every document: every file or contract marked change or no change (reason), no ambiguous scope wording). For spec or plan, Orchestrator directly revises the same document, including substantive omissions, before requesting approval. New product decisions outside approved scope require user input first; Orchestrator then revises the document. Missing or failed first drafts stop the stage and do not transfer initial authorship.
|
|
43
|
+
5. For design and brainstorming, finish the checklist on the final design before one consolidated correction covering every substantive omission with criterion/defect/evidence/expected fix. Use deltas/`unchanged`; NEVER split by omission. Further calls after correction need approved material scope/evidence changes or concrete unmet checklist items plus meaningful new input/criterion progress. State changed input/target criterion/expected artifact/progress. Existing-scope omissions need no renewed scope approval. Repeated unmet criteria without new input/evidence/progress hold the stage; report criterion/observation/exact unblock decision. DO NOT repeat resolved questions or count rewording/agent replacement as progress.
|
|
44
|
+
|
|
45
|
+
For design and brainstorming, converse under [design conversation](planning.md#design-conversation) and allow one consolidated correction on the final design. On the Architectural path the conversation ends with the start summary instead of a final design; the summary receives no consolidated correction, and Orchestrator's review and direct revision apply to the spec draft. Orchestrator handles reformatting, re-expression, save and patch errors without Planner calls. Separate substantive work uses normal gates. Design, spec and plan stages remain separately ordered: Architectural plan drafting starts only after the spec is saved, reviewed and revised and its reviewed path, version and SHA-256 are fixed; NEVER draft spec and plan concurrently. Add no fixed call cap/profile count condition or incomplete-draft acceptance.
|
|
46
|
+
|
|
47
|
+
<a id="architectural-start-confirmation"></a>
|
|
48
|
+
### Architectural start confirmation
|
|
49
|
+
|
|
50
|
+
1. Scope: on the Architectural path there is no design document and no design approval. Bounded keeps its design approval; Spike, the direct path (F1–F8) and non-behavior paths are unchanged.
|
|
51
|
+
2. Start summary: when the [design conversation](planning.md#design-conversation) ends, the design Planner returns a short start summary instead of a final design: scope to change, user decisions, author judgments, already-answered items, open checks, path/depth/risk judgment, document set with planned relative paths, and every file or contract marked change or no change (reason). It carries the [decision inventory](planning.md#decision-inventory).
|
|
52
|
+
3. Confirmation: Orchestrator checks the summary's decision inventory and scope notation, presents it and, in one confirmation, obtains the user's scope confirmation and explicit target choice under [handoff](handoff.md). The summary is neither saved nor committed. The confirmed summary supplies the approved scope/depth/document set and explicit choice required by the [formal drafting boundary](planning.md#formal-drafting-boundary).
|
|
53
|
+
4. Continuation: Orchestrator sends the same Planner a spec-stage delta brief with verified source/branch/HEAD/ownership, the target choice, confirmed scope/depth, document set, planned paths and exploration budget; that Planner returns the complete first spec draft and self-review. If that Planner is unavailable or its role, context or source is no longer valid, assign a fresh spec Planner with a complete initial brief.
|
|
54
|
+
5. Records: the spec records the conversation's user decisions and author judgments; later author judgments join the same list. A genuinely new decision during spec or plan drafting goes to the user; Orchestrator records the answer in the spec, rechecks spec↔plan consistency and redrafts affected documents. No design approval is requested.
|
|
55
|
+
6. Full Auto: under [Full Auto](planning.md#full-auto-run-mode), scope confirmation within the original request MAY be auto-decided; target choice follows the Execution-target choice row; [approval.run-mode] limits apply unchanged.
|
|
56
|
+
|
|
57
|
+
<a id="design-path-and-plan-depth"></a>
|
|
58
|
+
## Design path and plan depth
|
|
59
|
+
|
|
60
|
+
Record depth separately from risk. Risk controls checks/review, not design paths/plan approval. Bounded/omission is not low risk; Architectural adds no Tester/Reviewer at every stage. Apply risk rules and specific obligations.
|
|
61
|
+
|
|
62
|
+
1. Before feature/design/behavior work, assign brief/evidence/local `brainstorming` to Planner. Planner proposes context/path/options/tradeoffs/criteria/assumptions/questions; Orchestrator selects path, integrates, announces scope, routes revisions and obtains approval. NEVER run drafting skills itself. Direct path uses scope record only.
|
|
63
|
+
2. Spike distinguishes probe-only from specific combined scope. Bounded approves short design before Implementer; direct edits use approved scope record. Architectural replaces design approval with one [start confirmation](planning.md#architectural-start-confirmation), then complete Planner spec/self-review and Orchestrator save/review/revision without a separate spec approval request; a fresh plan Planner then drafts from the reviewed spec, and the spec and every plan receive one [combined approval](planning.md#architectural-combined-approval). Planner is read-only and requests no approval.
|
|
64
|
+
3. Assess plan depth after design approval (Architectural: start confirmation) and before Implementer, separately from files/LOC/Bounded label. Architectural always uses `writing-plans` and the combined spec+plan approval regardless of size/locality/risk. Bounded skips only for one local change, no dependent stages/cross-component shared state/lifecycle/integration-order concerns and one verification path. Otherwise require a plan. Labels/no-plan requests do not bypass judgment.
|
|
65
|
+
4. Record dependencies/depth reasons; also post the design path, depth and risk judgments in the SKILL.md Pre-action gate record. Planner returns complete plan/assumptions/open decisions/checks/self-review. Orchestrator saves/reviews/obtains approval before Implementer at user path or `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`. Default spec path is `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`.
|
|
66
|
+
5. Every Implementer first start/restart needs applicable approvals/artifacts/brief/findings and full handoff. Non-behavior docs/config omit only inapplicable stages. Direct edits need approved scope record and same first-edit gates.
|
|
67
|
+
|
|
68
|
+
Bounded has no spec stage, spec approval or spec-necessity record. If Bounded work appears to need a spec-level document, DO NOT write one inside Bounded: reassess the design path as Architectural, inform the user and obtain the path-change approval required by existing rules before dependent drafting. Required plans alone imply no written spec.
|
|
69
|
+
|
|
70
|
+
Only Planner authors the first complete spec or plan draft and self-review. Orchestrator reviews and directly revises the same document before approval. Unavailable/failed Planner stops first drafting rather than transferring authorship. Design approval or start confirmation does not transfer initial authorship.
|
|
71
|
+
|
|
72
|
+
<a id="architectural-combined-approval"></a>
|
|
73
|
+
## Architectural combined approval
|
|
74
|
+
|
|
75
|
+
For initial fast judgment apply the [fast gate](handoff.md#orchestrator-direct-path-for-small-tasks); its sufficient conditions do not change these depth decisions.
|
|
76
|
+
|
|
77
|
+
<a id="top-level-plan-tasks"></a>
|
|
78
|
+
## Top-level plan tasks
|
|
79
|
+
|
|
80
|
+
Apply Planner rules: ID/title, goal/scope/files, predecessors/dependencies, criteria, required pre-acceptance Tester/checks/evidence and holds. Tasks MUST be independently implementable/verifiable/acceptable. Inseparable policy/profile/tests/manifest contracts start in one task. If inseparability appears later, stop for revised scope/planning/approvals; NEVER merge distinct approved tasks during execution.
|
|
81
|
+
|
|
82
|
+
<a id="top-level-plan-tasks-2"></a>
|
|
83
|
+
## Top-level plan tasks
|
|
84
|
+
|
|
85
|
+
Include the provisional trigger judgment with the substitute-check list and reasons in the plan's final verification section.
|
|
86
|
+
|
|
87
|
+
<a id="dependency-and-readiness-record"></a>
|
|
88
|
+
## Dependency and readiness record
|
|
89
|
+
|
|
90
|
+
After approval and before first assignment, canonically link every task ID to plan version. Record explicit/implicit predecessors, inputs/outputs/shared contracts, files/conflicting resources, check/Tester paths, ready/held/reasons, initial ready batch and capacity/serialization reasons. Analyze shared APIs/contracts/generated artifacts/resources even across files. Unsettled contracts/incomplete dependencies block affected tasks; same-file concurrent Implementers are forbidden even on different lines. File separation/list order proves no independence.
|
|
91
|
+
|
|
92
|
+
Ready requires approvals/preparation, settled inputs/contracts, predecessor checks/Orchestrator acceptance/verified commits or accepted no-change, nonconflicting ownership/resources, available checks/Tester and slots under both full-tree ARC and lower actual runtime limits. Read [limits](limits.md); report runtime constraints without claiming capability. Start ready independent tasks concurrently with fresh Implementers within capacity. Record holds/serialization rather than silently following order. Preserve risk/Tester/Reviewer/target gates.
|
|
93
|
+
|
|
94
|
+
Update on reports/checks/acceptance/commit/slot return/conflicts. Completion alone releases no dependent. Immediately reassess newly ready tasks without waiting for unrelated batches. Failed/uncertain predecessors hold only their chains. Refresh handoff each dispatch; shared Git follows commit rules. This map cannot rewrite approved boundaries or waive approval.
|
|
95
|
+
|
|
96
|
+
Example: with A → B → C, independent D and two slots, start A/D. After A's checks/acceptance/verified commit, B may start while D continues. A failure holds B/C, not unaffected D.
|
|
97
|
+
|
|
98
|
+
<a id="document-save-evidence-gates"></a>
|
|
99
|
+
## Document-save evidence gates
|
|
100
|
+
|
|
101
|
+
Before the first Architectural spec save or any plan save, read this and record accessible brief/canonical evidence. Saving creates reviewable files, not approval/commits.
|
|
102
|
+
|
|
103
|
+
| Save | Required evidence |
|
|
104
|
+
|---|---|
|
|
105
|
+
| Spec | Confirmed start scope/evidence ([start confirmation](planning.md#architectural-start-confirmation)), complete Planner draft/self-review, Orchestrator integration/save/review ownership and absolute path. Architectural only |
|
|
106
|
+
| Plan | Bounded: approved design; Architectural: confirmed start scope and the reviewed spec path/version/SHA-256 and review evidence; depth judgment, plan list/dependencies, complete Planner draft/self-review, ownership and absolute path |
|
|
107
|
+
|
|
108
|
+
Saving for review requires no prior document approval, but does require valid target choice/actual preparation. The reviewed Architectural spec enters the document set before dependent planning; approval follows once for the full set. NEVER call uncommitted files committed. Missing or mismatched evidence stops the affected save.
|
|
109
|
+
|
|
110
|
+
<a id="complete-planning-document-set"></a>
|
|
111
|
+
## Complete planning-document set
|
|
112
|
+
|
|
113
|
+
Include all current-scope required specs/plans, excluding future projects. Record scope/depth/absolute paths/coverage/versions/status/dependencies/order/omissions/reasons/pending drafting and approvals. Complete means every required document written and approved (Architectural: one combined spec+plan approval; Bounded: plan approval) and no unresolved decision requiring another document. Omit no required artifact.
|
|
114
|
+
|
|
115
|
+
A required plan implies no spec. Spec stages cover Architectural only; plan stages cover required plans only. Add no spec duty to Spike/plan-skip/non-behavior paths.
|
|
116
|
+
|
|
117
|
+
Order: initial design approval → explicit target and source snapshot → first required draft/self-review → focused preparation gate → actual preparation/comparison → save/review/revision → Architectural: dependent plan drafting/save/review/revision → spec↔plan consistency check → one combined approval; Bounded: plan approval → full set → verify existing commits/batch remaining approvals → final Git → Implementer. On the Architectural path, [start confirmation](planning.md#architectural-start-confirmation) takes the place of initial design approval in this order and carries the explicit target choice. Omission skips only inapplicable documents with rationale. Complete documents precede staging/commit/handoff, not initial preparation/choice request. Partial approvals authorize no early implementation.
|
|
118
|
+
|
|
119
|
+
Defer local `brainstorming`'s early spec commit: save/self-review/review the uncommitted spec, draft/save/review all plans, obtain the combined approval, then final batch. Modify no external skill. `writing-plans` implementation commits grant neither planning-document commits nor early Implementer.
|
|
120
|
+
|
|
121
|
+
| Path | Approval/preparation |
|
|
122
|
+
|---|---|
|
|
123
|
+
| Spike | Approve question/method/scope/criteria/constraints; no forced unknown-implementation docs. Implementer probes require handoff; read-only Orchestrator/Planner probes without Implementer do not trigger it |
|
|
124
|
+
| Bounded, plan skipped | Approve short design; record omission conditions. Complete approvals, target choice, actual docs or valid absence, then handoff |
|
|
125
|
+
| Bounded, plan required | Approve design and all required plans; no spec. Draft the first required plan before target preparation; complete set before batch/handoff |
|
|
126
|
+
| Architectural | Start confirmation → reviewed written spec → all `writing-plans` plans → one combined spec+plan approval. First spec draft before target preparation; full set before batch/final checks/handoff |
|
|
127
|
+
| Non-behavior docs/config | Record scope/criteria/inapplicability. Preserve target/Git/docs-or-absence/handoff |
|
|
128
|
+
|
|
129
|
+
New planning scope requires list/depth/dependency reassessment and approvals before dependent drafting/commit. Approved-body changes need revised approval except task progress records below. New implementation scope holds execution until docs/approvals/preparation complete. Running Implementer stops before newly dependent edits; inspect actual changes/Git without retrospective preparation claims. Reflect approved versions through pending revisions below. Unchanged-document restarts follow handoff lifetime.
|
|
130
|
+
|
|
131
|
+
<a id="plan-updates-during-execution"></a>
|
|
132
|
+
## Plan updates during execution
|
|
133
|
+
|
|
134
|
+
Task progress records (checkboxes, notes, results, evidence and completion status) preserving the approved contract need no new approval; record classification/reason/actual time. Plan-level progress records (final verification results, final Reviewer round verdicts and finding dispositions with user-decision references, and overall completion status) follow [commit](commit.md#execution-time-plan-document-updates): they ride the plan's next task acceptance or final Reviewer follow-up commit, or a standalone closing commit made for pending revisions; otherwise they stay only in the canonical record. After task completion Orchestrator includes that task's own records with its accepted implementation work in the same focused commit, excluding other tasks. DO NOT amend the original planning commit or create a separate docs/fixup commit for those records. Accepted no-change tasks follow the no-change path without empty commits. Removing checks, invented success, unsupported acceptance or mixed scope changes are not progress records.
|
|
135
|
+
|
|
136
|
+
Changes to goals, task boundaries, scope, criteria, method, risk, dependencies or checks require revised approval before affected work. Hold, obtain the applicable design approval (Bounded; Architectural records the new decision in the revised spec) and document approvals below and prepare target/ownership/checks/handoff. Other body corrections follow version approval; classify typos/paths/commands/explanations by semantic effect. Every non-progress content change, including a mechanical correction, is a plan revision requiring applicable approval/preparation. A contract revision requires a fresh Implementer for remaining work.
|
|
137
|
+
|
|
138
|
+
Execution-time document revisions take this approval: a spec change with affected plans needs one combined revision approval for the spec and those plans; a plan-only change needs plan approval; a spec-only change needs spec approval after Orchestrator records why no plan is affected. Partial approvals never carry over.
|
|
139
|
+
|
|
140
|
+
After approval Orchestrator edits the same file, appends a revision-history row and leaves the revision uncommitted. Apply cumulative revisions to that file and append another row. At document end use `Version | Approval time | Classification | Affected tasks | Reason`; keep rows append-only, with no SHA. Add v1 at the first revision using the actual initial approval time. Preserve actual approval chronology, not retroactive authorization; later committed content proves no earlier approval.
|
|
141
|
+
|
|
142
|
+
Keep all approved spec/plan revisions pending for the accepted commit of the first top-level task executed or reconfirmed against the revised version. Otherwise include them in a current task acceptance or final Reviewer follow-up commit. Only when no implementation work remains before overall completion MAY Orchestrator make one standalone `docs(plan)` closing commit: record that evidence canonically, include all pending revisions/trailers and no implementation files. No separate docs/fixup commit is allowed outside this sole closing exception. Plan-level progress records alone never trigger it. Overall completion requires no pending revisions. Exclude revision hunks from independent tasks accepted on a prior version; hold that commit if safe separation is impossible.
|
|
143
|
+
|
|
144
|
+
NEVER amend planning or implementation commits, reset, replay or rewrite their history. Preserve canonical pending revisions, approved content copies, versions/hashes, approval references/actual times, classification/reason, affected tasks and hold/preparation/resume evidence under [preparation](handoff-prep.md#execution-time-plan-revision). NEVER overwrite old approvals/content. Follow [commit](commit.md#execution-time-plan-document-updates) and [verification](verification.md#evidence-after-plan-revision-commit). Add no Git automation/runtime enforcement/authority/check exemptions.
|
|
145
|
+
|
|
146
|
+
<a id="evidence-refresh-and-limits"></a>
|
|
147
|
+
## Evidence refresh and limits
|
|
148
|
+
|
|
149
|
+
Missing/mismatched evidence, unfinished approvals, unclear ownership or unresolved failures block affected save/choice request/Git mutation/handoff. Resolve/reverify before resume and on changed scope/version/path/target/Git state. Preserve unrelated changes; read-only investigation remains allowed.
|
|
150
|
+
|
|
151
|
+
<a id="local-planning-references"></a>
|
|
152
|
+
## Local planning references
|
|
153
|
+
|
|
154
|
+
Brief absolute installed `references/brainstorming.md`/`references/writing-plans.md`. Planner reads directly, resolving relatives from installed `references/`. Missing paths stop the stage without global fallback. Preserve ARC approval/ownership.
|
|
155
|
+
|
|
156
|
+
<a id="instruction-and-input-provenance"></a>
|
|
157
|
+
## Instruction and input provenance
|
|
158
|
+
|
|
159
|
+
Supply exact skill/reference paths/access state. Separate user instructions/discovered files, approved versions/open questions. Visual criteria link approved source/version/access/IDs/method. Missing inputs/unapproved interpretation hold dependent drafting. Optional alternatives follow [handoff](handoff.md#instruction-sources-bounded-read-recovery-visual-evidence-and-resumption). Planner stays draft-only in recovery.
|
|
160
|
+
|
|
161
|
+
<a id="managed-worktree-preparation"></a>
|
|
162
|
+
### Managed worktree preparation
|
|
163
|
+
|
|
164
|
+
Follow [handoff-worktree](handoff-worktree.md).
|
|
165
|
+
|
|
166
|
+
<a id="approved-cooperative-execution-path-within-the-repository"></a>
|
|
167
|
+
## Approved cooperative execution path within the repository
|
|
168
|
+
|
|
169
|
+
Installed workflow connects plan-mode document commits to initial Implementer assignment. Resolve `<target-home>/skills/arc/runtime/cli.mjs` from the actual loaded skill selected by the installer, including custom homes. Pass path/options as separate `node` arguments. Shell uses safely assigned/quoted `node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`. Follow [handoff](handoff.md) invocation/continuity.
|
|
170
|
+
|
|
171
|
+
Entry updates migrate no state/renew no approvals; drift requires current evidence. Scope is repository cooperative decisions/records, not native hook/provider/installer installation or blocking direct tools. `no-plan`/omission stays unsupported through Phases 2/3, implying neither policy violation nor new document duty.
|
|
172
|
+
|
|
173
|
+
Record approved planning-document SHA-256 (Architectural spec and plans; Bounded plans), shared docs-only commit and document/approval versions. CLI verifies exact Git-object paths/current bytes before assignment intent. New workflows/late commits prove no past compliance. Prior history/outside execution stays unverified. Approval/native results are `operator-attested`; agent IDs are not authenticated identity.
|
|
174
|
+
|
|
175
|
+
<a id="full-auto-run-mode"></a>
|
|
176
|
+
## Full Auto run mode
|
|
177
|
+
|
|
178
|
+
Records:
|
|
179
|
+
- Each auto decision: user-visible progress message `auto-decided (Full Auto): <gate> → <choice>; reason; alternatives; evidence`, plus the same entry in the canonical handoff record.
|
|
180
|
+
- Pre-action gate record: `run` field (`supervised` or `full-auto`).
|
|
181
|
+
- Revision-history `Approval time`: `auto-approved (Full Auto) <time>`.
|
|
182
|
+
- Runtime `approvalRef` (free text): `full-auto:<doc>@<version>`.
|
|
183
|
+
- Completion report: list every auto decision.
|
|
184
|
+
|
|
185
|
+
Stopping: a user request in this chat to stop or switch to Supervised overrides the installed default and applies from the next gate; earlier auto decisions remain recorded.
|