@webpresso/plugin-codex 0.0.15 → 0.0.17

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.
@@ -31,26 +31,26 @@ the blast radius is broader than a local fix.
31
31
 
32
32
  ## Tooling map
33
33
 
34
- | Need | Prefer |
35
- | ---------------------- | --------------------------------------------------------------------------- |
36
- | Reproduce / large logs | `wp_session_execute`, `wp_session_batch_execute`, `wp_session_execute_file` |
37
- | Recall prior evidence | `wp_session_search`, `wp_session_restore`, `wp_session_retrieve` |
38
- | Capture decisions | `wp_session_capture` (do not paste full reports back as user text) |
39
- | Scoped proof | `wp_test`, `wp_lint`, `wp_typecheck`, or `wp_qa` |
40
- | Audits | `wp_audit` / `wp_audits` |
41
- | Worktree isolation | `wp_blueprint_put` / `wp_worktree` — never thrash primary checkout |
42
- | PR follow-up | `wp_pr_status`, `wp_pr_upsert` when landing the fix |
34
+ | Need | Prefer |
35
+ | ---------------------- | ------------------------------------------------------------------ |
36
+ | Reproduce / large logs | `session_execute`, `session_batch_execute`, `session_execute_file` |
37
+ | Recall prior evidence | `session_search`, `session_restore`, `session_retrieve` |
38
+ | Capture decisions | `session_capture` (do not paste full reports back as user text) |
39
+ | Scoped proof | `test`, `lint`, `typecheck`, or `qa` |
40
+ | Audits | `audit` / `audits` |
41
+ | Worktree isolation | `blueprint_put` / `worktree` — never thrash primary checkout |
42
+ | PR follow-up | `pr_status`, `pr_upsert` when landing the fix |
43
43
 
44
44
  ## Non-negotiable invariants
45
45
 
46
46
  1. **Root cause, not symptom.** Trace the failure to the invariant that actually broke. Do not patch callers when the owner is fixable.
47
47
  2. **Loud failures, no silent fallbacks.** No default shims, sentinel returns, or catch-and-continue behavior that hides missing config, bad state, or broken boundaries.
48
- 3. **Use the repo's real execution surface.** Prefer MCP `wp_*` tools and repo wrappers over host Bash for search/test/lint. Use bounded session-memory paths for large output.
48
+ 3. **Use the repo's real execution surface.** Prefer wp MCP tools and repo wrappers over host Bash for search/test/lint. Use bounded session-memory paths for large output.
49
49
  4. **Regression proof is mandatory.** Add or strengthen a test or other reliable proof that would fail against the old behavior.
50
50
  5. **Raising timeouts is not a fix.** If a timeout fires, investigate the bottleneck. Only raise a bound when the repo already documents that workload and you can cite measurement.
51
51
  6. **Zero suppressions, zero papering over.** No lint disables, ts-ignore, compat aliases, or "temporary" branches to sneak the fix through.
52
52
  7. **Minimal correct diff.** Update every consumer of a changed contract in the same change, but do not bundle unrelated cleanup.
53
- 8. **Primary checkout is sacred.** If HEAD is detached, primary is dirty with unrelated work, or you are not on a managed worktree for non-trivial edits → **stop** and move to `wp_worktree` / blueprint owner. Never leave the primary checkout broken.
53
+ 8. **Primary checkout is sacred.** If HEAD is detached, primary is dirty with unrelated work, or you are not on a managed worktree for non-trivial edits → **stop** and move to `worktree` / blueprint owner. Never leave the primary checkout broken.
54
54
 
55
55
  ## Opportunistic fix budget (when called from ultragoal / autopilot)
56
56
 
@@ -61,7 +61,7 @@ the blast radius is broader than a local fix.
61
61
  - **Tooling / harness findings** ("fix inefficiency you come across", MCP vs shell,
62
62
  hook thrash) honor the same budget. Excess → record via the `tech-debt` skill
63
63
  (or backlog handoff); do not expand the current epic unbounded.
64
- - Prefer MCP `wp_*` and session-memory tools over the `wp` CLI / raw shell for
64
+ - Prefer wp MCP tools and session-memory tools over the `wp` CLI / raw shell for
65
65
  quality and discovery paths (see tooling map).
66
66
 
67
67
  ## Protocol
@@ -98,6 +98,19 @@ there, the investigation work is part of `fix`.
98
98
  - Read enough surrounding code to say the broken invariant in one sentence.
99
99
  - If the issue is nondeterministic, gather evidence until you can describe the slow/flaky/failing case without guessing.
100
100
 
101
+ **Prove the mechanism before naming it.** A cause that merely explains the
102
+ symptom is a hypothesis, not a finding. Run the failing thing with the candidate
103
+ values and read what it actually did; trace the claim to the code that executes,
104
+ not the code whose name matches the theory. If you cannot reproduce it, label it
105
+ unverified and keep investigating — do not write it into a plan, commit, or
106
+ report as the cause.
107
+
108
+ **When a cause is disproved, go back to the command, not to the next story.**
109
+ Substituting another plausible explanation without new observation is how one
110
+ dead route gets three confident, wrong diagnoses. If your second and third
111
+ explanations are still unobserved, you have not reproduced the failure yet.
112
+ Related: `catalog/agent/rules/evidence-discipline.md` § 6.
113
+
101
114
  If the "issue" is actually several unrelated failures, stop and ask which one to fix first.
102
115
 
103
116
  ### Step 2 — Decide where the fix belongs
@@ -130,10 +143,10 @@ Do not keep production code written before the test as "reference". If you wrote
130
143
 
131
144
  Run the narrowest checks that prove the repaired behavior on the real repo surface:
132
145
 
133
- - `wp_test` / targeted tests for the repaired path
134
- - `wp_lint` / `wp_typecheck` for changed surfaces
135
- - `wp_qa` only when the blast radius needs the bookend
136
- - Before push: start `wp_ci_preflight`, then poll `wp_ci_preflight_wait` with
146
+ - `test` / targeted tests for the repaired path
147
+ - `lint` / `typecheck` for changed surfaces
148
+ - `qa` only when the blast radius needs the bookend
149
+ - Before push: start `ci_preflight`, then poll `ci_preflight_wait` with
137
150
  its run ID until terminal success (use global `wp ci-preflight` only when MCP
138
151
  is unavailable). Run it after the final commit and do not edit or commit again
139
152
  before pushing: terminal success records the exact-state receipt checked by pre-push.
@@ -141,7 +154,7 @@ Run the narrowest checks that prove the repaired behavior on the real repo surfa
141
154
 
142
155
  Rules:
143
156
 
144
- - Prefer MCP `wp_*` over raw host Bash.
157
+ - Prefer wp MCP tools over raw host Bash.
145
158
  - Reuse fresh logs / session-memory indexed output; do not re-run long commands just to re-read.
146
159
  - Read the exit code and summary before making a claim.
147
160
  - Never `git push --no-verify` to land an unproven fix.
@@ -158,7 +171,7 @@ cleanup pass, use `ai-deslop` before the final verify handoff.
158
171
 
159
172
  ### Tool recovery and delivery intent
160
173
 
161
- - Discover the managed owner's current identity with `wp_blueprint_projects`
174
+ - Discover the managed owner's current identity with `blueprint_projects`
162
175
  using its absolute `cwd`; pass the returned project ID and matching checkout
163
176
  to session tools. A blueprint ID is not a project ID.
164
177
  - If quality tooling refuses stale or cross-checkout execution, follow its
@@ -26,24 +26,24 @@ session. Do **not** paste full transcripts.
26
26
 
27
27
  ## Tooling map
28
28
 
29
- | Need | Prefer |
30
- | ---------------------- | ----------------------------------------------------------------------------------- |
31
- | Capture decisions | `wp_session_capture` |
32
- | Context-light manifest | `wp_session_context` (required for subagents) |
33
- | Prior evidence | `wp_session_search` / `wp_session_retrieve` / `wp_session_restore` |
34
- | Other-host chat | `wp_conversation_search` / `wp_conversation_get` / `wp_conversation_read` (bounded) |
35
- | Ultragoal block | `wp_ultragoal_handoff` (≤40 lines) when a controller is active |
29
+ | Need | Prefer |
30
+ | ---------------------- | -------------------------------------------------------------------------- |
31
+ | Capture decisions | `session_capture` |
32
+ | Context-light manifest | `session_context` (required for subagents) |
33
+ | Prior evidence | `session_search` / `session_retrieve` / `session_restore` |
34
+ | Other-host chat | `conversation_search` / `conversation_get` / `conversation_read` (bounded) |
35
+ | Ultragoal block | `ultragoal_handoff` (≤40 lines) when a controller is active |
36
36
 
37
37
  ## Protocol
38
38
 
39
39
  1. **State the objective** in one sentence (what the next agent must finish).
40
- 2. **Capture** short pointers via `wp_session_capture`: done, blockers, decisions,
40
+ 2. **Capture** short pointers via `session_capture`: done, blockers, decisions,
41
41
  evidence refs (log paths, test commands, PR numbers) — not full reports.
42
- 3. **Build** a bounded manifest with `wp_session_context` (objective, constraints,
42
+ 3. **Build** a bounded manifest with `session_context` (objective, constraints,
43
43
  evidenceRefs, remainingSteps, validation, exclusions). Never copy parent history.
44
44
  4. **Optional cross-host:** resolve the conversation with conversation MCP tools;
45
45
  read only a **bounded tail** (`maxMessages` / `maxBytes`). Prefer resume
46
- commands from `wp_conversation_get` over paste.
46
+ commands from `conversation_get` over paste.
47
47
  5. **Emit ≤40 lines** covering:
48
48
  - goal / non-goals
49
49
  - done + evidence refs
@@ -63,6 +63,37 @@ session. Do **not** paste full transcripts.
63
63
  ## Done looks like
64
64
 
65
65
  - [ ] ≤40-line handoff with evidence refs
66
- - [ ] `wp_session_context` (or capture ids) for the next agent
66
+ - [ ] `session_context` (or capture ids) for the next agent
67
67
  - [ ] Next skill named
68
68
  - [ ] No transcript wall
69
+
70
+ ## Capped or paused host messaging
71
+
72
+ When the host messaging channel is capped or paused, the ≤40-line manifest IS
73
+ the delivery: the handoff built above carries objective, done, blockers, and
74
+ next steps even if no send lands — emit it once and treat it as sent. Include
75
+ the send-budget state (attempt count, last canary result) in the manifest
76
+ whenever the cap has been in play this session — the count's durable homes
77
+ are the outbox header and the `session_capture` record; re-read both on
78
+ resume. The leader's outbox anchor is durable in two homes: the
79
+ outbox file's own header and a `session_capture` record (`session_capture`
80
+ is registered in `src/mcp/tools/_names.ts`, implemented in
81
+ `src/mcp/tools/session-capture.ts`). When the coordinator incarnation changes,
82
+ re-anchor: write both homes plus the next handoff manifest — a recorded anchor
83
+ goes stale when the identity passes to a new session (observed 2026-10-31: a
84
+ memory-recorded live outbox path no longer existed). On the reader side, a
85
+ stale or dead anchor is not a wall: fall back to the next durable arbitration
86
+ source (`fleet_status` / blueprint task lists) and queues the staleness as
87
+ a blocker in the outbox or manifest; a control send is spent only when the
88
+ channel is open and a reserve slot remains, to surface the staleness. Before executing a resumed
89
+ or queued order, check durable state (the outbox, `fleet_status`,
90
+ blueprint task lists) for a newer arbitration — queued sends deliver late
91
+ and out of order. The manifest carries this check as a required line.
92
+ Queued orders in the manifest are one line each; if the queue would break
93
+ the ≤40-line cap, the manifest carries the count and the outbox path and
94
+ the orders stay in the outbox. Never route around a cap or
95
+ pause: no relays, no peer delegation, no new sessions, no schedulers, no
96
+ filesystem push-delivery to peers, no configuration changes, and no alternate
97
+ transport, tool, or uncapped/legacy send interface. The durable outbox is pull-read
98
+ state, not a route-around. Keep manifests context-light — do not paste full
99
+ transcripts.
@@ -7,7 +7,7 @@ scope: repo
7
7
  applies_to: [agents]
8
8
  related: []
9
9
  created: "2026-05-07"
10
- last_reviewed: "2026-05-07"
10
+ last_reviewed: "2026-11-01"
11
11
  name: hooks-doctor
12
12
  description: "Hook/plugin doctor for install health. Use for hook blocked, pretooluse, plugin broken."
13
13
  argument-hint: "[--skip-mcp]"
@@ -55,13 +55,13 @@ Each check prints `[x]` (pass) or `[ ]` (fail) with a detail line:
55
55
 
56
56
  ## Failure Remediation
57
57
 
58
- | Check | Likely Cause | Fix |
59
- | ------------------------------------------------ | -------------------------------------------------------------- | ----------------------------------------------------------------- |
60
- | `pretool-guard` / `post-tool` / etc. — not found | `wp run build` not run after install | `wp run build` |
61
- | `pretool-guard` / etc. — not executable | `chmod +x` not persisted | Re-run `wp run prepare` or `wp run build` which runs `chmod-bins` |
62
- | `plugin.json integrity` — missing | Claude adapter manifest absent from `@webpresso/plugin-claude` | Re-run `wp setup --host claude` or reinstall the Claude plugin |
63
- | `MCP server liveness` — timeout | MCP server cold-start too slow | Wait and retry, or run `wp hooks doctor --skip-mcp` |
64
- | Any check — not found at `dist/esm/...` | Build artifacts missing | Run `wp run build` in the webpresso repo |
58
+ | Check | Likely Cause | Fix |
59
+ | ------------------------------------------------ | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
60
+ | `pretool-guard` / `post-tool` / etc. — not found | `wp run build` not run after install | `wp run build` |
61
+ | `pretool-guard` / etc. — not executable | `chmod +x` not persisted | Re-run `wp run prepare` or `wp run build` which runs `chmod-bins` |
62
+ | `plugin.json integrity` — missing | Claude or Antigravity adapter manifest absent from plugin package | Re-run `wp setup --host <host>` or reinstall the host plugin |
63
+ | `MCP server liveness` — timeout | MCP server cold-start too slow | Wait and retry, or run `wp hooks doctor --skip-mcp` |
64
+ | Any check — not found at `dist/esm/...` | Build artifacts missing | Run `wp run build` in the webpresso repo |
65
65
 
66
66
  ### Updating the webpresso MCP server (monorepo authors)
67
67
 
@@ -95,10 +95,12 @@ started. Check the installed host version before using version-scoped controls.
95
95
  commands](https://dev.opencode.ai/v2/docs/cli/commands/); host documentation
96
96
  verified 2026-10-17). These `dev.opencode.ai` paths sit on a preview domain
97
97
  and can move; confirm the v2 path still resolves before following it.
98
+ - **Antigravity:** Preferences / Settings → Plugins → reload or toggle `wp` plugin,
99
+ or restart the Antigravity session. Verify with `wp hooks doctor` or `wp hooks status`.
98
100
 
99
101
  After reconnecting, prove the loaded source rather than the connection:
100
102
 
101
- 1. Call `wp_tool_surface` with `detail: "diagnostic"`.
103
+ 1. Call `tool_surface` with `detail: "diagnostic"`.
102
104
  2. Compare `details.diagnostic.live.sourceCommit` against the commit you expect
103
105
  the checkout to be serving.
104
106
  3. Read `details.diagnostic.identity.status`, which is exactly one of `current`,
@@ -19,19 +19,19 @@ flaky behavior, or confusing symptom before editing code.
19
19
 
20
20
  ## Tooling map
21
21
 
22
- | Need | Prefer |
23
- | ---------------------- | ---------------------------------------------------------------- |
24
- | Reproduce / large logs | `wp_session_execute`, `wp_session_batch_execute` |
25
- | Large files | `wp_session_execute_file` |
26
- | Prior continuity | `wp_session_search`, `wp_session_restore`, `wp_session_retrieve` |
27
- | Capture findings | `wp_session_capture` (short pointer, not full paste-back) |
28
- | Proof runs | `wp_test`, `wp_qa`, `wp_lint`, `wp_typecheck` |
29
- | Code search/read | host Grep/Read first; avoid shell-as-IDE |
22
+ | Need | Prefer |
23
+ | ---------------------- | ------------------------------------------------------- |
24
+ | Reproduce / large logs | `session_execute`, `session_batch_execute` |
25
+ | Large files | `session_execute_file` |
26
+ | Prior continuity | `session_search`, `session_restore`, `session_retrieve` |
27
+ | Capture findings | `session_capture` (short pointer, not full paste-back) |
28
+ | Proof runs | `test`, `qa`, `lint`, `typecheck` |
29
+ | Code search/read | host Grep/Read first; avoid shell-as-IDE |
30
30
 
31
31
  ## Workflow
32
32
 
33
33
  1. Reproduce or capture the failure.
34
- - Run the exact failing command or trace the exact user path (prefer `wp_session_execute`).
34
+ - Run the exact failing command or trace the exact user path (prefer `session_execute`).
35
35
  - Keep the evidence that matters: error text, failing assertion, exit code,
36
36
  log path, or boundary mismatch.
37
37
  2. Read the whole boundary.
@@ -42,9 +42,20 @@ flaky behavior, or confusing symptom before editing code.
42
42
  - Name the broken invariant in one sentence.
43
43
  - Name the owner that should enforce it.
44
44
  - Separate facts from guesses.
45
+ - **Every cause must carry the observation that proved it**: the command you
46
+ ran, its output, and the code path that produced it. A cause you have not
47
+ executed against the failing case is a guess and must be labelled as one.
45
48
  4. Disconfirm cheap alternatives.
46
49
  - Test the obvious competing explanations before settling on one cause.
47
50
  - Add temporary diagnostics only when needed, and remove them after one pass.
51
+ - **When a cause is disproved, return to the reproduction rather than
52
+ replacing it with the next plausible story.** Two or three confident
53
+ explanations in a row, none observed, means the failure has not been
54
+ reproduced yet — go back to step 1.
55
+ - A test fixture, capability object, or recorded tool output that asserts
56
+ behaviour is the weakest link: confirm at least one path against the real
57
+ binary, module, or service it stands in for.
58
+ - Related: `catalog/agent/rules/evidence-discipline.md` § 6.
48
59
  5. Produce failing proof.
49
60
  - Prefer a targeted failing test.
50
61
  - If test-first is impossible at this boundary, use the nearest deterministic
@@ -11,8 +11,8 @@ until independently verified.
11
11
 
12
12
  ## MCP-only contract
13
13
 
14
- - Call `wp_review_gate` exactly once for the real plan version or delivery diff.
15
- - Observe the same durable operation with `wp_review_gate_wait` when needed.
14
+ - Call `review_gate` exactly once for the real plan version or delivery diff.
15
+ - Observe the same durable operation with `review_gate_wait` when needed.
16
16
  - Never invoke a provider command, the legacy review CLI, or a removed review-run surface.
17
17
  - If the review MCP is unavailable, stop and report it unavailable. There is no CLI fallback.
18
18
 
@@ -25,8 +25,7 @@ until independently verified.
25
25
  "purpose": "delivery",
26
26
  "base_ref": "<full-base-sha>",
27
27
  "authority_ref": "<full-head-sha>",
28
- "provider": "opencode",
29
- "model": "opencode-go/deepseek-v4.1-flash",
28
+ "caller_model": "<your own model id, exactly as your host reports it>",
30
29
  "repository_access": "none",
31
30
  }
32
31
  ```
@@ -37,13 +36,15 @@ verdict with no new review and no new round. A partial approval, withheld becaus
37
36
  is incomplete (not every prior finding was briefed, or a briefed prior claim was marked
38
37
  still-open without a matching finding), grants no authority and spends no round.
39
38
 
40
- ## Model policy
39
+ ## Reviewer selection
41
40
 
42
- Default exact model: `opencode-go/deepseek-v4.1-flash`.
43
- Committed exact options: `opencode-go/deepseek-v4.1-flash`, `opencode-go/glm-5.3-flash`, `opencode-go/deepseek-v4-pro`, `opencode-go/kimi-k2.7-code`, `opencode-go/muse-spark-1.3-contributor`, `opencode-go/mimo-v2.6-pro`, `opencode-go/step-5-preview`, `opencode-go/qwen3.8-max`, `opencode-go/mimo-v2.6-flash`, `opencode-go/qwen3.8-flash`, `opencode-go/minimax-m3.1-flash-free`, `opencode-go/qwen3.7-plus`, `opencode-go/muse-spark-1.2-contributor`, `opencode-go/mimo-v2.5`, `opencode-go/minimax-m3`, `opencode-go/mimo-v2.5-pro`, `opencode-go/longcat-2.5-preview-free`, `opencode-go/longcat-2.0`, `opencode-go/gpt-6-luna`, `opencode-go/kimi-k3`, `opencode-go/hy4-preview`, `opencode-go/hy3`, `opencode-go/grok-4.7`, `opencode-go/gpt-5.6-luna`, `opencode-go/claude-haiku-5-5`, `opencode-go/glm-5.3`, `opencode-go/glm-5.2`, `opencode-go/gemini-4-argon-contributor`, `opencode-go/beam-free`.
44
- Use a named exact option when requested; otherwise use the default. Provider catalog discovery
45
- belongs to the snapshot drift workflow, never to a skill invocation; reading the box-local
46
- credential store at gate time is a local file read, not catalog discovery.
41
+ Pass `caller_model` with your OWN model id, exactly as your host reports it, and omit
42
+ `provider`, `model`, and `effort`: the gate selects the reviewer route itself — a cross-family
43
+ reviewer chosen for capability, current provider limits, and measured daily cost — and reports
44
+ the choice in `policy_selection`. Never name a reviewer model, probe a provider CLI for its
45
+ catalog, or read a credential store to discover models at invocation time; provider catalog
46
+ discovery belongs to the snapshot drift workflow. An operator may still pass an explicit
47
+ `provider`/`model` as a human override; agents must not.
47
48
 
48
49
  ## Review quality
49
50
 
@@ -75,9 +75,10 @@ Run **1–3 (and relevant review lenses) in parallel** whenever tools allow. Do
75
75
  - Score alternatives on elegance, durability, and efficiency; keep only the winner and write the rejection rationale for heavier options.
76
76
 
77
77
  4. **Plan-review lenses (skip when the caller already ran them).** Folded `/autoplan`: run relevant CEO/founder, design, engineering, and DevEx lenses **in parallel when independent**; consolidate keep/change/drop, unresolved taste calls, tests, go/no-go.
78
+ - **Review cost — know it before you dispatch.** An `approve`, `approve-with-nits`, or `reject` verdict from a `review_gate` run spends ONE formal review round (per slug and purpose). A no-verdict attempt spends none; editing the plan spends and resets nothing already spent. `src/review/budgets.ts` owns the numeric allowance — never restate it in prose — and `wp review budget <slug>` reports remaining capacity live.
78
79
  - **Skip condition.** If the caller states `plan-* reviews complete for this pass`, do **not** re-run the lenses. `ralplan` runs them before handing off, so re-running them here is duplicated spend, not a second opinion.
79
80
  - **Re-entry.** If refinement itself **materially changes scope**, re-run only the affected lens — never the full set — then continue applying.
80
- - **Re-review rounds.** `catalog/agent/rules/review-methodology-sota.md` Principle 5 sets the delta-anchored adjudication contract subsequent `wp_review_gate` rounds follow.
81
+ - **Re-review rounds.** `catalog/agent/rules/review-methodology-sota.md` Principle 5 sets the delta-anchored adjudication contract subsequent `review_gate` rounds follow.
81
82
 
82
83
  5. **Blueprint enforcement (max parallel).**
83
84
  - Split for independent execution; declare `Depends`; file-conflict CP = 0 per wave; TDD/proof steps; preserve acceptance criteria.
@@ -42,6 +42,10 @@ Use when the user invokes `$ralplan`, asks for RALPLAN, or wants consensus plann
42
42
  1. **Blueprint is the plan.** Freeform notes are not durable consensus. Create or bind a blueprint before reviews.
43
43
  2. **Align with other lanes before planning.** This repo is worked by many concurrent agent sessions. Before the code dive, establish which surfaces another live lane already owns and record them as explicit non-goals. See [Lane alignment](#lane-alignment-not-optional). The user should not have to re-assert this.
44
44
  3. **Ground before drafting.** Code dive (+ bounded external research when needed) happens **before** the blueprint draft is treated as serious.
45
+ - **A stated cause is a claim that must be observed.** When a plan explains
46
+ why something fails, it carries the command that produced that answer.
47
+ An unobserved cause is a guess laundered into consensus, and review will
48
+ spend rounds disproving it instead of improving the plan.
45
49
  4. **Reviews before refine.** Run risk-matched `plan-*` skills on the blueprint, apply findings, **then** `/plan-refine`.
46
50
  5. **No implementation.** Do not edit product source, commit implementation, or start `ultragoal`/`team`/`autopilot` unless the user explicitly switches out of planning.
47
51
  6. **No review stampede.** Do not fan out multi-host outside-voice swarms. Prefer in-host skill loads; at most one outside voice only if the user asks or the change is auth / data-loss / public-API sensitive.
@@ -126,7 +130,7 @@ Rules:
126
130
  - Apply findings **into the blueprint** after each review (or once after the set if independent).
127
131
  - Independent reviews may run in parallel **only when** they do not depend on each other's edits; if eng findings reshape scope, re-run only the affected optional reviews.
128
132
  - Optional high-risk challenge: one sequential outside-voice pass (`codex` / `claude` / `opencode-go`) **after** eng review if the user asks or the change is auth / data-loss / public-API sensitive. Never parallel multi-host review.
129
- - Any formal `wp_review_gate` re-review round follows `catalog/agent/rules/review-methodology-sota.md` Principle 5's delta-anchored adjudication contract, not a fresh rediscovery pass.
133
+ - Any formal `review_gate` re-review round follows `catalog/agent/rules/review-methodology-sota.md` Principle 5's delta-anchored adjudication contract, not a fresh rediscovery pass.
130
134
 
131
135
  ### 5. `/plan-refine` last (always)
132
136
 
@@ -9,7 +9,7 @@ related: [autopilot, goal, plan-refine, verify, handoff]
9
9
  created: "2026-07-13"
10
10
  last_reviewed: "2026-07-21"
11
11
  name: team
12
- description: "Coordinate multiple dashboard-backed agent sessions on one task."
12
+ description: "Coordinate multiple agent work lanes with a leader-owned task list."
13
13
  argument-hint: "<brief|role plan>"
14
14
  ---
15
15
 
@@ -18,38 +18,39 @@ argument-hint: "<brief|role plan>"
18
18
  Use `team` when the work needs coordinated parallel lanes with a leader-owned
19
19
  task list, explicit handoffs, and independent verification. Prefer native
20
20
  subagents for small bounded lookups; use `team` when the parallel work should be
21
- visible, durable, and operator-controllable from `wp dash`. Prefer `ultragoal` +
22
- `/goal` (autopilot) when the work is blueprint-owned and does not need
23
- multi-provider dashboard lanes.
21
+ visible and durable across a larger effort. Use Webpresso Desktop to manage
22
+ interactive provider sessions. Prefer `ultragoal` + `/goal` (autopilot) when the
23
+ work is blueprint-owned and does not need separately managed work lanes.
24
24
 
25
25
  ## Tooling map
26
26
 
27
- | Need | Prefer |
28
- | --------------------- | --------------------------------------------------------------- |
29
- | Dashboard / sessions | `wp dash`, `wp_fleet_status`, `wp_worker_tail` |
30
- | Worktrees | `wp_worktree` per lane |
31
- | Context-light handoff | `wp_session_context` (required before spawn — no history paste) |
32
- | Continuity | `wp_session_capture` / `search` / `restore` |
33
- | Blueprint tasks | `wp_blueprint_task_verify` only for completion |
34
- | QA | `wp_qa` / targeted `wp_test` / `wp_lint` / `wp_typecheck` |
35
- | PR | `wp_pr_upsert` / `wp_pr_status` / `wp_pr_wait` |
27
+ | Need | Prefer |
28
+ | --------------------- | ------------------------------------------------------------ |
29
+ | Interactive sessions | Webpresso Desktop |
30
+ | Worktree visibility | `wp fleet status`, `fleet_status` |
31
+ | Worktrees | `worktree` per lane |
32
+ | Context-light handoff | `session_context` (required before spawn — no history paste) |
33
+ | Continuity | `session_capture` / `search` / `restore` |
34
+ | Blueprint tasks | `blueprint_task_verify` only for completion |
35
+ | QA | `qa` / targeted `test` / `lint` / `typecheck` |
36
+ | PR | `pr_upsert` / `pr_status` / `pr_wait` |
36
37
 
37
38
  ## Protocol
38
39
 
39
40
  1. Start from a grounded brief or an approved blueprint. If scope is vague, run
40
41
  `plan-refine` first and define task lanes, shared files, budgets, and verification.
41
- 2. Open or reuse `wp dash` and launch the provider sessions needed for the
42
- lanes. Direct `wp claude`, `wp codex`, and `wp opencode` commands are
43
- expected to enter the dashboard in interactive terminals.
42
+ 2. Open Webpresso Desktop and launch the provider sessions needed for the
43
+ lanes. The `wp claude`, `wp codex`, and `wp opencode` commands
44
+ remain available for direct CLI launches.
44
45
  3. Assign one owner per lane. Include the task, allowed files or surfaces,
45
46
  expected output, verification command, and blocker-report rule.
46
- 4. Before each worker spawn, build a bounded manifest with `wp_session_context`
47
+ 4. Before each worker spawn, build a bounded manifest with `session_context`
47
48
  (objective, constraints, evidence refs, remaining steps). Never copy parent transcripts.
48
49
  5. Keep one lane or leader pass responsible for integration and evidence.
49
50
  Workers report findings, patches, tests, and unresolved risks; they do not
50
51
  self-approve or mark blueprint tasks complete.
51
52
  6. Integrate only after checking shared-file conflicts, updated assumptions,
52
- and verification evidence. Use `wp_blueprint_task_verify` for task completion
53
+ and verification evidence. Use `blueprint_task_verify` for task completion
53
54
  when a blueprint owns the work.
54
55
  7. Stop when every lane is complete, cancelled, or explicitly blocked and the
55
56
  leader has recorded verification evidence (≤40-line handoff if blocked).
@@ -66,6 +67,49 @@ multi-provider dashboard lanes.
66
67
  - Never bypass review provenance, push to main, self-approve, or increase
67
68
  timeouts to hide coordination failures.
68
69
 
70
+ ### Capped host messaging
71
+
72
+ - Pull-first routing: routine assignment, status, and attention flow goes
73
+ through the durable source and the existing pull surfaces (`fleet_status`
74
+ role / `wp fleet status` / `worker_tail` / `session_context`);
75
+ cross-session sends are reserved for a blocker, a decision, a changed
76
+ priority, or one availability canary. Judgment sends (a decision, a
77
+ changed priority, a blocker escalation that changes another lane's
78
+ authority) ride the typed request envelope (ADR 0004; the
79
+ `quota-and-purpose-routing-policy` blueprint owns that surface) — until
80
+ it ships, name the request in the outbox or manifest entry instead of
81
+ free-form text.
82
+ - Bounded, degradable pulls: slow or degraded pull surfaces return partial
83
+ results plus warnings — never hang, and never raise timeouts to hide it
84
+ (`no-timeout-as-fix`); a degraded read is a decision input, not something
85
+ to spend a send on.
86
+ - Counted discipline: every send attempt counts, refused and queued included.
87
+ Warn at six, stop routine sends at eight, and reserve two control slots; the
88
+ canary draws from the reserve, and the reserve is strictly rationed — one
89
+ send per genuinely new control event. The numbers assume the observed ~10
90
+ sends per user turn as of 2026-10-31 (the anthropics/claude-code#94000
91
+ thread reports variance across builds); rescale proportionally if the
92
+ observed cap differs. The running count and last canary result live in the
93
+ outbox header and the `session_capture` record; on resume or after
94
+ compaction, re-read them before any send.
95
+ - Send overflow queues to the outbox — a durable coordinator-owned queue
96
+ file. Where no fleet outbox exists, create one: a single
97
+ coordinator-owned markdown file at a stable path (the fleet protocol's
98
+ outbox path where the protocol defines one, otherwise one
99
+ coordinator-named path recorded in the two anchor homes) whose header
100
+ carries owner, path, attempt count, last canary result, and timestamp;
101
+ name it in the `session_capture` record and the next handoff
102
+ manifest. The manifest is the queue of record until the outbox exists.
103
+ - A pause closes the channel: queue in the leader's durable outbox and never
104
+ route around it — no relays, peers, new sessions, schedulers, filesystem
105
+ push-delivery to peers, configuration changes, or
106
+ alternate transports/tools, including any uncapped or legacy send interface. The
107
+ outbox is pull-read durable state, so pull-reading it is not a route-around;
108
+ the next genuine user turn is the reopening test.
109
+ - Supersession check: before acting on a queued order, check durable state for
110
+ a newer arbitration — queued sends deliver late and out of order (observed
111
+ 2026-10-24).
112
+
69
113
  ## Output
70
114
 
71
115
  Report:
@@ -25,7 +25,7 @@ Manage the tech-debt lifecycle using `wp tech-debt` commands.
25
25
 
26
26
  `new` (dry runs included) refuses a root that `wp audit committed-state-paths`
27
27
  forbids adding to, such as this repository's `tech-debt/`. There, record a new
28
- follow-up as a blueprint task (MCP `wp_blueprint_put`) or a draft blueprint
28
+ follow-up as a blueprint task (MCP `blueprint_put`) or a draft blueprint
29
29
  (`wp blueprint new`) instead. The examples below apply only where that audit
30
30
  permits the resolved root.
31
31
 
@@ -47,10 +47,30 @@ Optional post-land **product signal** for MCP/CLI/hooks/CI pain so Webpresso too
47
47
  4. Write the capture with the validating verb — it is the only writer, and it
48
48
  puts the document at the central, repo-scoped desktop state surface:
49
49
 
50
+ First write the capture JSON to a scratch file with the host's file-write
51
+ tool, under the scratch directory `$TMPDIR/webpresso/scratch/` (outside every
52
+ worktree, per the agent scratch write policy; never the repo root, and never
53
+ committed). Resolve that directory to an **absolute path** yourself and use
54
+ the literal path below — hosts refuse a command that carries a shell
55
+ variable expansion. Then hand the file to the verb with `--from-file`; no
56
+ pipe, redirect or shell variable is involved:
57
+
58
+ ```bash
59
+ wp tooling-friction write --file YYYY-MM-DD-<slug|pr|session>.json --from-file <absolute-scratch-dir>/tooling-friction-capture.json
60
+ ```
61
+
62
+ If your `wp` predates `--from-file`, **redirect** the same file to stdin
63
+ instead:
64
+
50
65
  ```bash
51
- printf '%s' "$CAPTURE_JSON" | wp tooling-friction write --file YYYY-MM-DD-<slug|pr|session>.json
66
+ wp tooling-friction write --file YYYY-MM-DD-<slug|pr|session>.json < <absolute-scratch-dir>/tooling-friction-capture.json
52
67
  ```
53
68
 
69
+ Do not pipe a shell variable into the verb (`printf '%s' "$CAPTURE_JSON" | …`):
70
+ hosts refuse the unresolvable expansion, and the fallback — writing the JSON
71
+ straight into the store — skips validation, which is how a capture with ten
72
+ schema issues reached disk. Never write the capture into the store yourself.
73
+
54
74
  The verb parses the document through the shared schema helper **before** it
55
75
  touches disk, so a capture that violates v1 is refused (non-zero exit,
56
76
  naming every failing field path) and nothing is written. It prints the
@@ -63,7 +83,7 @@ Optional post-land **product signal** for MCP/CLI/hooks/CI pain so Webpresso too
63
83
  verb's printed path matches:
64
84
 
65
85
  ```text
66
- wp_tooling_friction_path({"file":"YYYY-MM-DD-<slug|pr|session>.json"})
86
+ tooling_friction_path({"file":"YYYY-MM-DD-<slug|pr|session>.json"})
67
87
  → summary: tooling-friction path: <absolute-path>
68
88
  ```
69
89
 
@@ -84,17 +104,17 @@ Optional post-land **product signal** for MCP/CLI/hooks/CI pain so Webpresso too
84
104
  worktree or `.agent/` path.
85
105
 
86
106
  5. Optional `--promote` or severity `high`/`critical`: record the follow-up as
87
- a blueprint task (MCP `wp_blueprint_put`) or a draft blueprint
107
+ a blueprint task (MCP `blueprint_put`) or a draft blueprint
88
108
  (`wp blueprint new`), and set `promoted_to` to that blueprint path. Do not
89
109
  use `wp tech-debt new` here: it refuses this repository's `tech-debt/` root,
90
110
  which `wp audit committed-state-paths` forbids adding to.
91
- 6. Optional one-line `wp_session_capture` pointer to the JSON path — no paste-back walls.
111
+ 6. Optional one-line `session_capture` pointer to the JSON path — no paste-back walls.
92
112
 
93
113
  **Rate limit:** at most **one** capture per verify bookend.
94
114
 
95
115
  ## Store path (SSOT)
96
116
 
97
- `wp_tooling_friction_path({"file":"<file>"})` (or the human CLI projection
117
+ `tooling_friction_path({"file":"<file>"})` (or the human CLI projection
98
118
  `wp tooling-friction path --file <file>`) — a read-only projection of the pure
99
119
  preferred state root (WP_STATE_ROOT or env-paths data; no writability fallback)
100
120
  plus `repoIdentityV1(git-common-dir)` under `tooling-friction/<file>`. This
@@ -126,10 +146,10 @@ also include `path`, `repoKey` (16-hex), `stateRoot`, `scope: "repo"`, and
126
146
  "id": "tf-status-ci-skew",
127
147
  "severity": "high",
128
148
  "surface": "pr",
129
- "tool": "wp_pr_status",
149
+ "tool": "pr_status",
130
150
  "kind": "friction",
131
151
  "signal": "status_ci_skew",
132
- "symptom": "wp_pr_merge blocked while GitHub CLEAN and PR Policy green.",
152
+ "symptom": "pr_merge blocked while GitHub CLEAN and PR Policy green.",
133
153
  "token_waste": "high",
134
154
  "time_waste_minutes": 25,
135
155
  "recurrence": "session",
@@ -168,9 +188,9 @@ also include `path`, `repoKey` (16-hex), `stateRoot`, `scope: "repo"`, and
168
188
 
169
189
  **Good**
170
190
 
171
- - `wp_pr_merge: land readiness disagrees with GitHub CLEAN / PR Policy (status_ci_skew, high)`
172
- - `wp_review_gate: re-approve after ledger-only commits; subject binding unclear (retry_loop, medium)`
173
- - `wp_pr_upsert: bare Review model "Kimi" fails provider regex; needs "kimi reviewer" (schema_confuse, low)`
191
+ - `pr_merge: land readiness disagrees with GitHub CLEAN / PR Policy (status_ci_skew, high)`
192
+ - `review_gate: re-approve after ledger-only commits; subject binding unclear (retry_loop, medium)`
193
+ - `pr_upsert: bare Review model "Kimi" fails provider regex; needs "kimi reviewer" (schema_confuse, low)`
174
194
 
175
195
  **Bad**
176
196
 
@@ -191,7 +211,7 @@ also include `path`, `repoKey` (16-hex), `stateRoot`, `scope: "repo"`, and
191
211
  9. **Never invent the capture path** — no fleet folder slugs
192
212
  (`github.com-org-repo-*`), no worktree-keyed desktop-state, no guessing
193
213
  under `Application Support` or `~/.webpresso`. Always call
194
- `wp_tooling_friction_path` / `wp tooling-friction path` and write to the
214
+ `tooling_friction_path` / `wp tooling-friction path` and write to the
195
215
  absolute path it returns
196
216
 
197
217
  ## Integration
@@ -203,7 +223,7 @@ also include `path`, `repoKey` (16-hex), `stateRoot`, `scope: "repo"`, and
203
223
  ## Output (agent reply)
204
224
 
205
225
  ```text
206
- tooling-friction: wrote desktop state <absolute-path-from-wp_tooling_friction_path>
226
+ tooling-friction: wrote desktop state <absolute-path-from-tooling_friction_path>
207
227
  findings: 2 (high=1, medium=1)
208
228
  promoted: none | blueprints/<lifecycle>/<slug> | tech-debt/...
209
229
  ```