@webpresso/codex-plugin 3.1.26 → 3.1.28

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-kit",
3
- "version": "3.1.26",
3
+ "version": "3.1.28",
4
4
  "description": "Webpresso agent-kit: blueprints, skills, hooks, and MCP server",
5
5
  "author": {
6
6
  "name": "Webpresso",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpresso/codex-plugin",
3
- "version": "3.1.26",
3
+ "version": "3.1.28",
4
4
  "private": false,
5
5
  "description": "Codex plugin adapter for Webpresso agent-kit skills, hooks, and MCP runtime.",
6
6
  "homepage": "https://github.com/webpresso/agent-kit#readme",
@@ -2,14 +2,14 @@
2
2
  "schemaVersion": 1,
3
3
  "host": "codex",
4
4
  "packageName": "@webpresso/codex-plugin",
5
- "packageVersion": "3.1.26",
5
+ "packageVersion": "3.1.28",
6
6
  "runtimeDirs": [".codex/skills", ".agents/skills"],
7
7
  "skills": {
8
8
  "ai-deslop": {
9
9
  "digest": "sha256:c1da1003009073dd3923454947e1141efc2e7df5ad8d725a511ed5cff03bfb5c"
10
10
  },
11
11
  "autopilot": {
12
- "digest": "sha256:9e0b47c8438fe7c8123bec3361fcb17fd2fcd818a840f46ea272a7712e4c0b10"
12
+ "digest": "sha256:1d2f1ff0902f283c273395e474d9b7841b206b8635457b3c238e8e1df149b6ef"
13
13
  },
14
14
  "autoresearch": {
15
15
  "digest": "sha256:b4d51cd53beb4a3271827172dfbd0b1d27bd58761ca07a35d49a5d6324b87fdf"
@@ -21,10 +21,10 @@
21
21
  "digest": "sha256:21fd24862e7f7c8a1feadea6bc376492b136b99fc381cf1b8927c9db80615431"
22
22
  },
23
23
  "claude": {
24
- "digest": "sha256:bca8cc1311bb5a21aa7367ba5c71c3ef8269f29fcb82ec70df24e4c3f7ea50ac"
24
+ "digest": "sha256:a97c243b11a25a893d3149a5545d3d111bc54e72c2e2acea9ce6fad3d333d2f1"
25
25
  },
26
26
  "codex": {
27
- "digest": "sha256:acc5817fa9186891cdf9a17a5217fc89a98d7ac04620c363a715b312158bbcad"
27
+ "digest": "sha256:07804f1e139e1e2e76f34f35dd5471895072aea5d8b3f5f412cf1328a8180b4b"
28
28
  },
29
29
  "deep-interview": {
30
30
  "digest": "sha256:e80d7e12e486397103108bb473e98e8e8656519770fa20701f8b3e9e66991939"
@@ -39,16 +39,16 @@
39
39
  "digest": "sha256:306355888da0827e3523022077f731845726bbaaf595ca12515cc91d8605b5e6"
40
40
  },
41
41
  "fix": {
42
- "digest": "sha256:647aa94890e06b38b08e6cc12cd219343e963b4d3b469c349610b3a33f559dd5"
42
+ "digest": "sha256:6761e335ca1327d0dd12822886d5ea7f1b683f27caba62046cd0529c7cda7e44"
43
43
  },
44
44
  "grok": {
45
- "digest": "sha256:663b47c6abac5be939480e28a32029156f2b1ffa75bfe42c6b1edbbb52573a55"
45
+ "digest": "sha256:07f2cdc58889f13f0869ddc153d465423cf2f4aae7b9deb4c4e427d2dba78a34"
46
46
  },
47
47
  "hooks-doctor": {
48
48
  "digest": "sha256:d3e000980b9de7834233b98321c78000a37d38e303321186a0fc3268f6f51e69"
49
49
  },
50
50
  "investigate": {
51
- "digest": "sha256:2051bccb2daf97ee91a8c15c7ef5bc7cc705d49beb4cbc7c8f6c63f4acda88a2"
51
+ "digest": "sha256:778b3a1f38323e8dd6101c6ace26ff8aada1246b20952b3641d5d1049bc50055"
52
52
  },
53
53
  "lore-protocol": {
54
54
  "digest": "sha256:a80fbacc765e8b886437b9fdf7dd71e1ceb1b98b939078ec90fc88d06a8b4c69"
@@ -75,7 +75,7 @@
75
75
  "digest": "sha256:db285d477f43ed23df990d4c03750d9916cdc7809356c1bf025efdf6a9add9ed"
76
76
  },
77
77
  "team": {
78
- "digest": "sha256:151ef81df917435073a2d7b41173d33c45cb8aa1e5fdf34a70043bb3a2e746ff"
78
+ "digest": "sha256:bf6dc4bd96f19b4fda5ae270803a65e6742d0d93303f0fd460a8c08314c1fdd8"
79
79
  },
80
80
  "tech-debt": {
81
81
  "digest": "sha256:8b1f30e55ec6e5ab185ff19ecf15384438dbd619f675c2c65f2e53cedecbae5c"
@@ -87,10 +87,10 @@
87
87
  "digest": "sha256:bed3684a850651534f315d355cdeae50d951c429817df0f105cccdb7f4e1561b"
88
88
  },
89
89
  "ultragoal": {
90
- "digest": "sha256:12bec22b2125593376f0899ad3bd7fac9e47362cc384fab15c2f43daa3a842f9"
90
+ "digest": "sha256:953ab2625287866e5f27e602a89f1752e054d47522d04e1fdc11880867dc2fde"
91
91
  },
92
92
  "verify": {
93
- "digest": "sha256:9d9faa184b310d46d5a266ebe46bbf0819df526035dc10a6c13475097e3a284b"
93
+ "digest": "sha256:4c9d534c358456c1d34f9b4b919e70dd013164c7c89ca8229181b77e31bdc914"
94
94
  }
95
95
  }
96
96
  }
@@ -5,9 +5,9 @@ title: Autopilot
5
5
  status: active
6
6
  scope: repo
7
7
  applies_to: [agents]
8
- related: [goal, plan-refine, verify, testing-philosophy]
8
+ related: [goal, plan-refine, verify, testing-philosophy, ultragoal, pll, fix]
9
9
  created: "2026-07-10"
10
- last_reviewed: "2026-07-10"
10
+ last_reviewed: "2026-07-21"
11
11
  name: autopilot
12
12
  description: "Drive a brief through the bounded native goal pipeline."
13
13
  argument-hint: "<brief|force: brief>"
@@ -15,25 +15,62 @@ argument-hint: "<brief|force: brief>"
15
15
 
16
16
  # Autopilot
17
17
 
18
- Drive an approved brief through `plan -> execute -> qa -> validate -> land -> complete` using `wp ultragoal run` and the current handoff.
18
+ Drive an approved brief through `plan -> execute -> qa -> validate -> land -> complete`
19
+ using `wp_ultragoal_run` / `wp ultragoal run` and the current handoff.
20
+
21
+ ## Outside-voice (required)
22
+
23
+ After each ultragoal **phase or plan-gate milestone**, run an **OpenCode Go** outside-voice review and pick the model by purpose (plan critique → DeepSeek Pro; coding quality → Kimi Code first; cheap recheck → DeepSeek Flash). Resolve IDs from live `opencode models opencode-go`. Lifecycle authority only via converged `wp review gate` — never self-approve. Full protocol: the `ultragoal` skill. Respect `review_budget` (default one sequential path; no multi-host stampede).
19
24
 
20
25
  ## Vague gate
21
26
 
22
- A brief is anchored when it includes a file path, symbol, issue number, test name, or numbered steps. Route any unanchored brief through `plan-refine` before execution. A leading `force:` is the only explicit bypass; strip it before creating the goal and record the bypass in the blueprint.
27
+ A brief is anchored when it includes a file path, symbol, issue number, test name, or numbered steps
28
+ (blueprint slug and explicit budgets also count). Route any unanchored brief through
29
+ `plan-refine` before execution.
30
+
31
+ **Reject** (unless rewritten with scope + budgets): “complete all”, “full autopilot”,
32
+ “go to sleep”, “elegantly merge everything” without a named blueprint/PR set.
33
+
34
+ A leading `force:` is the only explicit bypass; strip it before creating the goal and
35
+ record the bypass in the blueprint.
36
+
37
+ Default budgets if the user omits them: `concurrency=4`, `fix_budget=1`,
38
+ `review_budget=1`, no `/loop`. See `ultragoal` skill.
39
+
40
+ ## Tooling map
41
+
42
+ | Pipeline step | Tools |
43
+ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
44
+ | Plan | `plan-refine`, `wp_blueprint_*`, `wp_session_capture` for decisions |
45
+ | Create controller | `wp_ultragoal_new`, `wp_worktree` |
46
+ | Execute | ready-set via blueprint tools; `/pll` or parallel subagents; `wp_session_context` for delegates; `wp_blueprint_task_verify` only to complete tasks |
47
+ | Opportunistic repair | `/fix` up to `fix_budget`; else handoff backlog |
48
+ | QA | `wp_qa` / `wp_lint` / `wp_typecheck` / `wp_test`; PR checks via `wp_pr_status` / `wp_pr_wait` |
49
+ | Validate | one outside voice if merge-bound (OpenCode Go by purpose, or claude/codex/grok); `wp review gate` for authority |
50
+ | Land | `wp_pr_upsert`, green required checks, merge + owner cleanup |
51
+ | Blocked / stop | `wp_ultragoal_handoff` ≤40 lines; `wp_ultragoal_cancel` if abandoned |
23
52
 
24
53
  ## Pipeline
25
54
 
26
- 1. Plan: refine blueprints and satisfy provenance-backed promotion approvals.
27
- 2. Execute: implement current ready tasks; use only `wp_blueprint_task_verify` to mark them done.
28
- 3. QA: run affected checks and `wp qa`; preserve normalized failure evidence.
29
- 4. Validate: obtain distinct verification and code-review evidence and resolve findings. Each lane appends a tracked `reviews.md` record in one of these exact forms:
55
+ 1. **Plan:** refine blueprints and satisfy provenance-backed promotion approvals.
56
+ 2. **Execute:** implement current **ready** tasks in parallel up to `concurrency`; use only
57
+ `wp_blueprint_task_verify` to mark them done.
58
+ 3. **QA:** run affected checks and `wp_qa`; preserve normalized failure evidence. Prefer
59
+ PR-bound CI when a PR exists.
60
+ 4. **Validate:** obtain verification + code-review evidence within `review_budget`. Each
61
+ lane appends a tracked `reviews.md` record in one of these exact forms:
30
62
 
31
63
  ```text
32
64
  <!-- wp:goal-validation {"kind":"verify","reviewer":"<identity>","artifact":"<tracked-path>"} -->
33
65
  <!-- wp:goal-validation {"kind":"code-review","reviewer":"<different-identity>","artifact":"<tracked-path>"} -->
34
66
  ```
35
67
 
36
- 5. Land: require green PR checks, complete the blueprint in the same PR, merge, and run owner cleanup.
37
- 6. Complete: stop only when `wp ultragoal run` records terminal evidence.
68
+ 5. **Land:** require green PR checks, complete the blueprint in the same PR, merge, and
69
+ run owner cleanup.
70
+ 6. **Complete:** stop only when `wp_ultragoal_run` records terminal evidence.
38
71
 
39
- Resume from durable state after interruption. Obey `WP_ULTRAGOAL_DISABLE=1`, iteration/error/validation caps, and repository ownership. The pipeline must never self-approve, directly mark tasks done, bypass evidence, or push to main. Keep every loop bounded and never increase timeouts.
72
+ Resume from durable state after interruption. Obey `WP_ULTRAGOAL_DISABLE=1`,
73
+ iteration/error/validation caps, and repository ownership. Never self-approve, directly
74
+ mark tasks done, bypass evidence, push to main, or increase timeouts (keep every loop bounded and never increase timeouts). After every phase
75
+ transition recorded by `wp ultragoal run`, obtain a fresh OpenCode Go outside review
76
+ before treating the milestone as closed (see Outside-voice above and the `ultragoal` skill).
@@ -8,6 +8,13 @@ license: MIT
8
8
 
9
9
  Use when a non-Claude host needs Claude to review a diff, challenge a plan, or answer a focused repo question. Keep it bounded/read-only unless asked otherwise, and report Claude output as advice, not verified fact.
10
10
 
11
+ ## Single-shot budget (anti-stampede)
12
+
13
+ - Default: **one** review invocation per request.
14
+ - Do **not** spawn parallel Claude + Codex + Grok + OpenCode reviews unless the user set `review_budget`/`N` > 1.
15
+ - Prefer `wp review run` / `wp review gate` over hand-rolled multi-agent loops.
16
+ - Bounded payload only (see below). Split large diffs across sequential calls, never unbounded whole-PR dumps.
17
+
11
18
  ## Auth check
12
19
 
13
20
  Use local Claude CLI login directly; do not route through Anthropic API-key env vars.
@@ -8,6 +8,13 @@ license: MIT
8
8
 
9
9
  Use this skill from Claude or another non-Codex host when the user wants Codex to independently review a diff, challenge a plan, or answer a repo question. Keep Codex read-only by default and treat its answer as external advice until independently verified.
10
10
 
11
+ ## Single-shot budget (anti-stampede)
12
+
13
+ - Default: **one** review invocation per request.
14
+ - Do **not** fan out parallel multi-host review matrices unless the user set `review_budget`/`N` > 1.
15
+ - Prefer `wp review run` / `wp review gate` over spawn/wait agent loops for review.
16
+ - Keep prompts bounded; no whole-repo paste.
17
+
11
18
  ## Auth check
12
19
 
13
20
  ```bash
@@ -7,7 +7,7 @@ scope: repo
7
7
  applies_to: [agents]
8
8
  related: [verify, testing-philosophy]
9
9
  created: "2026-05-13"
10
- last_reviewed: "2026-05-22"
10
+ last_reviewed: "2026-07-21"
11
11
  name: fix
12
12
  description: "Root-cause fix workflow that runs investigate first when diagnosis or failing proof is still missing."
13
13
  argument-hint: '<target> where target is: file|symptom|error|test|"free-text description"'
@@ -23,18 +23,43 @@ This command turns "please fix it well" into an enforceable workflow: diagnose
23
23
  first, repair at the owner, prove the repair, and escalate to `/verify` when
24
24
  the blast radius is broader than a local fix.
25
25
 
26
+ ## Tooling map
27
+
28
+ | Need | Prefer |
29
+ | ---------------------- | --------------------------------------------------------------------------- |
30
+ | Reproduce / large logs | `wp_session_execute`, `wp_session_batch_execute`, `wp_session_execute_file` |
31
+ | Recall prior evidence | `wp_session_search`, `wp_session_restore`, `wp_session_retrieve` |
32
+ | Capture decisions | `wp_session_capture` (do not paste full reports back as user text) |
33
+ | Scoped proof | `wp_test`, `wp_lint`, `wp_typecheck`, or `wp_qa` |
34
+ | Audits | `wp_audit` / `wp_audits` |
35
+ | Worktree isolation | `wp_worktree` / `wp blueprint start` — never thrash primary checkout |
36
+ | PR follow-up | `wp_pr_status`, `wp_pr_upsert` when landing the fix |
37
+
26
38
  ## Non-negotiable invariants
27
39
 
28
40
  1. **Root cause, not symptom.** Trace the failure to the invariant that actually broke. Do not patch callers when the owner is fixable.
29
41
  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.
30
- 3. **Use the repo's real execution surface.** Prefer repo-owned wrappers and injected routing guidance over host-specific tool assumptions. If the repo exposes quality wrappers, use them. Use bounded inspection paths for large-output investigation.
42
+ 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.
31
43
  4. **Regression proof is mandatory.** Add or strengthen a test or other reliable proof that would fail against the old behavior.
32
44
  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.
33
45
  6. **Zero suppressions, zero papering over.** No lint disables, ts-ignore, compat aliases, or "temporary" branches to sneak the fix through.
34
46
  7. **Minimal correct diff.** Update every consumer of a changed contract in the same change, but do not bundle unrelated cleanup.
47
+ 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.
48
+
49
+ ## Opportunistic fix budget (when called from ultragoal / autopilot / pll)
50
+
51
+ - At most **`fix_budget` (default 1)** pre-existing issues per controller phase.
52
+ - Each must have: named invariant, failing proof, owning path.
53
+ - If the repair needs its own blueprint or expands epic scope → **handoff backlog**, do not inline.
54
+ - Additional discoveries: list in the final report; do not thrash.
35
55
 
36
56
  ## Protocol
37
57
 
58
+ ### Step 0a — Worktree preflight
59
+
60
+ Before editing: confirm you are on a managed worktree or an explicitly allowed branch.
61
+ If the primary checkout is dirty/detached with unrelated state, stop and isolate first.
62
+
38
63
  ### Step 0 — Run the investigate phase when evidence is missing
39
64
 
40
65
  Before editing, check whether the current context already contains all of the
@@ -94,17 +119,17 @@ Do not keep production code written before the test as "reference". If you wrote
94
119
 
95
120
  Run the narrowest checks that prove the repaired behavior on the real repo surface:
96
121
 
97
- - targeted test(s) for the repaired path
98
- - targeted lint/typecheck/build checks for changed files or packages
99
- - any boundary-specific verification the repo requires for the touched surface
122
+ - `wp_test` / targeted tests for the repaired path
123
+ - `wp_lint` / `wp_typecheck` for changed surfaces
124
+ - `wp_qa` only when the blast radius needs the bookend
100
125
 
101
126
  Rules:
102
127
 
103
- - Prefer repo-owned wrappers or routed quality tools over raw host-specific commands.
104
- - Reuse fresh logs if the repo auto-saves them; do not re-run long commands just to re-read output.
128
+ - Prefer MCP `wp_*` over raw host Bash.
129
+ - Reuse fresh logs / session-memory indexed output; do not re-run long commands just to re-read.
105
130
  - Read the exit code and summary before making a claim.
106
131
 
107
- Escalate to `/verify <target>` when any of these are true:
132
+ Escalate to `/verify <target>` (local) or `/verify <target> --merge-ready` when any of these are true:
108
133
 
109
134
  - the fix crosses packages
110
135
  - the fix changes a public or shared contract
@@ -8,6 +8,13 @@ license: MIT
8
8
 
9
9
  Use when a non-Grok host needs Grok Build to review a diff, challenge a plan, or answer a focused repo question. Keep it read-only by default. A provenance-backed Grok approval is first-class and satisfies the blueprint strong-reviewer gate alone, with the same rejection authority as Claude or Codex.
10
10
 
11
+ ## Single-shot budget (anti-stampede)
12
+
13
+ - Default: **one** review invocation per request.
14
+ - Do **not** run parallel multi-host review swarms unless the user set `review_budget`/`N` > 1.
15
+ - Prefer `wp review run` / `wp review gate --provider grok` for lifecycle authority.
16
+ - Bounded prompts only.
17
+
11
18
  ## Auth / binary
12
19
 
13
20
  ```bash
@@ -17,10 +17,21 @@ flaky behavior, or confusing symptom before editing code.
17
17
  - Stop once you can name the broken invariant, show the failing proof, and
18
18
  point at the owner that should be repaired.
19
19
 
20
+ ## Tooling map
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 |
30
+
20
31
  ## Workflow
21
32
 
22
33
  1. Reproduce or capture the failure.
23
- - Run the exact failing command or trace the exact user path.
34
+ - Run the exact failing command or trace the exact user path (prefer `wp_session_execute`).
24
35
  - Keep the evidence that matters: error text, failing assertion, exit code,
25
36
  log path, or boundary mismatch.
26
37
  2. Read the whole boundary.
@@ -7,7 +7,7 @@ scope: repo
7
7
  applies_to: [agents]
8
8
  related: [autopilot, goal, plan-refine, verify]
9
9
  created: "2026-07-13"
10
- last_reviewed: "2026-07-13"
10
+ last_reviewed: "2026-07-21"
11
11
  name: team
12
12
  description: "Coordinate multiple dashboard-backed agent sessions on one task."
13
13
  argument-hint: "<brief|role plan>"
@@ -18,32 +18,49 @@ 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`.
21
+ visible, durable, and operator-controllable from `wp dash`. Prefer `ultragoal` +
22
+ `/pll` when the work is blueprint-owned and does not need multi-provider dashboard
23
+ lanes.
24
+
25
+ ## Tooling map
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` |
22
36
 
23
37
  ## Protocol
24
38
 
25
39
  1. Start from a grounded brief or an approved blueprint. If scope is vague, run
26
- `plan-refine` first and define task lanes, shared files, and verification.
40
+ `plan-refine` first and define task lanes, shared files, budgets, and verification.
27
41
  2. Open or reuse `wp dash` and launch the provider sessions needed for the
28
42
  lanes. Direct `wp claude`, `wp codex`, and `wp opencode` commands are
29
43
  expected to enter the dashboard in interactive terminals.
30
44
  3. Assign one owner per lane. Include the task, allowed files or surfaces,
31
45
  expected output, verification command, and blocker-report rule.
32
- 4. Keep one lane or leader pass responsible for integration and evidence.
46
+ 4. Before each worker spawn, build a bounded manifest with `wp_session_context`
47
+ (objective, constraints, evidence refs, remaining steps). Never copy parent transcripts.
48
+ 5. Keep one lane or leader pass responsible for integration and evidence.
33
49
  Workers report findings, patches, tests, and unresolved risks; they do not
34
50
  self-approve or mark blueprint tasks complete.
35
- 5. Integrate only after checking shared-file conflicts, updated assumptions,
51
+ 6. Integrate only after checking shared-file conflicts, updated assumptions,
36
52
  and verification evidence. Use `wp_blueprint_task_verify` for task completion
37
53
  when a blueprint owns the work.
38
- 6. Stop when every lane is complete, cancelled, or explicitly blocked and the
39
- leader has recorded verification evidence.
54
+ 7. Stop when every lane is complete, cancelled, or explicitly blocked and the
55
+ leader has recorded verification evidence (≤40-line handoff if blocked).
40
56
 
41
57
  ## Coordination Rules
42
58
 
43
59
  - Use a single source of truth for assignments: the blueprint, goal handoff, or
44
60
  leader-maintained task list.
45
- - Require ACK-style lane starts for shared files, dependency boundaries, or
46
- handoffs.
61
+ - Cap concurrency (default 4). Cascade-skip dependents of hard failures.
62
+ - Opportunistic `/fix` uses `fix_budget` (default 1) total across the team, not per lane.
63
+ - Require ACK-style lane starts for shared files, dependency boundaries, or handoffs.
47
64
  - Reassign or narrow blocked lanes instead of letting work drift.
48
65
  - Escalate changed assumptions before widening scope.
49
66
  - Never bypass review provenance, push to main, self-approve, or increase
@@ -5,9 +5,9 @@ title: Ultragoal
5
5
  status: active
6
6
  scope: repo
7
7
  applies_to: [agents]
8
- related: [autopilot, plan-refine, verify]
8
+ related: [autopilot, plan-refine, verify, pll, fix, opencode-go]
9
9
  created: "2026-07-10"
10
- last_reviewed: "2026-07-20"
10
+ last_reviewed: "2026-07-21"
11
11
  name: ultragoal
12
12
  description: "Run durable multi-blueprint ultragoals through evidence-gated handoffs."
13
13
  argument-hint: "<new|status|handoff|run|cancel> [brief]"
@@ -15,30 +15,158 @@ argument-hint: "<new|status|handoff|run|cancel> [brief]"
15
15
 
16
16
  # Ultragoal
17
17
 
18
- Use `wp ultragoal` as the durable controller for work spanning one or more blueprints.
18
+ Use `wp ultragoal` / MCP `wp_ultragoal_*` as the durable controller for work spanning
19
+ one or more blueprints. Prefer this spine over host-local mega-sessions or ad-hoc
20
+ multi-agent swarms.
21
+
22
+ ## Default budgets (override only when the user sets them)
23
+
24
+ | Budget | Default | Meaning |
25
+ | --------------- | --------- | ---------------------------------------------------------- |
26
+ | `concurrency` | 4 (max 8) | Parallel ready tasks / implementer lanes |
27
+ | `fix_budget` | 1 | Pre-existing issues fixable via `/fix` this phase |
28
+ | `review_budget` | 1 | Outside-voice reviewers for merge-ready (0 for local work) |
29
+ | `loop` | off | Do not run `/loop` or unbounded stop-hooks |
30
+
31
+ Reject unbudgeted sleep-mode briefs (“complete all”, “full autopilot”, “go to sleep”)
32
+ unless they name a blueprint/slug, budgets, and a stop condition. Route vague briefs
33
+ through `plan-refine` first (or require `force:` only when the user explicitly opts out).
34
+
35
+ ## Tooling map (use these; do not reimplement with Bash)
36
+
37
+ | Phase | Prefer MCP / CLI | Purpose |
38
+ | ---------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------- |
39
+ | Create / resume | `wp_ultragoal_new`, `wp_ultragoal_status` | Durable controller state |
40
+ | Isolation | `wp_worktree` | Owner / lane worktrees; never primary as controller |
41
+ | Blueprint read | `wp_blueprint_list`, `wp_blueprint_get`, `wp_blueprint_context` | Ready-set and deps |
42
+ | Blueprint write | `wp_blueprint_put`, `wp_blueprint_transition` | Spec edits (MCP-only for blueprints) |
43
+ | Task done | `wp_blueprint_task_verify` only | Evidence-gated completion |
44
+ | Parallel execute | `/pll` or ready-queue + host subagents | Max parallel when deps allow |
45
+ | Context-light delegate | `wp_session_context` | Manifest for subagents (no history paste) |
46
+ | Continuity | `wp_session_capture`, `wp_session_search`, `wp_session_restore`, `wp_session_snapshot` | Decisions / resume |
47
+ | Large command / file | `wp_session_execute`, `wp_session_batch_execute`, `wp_session_execute_file` | Bounded output + index |
48
+ | QA | `wp_qa` (or `wp_lint` + `wp_typecheck` + `wp_test`) | Affected quality gates |
49
+ | PR / land | `wp_pr_upsert`, `wp_pr_status`, `wp_pr_wait` | Open early; wait on required checks |
50
+ | Fleet / workers | `wp_fleet_status`, `wp_worker_tail` | Multi-session visibility |
51
+ | Token gain | `wp_gain` | Optional efficiency check after heavy execute |
52
+ | Advance loop | `wp_ultragoal_run`, `wp_ultragoal_handoff`, `wp_ultragoal_cancel` | Controller steps only |
53
+
54
+ Fallback to `wp …` CLI only when the matching MCP tool is unavailable. Prefer `wp` >
55
+ `vp` > raw package managers. Never raise timeouts to hide hangs.
19
56
 
20
57
  ## Protocol
21
58
 
22
- 1. Create or resume the ultragoal in a managed blueprint owner worktree (never main as controller).
23
- 2. Read `wp ultragoal status`, execute only the current phase handoff, then call `wp ultragoal run` again.
24
- 3. Complete blueprint tasks only through `wp_blueprint_task_verify` with passing evidence.
25
- 4. Stop when the controller reports `complete`, `cancelled`, blocked guard exhaustion, or `WP_ULTRAGOAL_DISABLE=1`.
59
+ 1. Create or resume the ultragoal in a **managed blueprint owner worktree** (`wp_worktree` /
60
+ `wp blueprint start`). Never use `main` or the primary checkout as controller.
61
+ 2. Print the **ready-set**: tasks whose dependencies are satisfied (from blueprint tools).
62
+ 3. Launch up to `concurrency` independent ready tasks in parallel (worktree-isolated).
63
+ Serialize only when file ownership overlaps or deps require it.
64
+ 4. Execute only the current phase handoff; call `wp_ultragoal_run` again after evidence.
65
+ 5. Mark tasks done **only** via `wp_blueprint_task_verify` with passing evidence.
66
+ 6. **Opportunistic `/fix`:** at most `fix_budget` pre-existing issues per phase, each with
67
+ named invariant + failing proof. Excess → handoff backlog (do not expand epic).
68
+ 7. **Validate / land:** local proof with `wp_qa` / targeted tools; outside review only when
69
+ merge-ready and within `review_budget` (default **exactly 1** sequential outside voice).
70
+ Prefer `wp review gate` for lifecycle authority. Use `wp_pr_*` for PR babysit — no
71
+ multi-sleep poll loops; no parallel multi-reviewer stampede.
72
+ 8. Stop on `complete`, `cancelled`, blocked guard exhaustion, or `WP_ULTRAGOAL_DISABLE=1`.
73
+
74
+ The blueprint engine owns task status and approval gates. The ultragoal controller must
75
+ never self-approve, directly mark a task done, bypass review provenance, or mutate the
76
+ primary checkout.
77
+
78
+ ## Failure / cascade
79
+
80
+ - Hard fail on a task → mark blocked with reason; **cascade-skip** dependents that cannot
81
+ proceed; continue independent ready work.
82
+ - Lifecycle mutation failure → stop (do not continue on stale plan state).
83
+ - On block: call `wp_ultragoal_handoff` and emit a **≤40-line handoff**: goal, done, blockers,
84
+ evidence refs (`wp_session_*` ids if any), next 3 commands. Do not paste full transcripts.
85
+
86
+ ## Outside-voice review (required for autopilot)
87
+
88
+ 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. Direct `wp review run` output is advisory only. Lifecycle authority that can satisfy promotion/completion gates comes only from a converged **`wp review gate`** (content-addressed ledger + bound artifact).
89
+
90
+ Count each milestone review against `review_budget` for merge-ready claims: **exactly one sequential** reviewer path unless the user sets N. Prefer purpose-matched OpenCode Go first; do not fan out multi-host review swarms.
91
+
92
+ ### Milestones that require a review
93
+
94
+ Run a distinct OpenCode Go review (via `wp review gate` when the milestone is a promotion/approval gate; otherwise `wp review gate` or a purpose-matched gate resume) after each of:
95
+
96
+ | Milestone | When |
97
+ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
98
+ | Plan gate | Before `draft` → `planned` / when ultragoal phase is `plan` and promotion is required |
99
+ | Phase advance | After ultragoal advances `plan` → `execute`, `execute` → `qa`, `qa` → `validate`, `validate` → `land`, or lands `complete` |
100
+ | Task batch handoff | After a meaningful execute batch when the phase remains `execute` (at least once per blueprint before claiming execute-complete) |
101
+
102
+ Do **not** invent ledger approvals. If OpenCode Go is unavailable or hits a provider-wide usage limit, capture the failure evidence and stop; do not substitute a forged approval.
103
+
104
+ ### Purpose → model routing (no hardcoding IDs)
105
+
106
+ Resolve models from the live catalog every time:
107
+
108
+ ```bash
109
+ opencode models opencode-go
110
+ ```
111
+
112
+ Pick by purpose (same intent as the committed OpenCode reviewer policy / `opencode-go` skill):
113
+
114
+ | Purpose | Preferred family (live catalog) | Why |
115
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------------------- |
116
+ | Plan / architecture critique | DeepSeek **Pro** (`opencode-go/deepseek…-pro`) | Deeper plan review depth |
117
+ | Coding / implementation quality | Kimi **Code** first (`…kimi…-code`) | Coding quality lane |
118
+ | Cheap recheck / high-availability follow-up | DeepSeek **Flash** (`…deepseek…-flash`) | Fast secondary pass |
119
+ | Aggregate / unspecified | Follow `opencode-go` skill order: Kimi Code → DeepSeek Pro → DeepSeek Flash → remaining families | Default outside-voice lane |
120
+
121
+ Resolve the actual model ID with catalog greps (never paste a fixed model string into agent instructions as the only option):
122
+
123
+ ```bash
124
+ CATALOG=$(opencode models opencode-go)
125
+ # plan critique example:
126
+ MODEL=$(echo "$CATALOG" | grep '^opencode-go/deepseek' | grep -- '-pro$' | sort -V | tail -1)
127
+ # coding example:
128
+ # MODEL=$(echo "$CATALOG" | grep '^opencode-go/kimi' | grep -- '-code$' | sort -V | tail -1)
129
+ ```
130
+
131
+ Treat a provider-wide usage limit as terminal for every OpenCode Go model in the current review window; do not hop families to evade a usage block on the same provider.
132
+
133
+ ### Gate invocation shape
134
+
135
+ ```bash
136
+ wp review gate <blueprint-slug> \
137
+ --purpose plan|delivery \
138
+ --provider opencode \
139
+ --model "$MODEL" \
140
+ --effort medium|high \
141
+ --target HEAD \
142
+ --json
143
+ ```
144
+
145
+ Use `--purpose plan` for plan-phase promotion and `--purpose delivery` for implementation/delivery validation. Resume interrupted gates with `--resume <gate-id>` against the same immutable target.
146
+
147
+ ### Honesty rules (non-negotiable)
26
148
 
27
- The blueprint engine owns task status and approval gates. The ultragoal controller must never self-approve, directly mark a task done, bypass review provenance, or mutate the primary checkout. Keep every loop bounded and never increase timeouts.
149
+ - Never self-approve or hand-edit `reviews.md` / `review-events.jsonl` / frontmatter approvals to fake OpenCode Go authority.
150
+ - Never mark blueprint tasks done except through `wp_blueprint_task_verify` with real evidence.
151
+ - Never run ultragoal mutations on `main` or a primary checkout; use the managed blueprint owner worktree.
152
+ - Keep every loop bounded and never increase timeouts.
153
+ - When the controller returns `waiting` (`blueprint-promotion`, `approval-gate`, `blueprint-tasks`, …), fix the named gap; do not spin `wp ultragoal run` without progress.
28
154
 
29
155
  ## Tooling-aligned evidence (QA / land)
30
156
 
31
- - **QA phase** prefers **GitHub required checks** for the worktree PR (`gh pr view` + `gh pr checks --required`) when:
32
- - PR is `OPEN` or `MERGED`
33
- - required checks are green (same evaluator as land)
34
- - PR head source snapshot matches the clean worktree HEAD snapshot
35
- - If no PR-bound green CI is available, ultragoal falls back to local **`wp qa`** (`vp run qa`).
36
- - Do **not** raise timeouts to paper over incomplete worktrees; open a PR early so CI can satisfy QA.
37
- - Prefer `wp pr wait` / `gh run watch` while babysitting; do not invent multi-sleep poll loops.
38
- - **Land** still requires a **MERGED** PR with green required checks bound to the projected source snapshot.
157
+ - **QA phase** prefers **GitHub required checks** for the worktree PR (`wp_pr_status` /
158
+ `wp_pr_wait` or `gh pr checks --required`) when PR is `OPEN`/`MERGED`, checks green, and
159
+ PR head matches clean worktree HEAD.
160
+ - If no PR-bound green CI is available, fall back to local **`wp_qa`**.
161
+ - Open a PR early so CI can satisfy QA. Do **not** raise timeouts.
162
+ - **Land** still requires a **MERGED** PR with green required checks bound to the projected
163
+ source snapshot. Use `/verify --merge-ready` (review_budget=1), not default local verify.
39
164
 
40
165
  ## Snapshot / dirty worktree
41
166
 
42
- - Ultragoal ledger appends to blueprint `reviews.md` / `review-events.jsonl` / `review-artifacts/**`.
43
- - These paths under both `blueprints/**` and monorepo `webpresso/blueprints/**` are **evidence-only dirt** and must not fail `createCleanSourceSnapshot`.
44
- - Dirty **source** paths (including `_overview.md` task status edits) still fail closed until committed.
167
+ - Ultragoal ledger appends to blueprint `reviews.md` / `review-events.jsonl` /
168
+ `review-artifacts/**`.
169
+ - These paths under both `blueprints/**` and monorepo `webpresso/blueprints/**` are
170
+ **evidence-only dirt** and must not fail `createCleanSourceSnapshot`.
171
+ - Dirty **source** paths (including `_overview.md` task status edits) still fail closed
172
+ until committed. Use `wp_session_snapshot` before risky branch switches.
@@ -7,10 +7,10 @@ scope: repo
7
7
  applies_to: [agents]
8
8
  related: [testing-philosophy, tph]
9
9
  created: "2026-05-07"
10
- last_reviewed: "2026-07-13"
10
+ last_reviewed: "2026-07-21"
11
11
  name: verify
12
12
  description: "Post-implementation quality gate: run checks, TPH audit, cleanup, docs, proof."
13
- argument-hint: "<target> [--full] where target is: package|file|plan-slug|all"
13
+ argument-hint: "<target> [--full|--merge-ready] where target is: package|file|plan-slug|all"
14
14
  ---
15
15
 
16
16
  # Verify
@@ -21,6 +21,33 @@ Post-implementation quality gate. Run after implementation exists, before claimi
21
21
  repair. `/verify` owns the broader question: **is this work actually complete,
22
22
  integrated, and free of stale garbage?**
23
23
 
24
+ ## Modes
25
+
26
+ | Invocation | Outside voice | When |
27
+ | -------------------------------- | ---------------------------------- | ------------------------------ |
28
+ | `/verify <target>` (default) | **0** | Local completeness / iteration |
29
+ | `/verify <target> --full` | **0** (broader local gates) | Full local QA bookend |
30
+ | `/verify <target> --merge-ready` | **exactly 1** (unless user sets N) | Claiming merge-ready / land |
31
+
32
+ Default `/verify` must **not** spawn outside reviewers. That stampede is a known
33
+ token/time failure mode. Merge-ready runs **one** sequential outside voice via
34
+ the preferred skill (`claude` / `codex` / `grok` / one OpenCode Go), then stops.
35
+
36
+ ## Tooling map
37
+
38
+ | Gate | Prefer |
39
+ | ------------------------- | --------------------------------------------------------------- |
40
+ | Lint / types / tests / QA | `wp_lint`, `wp_typecheck`, `wp_test`, `wp_qa` |
41
+ | Format | `wp_format` |
42
+ | Audits | `wp_audit`, `wp_audits` |
43
+ | Blueprint | blueprint MCP tools + `wp audit blueprint-lifecycle` |
44
+ | PR / CI wait | `wp_pr_status`, `wp_pr_wait` (not multi-sleep loops) |
45
+ | Release | `wp_release_readiness` when shipping |
46
+ | Large output | `wp_session_execute` / `batch_execute` / `execute_file` |
47
+ | Continuity | `wp_session_capture` for verify summary; avoid paste-back walls |
48
+ | E2E / act | `wp_e2e`, `wp_ci_act` when the change requires them |
49
+ | Outside authority | `wp review gate` (not raw multi-agent review swarms) |
50
+
24
51
  ## Iron law — evidence before claims
25
52
 
26
53
  No completion claim without fresh verification evidence.
@@ -40,15 +67,15 @@ Not sufficient: "should pass", "looks correct", lint-only evidence for runtime c
40
67
  ```bash
41
68
  /verify <target>
42
69
  /verify <target> --full
70
+ /verify <target> --merge-ready
43
71
  ```
44
72
 
45
73
  `<target>` is a file path, package name, blueprint slug, or `all`.
46
74
 
47
75
  Follow the repo's current routing and command surface:
48
76
 
49
- - use repo-owned quality wrappers first
50
- - use injected quality-tool routing when present
51
- - use bounded large-output tooling when the repo instructs it
77
+ - use MCP `wp_*` / repo-owned quality wrappers first
78
+ - use bounded session-memory tooling for large output
52
79
  - reuse fresh logs instead of re-running broad commands just to inspect output
53
80
 
54
81
  ## Folded health dashboard
@@ -98,17 +125,17 @@ Hard stop on any failure.
98
125
 
99
126
  Run the narrowest checks that prove the touched behavior:
100
127
 
101
- - targeted lint
102
- - targeted typecheck
103
- - targeted tests
104
- - build / e2e / package checks only when the change requires them
128
+ - `wp_lint` / targeted lint
129
+ - `wp_typecheck` / targeted typecheck
130
+ - `wp_test` / targeted tests
131
+ - `wp_qa`, `wp_e2e`, build / package checks only when the change requires them
105
132
 
106
133
  Rules:
107
134
 
108
- - Prefer repo wrappers over raw underlying tools.
109
- - Reuse fresh logs if the runner auto-saves them.
135
+ - Prefer MCP `wp_*` over raw underlying tools.
136
+ - Reuse fresh logs / session-memory indexed output if the runner auto-saves them.
110
137
  - Never claim broader correctness than the commands actually proved.
111
- - If the repo documents a "full QA" bookend, reserve it for the final broad pass rather than every iteration.
138
+ - If the repo documents a "full QA" bookend, reserve `wp_qa` / `--full` for the final broad pass rather than every iteration.
112
139
 
113
140
  ## Phase 3 — Cross-surface impact scan
114
141
 
@@ -161,59 +188,52 @@ cleanup, route that pass through `ai-deslop` first rather than broadening
161
188
 
162
189
  This phase exists to catch the garbage that often slips in beside otherwise-correct work.
163
190
 
164
- ## Phase 6 — Outside-model approval gate
191
+ ## Phase 6 — Outside-model approval gate (**`--merge-ready` only**)
192
+
193
+ **Skip this entire phase** for default `/verify` and `/verify --full`. Local
194
+ `done` claims do not require outside voice.
165
195
 
166
- Before claiming merge-ready, obtain outside-voice model approvals unless the
167
- user explicitly asked for a different approval count or reviewer mix.
196
+ Before claiming **merge-ready**, obtain outside-voice approvals only under this policy:
168
197
 
169
- Default policy:
198
+ Default merge-ready policy:
170
199
 
171
- - Require **one extra model approval** by default. At most **one OpenCode Go reviewer** counts toward the requirement unless the user explicitly asks for multiple OpenCode models.
172
- - If the user asks for more, fewer, zero, or specific reviewers, follow that
173
- explicit instruction and report the chosen requirement.
174
- - These approvals are model outside-voice approvals, not a substitute for
175
- required human GitHub reviews or branch-protection approvals.
200
+ - Require **exactly one** extra model approval unless the user sets a different N.
201
+ - At most **one OpenCode Go reviewer** counts toward the requirement unless the user
202
+ explicitly asks for multiple OpenCode models.
203
+ - Run reviewers **sequentially** (try next only if current unavailable). Never fan out
204
+ parallel multi-host review swarms.
205
+ - If the user asks for more, fewer, zero, or specific reviewers, follow that instruction
206
+ and report the chosen requirement.
207
+ - These approvals are model outside-voice approvals, not a substitute for human GitHub
208
+ reviews or branch-protection approvals.
176
209
 
177
- Reviewer preference:
210
+ Reviewer preference (pick **one** path):
178
211
 
179
- - When running from Codex, prefer **Claude or Grok** (fall back to one OpenCode Go reviewer if both are unavailable).
180
- - When running from Claude, prefer **Codex or Grok** (fall back to one OpenCode Go reviewer if both are unavailable).
181
- - When Codex/Claude/Grok outside voice is unavailable, use **one OpenCode Go
182
- reviewer** if OpenCode is logged in.
183
- - Prefer the repo's outside-voice skills instead of hand-rolled commands:
184
- `$agent-kit:claude`, `$agent-kit:codex`, `$agent-kit:grok`, and one OpenCode Go reviewer
185
- skills such as `$agent-kit:opencode-go`, `$agent-kit:qwen`,
186
- `$agent-kit:deepseek`, `$agent-kit:glm`, `$agent-kit:kimi`,
187
- `$agent-kit:minimax`, or `$agent-kit:mimo`.
212
+ - From Codex Claude or Grok (else one OpenCode Go).
213
+ - From Claude Codex or Grok (else one OpenCode Go).
214
+ - From Grok Claude or Codex (else one OpenCode Go).
215
+ - Prefer skills: `claude`, `codex`, `grok`, or one of `opencode-go` / `qwen` /
216
+ `deepseek` / `glm` / `kimi` / `minimax` / `mimo`.
188
217
 
189
218
  Approval evidence requirements:
190
219
 
191
- - For blueprint lifecycle approval workflows, run `wp review gate <blueprint-slug> --target HEAD --json`
192
- first so exact-SHA reusable evidence and approval frontmatter are handled
193
- transactionally. Use `wp review log` / `wp review read` for focused ledger
194
- inspection or manual evidence recording.
195
- - Each outside reviewer must return a clear `APPROVED`/`BLOCKED` (or equivalent)
196
- verdict with enough evidence to identify what it reviewed.
197
- - Record outside approval evidence as PR comments when a PR exists.
198
- - Each PR comment must include the approving model/tool name, provider/family
199
- when known, verdict, reviewed commit or branch, and any blockers or caveats.
200
- - If there is no PR yet, record the same evidence in the final Verify report and
201
- add the PR comments once the PR exists before calling the PR merge-ready.
202
- - If an outside reviewer is unavailable (not installed, not logged in, missing
203
- model, timeout after the reviewer skill's allowed retry path), do not silently
204
- count it. Try the next preferred reviewer. If the required count still cannot
205
- be met, report the exact approval gap and say the work is **not merge-ready**.
220
+ - Blueprint lifecycle: `wp review gate <blueprint-slug> --target HEAD --json` first.
221
+ Use `wp review log` / `wp review read` for inspection.
222
+ - Each reviewer must return clear `APPROVED`/`BLOCKED` with enough evidence.
223
+ - Record as PR comments when a PR exists (model/tool, verdict, reviewed commit).
224
+ - Unavailable reviewer try next preferred; if still short, report gap and
225
+ **not merge-ready** (never invent approvals).
206
226
 
207
227
  ## Phase 7 — Final completion statement
208
228
 
209
229
  Report:
210
230
 
211
- - what was verified
212
- - which commands/logs prove it
213
- - which docs/help/instruction surfaces were refreshed when command or operator guidance changed
214
- - which outside models approved it, with PR comment links when a PR exists
231
+ - mode used (`local` / `full` / `merge-ready`)
232
+ - what was verified and which `wp_*` commands/logs prove it
233
+ - which docs/help/instruction surfaces were refreshed when guidance changed
234
+ - outside models only if merge-ready (with PR comment links when applicable)
215
235
  - what remains intentionally out of scope
216
236
 
217
- When catalog assets, generated instruction templates, or checked-in generated instruction copies changed, include the repo's public-package-safety or package-surface leak checks in the verification evidence.
237
+ When catalog assets or generated instruction surfaces changed, include public-package-safety or package-surface leak checks.
218
238
 
219
239
  If any required check is missing, the correct result is **not done yet**, not a softer claim.