@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,494 +1,135 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Load
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
the
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
One criterion may need multiple tests. Never invent a condition, oracle, source,
|
|
73
|
-
command, result, approval or reviewer to satisfy a required field.
|
|
74
|
-
|
|
75
|
-
Before requesting review or approval of a plan, use the private
|
|
76
|
-
`_approvallib._preflight_plan_verification(client, identity)` with its current engine identity.
|
|
77
|
-
It checks all task verification definitions through complete bounded engine reads
|
|
78
|
-
and collects the current source-input snapshot, reporting every unsupported
|
|
79
|
-
command and any input-policy failure together. Both ordinary and initial paired
|
|
80
|
-
approval arming enforce this check. No declared command, test discovery, or test
|
|
81
|
-
module is executed or imported. Proposed test files and names may be absent;
|
|
82
|
-
the installed collector still has to support the proposed runner's output format.
|
|
83
|
-
Missing package-script definitions cannot establish a runner contract: declare a
|
|
84
|
-
supported direct runner or supply the reviewed script definition first. Runtime
|
|
85
|
-
executable/workspace binding and fresh named-result evidence remain required.
|
|
86
|
-
|
|
87
|
-
`verification_inputs.roots` and `exclude_directories` use exact slash-separated
|
|
88
|
-
repository-relative paths. Exclusions are directory paths, not globs or basename
|
|
89
|
-
matches and not relative to an individual root. For root `site`, a generated
|
|
90
|
-
dependency exclusion is `site/node_modules`, not `node_modules`. Review each
|
|
91
|
-
excluded output directory explicitly: the plan's roots and exclusions narrow
|
|
92
|
-
the ship set. In a git work tree `.gitignore` already keeps untracked ignored
|
|
93
|
-
files out of it; outside git nothing is filtered, so exclude generated
|
|
94
|
-
directories explicitly.
|
|
95
|
-
An exclusion outside all selected roots is rejected as ineffective. Overlapping
|
|
96
|
-
roots cannot reinclude an excluded directory. Roots must exist before execution;
|
|
97
|
-
use an existing containing directory for a planned new file so its creation
|
|
98
|
-
changes the snapshot. An oversized included file is reported with its path and
|
|
99
|
-
the 32 MiB per-file limit; revise the explicit policy rather than increasing the
|
|
100
|
-
limit or excluding source/test/governance inputs needed for the task.
|
|
101
|
-
|
|
102
|
-
Snapshot input identity is ship-set membership. In a git work tree the members
|
|
103
|
-
are the git index entries present on disk, plus untracked non-ignored files
|
|
104
|
-
within the plan's roots, minus its excludes. The one fixed exemption is
|
|
105
|
-
`.codearbiter/gate-events.log`: it is never counted, whatever the plan says, and
|
|
106
|
-
stays tracked as the audit trail; every other `.codearbiter` path still counts.
|
|
107
|
-
Outside git, membership is read from the filesystem (`membership: filesystem`);
|
|
108
|
-
the root must be the top level of its work tree, so a subdirectory root counts as
|
|
109
|
-
outside git. A failed git probe fails closed with `INPUT_MEMBERSHIP_UNAVAILABLE`. An unmerged
|
|
110
|
-
git index (conflicted paths) makes a snapshot fail closed until it is resolved.
|
|
111
|
-
The manifest format is `codearbiter.verification-inputs/0.2.0`; receipts bound to
|
|
112
|
-
a 0.1.0 manifest read as stale. Each evidence object is validated at most once
|
|
113
|
-
per operation and scans are bounded; raw reads are reused only up to a 64 MiB
|
|
114
|
-
per-operation retained-byte budget, past which an object can be read again, but
|
|
115
|
-
validation is never skipped.
|
|
116
|
-
|
|
117
|
-
The existing user, SMARTS, reviewer, or verification boundary must first persist
|
|
118
|
-
its actual policy-owned workflow event as canonical JSON in the reserved
|
|
119
|
-
content-addressed authority-source store. Interactive prompt approval currently
|
|
120
|
-
has production host seams in Claude Code and Codex. Pi 1.0.0 exposes an `input`
|
|
121
|
-
event, but codeArbiter has no Pi-native authority adapter. Under Pi do not arm this
|
|
122
|
-
adapter; the workflow remains blocked until that adapter is
|
|
123
|
-
implemented. On Claude Code or Codex, arm the exact current artifact immediately
|
|
124
|
-
before asking the approval question:
|
|
125
|
-
|
|
126
|
-
```sh
|
|
127
|
-
python "<plugin-root>/hooks/_approvallib.py" arm --root "<project-root>" --artifact-id <artifact-id>
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
On Claude Code, when the result carries `ask_envelope`, pass it unchanged as the
|
|
131
|
-
entire AskUserQuestion input (no `answers`, `annotations` or other field): the
|
|
132
|
-
user approves by clicking its Approve option, and the host-observed selection is
|
|
133
|
-
applied with origin `claude:AskUserQuestion:<session>`. Otherwise, or if the
|
|
134
|
-
user prefers typing, present the returned `short_reply` (a four-character code
|
|
135
|
-
such as `approve K7MQ`); the full `reply` is also accepted, and you
|
|
136
|
-
require that exact reply: the hook tolerates surrounding whitespace, invisible characters, a code
|
|
137
|
-
fence or quotes and a closing period, but nothing else in the message, and it
|
|
138
|
-
reports a mismatch instead of staying silent. The `UserPromptSubmit` hook
|
|
139
|
-
rechecks the armed identity, records the full armed reply as the host-observed
|
|
140
|
-
policy-owned source, captures its receipt, and applies approval. An ordinary
|
|
141
|
-
`yes`, a changed artifact, a wrong or expired code, a reply inside other text, or
|
|
142
|
-
a model-authored event does not confer authority. On the next turn, verify `validate` at the `approved`
|
|
143
|
-
gate before continuing. If the user declines or the artifact changes, cancel the
|
|
144
|
-
exact pending request before arming another one:
|
|
145
|
-
|
|
146
|
-
```sh
|
|
147
|
-
python "<plugin-root>/hooks/_approvallib.py" cancel --root "<project-root>" --artifact-id <artifact-id>
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Cancellation records no authority. Other workflow authorities must use their
|
|
151
|
-
corresponding host-owned adapters. Legacy `capture` events remain readable for
|
|
152
|
-
inventory but are inspection-only: the engine refuses to wrap them in a current
|
|
153
|
-
receipt. Current authority requires `capture-observation` over a closed producer
|
|
154
|
-
profile and engine-issued evidence context; never create an authority source
|
|
155
|
-
merely to satisfy an artifact transition. `approve` checks the resulting receipt
|
|
156
|
-
against current ready content. A missing or changed receipt, captured event, or
|
|
157
|
-
still-present policy source returns `AUTHORITY_UNVERIFIED`. Receipt format 0.1.0
|
|
158
|
-
remains readable for inspection after upgrade but is not authority-bearing; the
|
|
159
|
-
applicable policy boundary must produce a fresh 0.2.0 attestation before further
|
|
160
|
-
approval, dispatch, acceptance, commit proof, or finalization. This is the
|
|
161
|
-
repository's cooperative same-user attestation model, not cryptographic identity
|
|
162
|
-
proof or protection from an unrestricted same-user filesystem writer.
|
|
163
|
-
|
|
164
|
-
For ordinary sequential planning, create a plan as `draft_preview`, consume existing criterion IDs,
|
|
165
|
-
then `plan-bind` to the approved spec and approve the plan through its existing workflow. Initial
|
|
166
|
-
combined HTML sprint review uses the explicit paired path below instead of separate approvals.
|
|
167
|
-
A normative change invalidates its approval. Rebinding is explicit and preserves
|
|
168
|
-
history; it does not waive coverage or permit silent reinterpretation.
|
|
169
|
-
|
|
170
|
-
When adversarial review revises a ready initial draft spec after its draft plan exists,
|
|
171
|
-
query both current identities. The installed engine's explicit `plan-bind` request with
|
|
172
|
-
`binding_mode: draft_preview` requires the plan's existing `expected` CAS and the spec's
|
|
173
|
-
`spec_expected` revision/model CAS. It rebinds only that same-ID, same-slug initial pair:
|
|
174
|
-
both artifacts must remain unapproved drafts, tasks pending and unevidenced, prerequisites
|
|
175
|
-
unsatisfied and unevidenced, and scopes empty. Optional typed plan corrections must leave
|
|
176
|
-
both drafts fully ready. The binding remains `draft_preview`; this operation grants no
|
|
177
|
-
approval, delegation, prerequisite satisfaction, execution or acceptance. Revalidate both
|
|
178
|
-
current drafts, repeat the affected review and arm the exact combined approval afterward.
|
|
179
|
-
Inspect the installed operation schema first. An engine without this explicit draft
|
|
180
|
-
request reports a capability gap; never edit HTML, recreate the pair, substitute sequential
|
|
181
|
-
approval or use ordinary approved-source `plan-bind` to repair it.
|
|
182
|
-
|
|
183
|
-
## Initial sprint pair and delegated methods
|
|
184
|
-
|
|
185
|
-
Only when preparing initial combined approval, replaying an observed reply, or revising a task's
|
|
186
|
-
method under its existing grant, load `<plugin-root>/includes/sprint-authority.md`. That private
|
|
187
|
-
card owns the `arm-sprint` / `resume-sprint` / `smarts` bridge and the native pair/method operations.
|
|
188
|
-
Do not bulk-load it for ordinary task reads. Scoring is not consent; the initial observed user reply,
|
|
189
|
-
protected scope, real producer, current evidence and existing security/permission gates remain required.
|
|
190
|
-
|
|
191
|
-
## Reading and dispatch
|
|
192
|
-
|
|
193
|
-
Use `index`, then `outline`, then symbol-scoped `read`. Exact reads are explicitly
|
|
194
|
-
context-incomplete. Execution uses contextual pages; follow every `next_cursor`
|
|
195
|
-
until `context_complete: true`, and retain the final context ticket. Cursors bind
|
|
196
|
-
both documents and contributing receipts/events. No partial record is silently
|
|
197
|
-
returned. A stale cursor/ticket requires a fresh read.
|
|
198
|
-
|
|
199
|
-
These cursors and tickets name engine-written, content-addressed cooperative
|
|
200
|
-
delivery receipts. They are not authentication secrets and do not claim
|
|
201
|
-
resistance to an unrestricted same-user filesystem writer. A digest without its
|
|
202
|
-
corresponding engine-written receipt is rejected.
|
|
203
|
-
|
|
204
|
-
Before task selection, inspect the plan's exact prerequisite records. If one is
|
|
205
|
-
unsatisfied, collect and present the facts needed to judge its requirement; a
|
|
206
|
-
verification runner may supply facts but cannot confer prerequisite authority.
|
|
207
|
-
On Claude Code or Codex, arm a genuine user-workflow decision for the exact
|
|
208
|
-
current approved plan and prerequisite:
|
|
209
|
-
|
|
210
|
-
```sh
|
|
211
|
-
python "<plugin-root>/hooks/_prerequisitelib.py" arm --root "<project-root>" --artifact-id <artifact-id> --prerequisite-id <prerequisite-id>
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Show the returned title, requirement, review-packet digest, and `expires_at_utc`
|
|
215
|
-
deadline. The request and its reply code expire together 24 hours after arming.
|
|
216
|
-
Require the returned `short_reply` (`satisfy-prerequisite <code>`) or the full `reply`, with
|
|
217
|
-
the same tolerance and mismatch reporting as approval. The `UserPromptSubmit` hook
|
|
218
|
-
durably records that observed decision before publishing its authority source,
|
|
219
|
-
captures a prerequisite receipt, and applies the existing prerequisite CAS
|
|
220
|
-
operation. Its final nonce is non-secret freshness/correlation data, not a
|
|
221
|
-
credential: possession alone confers no authority, and only the exact prompt
|
|
222
|
-
observed at the trusted host boundary while the reviewed plan remains current
|
|
223
|
-
can satisfy the prerequisite. Wrong nonces or records, stale plan content or
|
|
224
|
-
approval, and expired requests confer no authority. A retry after confirmation reuses the same event,
|
|
225
|
-
receipt, operation ID, and mutation request; it never reconstructs a decision.
|
|
226
|
-
Only an unconfirmed request can be cancelled:
|
|
227
|
-
|
|
228
|
-
```sh
|
|
229
|
-
python "<plugin-root>/hooks/_prerequisitelib.py" cancel --root "<project-root>" --artifact-id <artifact-id> --prerequisite-id <prerequisite-id>
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
If the plan changes after confirmation, recover the obsolete request instead of
|
|
233
|
-
deleting its marker. `supersede` first proves the current identity differs. For
|
|
234
|
-
a captured request it also retries the exact operation ID: a committed replay is
|
|
235
|
-
accepted, while only an engine `REVISION_CONFLICT` proves the obsolete mutation
|
|
236
|
-
did not commit and permits the marker to clear. Published source and receipt
|
|
237
|
-
files remain as evidence:
|
|
238
|
-
|
|
239
|
-
```sh
|
|
240
|
-
python "<plugin-root>/hooks/_prerequisitelib.py" supersede --root "<project-root>" --artifact-id <artifact-id> --prerequisite-id <prerequisite-id>
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
The adapter fixes `authority_kind: user_workflow` and `verdict: satisfied`;
|
|
244
|
-
there is no caller-selected authority or bulk-satisfaction path. SMARTS prerequisite satisfaction remains unsupported; the plan-method producer below does not
|
|
245
|
-
grant prerequisite, security, backend or publication authority. Pi has no
|
|
246
|
-
prerequisite-capture adapter and must remain blocked. Do not infer eligibility from one satisfied prerequisite:
|
|
247
|
-
rerun `eligible`, and resolve each remaining record independently against the
|
|
248
|
-
new current plan identity.
|
|
249
|
-
|
|
250
|
-
`eligible` is authoritative for task selection on the HTML path.
|
|
251
|
-
`task-start` checks current spec/plan approval, binding, prerequisites, source
|
|
252
|
-
snapshot, dependency evidence and the complete context ticket. Within a checkpoint,
|
|
253
|
-
a predecessor in `REVIEW` can provisionally unblock its dependent after fresh
|
|
254
|
-
verification and spec review. Across checkpoints, dependencies require accepted
|
|
255
|
-
scope evidence. Provisional progress never counts as completion.
|
|
256
|
-
|
|
257
|
-
The orchestrator executes the declared verification through its existing governed
|
|
258
|
-
execution tool through the installed production authority adapter; it never
|
|
259
|
-
constructs a successful workflow event itself. Arm an exact task request first.
|
|
260
|
-
Verification and review authority below is supported on Codex and Claude Code.
|
|
261
|
-
On Pi, stop at this boundary rather than treating model-authored results as
|
|
262
|
-
authority; its installed prompt approval seam does not imply verification or
|
|
263
|
-
review support.
|
|
264
|
-
Every distinct `cwd` label in the engine context must be mapped once to an exact
|
|
265
|
-
linked Git worktree root. Mapped worktrees must share the artifact repository's
|
|
266
|
-
Git common directory, and the adapter freezes their filesystem identity, HEAD,
|
|
267
|
-
status digest, effective argv, and executable bytes:
|
|
268
|
-
|
|
269
|
-
```sh
|
|
270
|
-
python "<plugin-root>/hooks/artifact-authority.py" arm --root "<project-root>" --artifact-id <plan-id> --record-id <task-id> --activity verification --workspace "candidate worktree=<absolute-worktree>" --workspace "baseline-evidence worktree=<absolute-worktree>"
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
Use only the mappings actually named by that task; missing or extra labels fail
|
|
274
|
-
closed. Run the returned request through one plain governed exec invocation (no
|
|
275
|
-
compound shell expression), then publish only after the host's matching
|
|
276
|
-
`PostToolUse` has corroborated the wrapper's completed request-bound result:
|
|
277
|
-
|
|
278
|
-
```sh
|
|
279
|
-
python "<plugin-root>/hooks/artifact-authority.py" verify --root "<project-root>" --request-id <request-id>
|
|
280
|
-
python "<plugin-root>/hooks/artifact-authority.py" publish --root "<project-root>" --request-id <request-id>
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
The verifier launches exact engine-declared argv without a shell, supervises the
|
|
284
|
-
whole process tree, bounds output, requires exact named outcomes, and rejects
|
|
285
|
-
workspace or executable drift. If an attempt is interrupted, use the adapter's
|
|
286
|
-
`recover` operation to retain it as failed or abandoned; never rerun an uncertain
|
|
287
|
-
attempt under the same request.
|
|
288
|
-
|
|
289
|
-
Named Playwright commands require `test --reporter=json`; each required name must
|
|
290
|
-
equal a unique native `spec.title`. Named Vitest commands require
|
|
291
|
-
`run --reporter=verbose`; use the complete rendered `suite > case` identity after
|
|
292
|
-
the filename, not a leaf-name alias. Named unittest commands require `-v` or
|
|
293
|
-
`--verbose`. A passing row cannot conceal a duplicate, skip, failure or retry.
|
|
294
|
-
Plain exit checks cannot attest named tests.
|
|
295
|
-
|
|
296
|
-
Named npm commands support inspectable single-runner scripts, a contained
|
|
297
|
-
repository-relative `--prefix`, and arguments forwarded after `--`. A root script
|
|
298
|
-
may delegate once through `npm -w <name> run <script>` or
|
|
299
|
-
`npm --workspace <name> run <script>` when the name resolves uniquely in an array
|
|
300
|
-
of at most 32 explicit, contained workspace directories. The runner binds the root
|
|
301
|
-
manifest and every inspected workspace manifest. Globs, linked directories,
|
|
302
|
-
multiple workspace selectors and recursive npm delegation are unsupported.
|
|
303
|
-
Workspace delegation uses the declared cwd; a non-dot `--prefix` is unsupported
|
|
304
|
-
for this shape.
|
|
305
|
-
Preserve both npm argument boundaries when adding a reporter: for a root
|
|
306
|
-
`test:client` script containing `npm -w @example/client run test`, declare
|
|
307
|
-
`npm run test:client -- -- --reporter=verbose` to forward the reporter to Vitest.
|
|
308
|
-
The original root command still executes the full script. Compound
|
|
309
|
-
scripts and pre/post lifecycle scripts require separately declared direct-runner
|
|
310
|
-
commands; retain every check from the original suite when splitting commands.
|
|
311
|
-
On Windows, only the qualified standard `npm.cmd` layout is adapted: the runner
|
|
312
|
-
pins the wrapper, sibling `node.exe`, sibling `node_modules/npm/bin/npm-cli.js`,
|
|
313
|
-
and script manifest. It deliberately selects that sibling CLI rather than the
|
|
314
|
-
shim's optional global-prefix redirection. Unknown batch wrappers fail closed.
|
|
315
|
-
For workspace delegation, it also pins `npm-prefix.js` and checks that the nested
|
|
316
|
-
wrapper uses the same CLI, the default script shell, and no configured Node
|
|
317
|
-
options. Local executables shadowing nested npm are rejected.
|
|
318
|
-
Direct Node script entrypoints are also pinned. These launch-file bindings do
|
|
319
|
-
not establish transitive dependency closure for deliberately excluded inputs.
|
|
320
|
-
|
|
321
|
-
New observations use the closed `declared-command/0.3.0` producer profile to
|
|
322
|
-
retain collector and launch-file identities plus an engine-produced normalized
|
|
323
|
-
completion closure. Raw workspace fingerprints must still match before and
|
|
324
|
-
after command execution. Historical `0.1.0` and `0.2.0` bindings retain their
|
|
325
|
-
original contracts and cannot be relabelled as newer evidence.
|
|
326
|
-
|
|
327
|
-
For `spec_review` or `quality_review`, arm the corresponding activity without
|
|
328
|
-
workspace mappings and dispatch the returned `launch_envelope` unchanged to one
|
|
329
|
-
fresh host subagent. The bounded prompt names the retained, content-addressed
|
|
330
|
-
evidence context instead of embedding its full input manifest. The reviewer
|
|
331
|
-
must read that context and inspect its subject, coverage and source inputs.
|
|
332
|
-
The adapter verifies the context's canonical bytes and digest before launch and
|
|
333
|
-
publication; a missing or changed context blocks authority. Never shorten or
|
|
334
|
-
rewrite the returned envelope yourself.
|
|
335
|
-
The host hooks bind the exact launch call, child start and
|
|
336
|
-
the child's first stop; a pasted or coordinator-authored decision is not review
|
|
337
|
-
authority.
|
|
338
|
-
|
|
339
|
-
When reviewing completed work that relies on a verification run, linked
|
|
340
|
-
worktrees or supporting evidence, explicitly select the completion path. Add
|
|
341
|
-
`--completion-receipt <exact-published-receipt>` once per task and
|
|
342
|
-
`--supporting-file <absolute-regular-file>` for each supporting document to the
|
|
343
|
-
review `arm` command. A task review selects one verification receipt; a scope
|
|
344
|
-
review selects the exact receipt for every member. Supporting files require a
|
|
345
|
-
receipt selection. The existing review-before-verification path remains
|
|
346
|
-
available; it does not satisfy an explicitly requested completion review.
|
|
347
|
-
|
|
348
|
-
The native engine validates the selected published verification chain and
|
|
349
|
-
derives the worktree mappings from its qualified observation. It retains the
|
|
350
|
-
selected identities, worktree closure and supporting bytes in the immutable
|
|
351
|
-
context. Supporting material is data for review, not authority. Selection is
|
|
352
|
-
explicit: no newest-receipt search, directory import or attachment execution.
|
|
353
|
-
At most 16 regular files are admitted, each at most 64 KiB and together at most
|
|
354
|
-
256 KiB; links, reparse indirection, duplicate paths and changed content fail
|
|
355
|
-
closed. Read canonical spec and plan artifacts through the native artifact API;
|
|
356
|
-
they cannot be imported as supporting files. The generated prompt directs the reviewer to assess performed work
|
|
357
|
-
against each criterion, step and `done_when` obligation, using selected evidence
|
|
358
|
-
and source references. A consistent plan or an empty diff is insufficient.
|
|
359
|
-
|
|
360
|
-
Use the returned `completion_sha256` in the native `task-review` or
|
|
361
|
-
`accept-scope` request. The completed review and its exact verification run must
|
|
362
|
-
agree; a definition-only review or a different successful run is rejected.
|
|
363
|
-
The recorded task selection remains required by downstream freshness and scope
|
|
364
|
-
acceptance. Scope review uses validated task completion bindings. If verification
|
|
365
|
-
is rerun, obtain and record its completed task review before selecting that run
|
|
366
|
-
for scope review; do not infer equivalence between receipts.
|
|
367
|
-
|
|
368
|
-
Creating a completion context for a `0.3.0` verification recomputes the normalized
|
|
369
|
-
worktree closure bound during that verification. Only validated native outputs
|
|
370
|
-
and execution bookkeeping are normalized; their publication must not invalidate
|
|
371
|
-
unchanged source. Historical `0.2.0` verification retains its initial exact raw
|
|
372
|
-
fingerprint comparison. Later freshness checks allow native task-status and
|
|
373
|
-
execution bookkeeping updates in validated canonical artifacts while retaining
|
|
374
|
-
their normative content hashes.
|
|
375
|
-
Changes to task definitions, other HTML or other governance files still affect
|
|
376
|
-
freshness under the normal snapshot policy. The closure covers
|
|
377
|
-
tracked working-tree bytes and non-ignored untracked files, not ignored
|
|
378
|
-
dependencies or outputs. The completion assessment is still an independent
|
|
379
|
-
reviewer's judgment; schema validation does not prove that every file was read
|
|
380
|
-
or every conclusion is correct. Preserve the unchanged launch envelope and
|
|
381
|
-
genuine host capture throughout this path.
|
|
382
|
-
Publish the completed request through the same `publish` command. `task-review`
|
|
383
|
-
records the separate verification and spec-review receipts. After every task in
|
|
384
|
-
the scope reaches `REVIEW`, reverify against one current source snapshot, run the
|
|
385
|
-
combined quality review, and use `accept-scope` once. Do not accept tasks
|
|
386
|
-
individually.
|
|
387
|
-
|
|
388
|
-
Current Codex native V1 completion reviews retain the full frozen context in
|
|
389
|
-
its immutable, content-addressed file and keep only its closed reference in
|
|
390
|
-
mutable request state. Loading validates the exact context locator, hash,
|
|
391
|
-
canonical bytes and review kind. The native context budget remains 8 MiB;
|
|
392
|
-
mutable request state remains bounded at 1 MiB. Before dispatch, the adapter
|
|
393
|
-
reserves the exact fixed result identities, six times the 64 KiB decision
|
|
394
|
-
budget for canonical JSON escaping, and 32 bounded 256-byte lifecycle slots.
|
|
395
|
-
A request without that capacity is refused before child launch. Historical
|
|
396
|
-
inline requests retain their existing limits and abandonment-only recovery.
|
|
397
|
-
|
|
398
|
-
An ARMED review that never launched can be abandoned through the adapter:
|
|
399
|
-
|
|
400
|
-
```sh
|
|
401
|
-
python "<plugin-root>/hooks/artifact-authority.py" recover --root "<project-root>" --request-id <request-id> --disposition abandoned
|
|
1
|
+
# Structured specifications, plans and task state
|
|
2
|
+
|
|
3
|
+
Load for new full-lane work or an existing HTML spec/plan pair. The plan tracks
|
|
4
|
+
the agreed outcome, implementation and checks; it does **not** create a second
|
|
5
|
+
permission system. Follow real user decisions, host security and Git/release
|
|
6
|
+
authorization independently.
|
|
7
|
+
|
|
8
|
+
## Format and installed writer
|
|
9
|
+
|
|
10
|
+
New full feature and sprint spec/plan pairs default to canonical `.html`.
|
|
11
|
+
Check the installation-pinned native capability **before writing**. If it is
|
|
12
|
+
missing, invalid or denied, report the failed operation. It must not fall back to Markdown
|
|
13
|
+
or claim the artifact was saved. New files are
|
|
14
|
+
`.codearbiter/specs/<slug>.html` and `.codearbiter/plans/<slug>.html`.
|
|
15
|
+
An existing `.md` pair remains Markdown in its original format; do not
|
|
16
|
+
silently convert it or create a shadow ledger. Small-lane features stay inline.
|
|
17
|
+
HTML `--farm` dispatch remains disabled.
|
|
18
|
+
|
|
19
|
+
Use `hooks/_artifactlib.py`, which selects the installation-owned binary by
|
|
20
|
+
its verified manifest, never PATH or a project-selected executable. Native
|
|
21
|
+
`_select_authoring_route` and `_preflight_plan_authoring` select the same-slug
|
|
22
|
+
source/target, check identity and structural validity, then return a draft
|
|
23
|
+
target. They do **not** approve work or launch reviewers. This includes the
|
|
24
|
+
native Pi writer; it does not establish broader installed-host qualification.
|
|
25
|
+
|
|
26
|
+
## Author and maintain
|
|
27
|
+
|
|
28
|
+
Use native `create` and typed `apply`, not manual HTML/JSON editing. Keep stable
|
|
29
|
+
spec criterion IDs in the plan; use `record.add`/`record.update` and explicit
|
|
30
|
+
retirement reasons. Bind the exact current spec using `plan-bind`.
|
|
31
|
+
Incomplete drafts are valid working state. `validate` with `gate: ready`
|
|
32
|
+
reports missing coverage or structure, not permission to continue already
|
|
33
|
+
authorized work. Do not invent criteria, decisions or test results to pass
|
|
34
|
+
validation. A changed outcome goes to the actual decision owner; in-scope
|
|
35
|
+
methods and task decomposition can be updated with a reason.
|
|
36
|
+
|
|
37
|
+
Query an operation-specific `schema` only when its request shape is unknown;
|
|
38
|
+
reuse known shapes for subsequent calls instead of querying on every read.
|
|
39
|
+
Do not preload the entire schema. The packaged bridge invokes the verified native
|
|
40
|
+
binary as `ca-artifact <operation> --root <project-root> --request -`
|
|
41
|
+
with one JSON request on stdin; never resolve it from PATH. Requests use
|
|
42
|
+
protocol `codearbiter.artifact-api/0.1.0`; failed writes remain failures.
|
|
43
|
+
|
|
44
|
+
From the workspace root, pass this block on Python 3's stdin (`python -B -
|
|
45
|
+
'<absolute-installed-plugin-root>' '<plan-id>' '<task-id>'`, using your shell's
|
|
46
|
+
multiline stdin syntax and quoting). Use the host's loaded plugin root, not a
|
|
47
|
+
guessed project path. No helper script or directory outside the workspace is
|
|
48
|
+
needed. The client adds the protocol field; its second argument is the helper
|
|
49
|
+
installation, **not** the plugin root. Add `--schema` only when you need the
|
|
50
|
+
operation's request schema instead of the task packet.
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import json
|
|
54
|
+
import sys
|
|
55
|
+
from pathlib import Path
|
|
56
|
+
|
|
57
|
+
plugin = Path(sys.argv[1])
|
|
58
|
+
plan_id, task_id = sys.argv[2:4]
|
|
59
|
+
sys.path.insert(0, str(plugin / "hooks"))
|
|
60
|
+
from _artifactlib import ArtifactClient, helper_installation
|
|
61
|
+
|
|
62
|
+
client = ArtifactClient(Path.cwd(), helper_installation(str(plugin / "hooks/_artifactlib.py")))
|
|
63
|
+
if "--schema" in sys.argv[4:]:
|
|
64
|
+
print(json.dumps(client.call("schema", {"name": "operation", "operation": "task-context"})))
|
|
65
|
+
else:
|
|
66
|
+
identity = client.call("identity", {"artifact_id": plan_id})
|
|
67
|
+
packet = client.call("task-context", {
|
|
68
|
+
"artifact_id": plan_id, "task": task_id,
|
|
69
|
+
"model_sha256": identity["model_sha256"],
|
|
70
|
+
})
|
|
71
|
+
print(json.dumps(packet))
|
|
402
72
|
```
|
|
403
73
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
An older journal may return `refresh_required: true` instead. A rolled-back
|
|
467
|
-
operation is not success. Keep journal-compatible tooling when restoring code.
|
|
468
|
-
A transaction that was rolled back returns `OPERATION_ROLLED_BACK`.
|
|
469
|
-
|
|
470
|
-
`repair-preview` identifies an inconsistent generated view. `repair-apply` requires
|
|
471
|
-
both original-byte and candidate hashes and retains original bytes; it never
|
|
472
|
-
infers semantic edits from human-modified HTML. Export writes a standalone copy
|
|
473
|
-
outside canonical directories. Rebranding accepts only validated local assets.
|
|
474
|
-
|
|
475
|
-
## Legacy transition and blocked capabilities
|
|
476
|
-
|
|
477
|
-
Legacy Markdown remains readable through the old workflow. Conversion is explicit:
|
|
478
|
-
`migration-preview` receives typed spec/plan models and a complete nonoverlapping
|
|
479
|
-
line-disposition map for each original file. Review the models and mappings, then
|
|
480
|
-
`migration-apply` binds to the exact preview digest and records the review. Both
|
|
481
|
-
new artifacts are drafts. Original approval/status prose is not transferred.
|
|
482
|
-
Cutover is recoverable as a pair; completed cutovers use `migration-rollback`, which
|
|
483
|
-
refuses any intervening candidate edit. Original bytes remain in transaction history.
|
|
484
|
-
|
|
485
|
-
**HTML farm dispatch remains disabled and out of scope.** The
|
|
486
|
-
engine can derive an immutable base-bound projection, verify it before canary,
|
|
487
|
-
permit only `meta.model`/`meta.apiBaseUrl` enrichment, and seal exact execution
|
|
488
|
-
bytes plus caller-supplied provider-selection assertions. Those assertions are
|
|
489
|
-
auditable correspondence, not authenticated provenance. The shared built dispatcher enforces the checks
|
|
490
|
-
before side effects. Keep the HTML `--farm` path disabled until real authority
|
|
491
|
-
adapters, native packaged payloads and the fresh frontier/low-tier qualification
|
|
492
|
-
matrix all pass; the June 2026 run earns no current credit. Existing legacy farm
|
|
493
|
-
behavior is unchanged. Enabling normal premium-path HTML authoring does not count
|
|
494
|
-
as farm qualification or authorize farm dispatch.
|
|
74
|
+
## Read the smallest useful context
|
|
75
|
+
|
|
76
|
+
Use `identity` and `eligible` (advisory scheduling), then `task-context` with
|
|
77
|
+
the current plan `model_sha256` and task ID. Read the task, its referenced
|
|
78
|
+
criteria, dependency states and relevant prerequisite observations. The packet
|
|
79
|
+
has `context_complete: false`; expand only necessary exact symbols via
|
|
80
|
+
`read`/`read-batch` rather than parsing rendered HTML. Recheck identity after
|
|
81
|
+
a changed source or stale cursor. On a packet-size refusal, retrieve complete
|
|
82
|
+
individual records within the supported budget; do not accept truncation.
|
|
83
|
+
If an installed engine lacks `task-context`, use those existing bounded
|
|
84
|
+
symbol reads.
|
|
85
|
+
|
|
86
|
+
A fact or observable prerequisite is checked with ordinary authorized tools;
|
|
87
|
+
record its outcome through the native `prerequisite` **bounded `observation`**
|
|
88
|
+
with `kind: fact`, source and relevant `task_refs`. A decision reflects an
|
|
89
|
+
actual user choice; ask once if material and unresolved. Keep caller-reported
|
|
90
|
+
facts distinct from host-attested proof, and **no certification code** for
|
|
91
|
+
ordinary work. An unscoped prerequisite has unknown applicability, not
|
|
92
|
+
automatic plan-wide blocking or implicit satisfaction. Continue independent
|
|
93
|
+
tasks.
|
|
94
|
+
|
|
95
|
+
## Implement and report reality
|
|
96
|
+
|
|
97
|
+
Start an eligible pending task with `task-start`; no artifact approval,
|
|
98
|
+
context ticket or reviewer receipt is required. A real check belongs in
|
|
99
|
+
`task-check`: observed argv, relative cwd, outcome (pass/fail/skip/unknown),
|
|
100
|
+
summary, source and origin (`tool_result` or `agent_report`). Supply exit code
|
|
101
|
+
only when actually observed; bind `command_index` only to the exact planned
|
|
102
|
+
invocation. Command-level success is not invented named-test proof. A newer
|
|
103
|
+
failure/unknown cannot be hidden by an older pass.
|
|
104
|
+
|
|
105
|
+
`task-context` reports bounded, declared-path and `shared_inputs` source
|
|
106
|
+
applicability. `scoped_changed` means recheck affected work;
|
|
107
|
+
`scoped_unchanged` is **partial** evidence (`scope_complete: false`), not a
|
|
108
|
+
full dependency graph or verified test. Unsafe or unknown file scope is
|
|
109
|
+
`unassessed`. A presentation edit or new receipt identity alone does not
|
|
110
|
+
require a reviewer rerun.
|
|
111
|
+
|
|
112
|
+
Use receipt-free `task-review` for implementation ready for review.
|
|
113
|
+
Use `accept-scope` with a reason to record a completed implementation batch
|
|
114
|
+
as `DONE`; **DONE is not independently verified or accepted**. Report actual
|
|
115
|
+
checks, failures and unrun verification separately. Review relevant risks;
|
|
116
|
+
do not spawn a reviewer fleet to clear task bookkeeping.
|
|
117
|
+
|
|
118
|
+
## Resume safely
|
|
119
|
+
|
|
120
|
+
On interruption, inspect the worktree, running workers and committed state
|
|
121
|
+
before changing an `IN_PROGRESS` task. Use `task-reconcile` with the actual
|
|
122
|
+
state and reason; never clear a user `BLOCKED` stop without resolution.
|
|
123
|
+
Every mutation needs the current revision, model hash and a durable unique
|
|
124
|
+
operation ID. After a lost response, **retry the identical request and ID**
|
|
125
|
+
or use native `recover`; never start duplicate work or overwrite conflicts.
|
|
126
|
+
A rolled-back transaction is not success. Use `repair-preview`/`repair-apply`
|
|
127
|
+
only for the native generated-view repair contract, not semantic edits.
|
|
128
|
+
|
|
129
|
+
If saved state or a separately applicable policy genuinely requires strict
|
|
130
|
+
attested proof or older-format recovery, consult only the relevant section of
|
|
131
|
+
`<plugin-root>/includes/artifacts-attestation.md`. The optional reference
|
|
132
|
+
does not authorize ordinary work or replace current host/security rules.
|
|
133
|
+
Never open newer saved state with an incompatible old engine; use a matching
|
|
134
|
+
installed cohort and preserve the journal. After newer edits, forward
|
|
135
|
+
recovery takes precedence over overwriting current work with an old backup.
|