@webpresso/plugin-claude 0.0.10 → 0.0.11

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.
@@ -7,7 +7,7 @@ scope: repo
7
7
  applies_to: [agents]
8
8
  related: [verify, ultragoal, tech-debt, devex-review, land-policy]
9
9
  created: "2026-08-03"
10
- last_reviewed: "2026-08-03"
10
+ last_reviewed: "2026-08-11"
11
11
  name: tooling-friction
12
12
  description: "After land, capture MCP/CLI friction tips (optional; never blocks.)"
13
13
  argument-hint: "[--promote] [blueprint-slug|pr-number|session]"
@@ -50,26 +50,34 @@ Optional post-land **product signal** for MCP/CLI/hooks/CI pain so Webpresso too
50
50
  <state-root>/<repo-key>/tooling-friction/YYYY-MM-DD-<slug|pr|session>.json
51
51
  ```
52
52
 
53
- Ask the read-only MCP resolver for the exact path, then use that returned
54
- absolute path for the write:
53
+ **Path SSOT (required):** call the read-only MCP resolver and **copy the
54
+ absolute path from its summary text** (hosts often omit structured details):
55
55
 
56
56
  ```text
57
57
  wp_tooling_friction_path({"file":"YYYY-MM-DD-<slug|pr|session>.json"})
58
+ → summary: tooling-friction path: <absolute-path>
58
59
  ```
59
60
 
60
- The resolver is backed directly by
61
- `getSurfacePath("tooling-friction/<file>", "repo", <project-cwd>)`. For
62
- human CLI use, the equivalent read-only projection is
63
- `wp tooling-friction path --file <file>`. The capture is shared by that
64
- repository's worktrees but never written to any checkout. Create parent
65
- dirs as needed. If the returned path already exists, choose a unique
66
- session/HHMM suffix rather than overwriting it. If the surface cannot be
67
- resolved or written, report `tooling-friction: skipped: no state surface`
61
+ Write only to that absolute path. Do **not** construct a path by hand.
62
+
63
+ - `repo-key` is a **16-hex** `repoIdentityV1(git-common-dir)` segment from
64
+ `repoIdentityV1` under the pure preferred state root **not** a fleet worktree folder slug such
65
+ as `github.com-org-repo-<hash>` under `~/.webpresso/worktrees/repos/`.
66
+ - Scope is always **repo** (shared by every worktree of that git common
67
+ dir). Never use a worktree-keyed desktop-state surface for captures.
68
+ - Human CLI equivalent: `wp tooling-friction path --file <file>` (prints
69
+ the same absolute path on stdout).
70
+
71
+ Create parent dirs as needed. If the returned path already exists, choose a
72
+ unique session/HHMM suffix rather than overwriting it. If the surface cannot
73
+ be resolved or written, report `tooling-friction: skipped: no state surface`
68
74
  and stop; never fall back to a worktree or `.agent/` path.
69
75
 
70
76
  5. Optional `--promote` or severity `high`/`critical`:
71
77
  `wp tech-debt new "<short title>" --severity <s> --category tooling --status accepted`
72
- Set `promoted_to` to the resulting path.
78
+ Set `promoted_to` to the resulting path. `new` refuses on a primary-like
79
+ checkout; from one, pass `--cwd <managed-worktree-path>` (or `--allow-primary`
80
+ to override deliberately).
73
81
  6. Optional one-line `wp_session_capture` pointer to the JSON path — no paste-back walls.
74
82
 
75
83
  **Rate limit:** at most **one** capture per verify bookend.
@@ -77,9 +85,18 @@ Optional post-land **product signal** for MCP/CLI/hooks/CI pain so Webpresso too
77
85
  ## Store path (SSOT)
78
86
 
79
87
  `wp_tooling_friction_path({"file":"<file>"})` (or the human CLI projection
80
- `wp tooling-friction path --file <file>`) — a read-only projection of
81
- `getSurfacePath("tooling-friction/<file>", "repo", <project-cwd>)`, the
82
- repo-scoped desktop state surface, not a path inside `planning/` or a worktree.
88
+ `wp tooling-friction path --file <file>`) — a read-only projection of the pure
89
+ preferred state root (WP_STATE_ROOT or env-paths data; no writability fallback)
90
+ plus `repoIdentityV1(git-common-dir)` under `tooling-friction/<file>`. This
91
+ intentionally does **not** follow `getStateRoot()`'s temporary fallback when the
92
+ preferred root is unwritable — always copy the resolver output.
93
+
94
+ The MCP summary embeds the absolute path (`tooling-friction path: …`). Details
95
+ also include `path`, `repoKey` (16-hex), `stateRoot`, `scope: "repo"`, and
96
+ `projectRoot`. Copy the path; never invent one.
97
+
98
+ **Not** a path inside `planning/`, a checkout, or
99
+ `desktop-state/repos/github.com-…` (fleet worktree layout ≠ desktop-state key).
83
100
 
84
101
  ## Schema v1
85
102
 
@@ -161,6 +178,11 @@ repo-scoped desktop state surface, not a path inside `planning/` or a worktree.
161
178
  6. No blueprint errata misuse
162
179
  7. No committing desktop-state captures
163
180
  8. No auto-open GitHub issues per tip
181
+ 9. **Never invent the capture path** — no fleet folder slugs
182
+ (`github.com-org-repo-*`), no worktree-keyed desktop-state, no guessing
183
+ under `Application Support` or `~/.webpresso`. Always call
184
+ `wp_tooling_friction_path` / `wp tooling-friction path` and write to the
185
+ absolute path it returns
164
186
 
165
187
  ## Integration
166
188
 
@@ -171,7 +193,7 @@ repo-scoped desktop state surface, not a path inside `planning/` or a worktree.
171
193
  ## Output (agent reply)
172
194
 
173
195
  ```text
174
- tooling-friction: wrote desktop state <state-root>/<repo-key>/tooling-friction/<file>.json
196
+ tooling-friction: wrote desktop state <absolute-path-from-wp_tooling_friction_path>
175
197
  findings: 2 (high=1, medium=1)
176
198
  promoted: none | tech-debt/...
177
199
  ```
@@ -195,11 +195,11 @@ Fallback to `wp …` CLI only when the matching MCP tool is unavailable. Prefer
195
195
  the user sets N (the default value lives in `workflow-skills-routing.md`).
196
196
  Controller validation evidence is **machine-qa (prior QA phase) + N outside voices**
197
197
  (default N=1), not two outside model reviewers at budget 1.
198
- Use `wp_review_gate` only for exact-version draft plan approval/auto-promotion.
199
- Use advisory `wp_review_run` for implementation/phase outside voice; it never
200
- mutates blueprint approval state. A CLI delivery gate is explicit
201
- MCP-unavailable compatibility only, not this MCP contract. Use `wp_pr_*` for
202
- PR babysit — no
198
+ Use `wp_review_gate` in the default authoritative mode only for exact-version
199
+ draft plan approval/auto-promotion. Use the same tool with `mode: "advisory"`
200
+ for implementation/phase outside voice; it never mutates blueprint approval
201
+ state on its own. A CLI delivery gate is explicit MCP-unavailable
202
+ compatibility only, not this MCP contract. Use `wp_pr_*` for PR babysit — no
203
203
  multi-sleep poll loops; no parallel multi-reviewer stampede.
204
204
  8. Stop on `complete`, `cancelled`, blocked guard exhaustion, or `WP_ULTRAGOAL_DISABLE=1`.
205
205
 
@@ -217,15 +217,16 @@ primary checkout.
217
217
 
218
218
  ## Outside-voice review (required for autopilot)
219
219
 
220
- Autopilot and agent-driven ultragoal loops **must** request an **OpenCode Go** outside-voice review after each **goal/phase milestone**, and must pick the model by purpose. Use **`wp_review_gate`** only for exact-version draft plan approval/auto-promotion. Use single-shot **`wp_review_run`** for implementation/phase outside voice; it is advisory and never mutates blueprint approval state. CLI delivery gates are explicit MCP-unavailable compatibility only, not this MCP contract.
220
+ Autopilot and agent-driven ultragoal loops **must** request an **OpenCode Go** outside-voice review after each **goal/phase milestone**, and must pick the model by purpose. Use **`wp_review_gate`** in the default authoritative mode only for exact-version draft plan approval/auto-promotion. Use a single-shot **`wp_review_gate`** call with **`mode: "advisory"`** for implementation/phase outside voice; it never mutates blueprint approval state on its own — a later authoritative call may promote a matching advisory approval without re-invoking a provider. CLI delivery gates are explicit MCP-unavailable compatibility only, not this MCP contract.
221
221
 
222
222
  Count each milestone review against `review_budget` for merge-ready claims: **exactly one sequential** reviewer path unless the user sets N; the default value is owned by `workflow-skills-routing.md`. Prefer purpose-matched OpenCode Go first; do not fan out multi-host review swarms.
223
223
 
224
224
  ### Milestones that require a review
225
225
 
226
- Run `wp_review_gate` only for the plan approval milestone below. Run one
227
- single-shot `wp_review_run` for implementation/phase milestones; it is advisory
228
- and does not promote or otherwise mutate blueprint approval state.
226
+ Run `wp_review_gate` (default authoritative mode) only for the plan approval
227
+ milestone below. Run one single-shot `wp_review_gate` call with `mode:
228
+ "advisory"` for implementation/phase milestones; it is advisory and does not
229
+ promote or otherwise mutate blueprint approval state on its own.
229
230
 
230
231
  | Milestone | When |
231
232
  | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
@@ -41,18 +41,18 @@ the preferred skill (`claude` / `codex` / `grok` / one OpenCode Go), then stops.
41
41
 
42
42
  ## Tooling map
43
43
 
44
- | Gate | Prefer |
45
- | ------------------------- | --------------------------------------------------------------------------------------- |
46
- | Lint / types / tests / QA | `wp_lint`, `wp_typecheck`, `wp_test`, `wp_qa` |
47
- | Format | `wp_format` |
48
- | Audits | `wp_audit`, `wp_audits` |
49
- | Blueprint | blueprint MCP tools + `wp_audit` |
50
- | PR / CI wait | `wp_pr_status`, `wp_pr_wait` (not multi-sleep loops) |
51
- | Release | `wp_release_progress` for live Release phases; `wp_release_readiness` for package gates |
52
- | Large output | `wp_session_execute` / `batch_execute` / `execute_file` |
53
- | Continuity | `wp_session_capture` for verify summary; avoid paste-back walls |
54
- | E2E / act | `wp_e2e`, `wp_ci_act` when the change requires them |
55
- | Outside authority | `wp_review_gate` for plans; `wp_review_run` for implementation |
44
+ | Gate | Prefer |
45
+ | ------------------------- | ------------------------------------------------------------------------------------------------------- |
46
+ | Lint / types / tests / QA | `wp_lint`, `wp_typecheck`, `wp_test`, `wp_qa` |
47
+ | Format | `wp_format` |
48
+ | Audits | `wp_audit`, `wp_audits` |
49
+ | Blueprint | blueprint MCP tools + `wp_audit` |
50
+ | PR / CI wait | `wp_pr_status`, `wp_pr_wait` (not multi-sleep loops) |
51
+ | Release | `wp_release_progress` for live Release phases; `wp_release_readiness` for package gates |
52
+ | Large output | `wp_session_execute` / `batch_execute` / `execute_file` |
53
+ | Continuity | `wp_session_capture` for verify summary; avoid paste-back walls |
54
+ | E2E / act | `wp_e2e`, `wp_ci_act` when the change requires them |
55
+ | Outside authority | `wp_review_gate` (authoritative) for plans; `wp_review_gate` with `mode: "advisory"` for implementation |
56
56
 
57
57
  ## Iron law — evidence before claims
58
58
 
@@ -263,17 +263,33 @@ Do not substitute mutable branch names for authority when the audit needs a SHA.
263
263
  SSOT: `evaluateSensitiveReviewPolicy` in `src/review/sensitive-review-policy.ts`;
264
264
  CI job in `.github/workflows/pr-policy.yml`.
265
265
 
266
- ### 2. Sensitive → delivery until satisfied
266
+ ### 2. Sensitive → delivery to terminal verdict
267
267
 
268
268
  When classification is **sensitive**:
269
269
 
270
270
  - Require delivery review via `risk-review-coverage` / `wp_review_gate`
271
271
  (purpose delivery) / qualifying lane approvals for the current
272
- review subject until `policySatisfied`.
273
- - Launch **exactly one** `wp_review_gate` delivery attempt with
272
+ review subject until `policySatisfied` (**approval** or valid same-subject
273
+ **maintainer-override**). A formal **reject** is a terminal automated-review
274
+ outcome but does **not** satisfy land policy: Product status stays
275
+ `incomplete`, Process status stays `sensitive-blocked` until approval or
276
+ override. Tech-debt is **not** a substitute for delivery approval.
277
+ - Launch **exactly one at a time** `wp_review_gate` delivery attempt with
274
278
  `--base-ref <base-sha>` and `--authority-ref <head-sha>`. Do not substitute
275
279
  `HEAD` for the authority SHA, and do not relaunch while the same subject has
276
280
  an in-progress gate.
281
+ - On formal **reject**: surface the gate `next_action` (`report_delivery_reject`)
282
+ / reject projection to the user; free-triage against blueprint non-goals;
283
+ address the findings, then re-review only a changed exact subject. The shared
284
+ gate permits five distinct rejected delivery subjects by default. Once that
285
+ budget is exhausted, **do not** set `scope_continue=true` without explicit
286
+ user authorization; agents must not invent the grant. For plan or delivery,
287
+ only an operator may request an absolute finite same-slug ceiling through MCP
288
+ `scope_continue_limit` (10..32); the field still requires
289
+ `scope_continue=true`. MCP wins over `WP_REVIEW_SCOPE_CONTINUE_LIMIT`; when
290
+ neither is present, the plan/delivery defaults are 16/10. Machine enforcement
291
+ does not link successor slugs; creating one to launder or bypass the budget
292
+ remains procedurally forbidden, as do resets and retry schemes.
277
293
  - `Review-skip` is **FORBIDDEN** (`sensitive-review-skip-forbidden`).
278
294
  - Completed owner blueprint must be present in the PR
279
295
  (`sensitive-no-completed-owner` otherwise).
@@ -293,7 +309,7 @@ When classification is **standard**:
293
309
  Must be start-of-line. Process label: `standard-skip`.
294
310
 
295
311
  - Otherwise obtain **exactly one sequential** advisory outside voice
296
- (`wp_review_run` or host skill). Process label: `outside-approved`.
312
+ (`wp_review_gate` with `mode: "advisory"`, or host skill). Process label: `outside-approved`.
297
313
  - At most **one OpenCode Go reviewer** counts unless the user asks for more.
298
314
  - Invoke the selected reviewer **once**. Do not probe, retry, or rotate
299
315
  providers automatically, and **never** fan out parallel multi-host review
@@ -330,9 +346,25 @@ Never invent a land-now skip. See `land-policy` for the full table.
330
346
  `not_found` means there is no active or terminal gate for that subject; refresh
331
347
  state and start the gate again instead of continuing to wait.
332
348
  - Implementation / delivery approval: for sensitive PRs use `wp_review_gate`
333
- purpose delivery on the immutable subject; for standard advisory use
334
- `wp_review_run` exactly once with the selected provider and an expected
335
- verdict marker. Do not run a separate provider probe.
349
+ purpose delivery, default authoritative mode, on the immutable subject; for
350
+ standard advisory use the same `wp_review_gate` call with `mode: "advisory"`
351
+ exactly once with the selected provider. Do not run a separate provider
352
+ probe. A later authoritative call on the same subject may promote a
353
+ matching complete advisory approval to authority with zero provider
354
+ invocation, unless a completed reject already exists for that content at
355
+ either stage.
356
+ - `advisory-exhausted` is a terminal outcome with no ledger event and no
357
+ verdict — treat it as terminal-without-authority. It means this exact
358
+ digest already used its advisory attempt budget; do not retry the same
359
+ content or report it as a failure. Change the reviewed content (which mints
360
+ a new digest) or spend real authoritative budget instead. It is always
361
+ returned synchronously; no `wp_review_gate_wait` poll is ever needed or
362
+ issued for it.
363
+ - An advisory gate and an authoritative gate on the same subject cannot run
364
+ concurrently — unlike the removed `wp_review_run`, an advisory
365
+ `wp_review_gate` call claims the same active marker an authoritative call
366
+ does. If a call reports marker contention, serialize the two calls rather
367
+ than treating contention as an error.
336
368
  - Each gate reviewer must return exactly one schema-valid JSON review object;
337
369
  never infer a verdict from Markdown. The gate derives approval from typed
338
370
  findings: blockers reject, nits approve with nits, and no findings approve.
@@ -360,7 +392,9 @@ If any required check is missing, the correct result is **not done yet**, not a
360
392
 
361
393
  **Tooling friction (optional):** if this session burned medium+ tokens on MCP/CLI/hooks/CI
362
394
  gates (not product code), run `/tooling-friction` once and resolve its capture
363
- destination with `wp_tooling_friction_path({"file":"<file>"})` (human CLI:
364
- `wp tooling-friction path --file <file>`). Skip when the path was smooth. If
365
- the surface cannot be resolved or written, report the skip and never fall
366
- back to a worktree path. Never blocks land see the `tooling-friction` skill.
395
+ destination with `wp_tooling_friction_path({"file":"<file>"})` copy the absolute
396
+ path from the tool summary (human CLI: `wp tooling-friction path --file <file>`).
397
+ Do not invent fleet folder slugs or worktree-keyed desktop-state paths. Skip when
398
+ the path was smooth. If the surface cannot be resolved or written, report the skip
399
+ and never fall back to a worktree path. Never blocks land — see the
400
+ `tooling-friction` skill.