@yunhozz/arc 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MANIFEST.sha256 +109 -75
- package/README.md +19 -31
- package/claude/agents/{arc-coder.md → arc-implementer.md} +7 -7
- package/claude/agents/arc-planner.md +4 -4
- package/claude/agents/arc-qa.md +4 -4
- package/claude/agents/arc-reviewer.md +5 -5
- package/claude/agents/arc-scouter.md +3 -3
- package/claude/skill/SKILL.md +7 -7
- package/claude/skill/models.toml +3 -3
- package/claude/skill/references/commit.md +22 -7
- package/claude/skill/references/coordination.md +25 -18
- package/claude/skill/references/git-recovery.md +1 -1
- package/claude/skill/references/handoff-prep.md +25 -2
- package/claude/skill/references/handoff.md +116 -24
- package/claude/skill/references/planning.md +78 -22
- package/claude/skill/references/verification.md +155 -17
- package/claude/skill/runtime/acceptance.mjs +68 -0
- package/claude/skill/runtime/assignment.mjs +42 -0
- package/claude/skill/runtime/bootstrap.mjs +35 -0
- package/claude/skill/runtime/cli.mjs +8 -0
- package/claude/skill/runtime/command.mjs +21 -0
- package/claude/skill/runtime/cooperative-schema.mjs +55 -0
- package/claude/skill/runtime/cooperative.mjs +136 -0
- package/claude/skill/runtime/evaluate.mjs +40 -4
- package/claude/skill/runtime/external.mjs +51 -0
- package/claude/skill/runtime/gate.mjs +7 -7
- package/claude/skill/runtime/git-evidence.mjs +46 -0
- package/claude/skill/runtime/operations.mjs +2 -2
- package/claude/skill/runtime/role-policy.json +64 -19
- package/claude/skill/runtime/schema.mjs +1 -0
- package/claude/skill/runtime/scope.mjs +36 -0
- package/claude/skill/runtime/store.mjs +25 -4
- package/claude/skill/runtime/verification.mjs +123 -0
- package/claude/skill/scripts/model_config.py +2 -2
- package/codex/agents/{arc-coder.toml → arc-implementer.toml} +8 -8
- package/codex/agents/arc-planner.toml +6 -6
- package/codex/agents/arc-qa.toml +6 -6
- package/codex/agents/arc-reviewer.toml +6 -6
- package/codex/agents/arc-scouter.toml +5 -5
- package/codex/skill/SKILL.md +9 -9
- package/codex/skill/models.toml +3 -3
- package/codex/skill/references/commit.md +23 -8
- package/codex/skill/references/coordination.md +25 -18
- package/codex/skill/references/git-recovery.md +2 -2
- package/codex/skill/references/handoff-prep.md +25 -2
- package/codex/skill/references/handoff-worktree.md +4 -4
- package/codex/skill/references/handoff.md +126 -34
- package/codex/skill/references/planning.md +81 -23
- package/codex/skill/references/verification.md +160 -22
- package/codex/skill/runtime/acceptance.mjs +68 -0
- package/codex/skill/runtime/assignment.mjs +42 -0
- package/codex/skill/runtime/bootstrap.mjs +35 -0
- package/codex/skill/runtime/cli.mjs +8 -0
- package/codex/skill/runtime/command.mjs +21 -0
- package/codex/skill/runtime/cooperative-schema.mjs +55 -0
- package/codex/skill/runtime/cooperative.mjs +136 -0
- package/codex/skill/runtime/evaluate.mjs +40 -4
- package/codex/skill/runtime/external.mjs +51 -0
- package/codex/skill/runtime/gate.mjs +7 -7
- package/codex/skill/runtime/git-evidence.mjs +46 -0
- package/codex/skill/runtime/operations.mjs +2 -2
- package/codex/skill/runtime/role-policy.json +64 -19
- package/codex/skill/runtime/schema.mjs +1 -0
- package/codex/skill/runtime/scope.mjs +36 -0
- package/codex/skill/runtime/store.mjs +25 -4
- package/codex/skill/runtime/verification.mjs +123 -0
- package/codex/skill/scripts/model_config.py +3 -3
- package/lib/cli/postinstall.mjs +3 -16
- package/lib/cli/root.mjs +8 -18
- package/lib/cli/upgrade.mjs +1 -57
- package/lib/installer/manifest.mjs +7 -2
- package/lib/installer/plan.mjs +27 -13
- package/lib/installer/runtime-assets.mjs +25 -0
- package/lib/installer/shell-completion.mjs +15 -20
- package/lib/installer/targets.mjs +1 -1
- package/lib/installer/uninstall.mjs +5 -1
- package/lib/installer/upgrade-state.mjs +2 -2
- package/lib/installer/upgrade.mjs +2 -5
- package/lib/management/operations.mjs +39 -0
- package/lib/management/status.mjs +18 -0
- package/lib/management/update.mjs +58 -0
- package/lib/management/workflow.mjs +51 -0
- package/lib/models/config.mjs +1 -1
- package/lib/models/profiles.mjs +1 -1
- package/lib/policy/placement.mjs +6 -6
- package/lib/policy/render.mjs +3 -3
- package/lib/policy/role-policy.json +64 -19
- package/lib/release/artifact.mjs +1 -1
- package/lib/runtime/acceptance.mjs +68 -0
- package/lib/runtime/assignment.mjs +42 -0
- package/lib/runtime/bootstrap.mjs +35 -0
- package/lib/runtime/cli.mjs +8 -0
- package/lib/runtime/command.mjs +21 -0
- package/lib/runtime/cooperative-schema.mjs +55 -0
- package/lib/runtime/cooperative.mjs +136 -0
- package/lib/runtime/evaluate.mjs +40 -4
- package/lib/runtime/external.mjs +51 -0
- package/lib/runtime/gate.mjs +7 -7
- package/lib/runtime/git-evidence.mjs +46 -0
- package/lib/runtime/operations.mjs +2 -2
- package/lib/runtime/schema.mjs +1 -0
- package/lib/runtime/scope.mjs +36 -0
- package/lib/runtime/store.mjs +25 -4
- package/lib/runtime/verification.mjs +123 -0
- package/lib/tui/app.mjs +41 -0
- package/lib/tui/render.mjs +21 -0
- package/lib/tui/setup.mjs +20 -0
- package/lib/tui/terminal.mjs +71 -0
- package/lib/tui/workflow.mjs +12 -0
- package/package.json +1 -1
- package/scripts/postinstall.mjs +1 -3
- package/scripts/update-runtime-assets.mjs +6 -1
- package/lib/cli/choices.mjs +0 -47
- package/lib/cli/completion.mjs +0 -55
- package/lib/cli/index.mjs +0 -55
- package/lib/cli/preset.mjs +0 -29
- package/lib/cli/terminal.mjs +0 -19
- package/lib/cli/uninstall.mjs +0 -17
|
@@ -6,18 +6,18 @@ Stage exactly the accepted task paths; inspect staged scope and content to exclu
|
|
|
6
6
|
After acceptance, Orchestrator creates the focused local commit without additional user commit approval.
|
|
7
7
|
After Orchestrator accepts a task, the next action is the required Git state/scope checks, staging, and focused commit.
|
|
8
8
|
Do not commit before task acceptance or defer the task commit until the plan ends.
|
|
9
|
-
Only Orchestrator accepts the task and executes its focused commit;
|
|
9
|
+
Only Orchestrator accepts the task and executes its focused commit; Implementer completion does not replace acceptance.
|
|
10
10
|
Existing plan-skip paths have no new automatic commit obligation; their commits follow applicable guidance and user requests.
|
|
11
11
|
Commit one logical task promptly, using Conventional Commits with a concise English description.
|
|
12
12
|
Task acceptance/commit is distinct from final plan acceptance; remaining final checks and Reviewer timing follow verification.
|
|
13
|
-
Planning documents have their own batch docs commit before
|
|
13
|
+
Planning documents have their own batch docs commit before Implementer handoff.
|
|
14
14
|
|
|
15
15
|
After commit, verify exact SHA, subject, included paths, branch/HEAD and remaining index/worktree state.
|
|
16
16
|
Preserve unrelated changes; never automatically unstage, amend, reset, clean, stash, or delete branches.
|
|
17
17
|
On failure, stop dependent work and report actual state and completed steps.
|
|
18
18
|
MUST NOT blindly repeat a commit or staging command.
|
|
19
19
|
Push, merge, publish, deploy, and install still follow their separate guidance and approval rules.
|
|
20
|
-
|
|
20
|
+
Implementer must not commit, even when explicitly assigned.
|
|
21
21
|
|
|
22
22
|
Hold the task commit for unmet or unresolved criteria, failed or not-run required checks, undispositioned findings or
|
|
23
23
|
evidence gaps, scope expansion, ownership or staged scope/content mismatch, unexpected workspace/branch/HEAD/Git state,
|
|
@@ -27,11 +27,11 @@ commit. If commit creation is unclear, stop and inspect before any retry (see gi
|
|
|
27
27
|
For a no-change task make no empty commit; record acceptance evidence and no change.
|
|
28
28
|
On resume verify the same task's existing commit SHA, content, and validity and reuse it; never duplicate a successful
|
|
29
29
|
task commit. For final Reviewer findings on already committed plan work, Orchestrator defines a follow-up task and required
|
|
30
|
-
planning/approvals.
|
|
30
|
+
planning/approvals. Implementer leaves corrections uncommitted during rechecks. Orchestrator refreshes the latest committed
|
|
31
31
|
state plus uncommitted diff and changed-file list in the Reviewer artifact/brief. Reuse an independent Reviewer or
|
|
32
|
-
assign another independent Reviewer as needed. Repeat
|
|
32
|
+
assign another independent Reviewer as needed. Repeat Implementer → Reviewer without QA reassignment until findings are
|
|
33
33
|
resolved; Orchestrator then accepts the corrections and creates one focused follow-up commit.
|
|
34
|
-
Final QA findings retain
|
|
34
|
+
Final QA findings retain Implementer correction and QA recheck before a new focused commit.
|
|
35
35
|
Do not automatically amend/reset or duplicate the original task commit. Scope expansion keeps existing new
|
|
36
36
|
planning and approval obligations.
|
|
37
37
|
|
|
@@ -41,10 +41,24 @@ without trailing period, lowercase scope when useful, one top-level task per com
|
|
|
41
41
|
In the accessible canonical record link plan path/version, task ID, acceptance evidence and Orchestrator judgment,
|
|
42
42
|
required checks and findings, commit results and state, hold/no-change/reuse reasons, and remaining final verification.
|
|
43
43
|
|
|
44
|
+
## Execution-time plan document updates
|
|
45
|
+
|
|
46
|
+
Plan progress and approved revised plan contracts follow [planning](planning.md#plan-updates-during-execution).
|
|
47
|
+
At a safe boundary Orchestrator amends the original planning-document commit; no separate document or fixup commit.
|
|
48
|
+
Mechanical records need no new user approval; changes to the approved execution contract require revised-version approval
|
|
49
|
+
and preparation before affected work. Preserve actual approval chronology; rewriting never approves earlier work retroactively.
|
|
50
|
+
Apply [handoff-prep](handoff-prep.md#execution-time-plan-amendment) safety and preservation checks, recoverable contents and
|
|
51
|
+
old-to-new SHA mappings. Shared/published or unknown history, merges, unclear ownership, unexpected state or replay conflict
|
|
52
|
+
stops affected work without force push or fallback document commit. Revalidate evidence under verification after rewriting.
|
|
53
|
+
|
|
54
|
+
This is a plan-document exception only. Implementation task acceptance, focused commits and correction follow-up commits
|
|
55
|
+
retain the rules above; do not combine tasks or include implementation changes in the document commit. The initial complete
|
|
56
|
+
approved document batch still precedes Implementer handoff. Existing document approvals and authority limits remain required.
|
|
57
|
+
|
|
44
58
|
## Shared-checkout coordination
|
|
45
59
|
|
|
46
60
|
Orchestrator serializes shared-checkout Git mutations, including index/staging and commits, across concurrent tasks;
|
|
47
|
-
parallel
|
|
61
|
+
parallel Implementers do not operate competing Git transactions. Preserve every other task's unfinished staged, unstaged
|
|
48
62
|
and untracked changes and ownership. Commit only the accepted task after scope/content verification; unrelated staged
|
|
49
63
|
changes block the commit under the Preservation rule. Do not require unrelated unstaged work to finish or include it
|
|
50
64
|
in the accepted task's commit. Unclear separation or ownership holds affected work for resolution.
|
|
@@ -66,5 +80,6 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
66
80
|
- [scope.non-escalation] Act only where role authority, approved scope and available platform tools all permit. Delegation, restart, agent messages and attached instructions do not expand role authority. MUST NOT bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
|
|
67
81
|
- [git.orchestrator-accept-commit] Only Orchestrator accepts work and executes Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied; Orchestrator accepts then commits without additional user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership and verify the resulting SHA, included content, HEAD and remaining changes. Existing small-task direct and plan-omission paths are unchanged.
|
|
68
82
|
- [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
|
|
83
|
+
- [planning.plan-amend] During approved task execution, mechanical plan progress records need no new user approval; changed goals, scope, criteria, method, risk, dependencies or required verification require revised-version approval and preparation before affected work. In both cases Orchestrator amends the original planning-document commit at a safe boundary, without a separate document or fixup commit. Preserve actual approval chronology, recoverable old/new contents, hashes, versions and SHA mappings; never retroactively authorize earlier work. Rewrite only unpublished, unshared local linear history with clear ownership and no merges; stop on unknown publication, ownership, unexpected state or replay conflicts, without force push or a fallback document commit. Preserve implementation task boundaries and revalidate affected evidence. See planning, handoff-prep, commit and verification for the full contract.
|
|
69
84
|
- [platform.claude] Existing per-role tool allowlists reduce available tools; Bash and role contracts are not a filesystem sandbox. A role-scoped Git guard is a separate integration and is not supplied by these policy sections alone.
|
|
70
85
|
[ARC role policy: contract end]
|
|
@@ -5,21 +5,21 @@ Orchestrator reads this before the first specialist creation or assignment and r
|
|
|
5
5
|
## Ownership
|
|
6
6
|
|
|
7
7
|
- Orchestrator: sole owner of development, configuration, tests, implementation-dependent documentation, and mixed tasks
|
|
8
|
-
requiring implementation, assigning their edits to
|
|
8
|
+
requiring implementation, assigning their edits to Implementer. Coordinates scope, planning, approvals, integration,
|
|
9
9
|
acceptance, verification, and completion.
|
|
10
10
|
- Scouter: read-only material research/analysis and assigned static code/document/data/log exploration. Reports
|
|
11
11
|
evidence, assumptions, unresolved questions, impact, next actions, and workspace/path issues to Orchestrator.
|
|
12
12
|
Does not edit files or author standalone document files, or decide design/plans, verification, review, or completion.
|
|
13
13
|
- Planner: returns design/spec/plan drafts.
|
|
14
|
-
-
|
|
14
|
+
- Implementer edits assigned, approved implementation/configuration/test-code files and assigned dependent docs.
|
|
15
15
|
Orchestrator does not edit
|
|
16
16
|
them directly except under the Orchestrator direct path for small tasks.
|
|
17
17
|
- QA: verifies without edits.
|
|
18
18
|
- Reviewer: independently reviews the final full change.
|
|
19
|
-
- All five roles report directly to Orchestrator at depth 2: Scouter, Planner,
|
|
19
|
+
- All five roles report directly to Orchestrator at depth 2: Scouter, Planner, Implementer, QA, and Reviewer.
|
|
20
20
|
Orchestrator is depth 1.
|
|
21
21
|
Depth-2 roles cannot create agents or delegate tasks to another role. Reviewer remains independent.
|
|
22
|
-
- Claude native subagent names: Scouter=`arc-scouter`, Planner=`arc-planner`,
|
|
22
|
+
- Claude native subagent names: Scouter=`arc-scouter`, Planner=`arc-planner`, Implementer=`arc-implementer`, QA=`arc-qa`,
|
|
23
23
|
Reviewer=`arc-reviewer`.
|
|
24
24
|
- Across the full tree, obey configured limits for simultaneous subagents, including Scouter; there are no reserved slots.
|
|
25
25
|
Before first creation, read `references/limits.md` and installed `limits.toml`; maintain its cumulative ledger and reservations.
|
|
@@ -43,7 +43,7 @@ adds no agents or authority. Map executor requests such as `superpowers:executin
|
|
|
43
43
|
`superpowers:subagent-driven-development` to Orchestrator's dependency-aware coordination and risk-scaled verification;
|
|
44
44
|
this replaces executor mechanics and any separate execution-method choice, including prompts in an existing local reference.
|
|
45
45
|
Preserve plan approval, workspace, design, spec, and other applicable requirements, including TDD subject to the
|
|
46
|
-
explicit ARC exception in [handoff](handoff.md#
|
|
46
|
+
explicit ARC exception in [handoff](handoff.md#implementer-tdd-and-constraints). Adapt local `brainstorming` role, save, and early spec commit instructions to
|
|
47
47
|
ARC Planner ownership and evidence gates in planning/handoff; preserve upstream reference content. Report conflicts or
|
|
48
48
|
missing required local references before dependent work.
|
|
49
49
|
|
|
@@ -51,13 +51,13 @@ Planner, Reviewer, and Scouter return findings, relevant questions, next actions
|
|
|
51
51
|
Orchestrator. Planner preserves complete requested drafts. Orchestrator integrates results (save, route,
|
|
52
52
|
obtain approval; never author), routes decisions and required approvals,
|
|
53
53
|
and owns development acceptance and completion. Orchestrator coordinates dependent implementation tasks sequentially and
|
|
54
|
-
starts a fresh
|
|
54
|
+
starts a fresh Implementer for each top-level task (Role gate); reuse the current Implementer only for corrections, rework,
|
|
55
55
|
or rechecks of the same task while the approved scope, workspace, ownership, and relevant assignment context remain valid;
|
|
56
|
-
default to the current
|
|
57
|
-
a new task. Before sending corrections or rework to a reused
|
|
56
|
+
default to the current Implementer for same-task QA corrections. A QA finding within the current task does not itself create
|
|
57
|
+
a new task. Before sending corrections or rework to a reused Implementer, Orchestrator rechecks workspace, branch/HEAD and change state against the brief.
|
|
58
58
|
Replace or restart a role only when its context is invalid or unavailable, or the task boundary changes, subject to the
|
|
59
|
-
amendment exception below. A fresh
|
|
60
|
-
After an approved plan or acceptance-criteria amendment, start a fresh
|
|
59
|
+
amendment exception below. A fresh Implementer for the next task is a restart under handoff (choice reuse and restart brief rules are in handoff).
|
|
60
|
+
After an approved plan or acceptance-criteria amendment, start a fresh Implementer for
|
|
61
61
|
the remaining work even within the same task; it is also a restart under handoff. Do not add per-task QA or
|
|
62
62
|
review gates solely because a task boundary exists; apply risk requirements and specific approved obligations. If the
|
|
63
63
|
next task depends on a still-unverified risky contract, complete applicable QA at that dependency boundary and
|
|
@@ -84,15 +84,22 @@ resolve or explicitly disposition findings before dependent implementation. This
|
|
|
84
84
|
never use a context-inheriting fork (such as the `fork` subagent type) for an ARC role; do not claim fresh context
|
|
85
85
|
isolation without evidence. Reuse an existing specialist for related follow-up with only changed facts/objective when
|
|
86
86
|
its context
|
|
87
|
-
remains relevant; start fresh for unrelated or bloated context.
|
|
88
|
-
- Cite in the brief the absolute path of each required local ARC reference's SKILL.md (`test-driven-development` for
|
|
87
|
+
remains relevant; start fresh for unrelated or bloated context. Implementer and QA freshness follow the Role gate.
|
|
88
|
+
- Cite in the brief the absolute path of each required local ARC reference's SKILL.md (`test-driven-development` for Implementer,
|
|
89
89
|
`brainstorming`/`writing-plans` for Planner); the role Reads it before dependent work.
|
|
90
90
|
- For Reviewer, Orchestrator writes the final base..HEAD diff plus changed-file list to
|
|
91
91
|
`<git-common-dir>/arc/review/<slug>.diff` (same slug as the handoff record; base is the approved base HEAD recorded at
|
|
92
92
|
handoff; inline when small or write denied) and cites its absolute path in the brief; Reviewer reads it and states
|
|
93
93
|
limits. See verification.
|
|
94
|
-
- In
|
|
95
|
-
acceptance criteria, and constraints; do not ask
|
|
94
|
+
- In Implementer briefs, cite the plan/spec path with the task section's line range and include only the needed excerpts,
|
|
95
|
+
acceptance criteria, and constraints; do not ask Implementer to read whole plans or specs.
|
|
96
|
+
- Before formal Planner drafting, complete the stage brief using
|
|
97
|
+
[planning](planning.md#planner-drafting-preparation-and-consolidated-feedback): original requirements/criteria IDs,
|
|
98
|
+
approved and open decisions, actual target/ownership, preceding approved versions and document paths, current behavior
|
|
99
|
+
and connected policy/source/generated/runtime/installer/documentation surfaces, depth, dependencies, checks, holds and
|
|
100
|
+
exact stage deliverable. Preserve the shared brief field order. Review completeness and conflicts together; send one
|
|
101
|
+
consolidated feedback request with changed fields and `unchanged` for the rest. Preserve separate sequential design,
|
|
102
|
+
spec and plan approvals; no fixed call cap, incomplete draft acceptance or extra calls for resolved questions.
|
|
96
103
|
- Before optional calls, name the unresolved question and expected artifact. Skip calls whose questions are resolved
|
|
97
104
|
by available evidence or direct inspection.
|
|
98
105
|
- Run each ARC role as a foreground Agent call and use its returned result, or run it in the background and wait for the
|
|
@@ -116,7 +123,7 @@ resolve or explicitly disposition findings before dependent implementation. This
|
|
|
116
123
|
|
|
117
124
|
Orchestrator briefs absolute paths under the selected installed ARC directory: Planner reads
|
|
118
125
|
`references/superpowers/brainstorming/SKILL.md` and `references/superpowers/writing-plans/SKILL.md`;
|
|
119
|
-
|
|
126
|
+
Implementer reads `references/superpowers/test-driven-development/SKILL.md`, including required relative references.
|
|
120
127
|
Resolve paths within each skill directory. Runtime needs no global discovery, external Skill invocation, or automatic download.
|
|
121
128
|
Missing/damaged local files stop dependent work: report exact paths to Orchestrator, without global fallback.
|
|
122
129
|
ARC approval, ownership, TDD exceptions and executor adapters still apply.
|
|
@@ -125,7 +132,7 @@ ARC approval, ownership, TDD exceptions and executor adapters still apply.
|
|
|
125
132
|
## Models
|
|
126
133
|
|
|
127
134
|
`models.toml` beside this skill is the source of truth for role model and reasoning-effort settings.
|
|
128
|
-
Configuration keys `arc_scouter`, `arc_planner`, `
|
|
135
|
+
Configuration keys `arc_scouter`, `arc_planner`, `arc_implementer`, `arc_qa`, and `arc_reviewer` map to the hyphenated
|
|
129
136
|
Claude native subagent names above; they are not tool-call names.
|
|
130
137
|
Orchestrator uses the current conversation model. Use configured role settings without substitution or effort
|
|
131
138
|
reduction; report unavailable settings.
|
|
@@ -144,8 +151,8 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
144
151
|
- [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
|
|
145
152
|
- [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
|
|
146
153
|
- [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. MUST NOT save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
|
|
147
|
-
- [role.
|
|
148
|
-
- [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for
|
|
154
|
+
- [role.implementer-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
|
|
155
|
+
- [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Implementer correction and required QA recheck.
|
|
149
156
|
- [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only. MUST NOT execute QA tests, edit files, perform Git mutations or decide acceptance.
|
|
150
157
|
- [platform.claude] Existing per-role tool allowlists reduce available tools; Bash and role contracts are not a filesystem sandbox. A role-scoped Git guard is a separate integration and is not supplied by these policy sections alone.
|
|
151
158
|
[ARC role policy: contract end]
|
|
@@ -20,7 +20,7 @@ recovery material.
|
|
|
20
20
|
## Branch collision and invalid names
|
|
21
21
|
|
|
22
22
|
For an invalid name, branch creation/switch failure, lookup error, or unexpected current branch, inspect and record the
|
|
23
|
-
error and actual Git state, then stop
|
|
23
|
+
error and actual Git state, then stop Implementer handoff. A branch created without a successful switch is partial completion:
|
|
24
24
|
report it, never delete it automatically, and do not treat preparation as complete.
|
|
25
25
|
Do not fall back to another branch or checkout. A new collision suffix requires fresh user approval of the candidate
|
|
26
26
|
(handoff-prep). Existing staged/unstaged/untracked changes stay preserved; if they block a switch or ownership is
|
|
@@ -40,11 +40,11 @@ After branch creation/switch verify actual absolute path, branch, HEAD and prese
|
|
|
40
40
|
After staging verify index paths and diff before commit; unrelated staged files block the mutation. Stop and inspect
|
|
41
41
|
on failure or partial completion, record actual state and completed steps, and revalidate affected gates after resolution.
|
|
42
42
|
|
|
43
|
-
Batch-commit all remaining approved planning documents together in one focused docs commit before the first
|
|
43
|
+
Batch-commit all remaining approved planning documents together in one focused docs commit before the first Implementer
|
|
44
44
|
handoff. Stage only those document paths and verify the staged content and scope.
|
|
45
45
|
Verify the resulting SHA, subject, paths, branch, HEAD and remaining state. Already committed approved documents need no
|
|
46
46
|
duplicate commit. Record the actual preparation order and deviations, then complete the handoff gate before the
|
|
47
|
-
next
|
|
47
|
+
next Implementer start. User authorization persists for the unchanged approved target and scope; do not repeatedly ask for the
|
|
48
48
|
same choice.
|
|
49
49
|
|
|
50
50
|
## New task branch naming
|
|
@@ -85,11 +85,34 @@ Never amend, reset, or recommit past commits to merge them. Skip the commit only
|
|
|
85
85
|
produced, recording the depth rationale; uncommitted documents are not absent. Never include implementation files.
|
|
86
86
|
After success verify SHA, message, paths, HEAD, branch, and remaining state; the commit is not push approval.
|
|
87
87
|
|
|
88
|
+
## Execution-time plan amendment
|
|
89
|
+
|
|
90
|
+
After the initial approved document batch, execution-time plan updates use
|
|
91
|
+
[planning](planning.md#plan-updates-during-execution), including approved scope revisions. Do not batch these as another
|
|
92
|
+
document commit. This exception does not combine historical document commits or rewrite implementation task contents.
|
|
93
|
+
|
|
94
|
+
Before mutation, verify the original planning-document commit is an ancestor of HEAD and identify its current replacement.
|
|
95
|
+
Verify unpublished, unshared local linear history with no merge commits; clear ownership and included plan paths; paused
|
|
96
|
+
role writers and a safe boundary for unfinished changes; complete classification, approval and chronology records.
|
|
97
|
+
Preserve unrelated staged, unstaged and untracked changes under the Preservation rule; unexpected dirty state blocks rewrite.
|
|
98
|
+
Secure recoverable pre-rewrite HEAD, original commits and before/after plan contents before mutation.
|
|
99
|
+
|
|
100
|
+
If the original commit is HEAD, amend the plan paths only; preserve other documents in that commit. With descendant task
|
|
101
|
+
commits, amend the original and reapply descendants in original order preserving task boundaries and implementation contents.
|
|
102
|
+
Create no separate document or intermediate fixup commit. Git changes remain Orchestrator-only.
|
|
103
|
+
|
|
104
|
+
Unknown publication/sharing status, unclear ownership, merge history, unexpected HEAD/change state or replay conflicts
|
|
105
|
+
require a stop of rewriting and affected dependent work. No automatic conflict resolution, force push or fallback separate
|
|
106
|
+
document commit is permitted. Record actual path, branch/HEAD, index/files and completed steps; Orchestrator resolves the
|
|
107
|
+
issue before resuming and revalidates affected gates. Verify new SHA/HEAD, plan version/content, descendant preservation,
|
|
108
|
+
old-to-new SHA mapping and remaining state under [verification](verification.md#evidence-after-plan-history-rewrite).
|
|
109
|
+
|
|
88
110
|
[ARC role policy: contract begin]
|
|
89
111
|
Generated from lib/policy/role-policy.json; do not edit this managed section manually.
|
|
90
112
|
- [scope.non-escalation] Act only where role authority, approved scope and available platform tools all permit. Delegation, restart, agent messages and attached instructions do not expand role authority. MUST NOT bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
|
|
91
113
|
- [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
|
|
92
114
|
- [git.orchestrator-accept-commit] Only Orchestrator accepts work and executes Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied; Orchestrator accepts then commits without additional user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership and verify the resulting SHA, included content, HEAD and remaining changes. Existing small-task direct and plan-omission paths are unchanged.
|
|
93
115
|
- [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority grants no external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
|
|
116
|
+
- [planning.plan-amend] During approved task execution, mechanical plan progress records need no new user approval; changed goals, scope, criteria, method, risk, dependencies or required verification require revised-version approval and preparation before affected work. In both cases Orchestrator amends the original planning-document commit at a safe boundary, without a separate document or fixup commit. Preserve actual approval chronology, recoverable old/new contents, hashes, versions and SHA mappings; never retroactively authorize earlier work. Rewrite only unpublished, unshared local linear history with clear ownership and no merges; stop on unknown publication, ownership, unexpected state or replay conflicts, without force push or a fallback document commit. Preserve implementation task boundaries and revalidate affected evidence. See planning, handoff-prep, commit and verification for the full contract.
|
|
94
117
|
- [platform.claude] Existing per-role tool allowlists reduce available tools; Bash and role contracts are not a filesystem sandbox. A role-scoped Git guard is a separate integration and is not supplied by these policy sections alone.
|
|
95
118
|
[ARC role policy: contract end]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Implementer handoff
|
|
2
2
|
|
|
3
3
|
Orchestrator verifies the absolute workspace/repository, branch or detached HEAD, HEAD, staged/unstaged/untracked state,
|
|
4
4
|
ownership, document approvals and committed planning documents before first start and restart.
|
|
@@ -6,7 +6,7 @@ The approved execution target must remain valid. Claude v1 supports current chec
|
|
|
6
6
|
ARC-managed worktrees.
|
|
7
7
|
|
|
8
8
|
Execution-target choice and actual preparation precede formal drafting and saving of required specs/plans.
|
|
9
|
-
Initial design proposals may precede choice. Initial target preparation does not authorize
|
|
9
|
+
Initial design proposals may precede choice. Initial target preparation does not authorize Implementer; all applicable
|
|
10
10
|
approvals, complete documents, verified batch docs commits or valid absence, and final Git verification remain required.
|
|
11
11
|
Record planned document scope/paths and actual preparation separately, followed by actual drafting/save/approval and
|
|
12
12
|
commit results; preserve actual order and evidence gaps. Reuse a valid choice during document drafting and subsequent
|
|
@@ -23,18 +23,18 @@ explicit target choice; prior and resulting Git state; document commit SHA/subje
|
|
|
23
23
|
checks and limits. If a gate or record was late, record actual order and resolve forward; never claim retroactive
|
|
24
24
|
compliance.
|
|
25
25
|
|
|
26
|
-
The
|
|
26
|
+
The Implementer brief supplies absolute workspace, verified branch/HEAD, canonical record path, approved task/criteria,
|
|
27
27
|
exact file ownership, expected tests, dependency limits and blocked conditions. Restart brief: supply only verified
|
|
28
|
-
deltas and mark unchanged fields; `unchanged` means unchanged relative to the record file the fresh
|
|
29
|
-
and every other brief field is in full.
|
|
28
|
+
deltas and mark unchanged fields; `unchanged` means unchanged relative to the record file the fresh Implementer reads,
|
|
29
|
+
and every other brief field is in full. Implementer trusts Orchestrator verified prep rather than independently repeating
|
|
30
30
|
approval/Git evidence checks, reads fields marked unchanged, and stops on an actual observed conflict.
|
|
31
|
-
Tell
|
|
31
|
+
Tell Implementer that others share the repository and unrelated work MUST be preserved.
|
|
32
32
|
|
|
33
33
|
Roles report directly to Orchestrator. Do not delegate at depth 2. Orchestrator sequences dependent work,
|
|
34
34
|
resolves actual blockers and revalidates affected gates before resume. No automatic retry after unexpected Git or tool
|
|
35
35
|
failure.
|
|
36
36
|
|
|
37
|
-
If the record write is denied or unavailable, Orchestrator carries the full record inline in every
|
|
37
|
+
If the record write is denied or unavailable, Orchestrator carries the full record inline in every Implementer brief (no
|
|
38
38
|
delta, no record-file `unchanged`) and states why; that satisfies the accessible-record requirement.
|
|
39
39
|
Do not delete it automatically.
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ cannot bypass its approval gate.
|
|
|
48
48
|
|
|
49
49
|
Before assignment, apply every readiness condition in
|
|
50
50
|
[planning.md, Dependency and readiness record](planning.md#dependency-and-readiness-record), including predecessor
|
|
51
|
-
checks, Orchestrator acceptance and verified focused commit or accepted no-change evidence. A
|
|
51
|
+
checks, Orchestrator acceptance and verified focused commit or accepted no-change evidence. A Implementer completion report
|
|
52
52
|
alone is insufficient. Verify the linked record is current and capacity and file ownership permit assignment.
|
|
53
53
|
Readiness supplements the full handoff gate and execution-target restrictions; it never waives them.
|
|
54
54
|
For authorized HEAD or state changes, refresh this record and affected briefs, verify preservation and ownership,
|
|
@@ -76,7 +76,7 @@ its scope, criteria, constraints, and valid document-depth omissions alongside e
|
|
|
76
76
|
Reuse valid authorization for the same approved scope and target. A restart or new role assignment does not require
|
|
77
77
|
repeat approval. Reuse never waives verification of actual workspace/repository, branch or detached HEAD, HEAD,
|
|
78
78
|
changes, preservation, ownership, applicable documents, and preparation evidence by Orchestrator. Refresh actual state
|
|
79
|
-
and affected briefs for authorized changes; they alone do not invalidate approval.
|
|
79
|
+
and affected briefs for authorized changes; they alone do not invalidate approval. Implementer trusts the verified brief
|
|
80
80
|
under its profile. Material scope/method/risk changes and invalid target evidence hold affected work; resolve using
|
|
81
81
|
planning and the choice-lifetime rules above. Report the missing condition and resume evidence rather than asking
|
|
82
82
|
for an approval already valid for that scope.
|
|
@@ -85,13 +85,13 @@ Before any exception judgment, Orchestrator reads [Risk-scaled execution](verifi
|
|
|
85
85
|
|
|
86
86
|
## Common handoff gate
|
|
87
87
|
|
|
88
|
-
Before every
|
|
88
|
+
Before every Implementer first start/restart, Orchestrator passes the full gate:
|
|
89
89
|
applicable approvals/artifacts or valid omissions, explicit execution-target choice
|
|
90
90
|
or verified reuse, intended accessible repository/workspace, actual Git identity/state, preservation/ownership,
|
|
91
91
|
verified document commits or valid absence, and no unresolved failure/partial completion.
|
|
92
92
|
Missing evidence, mismatches, unclear ownership or unresolved preparation block handoff and require Orchestrator
|
|
93
93
|
resolution and full revalidation. Handoff owns the evidence fields, canonical handoff record, restart brief, choice lifetime
|
|
94
|
-
and reuse.
|
|
94
|
+
and reuse. Implementer trusts the Orchestrator-verified brief and reports actual conflicts under its self-contained profile;
|
|
95
95
|
never replace its local guards with a requirement to load Orchestrator procedures.
|
|
96
96
|
Depth-2 roles use the supplied workspace and report path/state conflicts; they cannot create/switch workspaces or
|
|
97
97
|
branches. The same conditions apply before an Orchestrator direct edit.
|
|
@@ -100,12 +100,12 @@ approved document preparation under [handoff-prep](handoff-prep.md).
|
|
|
100
100
|
ARC-managed worktree execution is unsupported; report an isolated worktree request before dependent work.
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
##
|
|
103
|
+
## Implementer TDD and constraints
|
|
104
104
|
|
|
105
|
-
Before feature, bug-fix, or behavior edits,
|
|
106
|
-
ARC exception applies; the
|
|
105
|
+
Before feature, bug-fix, or behavior edits, Implementer follows local `test-driven-development` unless the explicit
|
|
106
|
+
ARC exception applies; the Implementer profile holds Implementer's full TDD rules. TDD is waived only when every small,
|
|
107
107
|
low-risk criterion (Risk-scaled execution) and every plan-skip criterion (Orchestrator direct path) holds.
|
|
108
|
-
Before
|
|
108
|
+
Before Implementer starts,
|
|
109
109
|
Orchestrator records the scope, why every criterion is met, acceptance criteria, and focused verification in the brief.
|
|
110
110
|
An explicit user or task-specific TDD request overrides
|
|
111
111
|
this waiver. For qualifying tasks only, this exception takes precedence over the generic trigger in the local reference;
|
|
@@ -122,7 +122,7 @@ generalize it to behavior work.
|
|
|
122
122
|
Orchestrator may edit directly only when every small, low-risk criterion (Risk-scaled execution) holds.
|
|
123
123
|
Every plan-skip criterion must also hold: one local change, no dependent stages, no cross-component shared state,
|
|
124
124
|
lifecycle, or integration-order concerns, and one focused verification path. Significant, architectural,
|
|
125
|
-
ordinary-behavior, unclear-risk work and edits overlapping a running
|
|
125
|
+
ordinary-behavior, unclear-risk work and edits overlapping a running Implementer's assigned files are ineligible.
|
|
126
126
|
|
|
127
127
|
Significant risk is defined in Risk-scaled execution and excludes work from the Orchestrator direct path;
|
|
128
128
|
do not infer eligibility from a small file count.
|
|
@@ -132,30 +132,122 @@ why every criterion holds, acceptance criteria, and focused verification. Apply
|
|
|
132
132
|
[planning](planning.md#authorization-and-scope): an existing sufficiently specific user request can approve
|
|
133
133
|
that scope; no duplicate approval is needed. Otherwise present the scope record to the user and obtain explicit
|
|
134
134
|
approval before editing. Silence, an ambiguous response, or approval of other work is not approval.
|
|
135
|
-
Orchestrator then verifies the same handoff gate as a
|
|
135
|
+
Orchestrator then verifies the same handoff gate as a Implementer first start: explicit execution-target choice or valid
|
|
136
136
|
reuse, accessible intended workspace and repository, branch or detached HEAD, HEAD, staged/unstaged/untracked state,
|
|
137
137
|
preservation and ownership, and no unresolved failure or partial completion. Read this reference
|
|
138
138
|
and [handoff preparation](handoff-prep.md) before checking this gate.
|
|
139
139
|
|
|
140
140
|
Orchestrator edits only the approved files, preserves others' edits, and makes surgical changes without unrelated
|
|
141
|
-
refactoring or unapproved dependencies. Behavior edits follow the
|
|
141
|
+
refactoring or unapproved dependencies. Behavior edits follow the Implementer TDD rules and applicable recorded waiver
|
|
142
142
|
criteria; an explicit user or task-specific TDD request still requires test-driven-development.
|
|
143
143
|
Do not claim TDD under a waiver. After editing, Orchestrator records changed files, runs focused checks,
|
|
144
144
|
connects each acceptance criterion to evidence, and reports unverified scope. Orchestrator is not an independent
|
|
145
145
|
reviewer of its own edits; assign QA when evidence is incomplete. If scope expands, risk becomes unclear,
|
|
146
|
-
or any criterion fails, stop editing, record completed changes, and return subsequent edits to the normal Planner/
|
|
147
|
-
flow. A failed focused check or a QA finding routes the correction to
|
|
146
|
+
or any criterion fails, stop editing, record completed changes, and return subsequent edits to the normal Planner/Implementer
|
|
147
|
+
flow. A failed focused check or a QA finding routes the correction to Implementer, and it is rechecked; Orchestrator does not
|
|
148
148
|
self-correct.
|
|
149
149
|
|
|
150
150
|
Like other plan-skip paths, there is no automatic task commit; commits follow applicable guidance and user requests.
|
|
151
151
|
|
|
152
152
|
|
|
153
|
+
## Cooperative CLI verification handoff
|
|
154
|
+
|
|
155
|
+
For the supported spec+plan path, the verification handoff includes the registered task contract, exact check descriptor,
|
|
156
|
+
task/final scope, `status.changeFingerprints`, independent actor attestations, intent ID, result messageRef and verdict.
|
|
157
|
+
An externally authorized role performs each check/review after `prepare`, and records the actual result through `result`.
|
|
158
|
+
CLI records do not authenticate identities or prove actual agent policy compliance.
|
|
159
|
+
|
|
160
|
+
When scope, documents or approvals change, inspect `affectedTaskIds` and the dependency chain, preserve earlier approval and
|
|
161
|
+
result records, and hand off new approvals and contracts for affected tasks. Do not reuse an old passing check for a different fingerprint.
|
|
162
|
+
Link failed findings to the assigned Implementer's resolution evidence and QA rechecks for that change version. Only final overall Reviewer
|
|
163
|
+
findings use Implementer→Reviewer revalidation. Do not add Reviewer as a prerequisite for individual task acceptance or commits.
|
|
164
|
+
Follow [verification.md](verification.md#verification-lifecycle-in-the-cooperative-cli) for detailed fields and hold conditions.
|
|
165
|
+
An unsupported no-plan/omission path does not imply a policy violation or a requirement to write documents.
|
|
166
|
+
|
|
153
167
|
[ARC role policy: contract begin]
|
|
154
168
|
Generated from lib/policy/role-policy.json; do not edit this managed section manually.
|
|
155
169
|
- [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
|
|
156
|
-
- [role.
|
|
157
|
-
- [review.significant-no-plan] For significant/high-risk work without a plan:
|
|
158
|
-
- [review.significant-plan] For significant/high-risk plan work: each task uses
|
|
159
|
-
- [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use
|
|
170
|
+
- [role.implementer-implementation] Edit only assigned, approved files and run focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
|
|
171
|
+
- [review.significant-no-plan] For significant/high-risk work without a plan: Implementer → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. MUST NOT omit Reviewer merely because no plan exists. This creates no new plan obligation.
|
|
172
|
+
- [review.significant-plan] For significant/high-risk plan work: each task uses Implementer → fresh QA as required → Orchestrator acceptance and focused commit. After all tasks are accepted and required QA is complete, Reviewer reviews the final full change once. Reviewer is NOT a per-task or per-commit required gate. Preserve required checks and necessary finding rechecks.
|
|
173
|
+
- [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Implementer → Reviewer without QA reassignment; repeat until resolved. This exception applies only at the final plan stage. Preserve required QA and QA failure rechecks before initial final review and outside this exception.
|
|
160
174
|
- [platform.claude] Existing per-role tool allowlists reduce available tools; Bash and role contracts are not a filesystem sandbox. A role-scoped Git guard is a separate integration and is not supplied by these policy sections alone.
|
|
161
175
|
[ARC role policy: contract end]
|
|
176
|
+
|
|
177
|
+
## Initial Implementer assignment through the cooperative CLI
|
|
178
|
+
|
|
179
|
+
In approved plan mode, Orchestrator performs the following sequence. All mutation commands pass JSON through stdin with
|
|
180
|
+
`node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`.
|
|
181
|
+
Resolve `ARC_RUNTIME_ENTRY` from the actual ARC skill directory selected by the installation resolver:
|
|
182
|
+
`<target-home>/skills/arc/runtime/cli.mjs`. Use the loaded skill's location, including a custom target home;
|
|
183
|
+
do not guess the default home or use a package, checkout or cache entry. Pass the resolved path, checkout and
|
|
184
|
+
workflow ID as separate argv values when using a process API. In a shell, assign values safely and double-quote
|
|
185
|
+
these variables; never interpolate paths into executable shell text or use `eval`.
|
|
186
|
+
Query `status` without `--input`.
|
|
187
|
+
|
|
188
|
+
The entry preserves the cooperative state path in the selected checkout's Git common directory. Installing or
|
|
189
|
+
updating the entry does not migrate state or renew approvals. Runtime/hash, target, actor and revision checks still
|
|
190
|
+
apply: runtime drift holds existing evidence; obtain the required current evidence and approval through the
|
|
191
|
+
existing recovery procedure. A new workflow cannot retroactively validate earlier execution.
|
|
192
|
+
|
|
193
|
+
1. Prepare the docs-only commit of the approved spec and plan, and verify the exact document set, objects and current files.
|
|
194
|
+
Perform `init`, approval `record` and `prepare` only after this commit verification, even when user approval preceded the document commit.
|
|
195
|
+
2. After document commit verification, pass `mode: "plan"`, `actor: {id: "operator"}` and `selection: {messageRef, contentHash}` to `init` at the final target HEAD.
|
|
196
|
+
3. Use `record` to persist the user approval attestation already confirmed. The input is
|
|
197
|
+
`{requestId, expectedRevision, actor, evidence: {kind: "approval", messageRef, data: {approvalVersion, documentVersion, documents}}}`.
|
|
198
|
+
`documents` contains exactly the spec and plan, each with `{kind, path, gitPath, contentHash, approvalRef, commit}`.
|
|
199
|
+
`contentHash` is `sha256:<hex>`, and `approvalRef` must match the approval `messageRef`.
|
|
200
|
+
On HEAD drift, record a fresh target observation and renewed approval instead of reconnecting an earlier intent.
|
|
201
|
+
4. Pass `{requestId, expectedRevision, actor, operation: "assign-agent", taskId, arguments: {role: "implementer", paths, operations: ["edit"], documents, approvalRef, approvalVersion, documentVersion, correlation}}` to `prepare`.
|
|
202
|
+
Absolute `paths` must be inside the checkout. Confirm `allow`, `persisted: true` and the persisted intent.
|
|
203
|
+
5. Invoke the native assignment with the task, scope and correlation from the persisted intent.
|
|
204
|
+
6. Pass `{requestId, expectedRevision, actor, intentId, result: {status, messageRef, data: {correlation, taskId, agentId}}}` to `result`.
|
|
205
|
+
`intentId` is the prepare requestId. Distinguish success as `succeeded`, failure as `failed`, uncertain execution as `unknown` and a response mismatch as `mismatch`.
|
|
206
|
+
Success requires the returned agent ID. `unknown`/`mismatch` causes a hold; stop duplicate assignments and investigate the actual result.
|
|
207
|
+
|
|
208
|
+
Approval and assignment results on this path are `operator-attested`. They do not authenticate native identities or verify platform events.
|
|
209
|
+
The CLI cannot block direct calls outside it, and a new workflow cannot legitimize omitted past execution. Existing trusted adapter provenance requirements remain in force.
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## External operations and recovery in the cooperative CLI
|
|
213
|
+
|
|
214
|
+
The three phases support state, documents and assignment; scope, verification, acceptance and focused commits; and external approval, results and audit recovery.
|
|
215
|
+
Use `status.support` to inspect all nine areas and their limits. The supported mode is `plan` with spec+plan; no-plan and omission are unsupported. The CLI does not execute native/provider calls or push, merge, deploy or publish.
|
|
216
|
+
User approvals and execution results confirmed by the operator are `operator-attested`, with `nativeVerified: false` and
|
|
217
|
+
`remoteVerified: false`. Blocking direct calls outside the CLI and independent remote verification are not provided.
|
|
218
|
+
|
|
219
|
+
Orchestrator records an explicit approval it has already confirmed through `record` with
|
|
220
|
+
`evidence: {kind: "external-approval", messageRef, data: {operation, scope, descriptor}}`.
|
|
221
|
+
`scope` is an array of unique absolute paths within the checkout. Local commit approval does not authorize external operations.
|
|
222
|
+
Include the exact action, scope and target in the approval, and record every descriptor field below.
|
|
223
|
+
|
|
224
|
+
| operation | descriptor fields |
|
|
225
|
+
|---|---|
|
|
226
|
+
| push | repository, destination, refspec, sourceOid, expectedRemoteOid |
|
|
227
|
+
| merge | repository, changeRef, targetRef, expectedTargetOid |
|
|
228
|
+
| deploy | service, project, environment, artifactId, destination |
|
|
229
|
+
| publish | service, namespace, name, version, artifactHash, destination |
|
|
230
|
+
|
|
231
|
+
Git OIDs are full 40/64-character lowercase hex values; artifactHash is `sha256:<64-hex>`. Without a remote observation,
|
|
232
|
+
an OID is an expected value asserted by the user, not verified remote state. destination must be an identifier without secrets.
|
|
233
|
+
Do not submit URL userinfo, query or fragment components, or authentication information such as passwords, tokens or credentials.
|
|
234
|
+
The CLI rejects recognized credential inputs before persistence, but cannot determine whether every arbitrary string contains a secret.
|
|
235
|
+
|
|
236
|
+
Pass `{requestId, expectedRevision, actor: {id, role: "orchestrator"}, operation,
|
|
237
|
+
arguments: {approvalRef, scope, descriptor}}` to `prepare`. approvalRef matches the external approval messageRef.
|
|
238
|
+
An intent is persisted only when the exact approval, scope/target versions and runtime version match and no effect is unresolved.
|
|
239
|
+
After confirming `allow` and `persisted: true`, Orchestrator performs the external operation within its separately approved scope.
|
|
240
|
+
This CLI does not expand that execution authority.
|
|
241
|
+
|
|
242
|
+
`result`/`reconcile` accepts `{requestId, expectedRevision, actor, intentId,
|
|
243
|
+
result: {status, messageRef, data: {operation, scope, descriptor}}}`. intentId is the prepare requestId.
|
|
244
|
+
Target mismatches, unknown outcomes and stale results cause a hold while preserving earlier attestations. After an interruption,
|
|
245
|
+
use `status` to inspect the intent, `state.requests`, `state.audit` and `state.results`, and investigate whether the effect occurred.
|
|
246
|
+
Reconcile the investigation result against the same intent rather than preparing again or reusing the same approval to execute again.
|
|
247
|
+
Cancellation additionally requires a `notExecutedEvidence: {messageRef}` attestation that the operation was not executed.
|
|
248
|
+
The approval remains consumed after cancellation. Do not resolve version drift through automatic updates, migration or renewed permission.
|
|
249
|
+
Report the cause of the hold to Orchestrator.
|
|
250
|
+
|
|
251
|
+
Even succeeded results are operator attestations, not independent remote verification. `audit` retains the
|
|
252
|
+
request→decision→intent→result→resolution linkage, but is a locally editable record rather than tamper-proof security evidence.
|
|
253
|
+
Do not retry while the actual external outcome is uncertain.
|