@arbiterforge/ca-pi 0.18.4 → 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 +54 -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 +167 -2
- 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: ca-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,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ca-feature
|
|
3
|
-
description: "
|
|
3
|
+
description: "Build an authorized feature from a maintained specification, testable criteria and useful plan, without duplicating user approval."
|
|
4
4
|
argument-hint: "<what you want to build>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /ca-feature — spec-driven feature
|
|
8
8
|
|
|
9
|
-
The
|
|
9
|
+
The feature entry maintains a useful spec and plan before full-lane implementation. The user request supplies the intended authorization; the artifact engine does not require another permission code. Check criteria and applicable tests before claiming completion.
|
|
10
10
|
|
|
11
11
|
## Structured-artifact boundary
|
|
12
12
|
|
|
@@ -18,8 +18,7 @@ and the selected lane. Use only its returned mode, format, and paths. For a
|
|
|
18
18
|
selected HTML route it
|
|
19
19
|
checks the installed capability before writing; a missing or invalid helper is
|
|
20
20
|
a STOP and the workflow must not fall back to Markdown.
|
|
21
|
-
Its
|
|
22
|
-
command's `.md`, approval-label and status-cell assumptions for that pipeline.
|
|
21
|
+
Its typed identity, binding, and task-progress operations replace rendered-label and Markdown status-cell assumptions for that pipeline.
|
|
23
22
|
New full-lane specs use the installed structured-artifact engine and default to
|
|
24
23
|
canonical `.html`. An existing `.md` pair remains on the legacy path. Discovery requires a
|
|
25
24
|
complete same-extension spec/plan pair: select that exact pair as authoritative. A
|
|
@@ -28,7 +27,7 @@ and the next plan must use the same extension. The workflow must not create, ren
|
|
|
28
27
|
blocked. Small-lane behavior is unchanged: its confirmed mini-spec remains inline
|
|
29
28
|
and does not create a spec artifact.
|
|
30
29
|
|
|
31
|
-
**Orientation:** if `.codearbiter/code-map.md` is present, read it first — a coarse concern→path→role map that orients task authoring. Absent is fine; it is read-on-demand, populated by context-creation or commit-gate heal. At each actual author or independent reviewer dispatch, use the private `_artifactpromptlib.compose_feature_actor_input` contract described in `tdd` and `subagent-driven-development`; send
|
|
30
|
+
**Orientation:** if `.codearbiter/code-map.md` is present, read it first — a coarse concern→path→role map that orients task authoring. Absent is fine; it is read-on-demand, populated by context-creation or commit-gate heal. At each actual author or independent reviewer dispatch, use the private `_artifactpromptlib.compose_feature_actor_input` contract described in `tdd` and `subagent-driven-development`; send the bounded relevant input to that actor. Host permissions still apply to commands; delivery records do not independently grant or deny execution.
|
|
32
31
|
|
|
33
32
|
## Resume — an interrupted pipeline is re-entered, never restarted
|
|
34
33
|
|
|
@@ -46,18 +45,14 @@ rendered labels or embedded JSON. For a Markdown pair, use the
|
|
|
46
45
|
existing Markdown status ledger. Resume either exact format
|
|
47
46
|
without creating or consulting a shadow artifact; the workflow must not create,
|
|
48
47
|
rename, or convert its counterpart. On a match,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
4. **Spec exists but never approved** → `brainstorming` (`<plugin-root>/routines/brainstorming/SKILL.md`), at its approval gate — not from scratch.
|
|
58
|
-
|
|
59
|
-
Re-running `brainstorming` against an already-approved spec is the failure mode this section exists
|
|
60
|
-
to prevent: it discards approved decisions and re-asks answered questions. Only an explicit user
|
|
48
|
+
summarize the resume point without requesting an additional permission reply, then re-enter at the furthest useful stage:
|
|
49
|
+
|
|
50
|
+
1. **Plan exists with remaining, blocked, or unverified work** → `executing-plans` for actual outstanding tasks. HTML `REVIEW` and `DONE` are implementation progress, not proof of passing checks.
|
|
51
|
+
2. **Plan work complete with applicable checks recorded** → the authorized `commit-gate` handoff, without making a proof receipt another permission.
|
|
52
|
+
3. **Spec exists, no plan** → `writing-plans`.
|
|
53
|
+
4. **Spec exists but is incomplete** → inspect the missing actual requirements with `brainstorming`, rather than restarting the interview.
|
|
54
|
+
|
|
55
|
+
Re-running `brainstorming` against a usable existing spec discards decisions and re-asks answered questions. Only an explicit user
|
|
61
56
|
request ("start over") restarts an existing slug — and that is logged to `triage.log` like any
|
|
62
57
|
classification.
|
|
63
58
|
|
|
@@ -72,16 +67,14 @@ judged against `$ARGUMENTS` and a quick look at the code, never assumed:
|
|
|
72
67
|
- no new dependency, endpoint, command, or configuration surface;
|
|
73
68
|
- the behavior change is expressible as 1–3 concrete, individually testable acceptance criteria.
|
|
74
69
|
|
|
75
|
-
**Small lane:** state the mini-spec inline (the 1–3 criteria)
|
|
76
|
-
confirmation. On confirmation, append one line to `<project-root>/.codearbiter/triage.log`
|
|
70
|
+
**Small lane:** state the mini-spec inline (the 1–3 criteria). Unless the user requested a pause or a real consequential question remains, proceed without a second permission reply. Append one line to `<project-root>/.codearbiter/triage.log`
|
|
77
71
|
(append-only, `>>`):
|
|
78
72
|
|
|
79
73
|
```
|
|
80
74
|
[ISO-8601 timestamp] | BY: <git user.email> | LANE: small | SCOPE: <one-line> | BASIS: <criteria met>
|
|
81
75
|
```
|
|
82
76
|
|
|
83
|
-
Then route directly to `tdd` (`<plugin-root>/routines/tdd/SKILL.md`) — the
|
|
84
|
-
unchanged — and exit through the full `commit-gate` and `finishing-a-development-branch` exactly as
|
|
77
|
+
Then route directly to `tdd` (`<plugin-root>/routines/tdd/SKILL.md`) — the stated criteria are its obligations; run applicable TDD checks — and exit through the full `commit-gate` and `finishing-a-development-branch` exactly as
|
|
85
78
|
the full lane does. The lane trims ceremony, never gates.
|
|
86
79
|
|
|
87
80
|
Any criterion violated, or uncertain → **full lane** (below). Uncertainty is full-lane; the triage
|
|
@@ -95,31 +88,22 @@ Route through the pipeline in order; each step gates the next:
|
|
|
95
88
|
vague language, surface hidden complexity, force trade-offs. Writes the spec to
|
|
96
89
|
route-selected spec path. New full-lane work writes
|
|
97
90
|
`<project-root>/.codearbiter/specs/<slug>.html` through the installed engine.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`open-questions.md`, never guesses.
|
|
101
|
-
2. **`writing-plans`** (`<plugin-root>/routines/writing-plans/SKILL.md`) — decompose the approved spec into small tasks, each with an exact path and a
|
|
91
|
+
A missing consequential decision is asked once, not converted into a general spec-approval gate.
|
|
92
|
+
2. **`writing-plans`** (`<plugin-root>/routines/writing-plans/SKILL.md`) — turn the maintained spec into coherent tasks, each with relevant paths and a
|
|
102
93
|
verification that maps to a `tdd` obligation (it does not replace one). Writes
|
|
103
94
|
matching route-selected plan path with bijective criterion↔task coverage.
|
|
104
|
-
3. **`executing-plans`** (`<plugin-root>/routines/executing-plans/SKILL.md`) —
|
|
105
|
-
delegated to `subagent-driven-development` (`<plugin-root>/routines/subagent-driven-development/SKILL.md` — fresh author agent per task, spec-compliance review,
|
|
106
|
-
quality review, fresh verification). The user acknowledges between batches; nothing advances until
|
|
107
|
-
they do.
|
|
95
|
+
3. **`executing-plans`** (`<plugin-root>/routines/executing-plans/SKILL.md`) — runs coherent batches through `subagent-driven-development`, directly or with useful agents. Reports real progress and check results; pauses only for explicitly requested checkpoints or real missing decisions.
|
|
108
96
|
4. **`commit-gate`** — the only path to a commit; nine gates, including behavioral proof.
|
|
109
97
|
5. **`finishing-a-development-branch`** — terminal step: open-PR / merge-via-PR / discard. Every
|
|
110
98
|
change lands through a PR; never a direct write to the default branch.
|
|
111
99
|
|
|
112
|
-
The autonomous counterpart (`/ca-sprint`)
|
|
100
|
+
The autonomous counterpart (`/ca-sprint`) maintains the same spec→plan but passes the full plan to
|
|
113
101
|
`subagent-driven-development` directly, without per-batch checkpoints. That path is its own entry,
|
|
114
102
|
not `/feature`.
|
|
115
103
|
|
|
116
104
|
## Scope routing
|
|
117
105
|
|
|
118
|
-
Scope
|
|
119
|
-
`backend-author`, `frontend-author`, or `infra-author` — per the mapping in `tech-stack.md`. A
|
|
120
|
-
multi-area feature runs the appropriate agent per task. Each transition requires the affected local
|
|
121
|
-
tests from `<plugin-root>/includes/verification-boundary.md` to be green; exhaustive cross-area and
|
|
122
|
-
cross-platform proof runs in exact-head hosted CI before merge.
|
|
106
|
+
Scope suggests useful author skills (`backend-author`, `frontend-author`, `infra-author`), not mandatory one-agent-per-task dispatch. Run the affected local checks and preserve failures; exhaustive cross-area and cross-platform proof remains exact-head hosted CI before merge under `<plugin-root>/includes/verification-boundary.md`.
|
|
123
107
|
|
|
124
108
|
## When NOT to use
|
|
125
109
|
|
|
@@ -130,10 +114,9 @@ cross-platform proof runs in exact-head hosted CI before merge.
|
|
|
130
114
|
|
|
131
115
|
## Hard gate
|
|
132
116
|
|
|
133
|
-
MUST
|
|
134
|
-
spec in the full lane, the user-confirmed mini-spec in the small lane. MUST NOT take the small lane
|
|
117
|
+
MUST preserve testable intent and perform applicable checks before claiming completion. An unapproved artifact is not a denial of an already-authorized feature. MUST NOT take the small lane
|
|
135
118
|
unless every Step 0 criterion holds, and MUST log the classification to
|
|
136
119
|
`.codearbiter/triage.log` before `tdd` begins. MUST NOT skip `writing-plans` in the full lane.
|
|
137
|
-
MUST NOT
|
|
120
|
+
MUST NOT guess consequential unresolved user decisions; keep the affected task visibly waiting.
|
|
138
121
|
MUST NOT restart an interrupted pipeline whose artifacts exist on disk — resume at the furthest
|
|
139
122
|
checkpoint per the Resume ladder, unless the user explicitly asks to start over.
|
|
@@ -10,22 +10,28 @@ The only permitted entry to bug-fix work. No fix code is written before a regres
|
|
|
10
10
|
|
|
11
11
|
**Orientation:** if `.codearbiter/code-map.md` is present, read it before diagnosing — a coarse concern→path→role map that helps locate the defect. Absent is fine; it is read-on-demand.
|
|
12
12
|
|
|
13
|
-
For a confirmed bug, the
|
|
13
|
+
For a confirmed bug, the author reads the current scoped map,
|
|
14
14
|
provenance, command declarations and collector observations, applicable
|
|
15
|
-
constraints, and host-effective instructions.
|
|
16
|
-
|
|
15
|
+
constraints, and host-effective instructions. Resolve missing task-critical
|
|
16
|
+
inputs and applicable conflicts before dependent work; provenance warnings are
|
|
17
|
+
advisory. Direct implementation continues from these inputs.
|
|
18
|
+
|
|
19
|
+
When delegating, the coordinator calls `_contextselectlib.compose_fix_or_test_actor_input`
|
|
17
20
|
with `route='fix'`, `caller='fix'`, the actual task paths, and the observed,
|
|
18
21
|
expected, reproduction, cited evidence, and named regression test from the
|
|
19
|
-
bug-origin handoff.
|
|
22
|
+
bug-origin handoff. Supply `required_refs` for task-critical inputs identified
|
|
23
|
+
during orientation. Send its returned `input` to the actual author. A directly
|
|
20
24
|
confirmed bug may supply the same evidence without re-entering `debug`. Keep
|
|
21
25
|
command cwd and verification state; a historical pass does not prove a current
|
|
22
26
|
run. The packet is orientation with `requires_actor_check`, never permission to
|
|
23
27
|
change code. Resolve applicable critical context before material action.
|
|
24
28
|
Call `_contextselectlib.prepare_actor_delivery` for that returned packet and
|
|
25
29
|
the actual author/task/worktree/current epochs. Send its bounded
|
|
26
|
-
`delivery_text` to the author on `deliver
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
`delivery_text` to the author on `deliver` and retain the attempt. On `advisory`,
|
|
31
|
+
record the unknown delivery observation and continue authorized work without
|
|
32
|
+
further delivery retries. Missing required refs and applicable constraint or
|
|
33
|
+
instruction conflicts still stop dependent work; provenance warnings do not.
|
|
34
|
+
Re-select after resume, compaction or scope change.
|
|
29
35
|
|
|
30
36
|
## Flow
|
|
31
37
|
|
|
@@ -38,8 +44,8 @@ new behavior:
|
|
|
38
44
|
current state for the precise reason the bug causes (not an unrelated error).
|
|
39
45
|
4. **Confirm it's red for the right reason** — the failure message matches the described defect.
|
|
40
46
|
|
|
41
|
-
Only then does `tdd` proceed: minimal fix to green, then the remaining `tdd` gates.
|
|
42
|
-
|
|
47
|
+
Only then does `tdd` proceed: minimal fix to green, then the remaining `tdd` gates. When delegating,
|
|
48
|
+
select `backend-author`, `frontend-author`, or `infra-author` by where the bug lives. If
|
|
43
49
|
the defect cannot be pinned by a failing test, STOP and surface the question.
|
|
44
50
|
|
|
45
51
|
## Debug handoff and direct-fix prerequisite
|