@webpresso/plugin-opencode 0.0.4

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.
Files changed (37) hide show
  1. package/LICENSE +104 -0
  2. package/index.js +250 -0
  3. package/package.json +41 -0
  4. package/plugin-skill-ownership.json +99 -0
  5. package/skills/ai-deslop/SKILL.md +91 -0
  6. package/skills/autopilot/SKILL.md +77 -0
  7. package/skills/autoresearch/SKILL.md +49 -0
  8. package/skills/best-practice-research/SKILL.md +89 -0
  9. package/skills/browse/SKILL.md +25 -0
  10. package/skills/claude/SKILL.md +186 -0
  11. package/skills/codex/SKILL.md +142 -0
  12. package/skills/deep-interview/LICENSE.txt +28 -0
  13. package/skills/deep-interview/SKILL.md +269 -0
  14. package/skills/deep-research/SKILL.md +258 -0
  15. package/skills/delivery-program/SKILL.md +57 -0
  16. package/skills/design-review/SKILL.md +26 -0
  17. package/skills/devex-review/SKILL.md +28 -0
  18. package/skills/fix/SKILL.md +174 -0
  19. package/skills/grok/SKILL.md +32 -0
  20. package/skills/hooks-doctor/SKILL.md +78 -0
  21. package/skills/investigate/SKILL.md +72 -0
  22. package/skills/lore-protocol/SKILL.md +84 -0
  23. package/skills/opencode-go/SKILL.md +97 -0
  24. package/skills/plan-ceo-review/SKILL.md +27 -0
  25. package/skills/plan-design-review/SKILL.md +27 -0
  26. package/skills/plan-devex-review/SKILL.md +19 -0
  27. package/skills/plan-eng-review/SKILL.md +24 -0
  28. package/skills/plan-refine/SKILL.md +50 -0
  29. package/skills/plan-refine/references/full-methodology.md +645 -0
  30. package/skills/ralplan/SKILL.md +50 -0
  31. package/skills/team/SKILL.md +77 -0
  32. package/skills/tech-debt/SKILL.md +79 -0
  33. package/skills/testing-philosophy/SKILL.md +53 -0
  34. package/skills/testing-philosophy/references/full-testing-philosophy.md +523 -0
  35. package/skills/tph/SKILL.md +35 -0
  36. package/skills/ultragoal/SKILL.md +179 -0
  37. package/skills/verify/SKILL.md +283 -0
@@ -0,0 +1,174 @@
1
+ ---
2
+ type: skill
3
+ slug: fix
4
+ title: Fix
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: [verify, testing-philosophy]
9
+ created: "2026-05-13"
10
+ last_reviewed: "2026-07-21"
11
+ name: fix
12
+ description: "Root-cause fix workflow that runs investigate first when diagnosis or failing proof is still missing."
13
+ argument-hint: '<target> where target is: file|symptom|error|test|"free-text description"'
14
+ ---
15
+
16
+ # Fix Command
17
+
18
+ Fix the issue at its root, future-proof, aligned with repo philosophy.
19
+
20
+ **Arguments**: $ARGUMENTS
21
+
22
+ This command turns "please fix it well" into an enforceable workflow: diagnose
23
+ first, repair at the owner, prove the repair, and escalate to `/verify` when
24
+ the blast radius is broader than a local fix.
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_blueprint_put` / `wp_worktree` — never thrash primary checkout |
36
+ | PR follow-up | `wp_pr_status`, `wp_pr_upsert` when landing the fix |
37
+
38
+ ## Non-negotiable invariants
39
+
40
+ 1. **Root cause, not symptom.** Trace the failure to the invariant that actually broke. Do not patch callers when the owner is fixable.
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.
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.
43
+ 4. **Regression proof is mandatory.** Add or strengthen a test or other reliable proof that would fail against the old behavior.
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.
45
+ 6. **Zero suppressions, zero papering over.** No lint disables, ts-ignore, compat aliases, or "temporary" branches to sneak the fix through.
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)
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.
55
+
56
+ ## Protocol
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
+
63
+ ### Step 0 — Run the investigate phase when evidence is missing
64
+
65
+ Before editing, check whether the current context already contains all of the
66
+ following:
67
+
68
+ - a named root-cause hypothesis
69
+ - a failing proof tied to that hypothesis
70
+ - the owning boundary that should be repaired
71
+
72
+ If any of those are missing, run the `investigate` phase inline first:
73
+
74
+ - reproduce or capture the failure
75
+ - read the full error site and one nearby working pattern
76
+ - disconfirm cheap alternative explanations
77
+ - produce failing proof
78
+ - stop only when you can name the broken invariant and owner
79
+
80
+ Do not skip this phase because the fix "looks obvious". If the evidence is not
81
+ there, the investigation work is part of `fix`.
82
+
83
+ ### Step 1 — Reproduce and name the broken invariant
84
+
85
+ - Run the exact command, test, or user flow that surfaces the failure.
86
+ - Capture the evidence that matters: error text, file:line, exit code, failing assertion, or log path.
87
+ - Read enough surrounding code to say the broken invariant in one sentence.
88
+ - If the issue is nondeterministic, gather evidence until you can describe the slow/flaky/failing case without guessing.
89
+
90
+ If the "issue" is actually several unrelated failures, stop and ask which one to fix first.
91
+
92
+ ### Step 2 — Decide where the fix belongs
93
+
94
+ State briefly:
95
+
96
+ - the broken invariant
97
+ - the owner that should enforce it
98
+ - whether the fix changes a public contract
99
+ - which direct consumers must change in the same diff
100
+
101
+ If the blast radius is broader than the owner + direct consumers, keep going with `/fix` only if the change is still one coherent repair. If the work becomes a broader hardening pass, plan a `/verify` handoff before claiming done.
102
+
103
+ ### Step 3 — Write failing proof first when feasible
104
+
105
+ - For a reproducible bug, write or strengthen the smallest regression test that fails on the old behavior.
106
+ - Verify that it fails for the right reason before changing production code.
107
+ - If test-first is genuinely infeasible at that boundary, record why and create the nearest reliable proof instead (for example a deterministic integration reproduction, fixture, or logged command).
108
+
109
+ Do not keep production code written before the test as "reference". If you wrote code first, throw it away and restart from the failing proof.
110
+
111
+ ### Step 4 — Implement the minimal correct fix
112
+
113
+ - Edit the file or module that owns the invariant.
114
+ - Update every changed consumer in the same diff. No half-migrations.
115
+ - Delete compat shims, dead aliases, and TODO branches made obsolete by the repair.
116
+ - Keep complexity down by extracting helpers instead of nesting conditionals.
117
+
118
+ ### Step 5 — Run scoped verification
119
+
120
+ Run the narrowest checks that prove the repaired behavior on the real repo surface:
121
+
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
125
+ - Before push: `wp_ci_preflight` (use global `wp ci-preflight` only when MCP is
126
+ unavailable). Do not use remote CI
127
+ re-runs as the primary fix loop (`ci-cost-local-first`).
128
+
129
+ Rules:
130
+
131
+ - Prefer MCP `wp_*` over raw host Bash.
132
+ - Reuse fresh logs / session-memory indexed output; do not re-run long commands just to re-read.
133
+ - Read the exit code and summary before making a claim.
134
+ - Never `git push --no-verify` to land an unproven fix.
135
+
136
+ Escalate to `/verify <target>` (local) or `/verify <target> --merge-ready` when any of these are true:
137
+
138
+ - the fix crosses packages
139
+ - the fix changes a public or shared contract
140
+ - the fix touched docs, plans, blueprints, or repo SSOT
141
+ - the fix needs dead-code / compat / broad regression review before claiming done
142
+
143
+ If the repaired behavior is already green but the diff still needs a bounded
144
+ cleanup pass, use `ai-deslop` before the final verify handoff.
145
+
146
+ ### Step 6 — Report with evidence
147
+
148
+ Keep it short:
149
+
150
+ - what invariant broke
151
+ - how the change restores it
152
+ - what proof ran (tests, commands, log paths, exit codes)
153
+ - adjacent issues noticed but intentionally not fixed
154
+
155
+ ## Done looks like
156
+
157
+ - [ ] Root cause named in one sentence
158
+ - [ ] Fix applied at the owning boundary
159
+ - [ ] Regression proof fails against the old behavior
160
+ - [ ] Minimal code change restores the invariant
161
+ - [ ] Scoped verification passed on the changed surface
162
+ - [ ] `/verify` handoff used when blast radius exceeded a local fix
163
+ - [ ] Report cites evidence, not intent
164
+
165
+ ## Anti-patterns this command refuses
166
+
167
+ - Fixing the nearest symptom while leaving the real invariant broken
168
+ - Catching an error and returning a sentinel to "keep things moving"
169
+ - Raising a timeout, retry count, or polling interval instead of finding the bottleneck
170
+ - Adding a deprecated alias instead of updating consumers
171
+ - Introducing `any`, suppressions, or lint disables to unblock the fix
172
+ - Bundling unrelated refactors with the repair
173
+ - Claiming done from intuition, partial output, or another agent's success message
174
+ - Writing a planning/doc artifact when the user asked for a fix
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: grok
3
+ description: "Grok outside-voice review."
4
+ license: MIT
5
+ ---
6
+
7
+ Use for bounded Grok Build outside-voice review.
8
+
9
+ - One bounded review invocation per request.
10
+ - No fan-out, probe, retry, account rotation, or provider switch unless the user sets `review_budget`/`N` > 1.
11
+ - Use `wp_review_run` unless MCP is unavailable.
12
+ - Grok review is prompt-only: gather diff excerpts and verification yourself;
13
+ pass that supplied artifact to Grok.
14
+ - Call `wp_review_run` exactly once with `repository_access: "none"`. The runtime
15
+ owns the empty execution workspace.
16
+ - The prompt must say "supplied artifact text only", "do not inspect a
17
+ workspace", "do not announce future work", and require a final `VERDICT:` line.
18
+
19
+ ```jsonc
20
+ {
21
+ "prompt": "You are doing a bounded advisory code review of the supplied artifact text only. Do not inspect a workspace. Do not announce future work. <diff excerpts + verification + questions>. Final line must start with VERDICT:",
22
+ "provider": "grok",
23
+ "repository_access": "none",
24
+ "skipProbe": true,
25
+ "stage": "review",
26
+ "expectedMarker": "VERDICT:",
27
+ }
28
+ ```
29
+
30
+ `wp_review_gate` is plan-only exact-version draft approval/auto-promotion.
31
+ Implementation/phase review uses advisory `wp_review_run` and never mutates
32
+ blueprint approval state. CLI delivery gates are MCP-unavailable compatibility only.
@@ -0,0 +1,78 @@
1
+ ---
2
+ type: skill
3
+ slug: hooks-doctor
4
+ title: Hooks Doctor
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: []
9
+ created: "2026-05-07"
10
+ last_reviewed: "2026-05-07"
11
+ name: hooks-doctor
12
+ description: "Webpresso hook/plugin doctor: verify install health and debug broken hooks or plugin integration."
13
+ argument-hint: "[--skip-mcp]"
14
+ allowed-tools:
15
+ - Bash
16
+ ---
17
+
18
+ # Hooks Doctor
19
+
20
+ Verify the webpresso plugin hooks installation is healthy. Run this first when:
21
+
22
+ - A hook seems not to be firing
23
+ - The plugin was just installed or updated
24
+ - Claude Code can't find expected tools
25
+ - Any plugin integration issue arises
26
+
27
+ ## Running the Check
28
+
29
+ Run the doctor command directly:
30
+
31
+ ```
32
+ wp hooks doctor
33
+ ```
34
+
35
+ Or skip the MCP server check (for CI environments):
36
+
37
+ ```
38
+ wp hooks doctor --skip-mcp
39
+ ```
40
+
41
+ ## Interpreting Results
42
+
43
+ Each check prints `[x]` (pass) or `[ ]` (fail) with a detail line:
44
+
45
+ ```
46
+ [x] pretool-guard
47
+ [x] post-tool (lint-after-edit)
48
+ [x] stop (qa-changed-files)
49
+ [x] guard-switch
50
+ [x] sessionstart
51
+ [x] test-quality-check
52
+ [x] plugin.json integrity
53
+ [x] MCP server liveness: MCP server already running (sentinel found)
54
+ ```
55
+
56
+ ## Failure Remediation
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 |
65
+
66
+ After fixing, re-run `wp hooks doctor` to confirm.
67
+
68
+ ## How It Works
69
+
70
+ The doctor runs five categories of checks:
71
+
72
+ 1. **Bin existence** — each hook binary exists at the expected `dist/esm/hooks/...` path
73
+ 2. **Executable bit** — bins have execute permission (skipped on Windows)
74
+ 3. **stdin response** — interactive hooks (`pretool-guard`, `guard-switch`, `sessionstart`) respond to `{}` input with valid JSON and exit 0; fire-and-forget hooks (`lint-after-edit`, `qa-changed-files`) exit 0
75
+ 4. **plugin.json integrity** — adapter manifest exists, has required fields, and all referenced bins exist on disk
76
+ 5. **MCP server liveness** — spawns the MCP server and sends a `tools/list` JSON-RPC request; times out at 5s (soft-fail — warning only, does not fail the overall check)
77
+
78
+ If `isMcpReady()` detects a live MCP sentinel, the MCP check fast-passes without spawning.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: investigate
3
+ description: "Root-cause investigation workflow: reproduce, isolate, prove, and hand off the minimal repair scope."
4
+ license: MIT
5
+ ---
6
+
7
+ # Investigate
8
+
9
+ Use this skill when the task is to understand a bug, failure, regression,
10
+ flaky behavior, or confusing symptom before editing code.
11
+
12
+ ## Boundary
13
+
14
+ - `investigate` owns diagnosis, reproduction, hypothesis testing, and proof.
15
+ - `fix` owns repair. If the user asked to fix the problem and root-cause
16
+ evidence is still missing, `fix` should run this phase inline first.
17
+ - Stop once you can name the broken invariant, show the failing proof, and
18
+ point at the owner that should be repaired.
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
+
31
+ ## Workflow
32
+
33
+ 1. Reproduce or capture the failure.
34
+ - Run the exact failing command or trace the exact user path (prefer `wp_session_execute`).
35
+ - Keep the evidence that matters: error text, failing assertion, exit code,
36
+ log path, or boundary mismatch.
37
+ 2. Read the whole boundary.
38
+ - Inspect the full error site, the owning module, and one nearby working
39
+ pattern.
40
+ - Do not edit code yet.
41
+ 3. State the root-cause hypothesis.
42
+ - Name the broken invariant in one sentence.
43
+ - Name the owner that should enforce it.
44
+ - Separate facts from guesses.
45
+ 4. Disconfirm cheap alternatives.
46
+ - Test the obvious competing explanations before settling on one cause.
47
+ - Add temporary diagnostics only when needed, and remove them after one pass.
48
+ 5. Produce failing proof.
49
+ - Prefer a targeted failing test.
50
+ - If test-first is impossible at this boundary, use the nearest deterministic
51
+ reproduction instead.
52
+ 6. Hand off the minimal repair scope.
53
+ - List the owner, direct consumers, and the smallest safe verification set.
54
+ - If the issue is broader than one coherent repair, say so before any edit.
55
+
56
+ ## Output
57
+
58
+ Return:
59
+
60
+ - reproduced symptom
61
+ - broken invariant
62
+ - root-cause hypothesis status: confirmed / likely / blocked
63
+ - failing proof
64
+ - owning file or boundary
65
+ - recommended next step: `fix`, `verify`, or a scoped blocker
66
+
67
+ ## Anti-patterns
68
+
69
+ - Editing before you can name the invariant
70
+ - Treating a stack trace as proof of root cause
71
+ - Hiding uncertainty behind broad "probably X" explanations
72
+ - Expanding a debugging pass into cleanup or refactor work
@@ -0,0 +1,84 @@
1
+ ---
2
+ type: skill
3
+ slug: lore-protocol
4
+ title: lore-protocol
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: []
9
+ created: "2026-05-07"
10
+ last_reviewed: "2026-05-07"
11
+ name: lore-protocol
12
+ description: "Manual Lore commit-message trailers with wp audit commit-message; no hook enforcement because PRs squash."
13
+ ---
14
+
15
+ # lore-protocol
16
+
17
+ Use Lore commit-message trailers manually with `wp audit commit-message`. Hook enforcement is intentionally not installed because this repo uses squash commits.
18
+
19
+ Lore is a lightweight protocol for embedding decision context directly into
20
+ commit messages — constraints, rejected alternatives, confidence, and
21
+ forward-looking directives — so future engineers understand _why_ a change
22
+ was made, not just _what_ changed.
23
+
24
+ ## Quick start
25
+
26
+ ```bash
27
+ # Validate a commit message file (hard-fail mode — exits non-zero on violations)
28
+ wp audit commit-message --message-file .git/COMMIT_EDITMSG --require-lore
29
+
30
+ # Soft-warn mode — emits warnings but always exits 0 (adoption ramp)
31
+ wp audit commit-message --message-file .git/COMMIT_EDITMSG --lore-warn
32
+
33
+ # Opt in per-commit by adding [lore] to the subject line:
34
+ # feat(auth): prevent silent session drops [lore]
35
+ ```
36
+
37
+ ## Hook policy
38
+
39
+ Lore trailers are advisory/manual. Do not install commit-msg or pre-push hooks for Lore enforcement; squash commits are the durable review boundary.
40
+
41
+ ## Trailer format
42
+
43
+ ```
44
+ <intent line: why the change was made, not what changed>
45
+
46
+ <body: narrative context — constraints, approach rationale>
47
+
48
+ Constraint: <external constraint that shaped the decision>
49
+ Rejected: <alternative considered> | <reason for rejection>
50
+ Confidence: <low|medium|high>
51
+ Scope-risk: <narrow|moderate|broad>
52
+ Directive: <forward-looking warning for future modifiers>
53
+ Tested: <what was verified>
54
+ Not-tested: <known gaps in verification>
55
+ ```
56
+
57
+ ## Required trailers (for `--require-lore` or `[lore]` subject tag)
58
+
59
+ | Trailer | Required | Allowed values |
60
+ | -------------------------------------------- | ------------ | -------------------------------- |
61
+ | `Confidence:` | yes | `low`, `medium`, `high` |
62
+ | `Constraint:` or `Rejected:` or `Directive:` | at least one | free text |
63
+ | `Scope-risk:` | optional | `narrow`, `moderate`, `broad` |
64
+ | `Reversibility:` | optional | `clean`, `messy`, `irreversible` |
65
+ | `Tested:` | optional | free text |
66
+ | `Not-tested:` | optional | free text |
67
+ | `Related:` | optional | free text |
68
+
69
+ ## Example commit
70
+
71
+ ```
72
+ Prevent silent session drops during long-running operations
73
+
74
+ The auth service returns inconsistent status codes on token
75
+ expiry, so the interceptor catches all 4xx responses.
76
+
77
+ Constraint: Auth service does not support token introspection
78
+ Rejected: Extend token TTL to 24h | security policy violation
79
+ Confidence: high
80
+ Scope-risk: narrow
81
+ Directive: Error handling is broad — do not narrow without verifying upstream behavior
82
+ Tested: Single expired token refresh (unit)
83
+ Not-tested: Auth service cold-start > 500ms behavior
84
+ ```
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: opencode-go
3
+ description: "OpenCode Go aggregate outside-voice reviewer for read-only plan, code, or implementation critique."
4
+ license: MIT
5
+ ---
6
+
7
+ # OpenCode Go aggregate reviewer via OpenCode Go
8
+
9
+ Use when the user asks for an OpenCode Go aggregate reviewer / OpenCode Go review. Treat output as external advice until independently verified.
10
+
11
+ ## Model routing
12
+
13
+ Rendered from the committed OpenCode reviewer policy. It does not hardcode model IDs; it resolves the live `opencode models opencode-go` catalog.
14
+ Use the aggregate reviewer when the user wants an OpenCode Go review but did not specify a family. Select one available model in this order: Kimi K2.7 Code for coding quality, DeepSeek V4 Pro for deeper review depth, DeepSeek V4 Flash for cheap/high-availability coverage, then the remaining families.
15
+ Use the aggregate reviewer for general outside-voice plan critique, implementation review, or when the user wants the current best OpenCode Go lane without naming a family.
16
+
17
+ ## Primary path: MCP
18
+
19
+ When MCP is available, call `wp_review_run` exactly once with provider `opencode`, one selected live model, stage `review`, and a bounded prompt/marker. If no eligible model is known, call `wp_session_execute` at most once for a bounded catalog read before that single review call.
20
+
21
+ Do not retry or probe, rotate accounts, or change provider within the invocation. The shell blocks below are the MCP-unavailable fallback only.
22
+
23
+ ## MCP-unavailable fallback: auth check
24
+
25
+ ```bash
26
+ opencode providers list >/dev/null
27
+ ```
28
+
29
+ ## MCP-unavailable fallback: portable prompt file
30
+
31
+ ```bash
32
+ PROMPT_FILE=$(mktemp -t wp-opencode-go-review.XXXXXX)
33
+ trap 'rm -f "$PROMPT_FILE"' EXIT
34
+ ```
35
+
36
+ ## Dashboard helper relation
37
+
38
+ When `wp dash` provides dashboard context, use the shared helper emitter around this outside-voice review. The commands leave standalone OpenCode Go reviews unchanged.
39
+
40
+ ```bash
41
+ DASH_HELPER_RUN_ID=""
42
+ if [ "${WP_DASH:-}" = "1" ] && [ -n "${WP_DASH_RUN_ID:-}" ]; then
43
+ DASH_HELPER_RUN_ID=$(wp dash-helper-start --provider opencode-go --role reviewer --artifact "${OPENCODE_GO_REVIEW_ARTIFACT:-}")
44
+ fi
45
+ ```
46
+
47
+ After the review runtime exits, record its actual result and optional artifact:
48
+
49
+ ```bash
50
+ OPENCODE_GO_REVIEW_CODE=$?
51
+ if [ -n "$DASH_HELPER_RUN_ID" ]; then
52
+ if [ "$OPENCODE_GO_REVIEW_CODE" -eq 0 ]; then
53
+ wp dash-helper-complete --provider opencode-go --run-id "$DASH_HELPER_RUN_ID" --role reviewer --outcome completed --artifact "${OPENCODE_GO_REVIEW_ARTIFACT:-}"
54
+ else
55
+ wp dash-helper-complete --provider opencode-go --run-id "$DASH_HELPER_RUN_ID" --role reviewer --outcome failed --artifact "${OPENCODE_GO_REVIEW_ARTIFACT:-}"
56
+ fi
57
+ fi
58
+ ```
59
+
60
+ The managed OpenCode plugin currently has no parent-linked native subagent completion lifecycle. This capability is explicit unsupported coverage, not an inferred dashboard relation.
61
+
62
+ ## MCP-unavailable fallback: review command
63
+
64
+ Use read-only prompts. Run from the repo directory; do NOT pass `--dir "$PWD"` because opencode already uses the current directory and the extra index can stall reviews.
65
+ Review is advisory. `wp_review_gate` is plan-only exact-version draft approval/auto-promotion; `wp_review_run` never mutates approval state.
66
+
67
+ ```bash
68
+ # Aggregate reviewer: honor the canonical model-selection policy (Kimi K2.7 Code → DeepSeek V4 Pro → DeepSeek V4 Flash first, then cross-family selection fallbacks).
69
+ CATALOG=$(opencode models opencode-go)
70
+ MODEL=$(echo "$CATALOG" | grep '^opencode-go/kimi' | grep -- '-code$' | sort -V | tail -1)
71
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/deepseek' | grep -- '-pro$' | sort -V | tail -1)
72
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/deepseek' | grep -- '-flash$' | sort -V | tail -1)
73
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/qwen' | grep -- '-max$' | sort -V | tail -1)
74
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/glm' | sort -V | tail -1)
75
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/minimax' | sort -V | tail -1)
76
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/mimo' | grep -- '-pro$' | sort -V | tail -1)
77
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | sort -V | tail -1)
78
+
79
+ # Resolve one model from one bounded catalog read, then launch one review.
80
+ [ -n "$MODEL" ] || { echo "No OpenCode Go model resolved for this reviewer." >&2; exit 2; }
81
+ OPENCODE_GO_REVIEW_EFFORT=${OPENCODE_GO_REVIEW_EFFORT:-medium}
82
+ [ "$OPENCODE_GO_REVIEW_EFFORT" = medium ] || [ "$OPENCODE_GO_REVIEW_EFFORT" = high ] || { echo "OPENCODE_GO_REVIEW_EFFORT must be one of: medium, high" >&2; exit 2; }
83
+ OPENCODE_GO_REVIEW_IDLE_SECONDS=${OPENCODE_GO_REVIEW_IDLE_SECONDS:-180}
84
+ OPENCODE_GO_REVIEW_ARTIFACT_ROOT=${OPENCODE_GO_REVIEW_ARTIFACT_ROOT:-"$(pwd)/.webpresso/reviews"}
85
+ wp review run \
86
+ --provider opencode \
87
+ --prompt-file "$PROMPT_FILE" \
88
+ --model "$MODEL" \
89
+ --effort "$OPENCODE_GO_REVIEW_EFFORT" \
90
+ --stage review \
91
+ --artifact-root "$OPENCODE_GO_REVIEW_ARTIFACT_ROOT" \
92
+ --idle-seconds "$OPENCODE_GO_REVIEW_IDLE_SECONDS"
93
+ ```
94
+
95
+ The single catalog read above resolves `$MODEL`; do not perform another model-catalog command.
96
+ The typed runtime advances its idle clock only on monotonic semantic progress and has no total wall-clock cutoff.
97
+ OpenCode Go usage limit ends all OpenCode models this review (no family hop). Next: Grok (`--provider grok`). Gate fails over to Grok when accounts cool. Treat `true-idle`, `protocol-unsupported`, provider/abort/spawn/artifact failure as unavailable. Never replace with static timeout, byte-growth heartbeat, or buffered-output fallback.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: plan-ceo-review
3
+ description: "CEO/founder plan review for scope, ambition, customer value, sequencing, and whether the plan is the right bet."
4
+ license: MIT
5
+ ---
6
+
7
+ # CEO plan review
8
+
9
+ Review the plan as a founder accountable for product leverage and customer value.
10
+
11
+ ## Modes
12
+
13
+ Choose one mode explicitly:
14
+
15
+ - **Scope expansion:** the plan is too timid; propose a bigger wedge.
16
+ - **Selective expansion:** keep the core but add one or two high-leverage improvements.
17
+ - **Hold scope:** ambition is right; demand sharper execution and proof.
18
+ - **Scope reduction:** remove distracting work and ship the smallest valuable slice.
19
+
20
+ ## Review checklist
21
+
22
+ 1. Who urgently wants this outcome and why now?
23
+ 2. What is the 10-star version, and what is the smallest credible slice of it?
24
+ 3. What should be deleted because it does not advance the wedge?
25
+ 4. What proof will convince us the work mattered?
26
+
27
+ Return a verdict, the recommended mode, and specific plan edits.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: plan-design-review
3
+ description: "Designer plan review for UI/UX clarity, hierarchy, interaction quality, accessibility, and visual coherence."
4
+ license: MIT
5
+ ---
6
+
7
+ # Design plan review
8
+
9
+ Review the plan as a product designer before code is written.
10
+
11
+ ## Scorecard
12
+
13
+ Rate each dimension from 0-10 and explain what would make it a 10:
14
+
15
+ - User intent and primary task clarity
16
+ - Information hierarchy and content structure
17
+ - Interaction states and error recovery
18
+ - Accessibility and keyboard/screen-reader paths
19
+ - Visual coherence, spacing, and affordances
20
+ - Responsiveness and empty/loading states
21
+
22
+ ## Output
23
+
24
+ - Overall score and verdict
25
+ - Top three design risks
26
+ - Minimal plan edits that improve the score
27
+ - Acceptance criteria for visual and accessibility verification
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: plan-devex-review
3
+ description: "Developer-experience plan review for onboarding, docs, CLI/API ergonomics, migration risk, and time-to-hello-world."
4
+ license: MIT
5
+ ---
6
+
7
+ # Developer-experience plan review
8
+
9
+ Use before implementing developer-facing features, setup flows, CLIs, docs, SDKs, or migrations.
10
+
11
+ ## Review checklist
12
+
13
+ - Who is the developer and what are they trying to do?
14
+ - Is the first successful path obvious and short?
15
+ - Are errors actionable and copy-pastable?
16
+ - Does the plan preserve existing workflows and migration safety?
17
+ - What docs, examples, and smoke tests prove the experience?
18
+
19
+ Return DX score, blockers, simplifications, and acceptance tests.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: plan-eng-review
3
+ description: "Engineering-manager plan review for architecture, data flow, sequencing, edge cases, tests, and rollout risk."
4
+ license: MIT
5
+ ---
6
+
7
+ # Engineering plan review
8
+
9
+ Review the plan as an engineering manager who must make it safe to execute.
10
+
11
+ ## Process
12
+
13
+ 1. Identify the target outcome, non-goals, constraints, owners, and stop condition.
14
+ 2. Map the implementation path: changed files, data flow, public interfaces, migrations, and backward-compatibility concerns.
15
+ 3. List edge cases and failure modes by severity.
16
+ 4. Check test shape: unit, integration, e2e, fixtures, regression coverage, and verification commands.
17
+ 5. Recommend the smallest plan repair that materially reduces risk.
18
+
19
+ ## Output
20
+
21
+ - **Verdict:** ready / ready with edits / not ready
22
+ - **Blocking issues:** concrete fixes required before coding
23
+ - **Recommended edits:** concise patch-level plan changes
24
+ - **Verification contract:** commands and evidence required before completion