@arbiterforge/ca-pi 0.18.3 → 0.19.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/README.md +1 -1
- package/package.json +1 -1
- package/plugins/ca-pi/CHANGELOG.md +60 -0
- package/plugins/ca-pi/COMMANDS.md +2 -2
- package/plugins/ca-pi/SKILLS.md +5 -5
- package/plugins/ca-pi/SPRINT.md +43 -230
- package/plugins/ca-pi/agents/backend-author.md +5 -5
- package/plugins/ca-pi/agents/checkpoint-aggregator.md +7 -0
- package/plugins/ca-pi/agents/frontend-author.md +5 -5
- package/plugins/ca-pi/agents/infra-author.md +6 -7
- package/plugins/ca-pi/agents/scout.md +25 -24
- package/plugins/ca-pi/arbiter.md +6 -4
- package/plugins/ca-pi/generated/command-catalog.json +5 -5
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-amd64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-arm64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-amd64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-arm64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-amd64.exe +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-arm64.exe +0 -0
- package/plugins/ca-pi/helpers/artifacts/release.json +37 -37
- package/plugins/ca-pi/hooks/_approvallib.py +41 -0
- package/plugins/ca-pi/hooks/_artifactlib.py +61 -115
- package/plugins/ca-pi/hooks/_artifactpromptlib.py +12 -12
- package/plugins/ca-pi/hooks/_bashguardlib.py +66 -4
- package/plugins/ca-pi/hooks/_contextselectlib.py +38 -35
- package/plugins/ca-pi/hooks/_contextwriterlib.py +114 -0
- package/plugins/ca-pi/hooks/_host.py +1 -1
- package/plugins/ca-pi/hooks/_prerequisitelib.py +35 -0
- package/plugins/ca-pi/hooks/_provenancelib.py +107 -1
- package/plugins/ca-pi/hooks/_readinjectlib.py +21 -7
- package/plugins/ca-pi/hooks/_reconciliationlib.py +170 -3
- package/plugins/ca-pi/hooks/_releaselib.py +6 -6
- package/plugins/ca-pi/hooks/_sprintapprovallib.py +52 -2
- package/plugins/ca-pi/hooks/artifact-reconcile.py +13 -4
- package/plugins/ca-pi/hooks/hostapi.py +1 -1
- package/plugins/ca-pi/hooks/init-codearbiter.py +34 -5
- package/plugins/ca-pi/includes/artifacts-attestation.md +434 -0
- package/plugins/ca-pi/includes/artifacts.md +133 -492
- package/plugins/ca-pi/includes/author-tdd-workflow.md +32 -21
- package/plugins/ca-pi/includes/fresh-verification.md +14 -12
- package/plugins/ca-pi/includes/harvest.md +3 -3
- package/plugins/ca-pi/includes/reference-map.md +1 -1
- package/plugins/ca-pi/includes/routing-table.md +3 -3
- package/plugins/ca-pi/includes/sprint-authority.md +6 -1
- package/plugins/ca-pi/includes/verification-boundary.md +11 -2
- package/plugins/ca-pi/package.json +1 -1
- package/plugins/ca-pi/routines/INDEX.md +8 -8
- package/plugins/ca-pi/routines/brainstorming/SKILL.md +65 -202
- package/plugins/ca-pi/routines/commit-gate/SKILL.md +60 -25
- package/plugins/ca-pi/routines/context-check/SKILL.md +89 -53
- package/plugins/ca-pi/routines/context-creation/SKILL.md +114 -220
- package/plugins/ca-pi/routines/decompose/SKILL.md +139 -167
- package/plugins/ca-pi/routines/executing-plans/SKILL.md +38 -136
- package/plugins/ca-pi/routines/finishing-a-development-branch/SKILL.md +45 -55
- package/plugins/ca-pi/routines/refactor/SKILL.md +27 -12
- package/plugins/ca-pi/routines/release/SKILL.md +1 -1
- package/plugins/ca-pi/routines/subagent-driven-development/SKILL.md +80 -230
- package/plugins/ca-pi/routines/tdd/SKILL.md +115 -228
- package/plugins/ca-pi/routines/writing-plans/SKILL.md +104 -174
- package/plugins/ca-pi/skills/ca-audit/SKILL.md +2 -2
- package/plugins/ca-pi/skills/ca-checkpoint/SKILL.md +1 -1
- package/plugins/ca-pi/skills/ca-commit/SKILL.md +60 -25
- package/plugins/ca-pi/skills/ca-context-check/SKILL.md +89 -53
- package/plugins/ca-pi/skills/ca-create-context/SKILL.md +114 -220
- package/plugins/ca-pi/skills/ca-decompose/SKILL.md +139 -167
- package/plugins/ca-pi/skills/ca-feature/SKILL.md +21 -38
- package/plugins/ca-pi/skills/ca-fix/SKILL.md +15 -9
- package/plugins/ca-pi/skills/ca-init/SKILL.md +18 -40
- package/plugins/ca-pi/skills/ca-pr/SKILL.md +45 -55
- package/plugins/ca-pi/skills/ca-refactor/SKILL.md +27 -12
- package/plugins/ca-pi/skills/ca-release/SKILL.md +1 -1
- package/plugins/ca-pi/skills/ca-review/SKILL.md +5 -8
- package/plugins/ca-pi/skills/ca-sprint/SKILL.md +11 -25
- package/plugins/ca-pi/skills/ca-status/SKILL.md +15 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: decompose
|
|
3
|
-
description: Develop greenfield
|
|
3
|
+
description: Develop greenfield context from a durable interview and initialize it through the native context writer.
|
|
4
4
|
argument-hint: (none)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,180 +9,152 @@ argument-hint: (none)
|
|
|
9
9
|
<!-- catalog-compatibility-notice:start -->
|
|
10
10
|
> Compatibility route. Prefer `/ca-init --greenfield` for new usage. This installed route remains
|
|
11
11
|
> functional under the command-route compatibility policy at <plugin-root>/includes/command-compatibility.md;
|
|
12
|
-
> continue with the
|
|
12
|
+
> continue with the greenfield workflow below.
|
|
13
13
|
<!-- catalog-compatibility-notice:end -->
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Develop the project specification before implementation. Keep actual user decisions,
|
|
16
|
+
planned architecture and observed repository facts distinct.
|
|
16
17
|
|
|
17
|
-
##
|
|
18
|
+
## 1. Inspect and resume
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
Read `.codearbiter/CONTEXT.md`. An initialized project returns to normal operation;
|
|
21
|
+
context changes use `/ca-context-check`. Meaningful implementation source routes
|
|
22
|
+
to `/ca-create-context`. If the scaffold is absent, run `/ca-init` first.
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
Keep the interview in `.codearbiter/plans/decomposition/`: `_session.md` records the
|
|
25
|
+
current phase, remaining questions and actual user confirmations; each completed
|
|
26
|
+
layer has its own file. Read this state and resume the first unfinished step. Do not
|
|
27
|
+
repeat settled questions or require another approval of unchanged accepted work.
|
|
28
|
+
An explicit restart preserves earlier interview and decision history.
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
If `.codearbiter/.decompose-draft/` contains an interrupted interview, copy its session
|
|
31
|
+
and layer records to the durable directory before using them as source evidence.
|
|
32
|
+
Compare existing destinations byte-for-byte: retain identical files, and reconcile
|
|
33
|
+
conflicting versions without overwriting either. Temporary drafts remain until
|
|
34
|
+
initialization completes. Never cite a temporary file that cleanup will remove.
|
|
26
35
|
|
|
27
|
-
##
|
|
36
|
+
## 2. Capture the interview
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
Explain briefly that you will establish scope, architecture and a build sequence.
|
|
39
|
+
Ask focused questions only where existing answers do not establish the needed facts
|
|
40
|
+
or choices. Use these six layers; record an inapplicable category with its reason.
|
|
41
|
+
Persist each layer before proceeding. Each record contains the question, actual
|
|
42
|
+
answer, relevant trade-offs and unresolved `[CONFIRM-NN]` items. Keep each source
|
|
43
|
+
file within 1 MiB; split a long layer into named parts. Exclude secret values.
|
|
30
44
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
State the Rules of Engagement, verbatim:
|
|
34
|
-
|
|
35
|
-
> **Rules of Engagement**
|
|
36
|
-
>
|
|
37
|
-
> - **Pacing:** ONE LAYER AT A TIME. One focused question at a time within a layer (cluster only when tightly coupled). Never advance until the current layer is solid — no hand-wavy answers, no deferred decisions, no unchallenged vague language.
|
|
38
|
-
> - **Three lenses on every answer:**
|
|
39
|
-
> 1. **Vague requirements** — Challenge hand-wavy language. Force concrete nouns, numbers, and verbs. "Manage" is not a verb. "We'll figure that out later" is not acceptable; every "later" becomes a `[CONFIRM-NN]` placeholder.
|
|
40
|
-
> 2. **Hidden complexity** — After each layer, name what the user assumes is easy but is hard: state management, real-time sync, edge cases, data migration, multi-tenancy, role matrices, offline behavior, failure modes — anything that grows non-linearly with scale.
|
|
41
|
-
> 3. **Trade-off forcing** — When a real architectural or product decision exists, frame it: "X gives you A but costs B; Y gives you C but costs D — choose." Record every forced choice as a DRAFT ADR.
|
|
42
|
-
> - **Suggestions calibrated to confidence:** HIGH → recommend one option, one-line justification. MEDIUM → present 2–3 options with trade-offs, ask the deciding question. LOW → flag the gap, explain why it matters, ask the unlocking question. Never skip a gap silently; never suggest an integration without stating why.
|
|
43
|
-
|
|
44
|
-
No interview question is asked yet — the Layer 1 question is asked at the end of Phase 2, after draft persistence exists, so the first answer lands on disk.
|
|
45
|
-
|
|
46
|
-
Gate: persona and Rules of Engagement stated. Advance to Phase 2, never directly to Phase 3.
|
|
47
|
-
|
|
48
|
-
## Phase 2 — Draft persistence (or resume) · gate: BLOCK
|
|
49
|
-
|
|
50
|
-
The Phase 3 interview accumulates 60–110 Q/A turns across six layers. Without per-layer disk persistence, an auto-compaction event silently destroys earlier reasoning and any DRAFT ADRs. This phase plus the per-layer write rule in Phase 3 plus the disk re-read in Phase 4/5 make the skill compaction-resilient: every layer is durable the moment its gate clears.
|
|
51
|
-
|
|
52
|
-
Check for an existing draft directory at `<project-root>/.codearbiter/.decompose-draft/`.
|
|
53
|
-
|
|
54
|
-
**If it exists with `_session.md` and one or more `layer-N-*.md` files — Resume mode:**
|
|
55
|
-
|
|
56
|
-
- Read `_session.md` and every `layer-*.md` present. Read every `<project-root>/.codearbiter/decisions/*.md` with `status: draft` (prior-session draft ADRs to carry forward).
|
|
57
|
-
- Present a numbered summary: prior-session timestamp, captured layers by name, count of DRAFT ADRs.
|
|
58
|
-
- Ask the user to choose: **(a) Resume** — continue from the next unfinished layer, treating captured layers as solid; **(b) Restart** — delete the draft directory and every `status: draft` ADR, begin fresh; **(c) Abort** — exit the skill, leave draft directory and DRAFT ADRs intact.
|
|
59
|
-
- On Resume: re-establish each captured layer as solid, then enter Phase 3 at the next unfinished layer. On Restart: delete `.decompose-draft/` and every DRAFT ADR, then fresh-init below. On Abort: exit cleanly; never silently delete.
|
|
60
|
-
|
|
61
|
-
**If no draft directory exists (or after Restart) — fresh init:**
|
|
62
|
-
|
|
63
|
-
- Create `<project-root>/.codearbiter/.decompose-draft/`.
|
|
64
|
-
- Write `_session.md` recording the ISO-8601 start timestamp, the invoking identity (`git config user.email`), `Status: in-progress`, and a note that this directory is session state, auto-deleted on Phase 6 completion, and that re-invoking `/decompose` after interruption enters Resume mode.
|
|
65
|
-
- Ensure `.codearbiter/.decompose-draft/` is gitignored — append the entry to `<project-root>/.gitignore` if absent.
|
|
66
|
-
|
|
67
|
-
Then ask the first Layer 1 question to open the interview:
|
|
68
|
-
|
|
69
|
-
> "Describe your solution vision in your own words. What problem does it solve, and for whom?"
|
|
70
|
-
|
|
71
|
-
Gate: Phase 3 does not begin until either (a) the draft directory exists with `_session.md` and is otherwise empty (fresh start), or (b) prior layers are replayed and the user explicitly chose Resume.
|
|
72
|
-
|
|
73
|
-
## Phase 3 — Layered interview · gate: BLOCK
|
|
74
|
-
|
|
75
|
-
Run the six layers in strict sequence. Never skip a layer. Never advance until the current layer is solid — no open "later" items unless recorded as `[CONFIRM-NN]`, no unchallenged vague language, no forced trade-off left unresolved.
|
|
76
|
-
|
|
77
|
-
**Per-layer disk write (compaction contract):** when a layer's "advance when" checklist is satisfied, BEFORE the first question of the next layer, write the completed layer's full Q/A record to disk:
|
|
78
|
-
|
|
79
|
-
| Layer | Draft file |
|
|
45
|
+
| Layer and file | Required outcomes |
|
|
80
46
|
|---|---|
|
|
81
|
-
| 1 —
|
|
82
|
-
| 2 —
|
|
83
|
-
| 3 —
|
|
84
|
-
| 4 —
|
|
85
|
-
| 5 —
|
|
86
|
-
| 6 —
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
Re-read every input from disk — the three approved artifacts, all six `layer-*-*.md` files, and every `status: draft` ADR. This makes population idempotent across compaction: a user may approve Phase 4, suffer a compaction, re-invoke `/decompose` (Phase 2 enters Resume, Phase 4 sees its artifacts already approved on disk), and Phase 5 proceeds from disk.
|
|
129
|
-
|
|
130
|
-
Promote each `status: draft` ADR to `status: accepted` — an in-place edit of the frontmatter `status:` line (and its `## Status` body mirror) only; do not duplicate or rewrite the ADR body.
|
|
131
|
-
|
|
132
|
-
Then write the surviving project-state docs. Every file holds actual content derived from the interview — no template boilerplate left unfilled:
|
|
133
|
-
|
|
134
|
-
| Source | Destination |
|
|
47
|
+
| 1 — `layer-1-vision.md` | Problem, primary users, demonstrable success and exclusions. |
|
|
48
|
+
| 2 — `layer-2-flows.md` | User journey, non-human actors, failure experience and privilege boundaries. |
|
|
49
|
+
| 3 — `layer-3-functional-scope.md` | Capabilities with initiators, inputs and outputs; MVP/v1/later classification; hardest user-facing risk. |
|
|
50
|
+
| 4 — `layer-4-tech-shape.md` | Components and ownership, entities, state/write paths, stack and other hard constraints, technical risks, copyright holder, actual architectural choices and release intent. |
|
|
51
|
+
| 5 — `layer-5-integrations.md` | External dependencies, available contracts/authentication, ownership, reliability, cost and fallback requirements. |
|
|
52
|
+
| 6 — `layer-6-risks.md` | Material risks with mitigations, unresolved questions, bounded spikes and architecture-change triggers. |
|
|
53
|
+
|
|
54
|
+
Record a user-decided architectural choice through `decision-lifecycle` at
|
|
55
|
+
`<plugin-root>/routines/decision-lifecycle/SKILL.md`. It owns ADR numbering,
|
|
56
|
+
attribution, authoring and status transitions. Preserve draft choices as drafts
|
|
57
|
+
until the user actually decides; do not create an ADR merely to fill a quota.
|
|
58
|
+
|
|
59
|
+
Release intent is elicited here: capture the **tag prefix** preference and
|
|
60
|
+
**changelog kept** yes/no in Layer 4. No `.codearbiter/release-targets.md` row is ever written by this skill.
|
|
61
|
+
Greenfield runs before any manifest or tag exists. `/ca-release` or a subsequent
|
|
62
|
+
context refresh derives a target from the actual manifest and delivery structure.
|
|
63
|
+
|
|
64
|
+
An unresolved consequential choice blocks its dependent output. Record other gaps
|
|
65
|
+
as questions; a user's explicit deferral remains unresolved and is not permission.
|
|
66
|
+
|
|
67
|
+
## 3. Synthesize and confirm
|
|
68
|
+
|
|
69
|
+
Re-read the retained layer records and relevant ADRs. Write these three artifacts
|
|
70
|
+
under `.codearbiter/plans/`, using the recorded evidence:
|
|
71
|
+
|
|
72
|
+
- `01-architecture-breakdown.md`: components, responsibilities, connections,
|
|
73
|
+
integration boundaries and remaining architectural questions.
|
|
74
|
+
- `02-phased-build-plan.md`: MVP and subsequent phases, scope, risks, deferrals and
|
|
75
|
+
measurable completion criteria.
|
|
76
|
+
- `03-task-backlog.md`: prioritized, bounded tasks with roles, dependencies and
|
|
77
|
+
time-boxed spikes.
|
|
78
|
+
|
|
79
|
+
Present the files for review. Apply corrections and record the user's actual
|
|
80
|
+
confirmation in `_session.md`; existing confirmation covers unchanged artifacts.
|
|
81
|
+
Proceed when the artifacts accurately represent the user's choices and each gap is
|
|
82
|
+
resolved or explicitly retained on the question board.
|
|
83
|
+
|
|
84
|
+
## 4. Populate context
|
|
85
|
+
|
|
86
|
+
Re-read the approved artifacts and retained interview sources. Prepare UTF-8 drafts
|
|
87
|
+
outside the five target paths, each at most 128 KiB. Use only relevant retained
|
|
88
|
+
sources for each document; planned choices must not be described as implemented facts.
|
|
89
|
+
Use the matching document title: `# Project: <name>`, `# Tech stack`,
|
|
90
|
+
`# Coding standards`, `# Security controls` or `# Code map`.
|
|
91
|
+
Preserve existing CONTEXT frontmatter exactly; the scaffold owns activation and stage.
|
|
92
|
+
|
|
93
|
+
| Document ID | Content |
|
|
135
94
|
|---|---|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
95
|
+
| `CONTEXT` | Identity, purpose, users, scope and exclusions; frontmatter `arbiter: enabled` and one `stage:` number. |
|
|
96
|
+
| `tech-stack` | Intended runtime, frameworks, tooling and confirmed conventions. Mark commands without a real manifest as planned, not verified executable commands. |
|
|
97
|
+
| `coding-standards` | Confirmed structural/style conventions and copyright holder. |
|
|
98
|
+
| `security-controls` | Actual trust boundaries, authentication requirements, secret handling and prohibited primitives. |
|
|
99
|
+
| `code-map` | Planned concerns and ownership. Distinguish proposed paths from existing paths; state when no implementation paths exist yet. |
|
|
100
|
+
|
|
101
|
+
For each of the five documents, invoke the installed writer:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
python3 "<plugin-root>/hooks/init-codearbiter.py" --root "<project-root>" --context-draft "<draft.md>" --document "<document-id>" --source ".codearbiter/plans/decomposition/<layer-file.md>"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Repeat `--source` for each relevant retained source, up to 64 per document. Inspect
|
|
108
|
+
the returned preview, exact preimage and source bindings, then apply that preview
|
|
109
|
+
under the existing authorization:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python3 "<plugin-root>/hooks/init-codearbiter.py" --root "<project-root>" --context-apply "<preview_ref>" --preview-sha256 "<preview_sha256>"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The writer commits each document and its v2 provenance record together. Do not write
|
|
116
|
+
those protected pairs directly. A digest records inspected bytes; it does not certify
|
|
117
|
+
semantic review or user authority. If source or output bytes change, inspect the
|
|
118
|
+
changed input and prepare a fresh preview. Reuse the same retained preview after an
|
|
119
|
+
uncertain response; recovery determines whether its transaction committed.
|
|
120
|
+
|
|
121
|
+
Populate the other records through their owners:
|
|
122
|
+
|
|
123
|
+
- Add each approved backlog item with `python3 "<plugin-root>/hooks/taskwrite.py" add "<task>"`.
|
|
124
|
+
Compare the existing board before retrying so resumed population does not duplicate
|
|
125
|
+
tasks. Never write task rows directly or mark planned work done.
|
|
126
|
+
- Record unresolved questions in `open-questions.md`, retaining the scaffold and
|
|
127
|
+
actual resolution or deferral history. An empty question board is valid.
|
|
128
|
+
- Preserve `overrides.log`, `last-checkpoint` and all ADR history. The scaffold owns
|
|
129
|
+
their creation; initialization does not invent audit events or acceptance evidence.
|
|
130
|
+
|
|
131
|
+
Verify all five v2 pairs, the task/question boards and audit header are present.
|
|
132
|
+
Do not scaffold cut documents listed in `<plugin-root>/includes/cut-docs.md`.
|
|
133
|
+
|
|
134
|
+
## 5. Finalize and return to work
|
|
135
|
+
|
|
136
|
+
Preview initialization against the exact five document/provenance pairs and the
|
|
137
|
+
three independent board/audit outputs:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
python3 "<plugin-root>/hooks/init-codearbiter.py" --root "<project-root>" --context-finalize
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Inspect the result and apply its `preview_ref` and `preview_sha256` with
|
|
144
|
+
`--context-apply`. The writer validates current outputs and source evidence, then
|
|
145
|
+
commits the standalone `<!--INITIALIZED-->` marker and matching CONTEXT provenance
|
|
146
|
+
together. Missing, stale or malformed input names the repair needed; never append
|
|
147
|
+
the marker manually. Recover an uncertain transaction before preparing another.
|
|
148
|
+
|
|
149
|
+
Read back the committed result and all required outputs. Keep
|
|
150
|
+
`.codearbiter/plans/decomposition/`, approved plans and decision history. Remove only
|
|
151
|
+
this run's temporary drafts after confirming no provenance source refers to them.
|
|
152
|
+
Record completion in `_session.md`. Report the populated context, unresolved choices
|
|
153
|
+
and actual checks, then continue authorized work. Initialization records population;
|
|
154
|
+
it does not certify host enforcement, semantic review or passing tests.
|
|
155
|
+
|
|
156
|
+
When source and manifests arrive, `/ca-context-check` refreshes the selected
|
|
157
|
+
context against those files. Use `_provenancelib.assess_context_provenance` to inspect
|
|
158
|
+
current evidence. An existing `first_input_pending` result names the bounded refresh;
|
|
159
|
+
otherwise select the documents affected by the new source. Preserve interview
|
|
160
|
+
history and the initialized marker while reconciling intended and implemented facts.
|
|
@@ -1,145 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: executing-plans
|
|
3
|
-
description:
|
|
3
|
+
description: Assistive /feature coordinator. Select relevant tasks from a maintained spec/plan, delegate a useful batch when warranted, record verified versus pending checks honestly, and give progress summaries without default human-approval stops.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# executing-plans
|
|
8
8
|
|
|
9
|
+
Coordinate implementation of an already-authorized `/feature` plan. The spec/plan is a **maintained working agreement**, not an additional permission system. This coordinator schedules work and reports progress; `subagent-driven-development` owns implementation and scoped checks.
|
|
10
|
+
|
|
9
11
|
## Structured-artifact format boundary
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
`
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
For Markdown, group remaining tasks into small batches; the three-to-five task ceiling is legacy
|
|
48
|
-
presentation guidance, not a reason to rewrite typed scope. For HTML, read the authored checkpoint partition
|
|
49
|
-
through the installed engine. Build the sequence from the plan's exact checkpoint membership and ordering,
|
|
50
|
-
retaining each checkpoint's full task-ID set as its acceptance scope. Skip a checkpoint only when current
|
|
51
|
-
engine evidence establishes its accepted state. Do not remove `REVIEW` tasks from an unfinished checkpoint:
|
|
52
|
-
they still need the combined review and whole-scope acceptance. Likewise, do not drop `BLOCKED` members:
|
|
53
|
-
excluding one does not make the checkpoint complete. Resume it only through the supported reconciliation path
|
|
54
|
-
and refreshed eligibility. Respect explicit dependencies in either format.
|
|
55
|
-
|
|
56
|
-
A smaller display grouping must not split an HTML acceptance scope, combine checkpoints, or change their
|
|
57
|
-
membership to fit a task-count ceiling. Execute and accept one authored scope at a time. If the partition
|
|
58
|
-
itself is unsuitable, return the actual problem to `writing-plans` for the existing amendment/approval path;
|
|
59
|
-
do not mutate scope identity in the coordinator or add a new batching registry.
|
|
60
|
-
|
|
61
|
-
**Resume is the normal re-entry.** For Markdown, a task already `ACCEPTED` in
|
|
62
|
-
the plan's status column was verified before an earlier interruption. For HTML,
|
|
63
|
-
derive resume from current `eligible` evidence and the authored checkpoint partition above.
|
|
64
|
-
For Markdown, exclude accepted tasks from new batches. For HTML, retain checkpoint membership while
|
|
65
|
-
selecting only eligible work, and say which current accepted checkpoints are already complete.
|
|
66
|
-
Stale proof requires its existing reconciliation and revalidation, not automatic reimplementation.
|
|
67
|
-
Never restart the pipeline at brainstorming merely because the session died mid-plan.
|
|
68
|
-
|
|
69
|
-
After process recreation on an HTML pair, rediscover the same authoritative pair
|
|
70
|
-
and query `identity` and `eligible` again. An `IN_PROGRESS` task is not proof of
|
|
71
|
-
completion. Use the installed reconciliation adapter in `<plugin-root>/includes/artifacts.md` for the exact task,
|
|
72
|
-
including its genuine host-observed decision and exact stored retry identity; do not construct
|
|
73
|
-
an authority event in this coordinator. A supported `task-reconcile` transition must precede
|
|
74
|
-
redispatch through `task-start` with a fresh complete context ticket. A task in `REVIEW` still requires fresh evidence and the current
|
|
75
|
-
scope review before `accept-scope`; conversation memory cannot advance it.
|
|
76
|
-
|
|
77
|
-
For each task, confirm the plan names its exact target paths and its verification command. A task
|
|
78
|
-
missing either is underspecified — return it to `writing-plans`, do not improvise the gap.
|
|
79
|
-
|
|
80
|
-
Present the batch breakdown to the user as information, not a question: which tasks land in batch 1,
|
|
81
|
-
and what follows. Do NOT stop for a separate acknowledgment — the user approved the plan in
|
|
82
|
-
`writing-plans`, and the first Phase 3 checkpoint arrives after batch 1; a breakdown objection
|
|
83
|
-
surfaces there (or the user interrupts). Each unresolved unknown is a `[CONFIRM-NN]` in
|
|
84
|
-
`open-questions.md` — surface it, do not guess past it.
|
|
85
|
-
|
|
86
|
-
Gate: a batch sequence exists and every task has a target path and a verification command.
|
|
87
|
-
Missing current authority or capability, a stale prerequisite, or a `[CONFIRM-NN]` blocking the
|
|
88
|
-
first scope is a gate failure. Follow the existing diagnostic or reconciliation owner; do not
|
|
89
|
-
invent a plan, drop blocked members, or restart the interview to clear it.
|
|
90
|
-
|
|
91
|
-
## Phase 2 — Execute batch · gate: BLOCK
|
|
92
|
-
|
|
93
|
-
Invoke `subagent-driven-development` (`<plugin-root>/routines/subagent-driven-development/SKILL.md`) with `scope = [current batch task IDs]`. Pass the plan slug and
|
|
94
|
-
spec slug so it can read its own pre-flight files. Do not implement anything here — the author agents,
|
|
95
|
-
review chain, and verification all run inside that skill.
|
|
96
|
-
|
|
97
|
-
For HTML, pass the selected spec/plan identities and the complete task-ID set for one authored checkpoint;
|
|
98
|
-
do not pass a partial or cross-checkpoint task set. Labels and presentation batches do not confer acceptance.
|
|
99
|
-
The nested workflow uses engine eligibility to select work inside that scope, records dispatch with `task-start`, records
|
|
100
|
-
the separate verification and spec-review receipts with `task-review`, and
|
|
101
|
-
records whole-scope acceptance once with `accept-scope`. Preserve every returned
|
|
102
|
-
identity and receipt for the checkpoint and later commit proof.
|
|
103
|
-
|
|
104
|
-
`subagent-driven-development` returns when every task in the scope is `ACCEPTED` (Phase 3–5 green,
|
|
105
|
-
verification passed on a fresh run). A `tdd` BLOCK, a security CRITICAL finding, or an unresolved
|
|
106
|
-
`[CONFIRM-NN]` surfaced inside that skill halts the loop — surface it to the user and do not proceed.
|
|
107
|
-
|
|
108
|
-
Gate: `subagent-driven-development` signals batch complete with all scoped tasks `ACCEPTED`. Any
|
|
109
|
-
unresolved halt from inside the skill is a gate failure here.
|
|
110
|
-
|
|
111
|
-
## Phase 3 — Checkpoint · gate: STOP
|
|
112
|
-
|
|
113
|
-
Every task in the batch is done and verified. STOP and checkpoint with the user before any further
|
|
114
|
-
work:
|
|
115
|
-
|
|
116
|
-
- **Landed** — the tasks completed this batch, each verified by `subagent-driven-development` Phase 5.
|
|
117
|
-
- **Next** — the tasks in the upcoming batch.
|
|
118
|
-
- **Open** — any `[NEEDS-TRIAGE]` marker raised inside the batch, any `[CONFIRM-NN]` still blocking.
|
|
119
|
-
|
|
120
|
-
Do not begin the next batch until the user acknowledges. This gate is the point of `/feature` — the
|
|
121
|
-
human checkpoint that separates it from `/sprint`'s autonomous run.
|
|
122
|
-
|
|
123
|
-
Gate: the user has acknowledged the checkpoint. On acknowledgement, loop to Phase 2 for the next
|
|
124
|
-
batch. When the final batch is acknowledged and the plan is fully verified, route to `commit-gate` —
|
|
125
|
-
do not commit from here.
|
|
126
|
-
|
|
127
|
-
Before claiming that an HTML plan's final batch completed, use the installed
|
|
128
|
-
bridge's `_preflight_current_acceptance` with the exact route returned by
|
|
129
|
-
`_resolve_workflow_pair`, the repository-bound client, and the engine-returned
|
|
130
|
-
spec and plan artifact IDs. Pass no caller status, digest, receipt, or label.
|
|
131
|
-
Retain the returned engine identities and receipt set for `commit-gate`. Any
|
|
132
|
-
refusal leaves the batch incomplete and blocks the handoff.
|
|
133
|
-
|
|
134
|
-
## Hard rules
|
|
135
|
-
|
|
136
|
-
- MUST NOT execute tasks inline — delegate every batch to `subagent-driven-development` with an explicit `scope`.
|
|
137
|
-
- MUST NOT advance past a checkpoint the user has not acknowledged.
|
|
138
|
-
- MUST NOT call `commit-gate` until all batches are acknowledged and every plan
|
|
139
|
-
task is accepted; for HTML this means a fresh `eligible` result reports
|
|
140
|
-
`all_accepted_and_current: true` for the selected plan identity.
|
|
141
|
-
- MUST surface any halt from `subagent-driven-development` (tdd BLOCK, CRITICAL, CONFIRM-NN) to the user — do not swallow it or re-dispatch around it.
|
|
142
|
-
- MUST NOT absorb scope the plan does not name — mark it `[NEEDS-TRIAGE]`.
|
|
143
|
-
- MUST NOT commit; route to `commit-gate` when the plan is fully verified.
|
|
144
|
-
- MUST return an underspecified task (missing path or verification command) to `writing-plans` — do not improvise the gap.
|
|
145
|
-
- MUST surface a plan-versus-code conflict via `/conflict`, never silently reconcile it.
|
|
13
|
+
Load `<plugin-root>/includes/artifacts.md` for artifact I/O and preserve the selected spec/plan representation.
|
|
14
|
+
|
|
15
|
+
An HTML checkpoint is **not a new user checkpoint in `/sprint`**. The sprint route hands the whole plan directly to `subagent-driven-development`. For `/feature`, checkpoints group meaningful progress. A user-requested attended pause is respected, but no artifact-created approval prompt is required between routine batches.
|
|
16
|
+
|
|
17
|
+
## Phase 1 - Select the next meaningful work
|
|
18
|
+
|
|
19
|
+
After process recreation, rediscover the same authoritative pair and query `identity` and `eligible` again. Read the relevant criteria, current plan tasks, and actual dependencies through `index`, `outline`, and symbol-scoped `read`. The engine `eligible` response is **advisory**, never a permission grant or a current-test claim. `REVIEW` or `DONE` records implementation progress, not a passing test.
|
|
20
|
+
|
|
21
|
+
For HTML, inspect the plan's exact checkpoint membership and use the authored checkpoint partition to organize the work. A three-to-five task grouping is optional presentation guidance; it **must not split an HTML acceptance scope** just to meet a count. Retain each checkpoint's full task-ID set for accurate reporting, but do not treat earlier checkpoint numbering as a dependency or approval. A `BLOCKED` member is still visible and cannot silently make the checkpoint complete. Group independent work so it can continue when another member has a real unmet prerequisite.
|
|
22
|
+
|
|
23
|
+
For Markdown, retain its recorded task statuses and dependencies without auto-conversion. The coordinator may return an underspecified task to `writing-plans` or amend the authorized method and check with a reason. Ask only about a consequential missing decision; no repeated plan approval, negative intent interview, or prerequisite code.
|
|
24
|
+
|
|
25
|
+
On resume, examine `IN_PROGRESS` work and outstanding workers before attempting any new start. If the state needs correction, use a reasoned `task-reconcile` under current CAS/operation ID. Never infer that work is done merely because a process died; never automatically clear `BLOCKED` or duplicate execution. A stale proof observation is visible but is not a reason to restart the whole specification process.
|
|
26
|
+
|
|
27
|
+
**Progress assessment:** identify actionable tasks, relevant checks, and genuinely missing inputs. A disputed source requirement or irreversible operation is a real question. Missing optional code-map text, a reviewer adapter, approval nonce, or delivery ticket is not a universal blocker.
|
|
28
|
+
|
|
29
|
+
## Phase 2 - Execute and record a coherent batch
|
|
30
|
+
|
|
31
|
+
Invoke `subagent-driven-development` with an explicit `scope` containing the selected task IDs (normally an authored checkpoint's relevant work). Do not pass a partial or cross-checkpoint task set **as if** it were evidence of whole-checkpoint acceptance; presentation batches do not confer acceptance. The nested implementation skill may use one author, several well-scoped agents, or direct implementation based on actual value. A fresh author plus two reviewers for each task is not compulsory.
|
|
32
|
+
|
|
33
|
+
For HTML, progress through ordinary `task-start`, `task-review` (implementation ready), and receipt-free `accept-scope` (implementation `DONE`) as applicable. A fact prerequisite can be checked and recorded with a reported source; an unresolved decision needs the actual user's choice. No `arm-sprint`, `satisfy-prerequisite` reply, `task-reconcile` approval nonce, mandatory context ticket, or `_preflight_current_acceptance` call is necessary for ordinary execution.
|
|
34
|
+
|
|
35
|
+
The worker returns actual work and checks, including failures or still-unrun verification. These remain outstanding in the batch report. Do not describe `DONE` as `ACCEPTED` or replace command output with a model assertion. If a required check fails, repair the affected work or report incomplete verification; do not rerun all unrelated reviewers solely because an evidence receipt changed.
|
|
36
|
+
|
|
37
|
+
## Phase 3 - Report progress; pause only when requested
|
|
38
|
+
|
|
39
|
+
Report what changed, the applicable tests/checks actually run and their results, what remains, and the next dependency-clean batch. Use `[NEEDS-TRIAGE]` for discoveries outside the agreed scope. Do not claim the batch shipped or passed every check unless current evidence supports that statement.
|
|
40
|
+
|
|
41
|
+
**Normal behavior:** continue to the next authorized batch without waiting for the user to acknowledge a routine status report. A checkpoint is a progress summary, not an implicit human permission boundary. If the user explicitly requested a review, pause, signoff, or constrained attended execution point, honor it and do not proceed past that chosen point until answered. Also stop at genuine new product choices, explicit user denials, independent host/security restrictions, or irreversible actions outside the existing authority.
|
|
42
|
+
|
|
43
|
+
Once implementation is complete, send the current plan state, actual verification results, and open work to `commit-gate` **only if committing is authorized**. The commit gate owns its actual Git permissions, focused checks, staged diff review, and independent security controls. Advisory engine status is not a substitute for those checks, but the engine's receipt chain is not an additional permission to make a commit.
|
|
44
|
+
|
|
45
|
+
## Hard boundaries
|
|
46
|
+
|
|
47
|
+
Do not create new HTML from a legacy Markdown pair, discard a blocked task, synthesize receipts, label unrun tests green, or silently reinterpret requirements. Never reset the entire feature on process recreation. Keep explicit human stops and actual host permissions intact. Do not personally create a commit or PR; use their owning workflows, with normal authorized branch protections.
|