@arbiterforge/ca-pi 0.14.17 → 0.15.1

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.
@@ -72,6 +72,30 @@ ADR compatibility review, open-question handling, harvest and user/SMARTS gates.
72
72
  One criterion may need multiple tests. Never invent a condition, oracle, source,
73
73
  command, result, approval or reviewer to satisfy a required field.
74
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; `.gitignore` does not define this policy.
92
+ An exclusion outside all selected roots is rejected as ineffective. Overlapping
93
+ roots cannot reinclude an excluded directory. Roots must exist before execution;
94
+ use an existing containing directory for a planned new file so its creation
95
+ changes the snapshot. An oversized included file is reported with its path and
96
+ the 32 MiB per-file limit; revise the explicit policy rather than increasing the
97
+ limit or excluding source/test/governance inputs needed for the task.
98
+
75
99
  The existing user, SMARTS, reviewer, or verification boundary must first persist
76
100
  its actual policy-owned workflow event as canonical JSON in the reserved
77
101
  content-addressed authority-source store. Interactive prompt approval currently
@@ -85,11 +109,19 @@ before asking the approval question:
85
109
  python "<plugin-root>/hooks/_approvallib.py" arm --root "<project-root>" --artifact-id <artifact-id>
86
110
  ```
87
111
 
88
- Present the returned `reply` value verbatim and require that exact reply. The
89
- `UserPromptSubmit` hook rechecks the armed identity, records the host-observed
90
- prompt as the policy-owned source, captures its receipt, and applies approval.
91
- An ordinary `yes`, a changed artifact, a wrong token, or a model-authored event
92
- does not confer authority. On the next turn, verify `validate` at the `approved`
112
+ On Claude Code, when the result carries `ask_envelope`, pass it unchanged as the
113
+ entire AskUserQuestion input (no `answers`, `annotations` or other field): the
114
+ user approves by clicking its Approve option, and the host-observed selection is
115
+ applied with origin `claude:AskUserQuestion:<session>`. Otherwise, or if the
116
+ user prefers typing, present the returned `short_reply` (a four-character code
117
+ such as `approve K7MQ`); the full `reply` is also accepted, and you
118
+ require that exact reply: the hook tolerates surrounding whitespace, invisible characters, a code
119
+ fence or quotes and a closing period, but nothing else in the message, and it
120
+ reports a mismatch instead of staying silent. The `UserPromptSubmit` hook
121
+ rechecks the armed identity, records the full armed reply as the host-observed
122
+ policy-owned source, captures its receipt, and applies approval. An ordinary
123
+ `yes`, a changed artifact, a wrong or expired code, a reply inside other text, or
124
+ a model-authored event does not confer authority. On the next turn, verify `validate` at the `approved`
93
125
  gate before continuing. If the user declines or the artifact changes, cancel the
94
126
  exact pending request before arming another one:
95
127
 
@@ -149,7 +181,8 @@ python "<plugin-root>/hooks/_prerequisitelib.py" arm --root "<project-root>" --a
149
181
  ```
150
182
 
151
183
  Show the returned title, requirement, and review-packet digest, then require the
152
- returned `satisfy-prerequisite ...` reply verbatim. The `UserPromptSubmit` hook
184
+ returned `short_reply` (`satisfy-prerequisite <code>`) or the full `reply`, with
185
+ the same tolerance and mismatch reporting as approval. The `UserPromptSubmit` hook
153
186
  durably records that observed decision before publishing its authority source,
154
187
  captures a prerequisite receipt, and applies the existing prerequisite CAS
155
188
  operation. Its final nonce is non-secret freshness/correlation data, not a
@@ -221,6 +254,28 @@ workspace or executable drift. If an attempt is interrupted, use the adapter's
221
254
  `recover` operation to retain it as failed or abandoned; never rerun an uncertain
222
255
  attempt under the same request.
223
256
 
257
+ Named Playwright commands require `test --reporter=json`; each required name must
258
+ equal a unique native `spec.title`. Named Vitest commands require
259
+ `run --reporter=verbose`; use the complete rendered `suite > case` identity after
260
+ the filename, not a leaf-name alias. Named unittest commands require `-v` or
261
+ `--verbose`. A passing row cannot conceal a duplicate, skip, failure or retry.
262
+ Plain exit checks cannot attest named tests.
263
+
264
+ Named npm commands support inspectable single-runner scripts, a contained
265
+ repository-relative `--prefix`, and arguments forwarded after `--`. Compound
266
+ scripts and pre/post lifecycle scripts require separately declared direct-runner
267
+ commands; retain every check from the original suite when splitting commands.
268
+ On Windows, only the qualified standard `npm.cmd` layout is adapted: the runner
269
+ pins the wrapper, sibling `node.exe`, sibling `node_modules/npm/bin/npm-cli.js`,
270
+ and script manifest. It deliberately selects that sibling CLI rather than the
271
+ shim's optional global-prefix redirection. Unknown batch wrappers fail closed.
272
+ Direct Node script entrypoints are also pinned. These launch-file bindings do
273
+ not establish transitive dependency closure for deliberately excluded inputs.
274
+
275
+ New observations use the closed `declared-command/0.2.0` producer profile to
276
+ retain collector and launch-file identities. Historical `0.1.0` bindings remain
277
+ separate and cannot be relabelled as qualified launch evidence.
278
+
224
279
  For `spec_review` or `quality_review`, arm the corresponding activity without
225
280
  workspace mappings and dispatch the returned `launch_envelope` unchanged to one
226
281
  fresh host subagent. The host hooks bind the exact launch call, child start and
@@ -234,7 +289,8 @@ individually.
234
289
 
235
290
  An interrupted or `BLOCKED` HTML task never resumes by editing its status. Arm
236
291
  the installed reconciliation adapter for the exact task or scope, present its
237
- returned reply verbatim, and let `UserPromptSubmit` capture and apply the observed
292
+ returned `short_reply` (`reconcile <STATE> <code>` for a task, `reconcile <code>`
293
+ for a scope; the full `reply` also works), and let `UserPromptSubmit` capture and apply the observed
238
294
  user decision across repositories:
239
295
 
240
296
  ```sh
@@ -17,8 +17,10 @@ python "<plugin-root>/hooks/_approvallib.py" arm-sprint --root "<project-root>"
17
17
  ```
18
18
 
19
19
  Omit `--delegate-methods` for approval without delegated plan-method changes. Show the returned
20
- `reply` verbatim. It explicitly names both IDs, `delegate-methods` or `approve-only`, and the nonce.
21
- An ordinary yes, wrong nonce/mode or changed member does not approve either. `sprint-approve`
20
+ `short_reply`, which restates the mode: `approve-sprint delegate <code>` or
21
+ `approve-sprint approve-only <code>`. The full `reply` naming both IDs, `delegate-methods` or
22
+ `approve-only`, and the nonce is also accepted, with the same tolerance as single approval.
23
+ An ordinary yes, wrong code/nonce/mode or changed member does not approve either. `sprint-approve`
22
24
  recomputes both model/revision identities and the projected binding, verifies both observations
23
25
  from the same actual reply, and commits the two approvals through the existing native journal.
24
26
  It produces separate bound receipts and an optional `grant_receipt`. No partial approval is visible
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbiterforge/ca-pi",
3
- "version": "0.14.17",
3
+ "version": "0.15.1",
4
4
  "private": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -118,7 +118,18 @@ returned same-slug `.codearbiter/plans/<slug>.html` target may be created. Creat
118
118
  that plan through the installed structured-artifact engine as `draft_preview`,
119
119
  using the source spec's exact artifact ID and normative digest. For ordinary sequential planning,
120
120
  this must be the approved spec's exact artifact ID and normative digest. Populate it only with typed operations
121
- and validate it at the ready gate. For initial combined review, retain `draft_preview` and return
121
+ and validate it at the ready gate. Before presenting either ordinary or combined review, call
122
+ the private `_approvallib._preflight_plan_verification(client, identity)` with the current engine identity.
123
+ It reads every task through bounded engine pages, checks each declared runner's supported
124
+ named-outcome format, snapshots current inputs, and rejects identity drift. Resolve the complete
125
+ reported set of command/input diagnostics before asking for approval. It does not run commands,
126
+ discover or import tests, or require proposed test files and test names to exist. Input roots must
127
+ already exist: choose an existing containing directory for files the plan will create. Roots and
128
+ excluded directories are exact repository-relative paths, not basenames, globs, or paths relative
129
+ to each root; for root `site`, use `site/node_modules`, `site/dist`, and other reviewed output paths.
130
+ The ordinary and paired approval adapters repeat this preflight before arming their user reply.
131
+ This admission check is not verification evidence; execution still binds actual commands and
132
+ requires current named outcomes. For initial combined review, retain `draft_preview` and return
122
133
  both ready identities to the caller: `sprint-approve` owns the binding and both approvals after one
123
134
  actual host-observed reply. Do not separately `plan-bind` or approve that pair. On ordinary approved-spec
124
135
  planning, use `plan-bind` to bind it to the approved spec before plan approval. This path must not create `.codearbiter/plans/<slug>.md`;