@webpieces/rules-config 0.4.779 → 0.4.781
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/package.json +1 -1
- package/src/checklist-config.d.ts +4 -3
- package/src/checklist-config.js +5 -4
- package/src/checklist-config.js.map +1 -1
- package/src/checklist-validator.d.ts +2 -1
- package/src/checklist-validator.js +10 -4
- package/src/checklist-validator.js.map +1 -1
- package/src/pr-gate-config.d.ts +5 -5
- package/src/pr-gate-config.js +13 -8
- package/src/pr-gate-config.js.map +1 -1
- package/src/pr-gate-section-validators.d.ts +8 -4
- package/src/pr-gate-section-validators.js +41 -21
- package/src/pr-gate-section-validators.js.map +1 -1
- package/src/retired-config-keys.js +3 -3
- package/src/retired-config-keys.js.map +1 -1
- package/src/reviewer-instructions.d.ts +1 -1
- package/src/reviewer-instructions.js +2 -2
- package/src/reviewer-instructions.js.map +1 -1
- package/src/subagent-provenance.d.ts +1 -1
- package/src/subagent-provenance.js +1 -1
- package/src/subagent-provenance.js.map +1 -1
- package/src/validate-config.js +0 -1
- package/src/validate-config.js.map +1 -1
- package/templates/webpieces.review-checklists.md +13 -10
|
@@ -4,11 +4,11 @@ Your repo defines company review checklists in `pr-gate.checklists` in `webpiece
|
|
|
4
4
|
array of `{ id, doc, required, patterns? }`, and that is the **only** accepted shape. Each has an `id`
|
|
5
5
|
(its name; it keys `review-<id>.json`), a **repo-relative** `doc` it is reviewed against, says whether it
|
|
6
6
|
**blocks**, and optionally carries path `patterns`. Checklists do not pick an agent type: every one is
|
|
7
|
-
reviewed by the ONE agent `
|
|
7
|
+
reviewed by the ONE reviewer agent — `webpieces-reviewer` unless you override it (webpieces verifies
|
|
8
|
+
`.claude/agents/<name>.md` exists):
|
|
8
9
|
|
|
9
10
|
```jsonc
|
|
10
11
|
"commands": { "pr-gate": {
|
|
11
|
-
"reviewerAgentName": "webpieces-reviewer", // REQUIRED
|
|
12
12
|
"reviewerAgents": 1, // OPTIONAL — see below
|
|
13
13
|
"checklists": [
|
|
14
14
|
{ "id": "db-migrations",
|
|
@@ -23,15 +23,18 @@ reviewed by the ONE agent `reviewerAgentName` names (webpieces verifies `.claude
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
> **The per-entry `subagent` key is RETIRED** — config validation fails and names the edit: rename it to
|
|
26
|
-
> `id
|
|
26
|
+
> `id`. There is no compatibility mode.
|
|
27
27
|
|
|
28
|
-
## `reviewerAgentName` and `reviewerAgents` — who reviews, and how many of them
|
|
28
|
+
## `overrideReviewerAgent`, `reviewerAgentName` and `reviewerAgents` — who reviews, and how many of them
|
|
29
29
|
|
|
30
|
-
-
|
|
31
|
-
`webpieces-reviewer
|
|
30
|
+
- **The reviewer agent** is the `subagent_type` every reviewer is spawned as. By default — write nothing —
|
|
31
|
+
it is `webpieces-reviewer`, a generic, checklist-agnostic reviewer that webpieces owns:
|
|
32
32
|
`wp-install-ai-hooks` and `pnpm wp-upgrade-shim` write it to `.claude/agents/webpieces-reviewer.md`, and a
|
|
33
|
-
stale or hand-edited copy is flagged with `pnpm wp-upgrade-shim` as the cure.
|
|
34
|
-
|
|
33
|
+
stale or hand-edited copy is flagged with `pnpm wp-upgrade-shim` as the cure.
|
|
34
|
+
- **`overrideReviewerAgent`** (optional boolean, absent = false) + **`reviewerAgentName`** use an agent of
|
|
35
|
+
your own instead: set `"overrideReviewerAgent": true` and `"reviewerAgentName": "my-reviewer"`. The two go
|
|
36
|
+
together — a `reviewerAgentName` without the override, or the override without a name, fails config
|
|
37
|
+
validation naming the edit.
|
|
35
38
|
- **`reviewerAgents`** (optional positive integer) caps how many reviewer subagents one round may use.
|
|
36
39
|
- **Absent** — one SEPARATE subagent per checklist, and `wp-finish` requires a distinct run for each.
|
|
37
40
|
- **Present (N)** — `wp-review-upsert-pr` tells you to use AT MOST N subagents for the owed checklists and
|
|
@@ -125,7 +128,7 @@ The changed files + the exact base sha the gate uses are in
|
|
|
125
128
|
|
|
126
129
|
For each matched **required** checklist — and each **optional** one the human picked — you must:
|
|
127
130
|
|
|
128
|
-
1. **Have a
|
|
131
|
+
1. **Have a reviewer-agent subagent review it** — a SEPARATE one per checklist, unless
|
|
129
132
|
`reviewerAgents` lets one subagent cover several. The coding agent may **not** review its own work.
|
|
130
133
|
`wp-finish` verifies from the harness's own records that a reviewer subagent actually ran on this branch
|
|
131
134
|
for each checklist (a distinct run per checklist when `reviewerAgents` is absent).
|
|
@@ -145,7 +148,7 @@ pick none, that is a complete answer; go straight to finish.
|
|
|
145
148
|
|
|
146
149
|
**You may never write a reviewer's `review-<id>.json` yourself.** If the reviewer agent cannot be spawned,
|
|
147
150
|
that is a config bug, not your cue to self-certify — report it to the human. (webpieces rejects a
|
|
148
|
-
|
|
151
|
+
reviewer agent that has no `.claude/agents/<name>.md`, so this should surface as a config error instead.)
|
|
149
152
|
|
|
150
153
|
## `review-<id>.json` (each reviewer subagent writes its own)
|
|
151
154
|
|