@webpieces/rules-config 0.4.801 → 0.4.802

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.
@@ -19,7 +19,7 @@ That question is already answered: **yes, always.** Run the flow:
19
19
  pnpm wp-start-upsert-pr # ① 3-point update from main. Does NOT push and does NOT build.
20
20
  pnpm wp-review-upsert-pr # ② validates that merge, runs the BUILD GATE, extracts the diff,
21
21
  # and prints the reviewer subagents to spawn
22
- # → spawn each reviewer it names (each writes its own review-<id>.json)
22
+ # → spawn each reviewer it names (each submits its own verdict: pnpm wp-write-review --checklist <id>)
23
23
  # → write review.json at the exact path it prints
24
24
  # (.webpieces/pr-review/<feature>/review.json — its `title` becomes the PR title)
25
25
  pnpm wp-finish-upsert-pr # ③ creates/updates the PR (and pushes — the ONE push)
@@ -121,8 +121,8 @@ hand can drift out of date if nothing is restated by hand.
121
121
  Unlike the report-only command it replaces, this one **can fail** — on an unresolved merge or a red build.
122
122
  It fails before any reviewer is spawned, which is the point.
123
123
 
124
- Checklists already reviewed on this branch are **not** re-listed — verdict files persist, so a second
125
- start/review/finish cycle re-instructs nothing.
124
+ Checklists already reviewed on this branch are **not** re-listed while their in-scope files are unchanged
125
+ — verdict files persist, so a second start/review/finish cycle re-instructs only what changed.
126
126
 
127
127
  `wp-finish-upsert-pr` recomputes the same set and **refuses to open the PR** while any reviewer still owes
128
128
  a passing verdict, naming only the ones still missing. An optional checklist that was offered and declined
@@ -153,8 +153,22 @@ When `reviewerAgents` is positive, for each matched **required** checklist — a
153
153
  `git diff <base> HEAD -- <file>` (base is in `pr-context.json`) — and decide whether the change
154
154
  satisfies the checklist. (A path-coarse checklist like "new API/queues" simply reports
155
155
  `"status": "green"` when the diffs add no new route/queue.)
156
- 3. Have it **write its verdict** to `.webpieces/pr-review/<featureSlug>/review-<id>.json` (one file per
157
- checklist, so concurrent reviewers never clobber each other). `<id>` is the checklist's `id`.
156
+ 3. Have it **submit its verdict** with `pnpm wp-write-review --checklist <id>` (the JSON on stdin, or
157
+ `--file <path>`). The bin writes `review-<id>.json` beside the branch's `review.json` — one file per
158
+ checklist, so concurrent reviewers never clobber each other — plus `review-<id>.provenance.json`
159
+ recording WHO submitted it (the harness's own session/agent ids, stamped by the PreToolUse hook), the
160
+ commit it was briefed on, and a hash of the checklist's in-scope diff. It is the ONLY way a verdict is
161
+ written: it refuses the coordinating agent, and `wp-finish-upsert-pr` rejects a `review-<id>.json` that
162
+ has no provenance or was edited after submission. There is no second route.
163
+
164
+ **Codex has no agent types**, so spawn a generic subagent with NO forked turns — fresh context, never a fork
165
+ of your own conversation — and hand it only the instructions files. The brief on disk is its whole input;
166
+ a forked conversation hands a reviewer the author's reasoning, which costs tokens and its independence.
167
+
168
+ **Verdicts CARRY while their scope is unchanged.** On a re-run, `wp-review-upsert-pr` keeps a checklist's
169
+ green or yellow verdict while the hash of that checklist's in-scope diff is the one its provenance
170
+ recorded, and prints it as `<id> — carried GREEN from <sha>, in-scope files unchanged`. It briefs only the
171
+ checklists that are red, never ran, were rejected, or whose in-scope files changed. A red is never carried.
158
172
 
159
173
  **How to ask about the optional ones.** `wp-review-upsert-pr` prints them as their own step, listing each
160
174
  with the files it matched and the doc it reviews against. Put them to the human in **ONE multi-select
@@ -163,11 +177,15 @@ answering "no" nine times in a row is being worn down rather than consulted, and
163
177
  cheap answer is yes to everything — which is exactly the state `required: false` exists to fix. If they
164
178
  pick none, that is a complete answer; go straight to finish.
165
179
 
166
- **You may never write a reviewer's `review-<id>.json` yourself.** If the reviewer agent cannot be spawned,
167
- that is a config bug, not your cue to self-certify — report it to the human. (webpieces rejects a
168
- reviewer agent that has no `.claude/agents/<name>.md`, so this should surface as a config error instead.)
180
+ **You may never write or submit a reviewer's verdict yourself.** `wp-write-review` refuses the
181
+ coordinating agent, and a hand-written `review-<id>.json` is rejected at finish. If the reviewer agent cannot
182
+ be spawned, that is a config bug, not your cue to self-certify — report it to the human.
169
183
 
170
- ## `review-<id>.json` (each reviewer subagent writes its own)
184
+ **From a plain terminal** (no AI harness in the environment, no hook stamp) `wp-write-review` records the
185
+ submitter as `terminal` — a HUMAN reviewer — and finish accepts it. CI never submits or reads verdicts:
186
+ the review state is local and never committed.
187
+
188
+ ## The verdict each reviewer subagent submits through `wp-write-review`
171
189
 
172
190
  ```json
173
191
  {
@@ -262,7 +280,8 @@ review must not read as a fully-reviewed one.
262
280
  ```
263
281
 
264
282
  Then run `pnpm wp-finish-upsert-pr`. It re-computes the matched checklists, requires a well-formed,
265
- passing (or overridden) `review-<id>.json` for each, verifies a reviewer subagent ran for each, and
283
+ passing (or overridden) `review-<id>.json` for each — submitted through `wp-write-review`, unedited, and
284
+ judging the in-scope diff as it is now — verifies a reviewer subagent ran for each, and
266
285
  only then opens/updates the PR.
267
286
 
268
287
  > Provenance is verified from Claude Code's own subagent records — it is not tamper-proof (a determined