@webpresso/plugin-opencode 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin-skill-ownership.json +15 -15
- package/skills/autopilot/SKILL.md +1 -1
- package/skills/claude/SKILL.md +24 -166
- package/skills/codex/SKILL.md +25 -123
- package/skills/fix/SKILL.md +4 -3
- package/skills/grok/SKILL.md +30 -18
- package/skills/hooks-doctor/SKILL.md +28 -18
- package/skills/opencode-go/SKILL.md +35 -85
- package/skills/plan-refine/SKILL.md +1 -0
- package/skills/plan-refine/references/full-methodology.md +18 -18
- package/skills/ralplan/SKILL.md +1 -0
- package/skills/tech-debt/SKILL.md +6 -0
- package/skills/testing-philosophy/references/full-testing-philosophy.md +8 -12
- package/skills/tooling-friction/SKILL.md +38 -16
- package/skills/ultragoal/SKILL.md +10 -9
- package/skills/verify/SKILL.md +65 -27
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"host": "opencode",
|
|
4
4
|
"packageName": "@webpresso/plugin-opencode",
|
|
5
|
-
"packageVersion": "0.0.
|
|
5
|
+
"packageVersion": "0.0.11",
|
|
6
6
|
"runtimeDirs": [],
|
|
7
7
|
"skills": {
|
|
8
8
|
"ai-deslop": {
|
|
9
9
|
"digest": "sha256:cf07df5835037f10401400e220c1c923f5325a6149d59c231ce316e10595fdfc"
|
|
10
10
|
},
|
|
11
11
|
"autopilot": {
|
|
12
|
-
"digest": "sha256:
|
|
12
|
+
"digest": "sha256:fc0f77917bd7af3d6e99ce3a96067394308a3b8c94c416b5076167b19e00a754"
|
|
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:
|
|
24
|
+
"digest": "sha256:e1e97e5419249fbb0cb8446e96fc8e80c165c149db563784570f96ad629ab54d"
|
|
25
25
|
},
|
|
26
26
|
"codex": {
|
|
27
|
-
"digest": "sha256:
|
|
27
|
+
"digest": "sha256:1f93db92066e5b39ba334ec1d8c3af3de79dea13947dba97b8b7340302906d63"
|
|
28
28
|
},
|
|
29
29
|
"deep-interview": {
|
|
30
30
|
"digest": "sha256:79fbf86a86024a311583a1500bb6960c82ad1383cc9f8ed3f04bbace41848ff7"
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"digest": "sha256:306355888da0827e3523022077f731845726bbaaf595ca12515cc91d8605b5e6"
|
|
43
43
|
},
|
|
44
44
|
"fix": {
|
|
45
|
-
"digest": "sha256:
|
|
45
|
+
"digest": "sha256:38ddebb82a73e9e18e5b9909585a8477285387ac7bbad2574e3708362c4d0475"
|
|
46
46
|
},
|
|
47
47
|
"grok": {
|
|
48
|
-
"digest": "sha256:
|
|
48
|
+
"digest": "sha256:1a6bf596fde9ce50a06ea767c06e65d4845c52d5af085644c958964385363b1e"
|
|
49
49
|
},
|
|
50
50
|
"handoff": {
|
|
51
51
|
"digest": "sha256:eb34b39fc6d416fe8203eea979b4b99ab3150c44da6dad3ca4afb8fe8fb75b85"
|
|
52
52
|
},
|
|
53
53
|
"hooks-doctor": {
|
|
54
|
-
"digest": "sha256:
|
|
54
|
+
"digest": "sha256:30286e9ef1c64f2c01d05b0e13a39c54741c7a3e02e5d18636795a7517c0b566"
|
|
55
55
|
},
|
|
56
56
|
"investigate": {
|
|
57
57
|
"digest": "sha256:778b3a1f38323e8dd6101c6ace26ff8aada1246b20952b3641d5d1049bc50055"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"digest": "sha256:a80fbacc765e8b886437b9fdf7dd71e1ceb1b98b939078ec90fc88d06a8b4c69"
|
|
61
61
|
},
|
|
62
62
|
"opencode-go": {
|
|
63
|
-
"digest": "sha256:
|
|
63
|
+
"digest": "sha256:c47cbe07f96510112d1bccae0a6319d3f74a5e2f3827a59865d45aea757c6dc6"
|
|
64
64
|
},
|
|
65
65
|
"plan-ceo-review": {
|
|
66
66
|
"digest": "sha256:4d426158518dd71f8998770e8d4037bcbfa3c65d7265a93a4a78a9b015ba881e"
|
|
@@ -75,31 +75,31 @@
|
|
|
75
75
|
"digest": "sha256:b728dad90254d4c9f81b3818321d34ab53519b79ce20ff3bfe08bfacb2aa3e86"
|
|
76
76
|
},
|
|
77
77
|
"plan-refine": {
|
|
78
|
-
"digest": "sha256:
|
|
78
|
+
"digest": "sha256:cf2c0743a81b0d8954417482e7812212a6a90e5046926c44cd82a6a309dfdc26"
|
|
79
79
|
},
|
|
80
80
|
"ralplan": {
|
|
81
|
-
"digest": "sha256:
|
|
81
|
+
"digest": "sha256:47cf47910b50471eb92f9487a018311442c95b26907c5b21c3f5b87947bf7e7e"
|
|
82
82
|
},
|
|
83
83
|
"team": {
|
|
84
84
|
"digest": "sha256:c27107b46e0cd7b9c264a6f51f74f505920d63e7ee2a2d26d2f288592fd10bd2"
|
|
85
85
|
},
|
|
86
86
|
"tech-debt": {
|
|
87
|
-
"digest": "sha256:
|
|
87
|
+
"digest": "sha256:bec6c83a18e55d148af973dd84d34a8750d8a8fe4345e5fca7b9e8c3e876fd9a"
|
|
88
88
|
},
|
|
89
89
|
"testing-philosophy": {
|
|
90
|
-
"digest": "sha256:
|
|
90
|
+
"digest": "sha256:23fdad944b089de3cfcd13957a5ac10c37bd3d136b192029af69368bca1470db"
|
|
91
91
|
},
|
|
92
92
|
"tooling-friction": {
|
|
93
|
-
"digest": "sha256:
|
|
93
|
+
"digest": "sha256:569904882036df09b52864411332ad5ea53e2914bc58d90030a0676f50bee228"
|
|
94
94
|
},
|
|
95
95
|
"tph": {
|
|
96
96
|
"digest": "sha256:bed3684a850651534f315d355cdeae50d951c429817df0f105cccdb7f4e1561b"
|
|
97
97
|
},
|
|
98
98
|
"ultragoal": {
|
|
99
|
-
"digest": "sha256:
|
|
99
|
+
"digest": "sha256:caa61789eb5ce01940cfaccf7e70e9290c1f318cb31e25d038eb45b26970c39c"
|
|
100
100
|
},
|
|
101
101
|
"verify": {
|
|
102
|
-
"digest": "sha256:
|
|
102
|
+
"digest": "sha256:03bd3b922a24d19ccc0b942d4f56d97f09e24939220a69d8fad8ba1144085d12"
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -25,7 +25,7 @@ using `wp_ultragoal_run` / `wp ultragoal run` and the current handoff.
|
|
|
25
25
|
|
|
26
26
|
## Outside-voice (required)
|
|
27
27
|
|
|
28
|
-
After each ultragoal **phase or plan-gate milestone**, run an **OpenCode Go** outside-voice review and pick the model by purpose. The purpose→family ordering lives in one place — the committed reviewer policy rendered into the `opencode-go` skill — so follow that skill and do not restate the ordering here. Resolve IDs from live `opencode models opencode-go`. `wp_review_gate` is only for exact-version draft plan approval/auto-promotion; `
|
|
28
|
+
After each ultragoal **phase or plan-gate milestone**, run an **OpenCode Go** outside-voice review and pick the model by purpose. The purpose→family ordering lives in one place — the committed reviewer policy rendered into the `opencode-go` skill — so follow that skill and do not restate the ordering here. Resolve IDs from live `opencode models opencode-go`. `wp_review_gate` in the default authoritative mode is only for exact-version draft plan approval/auto-promotion; the same tool called with `mode: "advisory"` is for implementation/phase review and never mutates blueprint approval state on its own — a later authoritative call may promote a matching advisory approval without re-invoking a provider. Never self-approve. Full protocol: the `ultragoal` skill. Respect `review_budget` (default owned by `workflow-skills-routing.md`): one sequential path, no multi-host stampede.
|
|
29
29
|
|
|
30
30
|
## Vague gate
|
|
31
31
|
|
package/skills/claude/SKILL.md
CHANGED
|
@@ -1,186 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: claude
|
|
3
|
-
description: "Claude
|
|
3
|
+
description: "Claude outside-voice reviewer through Webpresso MCP."
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Claude outside
|
|
7
|
+
# Claude outside-voice review
|
|
8
8
|
|
|
9
|
-
Use
|
|
9
|
+
Use only for a requested content-bound plan or delivery review. Treat output as external advice
|
|
10
|
+
until independently verified.
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## MCP-only contract
|
|
12
13
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
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.
|
|
16
|
+
- Never invoke a provider command, the legacy review CLI, or a removed review-run surface.
|
|
17
|
+
- If the review MCP is unavailable, stop and report it unavailable. There is no CLI fallback.
|
|
17
18
|
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
When the webpresso MCP server is available, call `wp_review_run` exactly once
|
|
21
|
-
instead of any bash block below. It is the same `wp review run` typed runtime,
|
|
22
|
-
called in-process, and takes a `prompt` string without `--prompt-file` bookkeeping.
|
|
23
|
-
Use the default review stage.
|
|
19
|
+
## Advisory call
|
|
24
20
|
|
|
25
21
|
```jsonc
|
|
26
|
-
// wp_review_run MCP tool call
|
|
27
22
|
{
|
|
28
|
-
"
|
|
23
|
+
"project_id": "<project>",
|
|
24
|
+
"slug": "<blueprint-slug>",
|
|
25
|
+
"purpose": "delivery",
|
|
26
|
+
"base_ref": "<full-base-sha>",
|
|
27
|
+
"authority_ref": "<full-head-sha>",
|
|
29
28
|
"provider": "claude",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// review.
|
|
29
|
+
"repository_access": "none",
|
|
30
|
+
"mode": "advisory",
|
|
33
31
|
}
|
|
34
32
|
```
|
|
35
33
|
|
|
36
|
-
Use
|
|
37
|
-
fallback, or rotate accounts within the invocation. Never shell into a
|
|
38
|
-
provider CLI when MCP is available; that bypasses typed artifact capture under
|
|
39
|
-
`.webpresso/reviews`.
|
|
40
|
-
|
|
41
|
-
For long-running reviews, prefer the async MCP path: call `wp_review_run` with
|
|
42
|
-
`"provider": "claude"` and `"background": true`, then poll `wp_review_wait`
|
|
43
|
-
with the returned `runId`. Do not solve MCP transport limits by inflating
|
|
44
|
-
synchronous review timeouts.
|
|
45
|
-
|
|
46
|
-
The bash blocks in this skill (below) are the **MCP-unavailable fallback only**
|
|
47
|
-
— use them when the webpresso MCP server itself is not reachable in the current
|
|
48
|
-
host, not as a provider-fallback mechanism.
|
|
49
|
-
|
|
50
|
-
## MCP-unavailable fallback: auth check
|
|
51
|
-
|
|
52
|
-
Use local Claude CLI login directly; do not route through Anthropic API-key env vars.
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
AUTH_STATUS_FILE=$(mktemp -t wp-claude-auth.XXXXXX)
|
|
56
|
-
trap 'rm -f "$AUTH_STATUS_FILE"' EXIT
|
|
57
|
-
if ! claude auth status --json >"$AUTH_STATUS_FILE" 2>/dev/null; then
|
|
58
|
-
if ! claude auth status >"$AUTH_STATUS_FILE" 2>/dev/null; then
|
|
59
|
-
echo "CLAUDE_AUTH=missing: run claude auth login with the intended Claude Max account"
|
|
60
|
-
exit 1
|
|
61
|
-
fi
|
|
62
|
-
fi
|
|
63
|
-
if grep -E '"(authenticated|loggedIn|success)"[[:space:]]*:[[:space:]]*true' "$AUTH_STATUS_FILE" >/dev/null; then
|
|
64
|
-
echo "CLAUDE_AUTH=cli-login"
|
|
65
|
-
else
|
|
66
|
-
echo "CLAUDE_AUTH=missing: claude auth status did not report a recognized Claude CLI login"
|
|
67
|
-
exit 1
|
|
68
|
-
fi
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## MCP-unavailable fallback: portable prompt file
|
|
72
|
-
|
|
73
|
-
Use a suffix-free `mktemp -t` pattern so macOS and Linux both work:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
PROMPT_FILE=$(mktemp -t wp-claude-review.XXXXXX)
|
|
77
|
-
trap 'rm -f "$PROMPT_FILE"' EXIT
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Dashboard helper relation
|
|
81
|
-
|
|
82
|
-
When this skill runs under `wp dash`, record the outside-voice lifecycle with
|
|
83
|
-
`wp dash-helper-start --provider claude --role reviewer` and
|
|
84
|
-
`wp dash-helper-complete --provider claude --role reviewer --outcome <completed|failed>`
|
|
85
|
-
using the actual terminal outcome and artifact path.
|
|
86
|
-
Outside the dashboard, skip helper emission. Claude's managed native subagent
|
|
87
|
-
lifecycle is not parent-linked; this unsupported coverage must stay explicit,
|
|
88
|
-
and completion must never be inferred from transcript text or timing.
|
|
89
|
-
|
|
90
|
-
## Modes
|
|
91
|
-
|
|
92
|
-
### Review
|
|
93
|
-
|
|
94
|
-
Use single-file / single-question first for any non-trivial diff. Do not send a whole PR unless it already fits within the bounded payload below.
|
|
95
|
-
|
|
96
|
-
**Model policy:** leave `CLAUDE_REVIEW_MODEL` unset unless the user requested a
|
|
97
|
-
specific Claude model (for example `fable` for a lighter advisory pass). When it
|
|
98
|
-
is unset, `wp review run` lets the Claude CLI choose its own default by omitting
|
|
99
|
-
`--model`. The blueprint promotion/completion approval gate
|
|
100
|
-
(`catalog/agent/rules/pre-implementation.md`) validates reviewer identity
|
|
101
|
-
(`claude`/`codex`/`grok`/an OpenCode-Go model), not the reviewed model string, so do not
|
|
102
|
-
claim the gate rejects a different Claude model.
|
|
103
|
-
|
|
104
|
-
#### Bounded prompt payload
|
|
105
|
-
|
|
106
|
-
Always include:
|
|
107
|
-
|
|
108
|
-
- current branch and base branch
|
|
109
|
-
- `git diff --stat`
|
|
110
|
-
- changed file list
|
|
111
|
-
- one targeted file diff or one narrow snippet/hunk only, capped to a fixed size
|
|
112
|
-
|
|
113
|
-
Prefer ~12 KB or ~200 lines per call. Split large reviews instead of raising the cap.
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
BASE_BRANCH=${BASE_BRANCH:-origin/main}
|
|
117
|
-
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
118
|
-
TARGET_FILE=${TARGET_FILE:?set TARGET_FILE to one changed file}
|
|
119
|
-
|
|
120
|
-
{
|
|
121
|
-
printf 'Outside review mode: focused diff review\n'
|
|
122
|
-
printf 'Base branch: %s\nCurrent branch: %s\n\n' "$BASE_BRANCH" "$CURRENT_BRANCH"
|
|
123
|
-
printf 'git diff --stat %s...HEAD\n' "$BASE_BRANCH"
|
|
124
|
-
git diff --stat "$BASE_BRANCH"...HEAD
|
|
125
|
-
printf '\nChanged files:\n'
|
|
126
|
-
git diff --name-only "$BASE_BRANCH"...HEAD
|
|
127
|
-
printf '\nTarget file: %s\n' "$TARGET_FILE"
|
|
128
|
-
printf 'Bounded target diff (max 12000 bytes):\n'
|
|
129
|
-
git diff --unified=3 "$BASE_BRANCH"...HEAD -- "$TARGET_FILE" | \
|
|
130
|
-
head -c 12000
|
|
131
|
-
printf '\n\nQuestion: Identify the highest-signal correctness, security, data-loss, or maintainability risk in %s. Quote only the smallest relevant excerpt. If context is insufficient, answer INSUFFICIENT_CONTEXT.\n' "$TARGET_FILE"
|
|
132
|
-
} >"$PROMPT_FILE"
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
#### Progress-aware review runtime
|
|
136
|
-
|
|
137
|
-
Run one review through the typed `wp review run` owner. Skills must not embed
|
|
138
|
-
subprocess supervision. The runtime consumes Claude's streaming JSON events,
|
|
139
|
-
advances its idle clock only on monotonic semantic progress, and has no total
|
|
140
|
-
wall-clock cutoff.
|
|
141
|
-
|
|
142
|
-
The artifact root contains private runtime diagnostics, not a recorded
|
|
143
|
-
transcript or committable approval evidence. Direct `wp review run` output is
|
|
144
|
-
advisory. `wp_review_gate` is plan-only exact-version draft approval/auto-promotion;
|
|
145
|
-
implementation/phase reviews use advisory `wp_review_run` and never mutate
|
|
146
|
-
blueprint approval state. CLI delivery gates are MCP-unavailable compatibility only.
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
CLAUDE_REVIEW_MODEL=${CLAUDE_REVIEW_MODEL:-}
|
|
150
|
-
CLAUDE_MODEL_ARGS=()
|
|
151
|
-
if [ -n "$CLAUDE_REVIEW_MODEL" ]; then
|
|
152
|
-
CLAUDE_MODEL_ARGS=(--model "$CLAUDE_REVIEW_MODEL")
|
|
153
|
-
fi
|
|
154
|
-
CLAUDE_REVIEW_EFFORT=${CLAUDE_REVIEW_EFFORT:-medium}
|
|
155
|
-
CLAUDE_REVIEW_IDLE_SECONDS=${CLAUDE_REVIEW_IDLE_SECONDS:-180}
|
|
156
|
-
CLAUDE_REVIEW_ARTIFACT_ROOT=${CLAUDE_REVIEW_ARTIFACT_ROOT:-"$(pwd)/.webpresso/reviews"}
|
|
157
|
-
CLAUDE_REVIEW_CODE=0
|
|
158
|
-
wp review run \
|
|
159
|
-
--provider claude \
|
|
160
|
-
--prompt-file "$PROMPT_FILE" \
|
|
161
|
-
"${CLAUDE_MODEL_ARGS[@]}" \
|
|
162
|
-
--effort "$CLAUDE_REVIEW_EFFORT" \
|
|
163
|
-
--stage review \
|
|
164
|
-
--artifact-root "$CLAUDE_REVIEW_ARTIFACT_ROOT" \
|
|
165
|
-
--idle-seconds "$CLAUDE_REVIEW_IDLE_SECONDS"
|
|
166
|
-
CLAUDE_REVIEW_CODE=$?
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Treat `true-idle`, `protocol-unsupported`, provider failure, abort, spawn failure, or artifact failure as an unavailable advisory result. Never replace them with a static timeout, arbitrary byte-growth heartbeat, or buffered-output fallback.
|
|
170
|
-
|
|
171
|
-
#### Invocation policy
|
|
172
|
-
|
|
173
|
-
Run one provider review per invocation. Do not retry, fall back to another
|
|
174
|
-
provider, or rotate accounts within the invocation. A new invocation requires
|
|
175
|
-
an explicit diagnosis and caller decision. Do not fall back to an unbounded
|
|
176
|
-
whole-PR prompt.
|
|
177
|
-
|
|
178
|
-
Summarize findings with severity, evidence, model, artifact path, and whether you independently verified them.
|
|
34
|
+
Use authoritative mode only when formal plan or delivery approval is requested.
|
|
179
35
|
|
|
180
|
-
|
|
36
|
+
## Model policy
|
|
181
37
|
|
|
182
|
-
|
|
38
|
+
When the user names an exact model, pass it in the MCP `model` field. Otherwise omit
|
|
39
|
+
that field and let the MCP owner select the configured provider default.
|
|
183
40
|
|
|
184
|
-
|
|
41
|
+
## Review quality
|
|
185
42
|
|
|
186
|
-
|
|
43
|
+
Follow `catalog/agent/rules/review-methodology-sota.md`; report typed verdict, model,
|
|
44
|
+
artifact, grounded findings, and independently verified conclusions.
|
package/skills/codex/SKILL.md
CHANGED
|
@@ -1,142 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codex
|
|
3
|
-
description: "Codex
|
|
3
|
+
description: "Codex outside-voice reviewer through Webpresso MCP."
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Codex outside
|
|
7
|
+
# Codex outside-voice review
|
|
8
8
|
|
|
9
|
-
Use
|
|
9
|
+
Use only for a requested content-bound plan or delivery review. Treat output as external advice
|
|
10
|
+
until independently verified.
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## MCP-only contract
|
|
12
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.
|
|
16
|
+
- Never invoke a provider command, the legacy review CLI, or a removed review-run surface.
|
|
17
|
+
- If the review MCP is unavailable, stop and report it unavailable. There is no CLI fallback.
|
|
18
|
+
|
|
19
|
+
## Advisory call
|
|
14
20
|
|
|
15
21
|
```jsonc
|
|
16
|
-
// wp_review_run MCP tool call
|
|
17
22
|
{
|
|
18
|
-
"
|
|
23
|
+
"project_id": "<project>",
|
|
24
|
+
"slug": "<blueprint-slug>",
|
|
25
|
+
"purpose": "delivery",
|
|
26
|
+
"base_ref": "<full-base-sha>",
|
|
27
|
+
"authority_ref": "<full-head-sha>",
|
|
19
28
|
"provider": "codex",
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// review.
|
|
29
|
+
"repository_access": "none",
|
|
30
|
+
"mode": "advisory",
|
|
23
31
|
}
|
|
24
32
|
```
|
|
25
33
|
|
|
26
|
-
Use
|
|
27
|
-
|
|
28
|
-
For long-running reviews, prefer the async MCP path: call `wp_review_run` with
|
|
29
|
-
`"provider": "codex"` and `"background": true`, then poll `wp_review_wait`
|
|
30
|
-
with the returned `runId`. Do not solve MCP transport limits by inflating
|
|
31
|
-
synchronous review timeouts.
|
|
32
|
-
|
|
33
|
-
The bash blocks in this skill (below) are the **MCP-unavailable fallback only** — use them when the webpresso MCP server itself is not reachable in the current host, not as a provider-fallback mechanism.
|
|
34
|
-
|
|
35
|
-
## Single-shot budget (anti-stampede)
|
|
36
|
-
|
|
37
|
-
- Default: **one** review invocation per request.
|
|
38
|
-
- Do **not** fan out parallel multi-host review matrices unless the user set `review_budget`/`N` > 1.
|
|
39
|
-
- Prefer `wp_review_run` (MCP) or `wp review run` (CLI fallback) over spawn/wait agent loops for review.
|
|
40
|
-
- Keep prompts bounded; no whole-repo paste.
|
|
41
|
-
|
|
42
|
-
## MCP-unavailable fallback (raw CLI)
|
|
43
|
-
|
|
44
|
-
Everything from here down is the manual `wp review run` CLI path documented for hosts or sessions where the webpresso MCP server is not reachable. Prefer `wp_review_run` above whenever MCP is available.
|
|
45
|
-
|
|
46
|
-
## MCP-unavailable fallback: auth check
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
if ! codex login status >/dev/null 2>&1; then
|
|
50
|
-
echo "CODEX_AUTH=missing: run codex login before using the codex outside-voice skill"
|
|
51
|
-
exit 1
|
|
52
|
-
fi
|
|
53
|
-
echo "CODEX_AUTH=ok"
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## MCP-unavailable fallback: portable prompt file
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
PROMPT_FILE=$(mktemp -t wp-codex-review.XXXXXX)
|
|
60
|
-
trap 'rm -f "$PROMPT_FILE"' EXIT
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Dashboard helper relation
|
|
64
|
-
|
|
65
|
-
When called by `wp dash`, record the outside-voice lifecycle with
|
|
66
|
-
`wp dash-helper-start --provider codex --role reviewer` and
|
|
67
|
-
`wp dash-helper-complete --provider codex --role reviewer --outcome <completed|failed>`
|
|
68
|
-
using the actual terminal outcome and artifact path.
|
|
69
|
-
Standalone calls skip helper emission. Codex native subagent events are not
|
|
70
|
-
parent-linked in the managed lifecycle; this unsupported coverage must stay
|
|
71
|
-
explicit, and completion must never be inferred from text, PIDs, or
|
|
72
|
-
timestamps.
|
|
73
|
-
|
|
74
|
-
## Options
|
|
75
|
-
|
|
76
|
-
Every mode runs through the `wp review run` runtime and honors these environment
|
|
77
|
-
overrides. Set them inline, e.g.
|
|
78
|
-
`CODEX_REVIEW_MODEL=gpt-5.6-sol CODEX_REVIEW_EFFORT=high /codex`.
|
|
79
|
-
|
|
80
|
-
- `CODEX_REVIEW_MODEL` — the Codex model. Defaults to the `model = "..."` in the
|
|
81
|
-
active Codex config (`${CODEX_HOME:-~/.codex}/config.toml`); if neither the
|
|
82
|
-
environment nor config names a model, `wp review run` lets the Codex CLI choose
|
|
83
|
-
its own default. It MUST be a model the current login is provisioned for: ChatGPT-account
|
|
84
|
-
logins use the config's codenamed ids (e.g. `gpt-5.6-sol`) and reject a bare
|
|
85
|
-
`gpt-5.6`. When the user names a model ("review with 5.6-sol"), pass it here.
|
|
86
|
-
- `CODEX_REVIEW_EFFORT` — reasoning effort, default `medium`. The review stage
|
|
87
|
-
accepts only `medium` or `high`; any other value is rejected.
|
|
88
|
-
- `CODEX_REVIEW_IDLE_SECONDS` — idle timeout in seconds for the review stage,
|
|
89
|
-
default `180`.
|
|
90
|
-
- `CODEX_REVIEW_ARTIFACT_ROOT` — directory for private runtime diagnostics,
|
|
91
|
-
default `<cwd>/.webpresso/reviews`. Never commit files from this directory or
|
|
92
|
-
cite them as approval evidence.
|
|
93
|
-
|
|
94
|
-
Direct `wp review run` output is advisory. `wp_review_gate` is plan-only
|
|
95
|
-
exact-version draft approval/auto-promotion; implementation/phase reviews use
|
|
96
|
-
advisory `wp_review_run` and never mutate blueprint approval state. CLI delivery
|
|
97
|
-
gates are MCP-unavailable compatibility only.
|
|
98
|
-
|
|
99
|
-
## Modes
|
|
100
|
-
|
|
101
|
-
### Review
|
|
102
|
-
|
|
103
|
-
1. Capture the current branch, base branch, and `git diff --stat`.
|
|
104
|
-
2. Write a concise prompt asking Codex to find correctness, security, data-loss, and maintainability risks.
|
|
105
|
-
3. Run Codex through the typed review runtime in read-only mode:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
# CODEX_REVIEW_MODEL / CODEX_REVIEW_EFFORT are overridable — see ## Options for
|
|
109
|
-
# the full option list, valid values, and how to pick a login-supported model.
|
|
110
|
-
CODEX_REVIEW_MODEL=${CODEX_REVIEW_MODEL:-}
|
|
111
|
-
CODEX_MODEL_ARGS=()
|
|
112
|
-
if [ -n "$CODEX_REVIEW_MODEL" ]; then
|
|
113
|
-
CODEX_MODEL_ARGS=(--model "$CODEX_REVIEW_MODEL")
|
|
114
|
-
fi
|
|
115
|
-
CODEX_REVIEW_EFFORT=${CODEX_REVIEW_EFFORT:-medium}
|
|
116
|
-
case "$CODEX_REVIEW_EFFORT" in
|
|
117
|
-
medium|high) ;;
|
|
118
|
-
*) echo "CODEX_REVIEW_EFFORT must be one of: medium, high" >&2; exit 2 ;;
|
|
119
|
-
esac
|
|
120
|
-
CODEX_REVIEW_IDLE_SECONDS=${CODEX_REVIEW_IDLE_SECONDS:-180}
|
|
121
|
-
CODEX_REVIEW_ARTIFACT_ROOT=${CODEX_REVIEW_ARTIFACT_ROOT:-"$(pwd)/.webpresso/reviews"}
|
|
122
|
-
CODEX_REVIEW_CODE=0
|
|
123
|
-
wp review run \
|
|
124
|
-
--provider codex \
|
|
125
|
-
--prompt-file "$PROMPT_FILE" \
|
|
126
|
-
"${CODEX_MODEL_ARGS[@]}" \
|
|
127
|
-
--effort "$CODEX_REVIEW_EFFORT" \
|
|
128
|
-
--stage review \
|
|
129
|
-
--artifact-root "$CODEX_REVIEW_ARTIFACT_ROOT" \
|
|
130
|
-
--idle-seconds "$CODEX_REVIEW_IDLE_SECONDS"
|
|
131
|
-
CODEX_REVIEW_CODE=$?
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
4. Summarize findings with severity, evidence, and whether you independently verified them.
|
|
34
|
+
Use authoritative mode only when formal plan or delivery approval is requested.
|
|
135
35
|
|
|
136
|
-
|
|
36
|
+
## Model policy
|
|
137
37
|
|
|
138
|
-
|
|
38
|
+
When the user names an exact model, pass it in the MCP `model` field. Otherwise omit
|
|
39
|
+
that field and let the MCP owner select the configured provider default.
|
|
139
40
|
|
|
140
|
-
|
|
41
|
+
## Review quality
|
|
141
42
|
|
|
142
|
-
|
|
43
|
+
Follow `catalog/agent/rules/review-methodology-sota.md`; report typed verdict, model,
|
|
44
|
+
artifact, grounded findings, and independently verified conclusions.
|
package/skills/fix/SKILL.md
CHANGED
|
@@ -133,9 +133,10 @@ Run the narrowest checks that prove the repaired behavior on the real repo surfa
|
|
|
133
133
|
- `wp_test` / targeted tests for the repaired path
|
|
134
134
|
- `wp_lint` / `wp_typecheck` for changed surfaces
|
|
135
135
|
- `wp_qa` only when the blast radius needs the bookend
|
|
136
|
-
- Before push: `wp_ci_preflight
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
- Before push: start `wp_ci_preflight`, then poll `wp_ci_preflight_wait` with
|
|
137
|
+
its run ID until terminal success (use global `wp ci-preflight` only when MCP
|
|
138
|
+
is unavailable). Run it after the final commit and do not edit or commit again
|
|
139
|
+
before pushing: terminal success records the exact-state receipt checked by pre-push.
|
|
139
140
|
Do not use remote CI re-runs as the primary fix loop (`ci-cost-local-first`).
|
|
140
141
|
|
|
141
142
|
Rules:
|
package/skills/grok/SKILL.md
CHANGED
|
@@ -1,32 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grok
|
|
3
|
-
description: "Grok outside-voice
|
|
3
|
+
description: "Grok outside-voice reviewer through Webpresso MCP."
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Grok outside-voice review
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Call `
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
9
|
+
Use only for a requested content-bound plan or delivery review. Treat output as external advice
|
|
10
|
+
until independently verified.
|
|
11
|
+
|
|
12
|
+
## MCP-only contract
|
|
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.
|
|
16
|
+
- Never invoke a provider command, the legacy review CLI, or a removed review-run surface.
|
|
17
|
+
- If the review MCP is unavailable, stop and report it unavailable. There is no CLI fallback.
|
|
18
|
+
|
|
19
|
+
## Advisory call
|
|
18
20
|
|
|
19
21
|
```jsonc
|
|
20
22
|
{
|
|
21
|
-
"
|
|
23
|
+
"project_id": "<project>",
|
|
24
|
+
"slug": "<blueprint-slug>",
|
|
25
|
+
"purpose": "delivery",
|
|
26
|
+
"base_ref": "<full-base-sha>",
|
|
27
|
+
"authority_ref": "<full-head-sha>",
|
|
22
28
|
"provider": "grok",
|
|
23
29
|
"repository_access": "none",
|
|
24
|
-
"
|
|
25
|
-
"stage": "review",
|
|
26
|
-
"expectedMarker": "VERDICT:",
|
|
30
|
+
"mode": "advisory",
|
|
27
31
|
}
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
Use authoritative mode only when formal plan or delivery approval is requested.
|
|
35
|
+
|
|
36
|
+
## Model policy
|
|
37
|
+
|
|
38
|
+
When the user names an exact model, pass it in the MCP `model` field. Otherwise omit
|
|
39
|
+
that field and let the MCP owner select the configured provider default.
|
|
40
|
+
|
|
41
|
+
## Review quality
|
|
42
|
+
|
|
43
|
+
Follow `catalog/agent/rules/review-methodology-sota.md`; report typed verdict, model,
|
|
44
|
+
artifact, grounded findings, and independently verified conclusions.
|
|
@@ -55,34 +55,44 @@ Each check prints `[x]` (pass) or `[ ]` (fail) with a detail line:
|
|
|
55
55
|
|
|
56
56
|
## Failure Remediation
|
|
57
57
|
|
|
58
|
-
| Check
|
|
59
|
-
|
|
|
60
|
-
| `pretool-guard` / `post-tool` / etc. — not found
|
|
61
|
-
| `pretool-guard` / etc. — not executable
|
|
62
|
-
| `plugin.json integrity` — missing
|
|
63
|
-
| `MCP server liveness` — timeout
|
|
64
|
-
|
|
|
65
|
-
| 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 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 |
|
|
66
65
|
|
|
67
66
|
### Updating the webpresso MCP server (monorepo authors)
|
|
68
67
|
|
|
69
|
-
`mcp` is **
|
|
70
|
-
|
|
68
|
+
`mcp` is **source-first**: in a checkout with TypeScript source the server runs
|
|
69
|
+
from source, so it always serves HEAD. After changing `src/mcp/**`, conversation
|
|
70
|
+
catalog, or pretool routing that MCP hosts must run:
|
|
71
71
|
|
|
72
|
-
1.
|
|
73
|
-
2.
|
|
74
|
-
`pkill -f 'dist/runtime/.*/wp mcp'` if a long-lived process sticks.
|
|
75
|
-
3. Smoke a tool only available in the new code.
|
|
72
|
+
1. Reconnect webpresso MCP in the agent host.
|
|
73
|
+
2. Smoke a tool only available in the new code.
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
No runtime rebuild is involved, and no `pkill` is needed — every launcher layer
|
|
76
|
+
owns its child's stdin, so a disconnect unwinds the whole chain. Chat-only
|
|
77
|
+
restart is still **not** enough: reconnect the server itself.
|
|
78
|
+
|
|
79
|
+
Managed `wp hook` and `wp hooks doctor|status|dispatch` commands are
|
|
80
|
+
source-authoritative and require no post-merge runtime rebuild. Existing
|
|
81
|
+
managed installations run exact `wp sync`, then rerun `wp hooks doctor` or
|
|
82
|
+
`wp hooks status` until the legacy-projection warning is absent. Packed
|
|
83
|
+
consumers continue to use the shipped compiled runtime and repair/reinstall that
|
|
84
|
+
artifact if it is missing.
|
|
85
|
+
|
|
86
|
+
**One-time upgrade step:** chains started before the source-first lane shipped
|
|
87
|
+
ran no stdin relay, so quit and reopen each MCP host once to retire them. A
|
|
88
|
+
`pkill` pattern is not a substitute — it misses source-launched chains and can
|
|
89
|
+
kill another session's server.
|
|
80
90
|
|
|
81
91
|
**Offline shell allowlist** when webpresso MCP tools are unavailable (must
|
|
82
92
|
match `dev-routing-bounded-read.ts`):
|
|
83
93
|
|
|
84
94
|
```text
|
|
85
|
-
rg -n pattern path | head -
|
|
95
|
+
rg --no-config -n pattern path 2>/dev/null | head -c 65536
|
|
86
96
|
head -n 200 path/to/file
|
|
87
97
|
git log --oneline -n 50
|
|
88
98
|
git show --stat HEAD
|
|
@@ -4,94 +4,44 @@ description: "OpenCode Go aggregate outside-voice reviewer for read-only plan, c
|
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# OpenCode Go aggregate
|
|
8
|
-
|
|
9
|
-
Use
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
|
7
|
+
# OpenCode Go aggregate outside-voice review
|
|
8
|
+
|
|
9
|
+
Use only for a requested content-bound plan or delivery review. Treat output as external advice
|
|
10
|
+
until independently verified.
|
|
11
|
+
|
|
12
|
+
## MCP-only contract
|
|
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.
|
|
16
|
+
- Never invoke a provider command, the legacy review CLI, or a removed review-run surface.
|
|
17
|
+
- If the review MCP is unavailable, stop and report it unavailable. There is no CLI fallback.
|
|
18
|
+
|
|
19
|
+
## Advisory call
|
|
20
|
+
|
|
21
|
+
```jsonc
|
|
22
|
+
{
|
|
23
|
+
"project_id": "<project>",
|
|
24
|
+
"slug": "<blueprint-slug>",
|
|
25
|
+
"purpose": "delivery",
|
|
26
|
+
"base_ref": "<full-base-sha>",
|
|
27
|
+
"authority_ref": "<full-head-sha>",
|
|
28
|
+
"provider": "opencode",
|
|
29
|
+
"model": "opencode-go/deepseek-v4-pro",
|
|
30
|
+
"repository_access": "none",
|
|
31
|
+
"mode": "advisory",
|
|
32
|
+
}
|
|
45
33
|
```
|
|
46
34
|
|
|
47
|
-
|
|
35
|
+
Use authoritative mode only when formal plan or delivery approval is requested.
|
|
48
36
|
|
|
49
|
-
|
|
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
|
|
37
|
+
## Model policy
|
|
63
38
|
|
|
64
|
-
|
|
65
|
-
|
|
39
|
+
Default exact model: `opencode-go/deepseek-v4-pro`.
|
|
40
|
+
Committed exact options: `opencode-go/deepseek-v4-pro`, `opencode-go/deepseek-v4-flash`, `opencode-go/kimi-k2.7-code`, `opencode-go/glm-5.3`, `opencode-go/minimax-m3`, `opencode-go/mimo-v2.5-pro`, `opencode-go/qwen3.8-max`, `opencode-go/mimo-v2.5`, `opencode-go/qwen3.7-plus`, `opencode-go/qwen3.7-max`, `opencode-go/qwen3.6-plus`, `opencode-go/gpt-5.6-luna`, `opencode-go/minimax-m2.7`, `opencode-go/kimi-k3`, `opencode-go/glm-5.2`, `opencode-go/kimi-k2.6`, `opencode-go/hy3`, `opencode-go/glm-5.1`, `opencode-go/grok-4.5`.
|
|
41
|
+
Use a named exact option when requested; otherwise use the default. Provider catalog discovery
|
|
42
|
+
belongs to the snapshot drift workflow, never to a skill invocation.
|
|
66
43
|
|
|
67
|
-
|
|
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
|
-
```
|
|
44
|
+
## Review quality
|
|
94
45
|
|
|
95
|
-
|
|
96
|
-
|
|
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.
|
|
46
|
+
Follow `catalog/agent/rules/review-methodology-sota.md`; report typed verdict, model,
|
|
47
|
+
artifact, grounded findings, and independently verified conclusions.
|
|
@@ -77,6 +77,7 @@ Run **1–3 (and relevant review lenses) in parallel** whenever tools allow. Do
|
|
|
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
78
|
- **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
79
|
- **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.
|
|
80
81
|
|
|
81
82
|
5. **Blueprint enforcement (max parallel).**
|
|
82
83
|
- Split for independent execution; declare `Depends`; file-conflict CP = 0 per wave; TDD/proof steps; preserve acceptance criteria.
|
|
@@ -333,18 +333,18 @@ without reading other tasks. Include: what, why, constraints, gotchas.]
|
|
|
333
333
|
**Steps (TDD):**
|
|
334
334
|
|
|
335
335
|
1. Write failing test for [specific behavior]
|
|
336
|
-
2. Run: `
|
|
336
|
+
2. Run: `wp test --files <path/to/test-file.test.ts>` — verify the current contract
|
|
337
337
|
3. Implement minimal code to pass
|
|
338
|
-
4. Run: `
|
|
338
|
+
4. Run: `wp test --files <path/to/test-file.test.ts>` — verify PASS
|
|
339
339
|
5. Refactor if needed (complexity ≤ 8)
|
|
340
|
-
6. Run: `
|
|
340
|
+
6. Run: `wp lint --files <changed-file.ts> <changed-test.ts>` and `wp typecheck --files <changed-file.ts> <changed-test.ts>`
|
|
341
341
|
|
|
342
342
|
**Acceptance:**
|
|
343
343
|
|
|
344
|
-
- [ ]
|
|
344
|
+
- [ ] Positive contract test covers the requested behavior
|
|
345
345
|
- [ ] Implementation passes all tests
|
|
346
|
-
- [ ] `
|
|
347
|
-
- [ ] `
|
|
346
|
+
- [ ] `wp lint --files <changed-files...>` passes
|
|
347
|
+
- [ ] `wp typecheck --files <changed-files...>` passes
|
|
348
348
|
```
|
|
349
349
|
|
|
350
350
|
Use `#### Task X.Y: ...` only when a lane prefix would add no value, but prefer lane-prefixed headers such as `[schema]`, `[backend]`, `[ui]`, `[infra]`, `[docs]`, or `[qa]`.
|
|
@@ -362,22 +362,22 @@ These are enforced project conventions (with webpresso's conventions as the exam
|
|
|
362
362
|
|
|
363
363
|
- Task says "1 day", "3 hours", "2 weeks" → Change to t-shirt size
|
|
364
364
|
- Task creates migration files or migration infrastructure when the repo prefers `db push` → Use the repo's chosen workflow
|
|
365
|
-
- References
|
|
365
|
+
- References a retired database command when the repo uses `db push` → Use `db push` (entity YAML → schema generation → push)
|
|
366
366
|
|
|
367
367
|
### Blueprint Validation Checklist
|
|
368
368
|
|
|
369
369
|
Run this audit on every task in the blueprint:
|
|
370
370
|
|
|
371
|
-
| Check | Violation | Fix
|
|
372
|
-
| --------------------------------- | ---------------------------------------------------- |
|
|
373
|
-
| Has `**Depends:**` line? | Missing → parallel execution can't build DAG | Add explicit dependency or "None"
|
|
374
|
-
| Has `**Files:**` section? | Missing → agents can't detect file conflicts | List every file touched (Create/Modify)
|
|
375
|
-
| Has `**Steps (TDD):**`? | Missing → agents skip tests | Add
|
|
376
|
-
| Has `**Acceptance:**` checkboxes? | Missing → no completion criteria | Add testable acceptance criteria
|
|
377
|
-
| Description self-contained? | References "see above" or "as described in Task X.Y" | Inline the context — each task runs independently
|
|
378
|
-
| Files overlap with another task? | Two tasks modify same file → conflict in parallel | Merge tasks or add explicit `**Depends:**`
|
|
379
|
-
| Uses t-shirt sizing? | Day/week estimates used | Replace with XS/S/M/L/XL
|
|
380
|
-
| Follows repo DB workflow? | Diverges from repo's chosen workflow | Use repo's chosen workflow instead
|
|
371
|
+
| Check | Violation | Fix |
|
|
372
|
+
| --------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- |
|
|
373
|
+
| Has `**Depends:**` line? | Missing → parallel execution can't build DAG | Add explicit dependency or "None" |
|
|
374
|
+
| Has `**Files:**` section? | Missing → agents can't detect file conflicts | List every file touched (Create/Modify) |
|
|
375
|
+
| Has `**Steps (TDD):**`? | Missing → agents skip tests | Add positive verification steps with exact `wp` commands |
|
|
376
|
+
| Has `**Acceptance:**` checkboxes? | Missing → no completion criteria | Add testable acceptance criteria |
|
|
377
|
+
| Description self-contained? | References "see above" or "as described in Task X.Y" | Inline the context — each task runs independently |
|
|
378
|
+
| Files overlap with another task? | Two tasks modify same file → conflict in parallel | Merge tasks or add explicit `**Depends:**` |
|
|
379
|
+
| Uses t-shirt sizing? | Day/week estimates used | Replace with XS/S/M/L/XL |
|
|
380
|
+
| Follows repo DB workflow? | Diverges from repo's chosen workflow | Use repo's chosen workflow instead |
|
|
381
381
|
|
|
382
382
|
### Granularity Rules
|
|
383
383
|
|
|
@@ -532,7 +532,7 @@ Rate the plan's parallelizability:
|
|
|
532
532
|
|
|
533
533
|
### Self-Contained Task Test
|
|
534
534
|
|
|
535
|
-
For each task, ask: **"Can an agent execute this task with ONLY the task description, the codebase, and `
|
|
535
|
+
For each task, ask: **"Can an agent execute this task with ONLY the task description, the codebase, and the repository's `wp` commands?"**
|
|
536
536
|
|
|
537
537
|
If the answer is no, the task is missing context. Common fixes:
|
|
538
538
|
|
package/skills/ralplan/SKILL.md
CHANGED
|
@@ -112,6 +112,7 @@ Rules:
|
|
|
112
112
|
- Apply findings **into the blueprint** after each review (or once after the set if independent).
|
|
113
113
|
- 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.
|
|
114
114
|
- 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.
|
|
115
|
+
- 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.
|
|
115
116
|
|
|
116
117
|
### 5. `/plan-refine` last (always)
|
|
117
118
|
|
|
@@ -34,6 +34,12 @@ wp tech-debt new "Legacy CLI complexity" \
|
|
|
34
34
|
# Preview without writing
|
|
35
35
|
wp tech-debt new "Performance bottleneck" --severity high --category mutation --dry-run
|
|
36
36
|
|
|
37
|
+
# `new` refuses on a primary-like checkout: a file written there cannot be
|
|
38
|
+
# edited afterwards under worktree discipline, so the capture is left half-done.
|
|
39
|
+
# Retry from a managed worktree, point --cwd at one, or override deliberately.
|
|
40
|
+
wp tech-debt new "Legacy CLI complexity" --cwd /path/to/managed/worktree
|
|
41
|
+
wp tech-debt new "Legacy CLI complexity" --allow-primary
|
|
42
|
+
|
|
37
43
|
# List all tech-debt items (optional filters)
|
|
38
44
|
wp tech-debt list
|
|
39
45
|
wp tech-debt list --status accepted
|
|
@@ -434,7 +434,7 @@ Before claiming a test is "done":
|
|
|
434
434
|
- [ ] **Does it use real dependencies?** (PGlite for DB, real services)
|
|
435
435
|
- [ ] **Are assertions specific?** (Not just `toBeTruthy()`)
|
|
436
436
|
- [ ] **Does it test behavior, not implementation?** (No spy assertions)
|
|
437
|
-
- [ ] **Mutation score ≥85%?** (Run `
|
|
437
|
+
- [ ] **Mutation score ≥85%?** (Run `wp test --mutation --package <pkg>`)
|
|
438
438
|
- [ ] **Does it fail if the code breaks?** (Temporarily break code, verify test fails)
|
|
439
439
|
- [ ] **Is it in the right file?** (`.test.ts` for unit, `.integration.test.ts` for DB)
|
|
440
440
|
|
|
@@ -450,23 +450,19 @@ Before claiming a test is "done":
|
|
|
450
450
|
|
|
451
451
|
## Quick Commands
|
|
452
452
|
|
|
453
|
-
These
|
|
453
|
+
These use the repository's `wp` task facade.
|
|
454
454
|
|
|
455
455
|
```bash
|
|
456
456
|
# Run tests
|
|
457
457
|
# WARNING: Never run full suites during iteration. Use single-file verification.
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
# Mutation testing
|
|
463
|
-
just test --mutation --package <package> # Full mutation test
|
|
464
|
-
just test --mutation-diff # Changed packages only
|
|
458
|
+
wp test # All tests (FINAL VERIFICATION ONLY)
|
|
459
|
+
wp test --package <package> # Specific package (FINAL VERIFICATION ONLY)
|
|
460
|
+
wp test --files path/to/test.ts # Single file (ITERATION SAFE)
|
|
465
461
|
|
|
466
462
|
# Audit quality
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
463
|
+
wp audit test-smells # Static test-quality checks
|
|
464
|
+
wp audit tph-e2e # Integration-first E2E review
|
|
465
|
+
wp qa # Full quality check
|
|
470
466
|
```
|
|
471
467
|
|
|
472
468
|
## Decision Tree
|
|
@@ -7,7 +7,7 @@ scope: repo
|
|
|
7
7
|
applies_to: [agents]
|
|
8
8
|
related: [verify, ultragoal, tech-debt, devex-review, land-policy]
|
|
9
9
|
created: "2026-08-03"
|
|
10
|
-
last_reviewed: "2026-08-
|
|
10
|
+
last_reviewed: "2026-08-11"
|
|
11
11
|
name: tooling-friction
|
|
12
12
|
description: "After land, capture MCP/CLI friction tips (optional; never blocks.)"
|
|
13
13
|
argument-hint: "[--promote] [blueprint-slug|pr-number|session]"
|
|
@@ -50,26 +50,34 @@ Optional post-land **product signal** for MCP/CLI/hooks/CI pain so Webpresso too
|
|
|
50
50
|
<state-root>/<repo-key>/tooling-friction/YYYY-MM-DD-<slug|pr|session>.json
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
absolute path
|
|
53
|
+
**Path SSOT (required):** call the read-only MCP resolver and **copy the
|
|
54
|
+
absolute path from its summary text** (hosts often omit structured details):
|
|
55
55
|
|
|
56
56
|
```text
|
|
57
57
|
wp_tooling_friction_path({"file":"YYYY-MM-DD-<slug|pr|session>.json"})
|
|
58
|
+
→ summary: tooling-friction path: <absolute-path>
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
Write only to that absolute path. Do **not** construct a path by hand.
|
|
62
|
+
|
|
63
|
+
- `repo-key` is a **16-hex** `repoIdentityV1(git-common-dir)` segment from
|
|
64
|
+
`repoIdentityV1` under the pure preferred state root — **not** a fleet worktree folder slug such
|
|
65
|
+
as `github.com-org-repo-<hash>` under `~/.webpresso/worktrees/repos/`.
|
|
66
|
+
- Scope is always **repo** (shared by every worktree of that git common
|
|
67
|
+
dir). Never use a worktree-keyed desktop-state surface for captures.
|
|
68
|
+
- Human CLI equivalent: `wp tooling-friction path --file <file>` (prints
|
|
69
|
+
the same absolute path on stdout).
|
|
70
|
+
|
|
71
|
+
Create parent dirs as needed. If the returned path already exists, choose a
|
|
72
|
+
unique session/HHMM suffix rather than overwriting it. If the surface cannot
|
|
73
|
+
be resolved or written, report `tooling-friction: skipped: no state surface`
|
|
68
74
|
and stop; never fall back to a worktree or `.agent/` path.
|
|
69
75
|
|
|
70
76
|
5. Optional `--promote` or severity `high`/`critical`:
|
|
71
77
|
`wp tech-debt new "<short title>" --severity <s> --category tooling --status accepted`
|
|
72
|
-
Set `promoted_to` to the resulting path.
|
|
78
|
+
Set `promoted_to` to the resulting path. `new` refuses on a primary-like
|
|
79
|
+
checkout; from one, pass `--cwd <managed-worktree-path>` (or `--allow-primary`
|
|
80
|
+
to override deliberately).
|
|
73
81
|
6. Optional one-line `wp_session_capture` pointer to the JSON path — no paste-back walls.
|
|
74
82
|
|
|
75
83
|
**Rate limit:** at most **one** capture per verify bookend.
|
|
@@ -77,9 +85,18 @@ Optional post-land **product signal** for MCP/CLI/hooks/CI pain so Webpresso too
|
|
|
77
85
|
## Store path (SSOT)
|
|
78
86
|
|
|
79
87
|
`wp_tooling_friction_path({"file":"<file>"})` (or the human CLI projection
|
|
80
|
-
`wp tooling-friction path --file <file>`) — a read-only projection of
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
`wp tooling-friction path --file <file>`) — a read-only projection of the pure
|
|
89
|
+
preferred state root (WP_STATE_ROOT or env-paths data; no writability fallback)
|
|
90
|
+
plus `repoIdentityV1(git-common-dir)` under `tooling-friction/<file>`. This
|
|
91
|
+
intentionally does **not** follow `getStateRoot()`'s temporary fallback when the
|
|
92
|
+
preferred root is unwritable — always copy the resolver output.
|
|
93
|
+
|
|
94
|
+
The MCP summary embeds the absolute path (`tooling-friction path: …`). Details
|
|
95
|
+
also include `path`, `repoKey` (16-hex), `stateRoot`, `scope: "repo"`, and
|
|
96
|
+
`projectRoot`. Copy the path; never invent one.
|
|
97
|
+
|
|
98
|
+
**Not** a path inside `planning/`, a checkout, or
|
|
99
|
+
`desktop-state/repos/github.com-…` (fleet worktree layout ≠ desktop-state key).
|
|
83
100
|
|
|
84
101
|
## Schema v1
|
|
85
102
|
|
|
@@ -161,6 +178,11 @@ repo-scoped desktop state surface, not a path inside `planning/` or a worktree.
|
|
|
161
178
|
6. No blueprint errata misuse
|
|
162
179
|
7. No committing desktop-state captures
|
|
163
180
|
8. No auto-open GitHub issues per tip
|
|
181
|
+
9. **Never invent the capture path** — no fleet folder slugs
|
|
182
|
+
(`github.com-org-repo-*`), no worktree-keyed desktop-state, no guessing
|
|
183
|
+
under `Application Support` or `~/.webpresso`. Always call
|
|
184
|
+
`wp_tooling_friction_path` / `wp tooling-friction path` and write to the
|
|
185
|
+
absolute path it returns
|
|
164
186
|
|
|
165
187
|
## Integration
|
|
166
188
|
|
|
@@ -171,7 +193,7 @@ repo-scoped desktop state surface, not a path inside `planning/` or a worktree.
|
|
|
171
193
|
## Output (agent reply)
|
|
172
194
|
|
|
173
195
|
```text
|
|
174
|
-
tooling-friction: wrote desktop state <
|
|
196
|
+
tooling-friction: wrote desktop state <absolute-path-from-wp_tooling_friction_path>
|
|
175
197
|
findings: 2 (high=1, medium=1)
|
|
176
198
|
promoted: none | tech-debt/...
|
|
177
199
|
```
|
|
@@ -195,11 +195,11 @@ Fallback to `wp …` CLI only when the matching MCP tool is unavailable. Prefer
|
|
|
195
195
|
the user sets N (the default value lives in `workflow-skills-routing.md`).
|
|
196
196
|
Controller validation evidence is **machine-qa (prior QA phase) + N outside voices**
|
|
197
197
|
(default N=1), not two outside model reviewers at budget 1.
|
|
198
|
-
Use `wp_review_gate` only for exact-version
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
PR babysit — no
|
|
198
|
+
Use `wp_review_gate` in the default authoritative mode only for exact-version
|
|
199
|
+
draft plan approval/auto-promotion. Use the same tool with `mode: "advisory"`
|
|
200
|
+
for implementation/phase outside voice; it never mutates blueprint approval
|
|
201
|
+
state on its own. A CLI delivery gate is explicit MCP-unavailable
|
|
202
|
+
compatibility only, not this MCP contract. Use `wp_pr_*` for PR babysit — no
|
|
203
203
|
multi-sleep poll loops; no parallel multi-reviewer stampede.
|
|
204
204
|
8. Stop on `complete`, `cancelled`, blocked guard exhaustion, or `WP_ULTRAGOAL_DISABLE=1`.
|
|
205
205
|
|
|
@@ -217,15 +217,16 @@ primary checkout.
|
|
|
217
217
|
|
|
218
218
|
## Outside-voice review (required for autopilot)
|
|
219
219
|
|
|
220
|
-
Autopilot and agent-driven ultragoal loops **must** request an **OpenCode Go** outside-voice review after each **goal/phase milestone**, and must pick the model by purpose. Use **`wp_review_gate`** only for exact-version draft plan approval/auto-promotion. Use single-shot **`
|
|
220
|
+
Autopilot and agent-driven ultragoal loops **must** request an **OpenCode Go** outside-voice review after each **goal/phase milestone**, and must pick the model by purpose. Use **`wp_review_gate`** in the default authoritative mode only for exact-version draft plan approval/auto-promotion. Use a single-shot **`wp_review_gate`** call with **`mode: "advisory"`** for implementation/phase outside voice; it never mutates blueprint approval state on its own — a later authoritative call may promote a matching advisory approval without re-invoking a provider. CLI delivery gates are explicit MCP-unavailable compatibility only, not this MCP contract.
|
|
221
221
|
|
|
222
222
|
Count each milestone review against `review_budget` for merge-ready claims: **exactly one sequential** reviewer path unless the user sets N; the default value is owned by `workflow-skills-routing.md`. Prefer purpose-matched OpenCode Go first; do not fan out multi-host review swarms.
|
|
223
223
|
|
|
224
224
|
### Milestones that require a review
|
|
225
225
|
|
|
226
|
-
Run `wp_review_gate` only for the plan approval
|
|
227
|
-
single-shot `
|
|
228
|
-
|
|
226
|
+
Run `wp_review_gate` (default authoritative mode) only for the plan approval
|
|
227
|
+
milestone below. Run one single-shot `wp_review_gate` call with `mode:
|
|
228
|
+
"advisory"` for implementation/phase milestones; it is advisory and does not
|
|
229
|
+
promote or otherwise mutate blueprint approval state on its own.
|
|
229
230
|
|
|
230
231
|
| Milestone | When |
|
|
231
232
|
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
package/skills/verify/SKILL.md
CHANGED
|
@@ -41,18 +41,18 @@ the preferred skill (`claude` / `codex` / `grok` / one OpenCode Go), then stops.
|
|
|
41
41
|
|
|
42
42
|
## Tooling map
|
|
43
43
|
|
|
44
|
-
| Gate | Prefer
|
|
45
|
-
| ------------------------- |
|
|
46
|
-
| Lint / types / tests / QA | `wp_lint`, `wp_typecheck`, `wp_test`, `wp_qa`
|
|
47
|
-
| Format | `wp_format`
|
|
48
|
-
| Audits | `wp_audit`, `wp_audits`
|
|
49
|
-
| Blueprint | blueprint MCP tools + `wp_audit`
|
|
50
|
-
| PR / CI wait | `wp_pr_status`, `wp_pr_wait` (not multi-sleep loops)
|
|
51
|
-
| Release | `wp_release_progress` for live Release phases; `wp_release_readiness` for package gates
|
|
52
|
-
| Large output | `wp_session_execute` / `batch_execute` / `execute_file`
|
|
53
|
-
| Continuity | `wp_session_capture` for verify summary; avoid paste-back walls
|
|
54
|
-
| E2E / act | `wp_e2e`, `wp_ci_act` when the change requires them
|
|
55
|
-
| Outside authority | `wp_review_gate` for plans; `
|
|
44
|
+
| Gate | Prefer |
|
|
45
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
46
|
+
| Lint / types / tests / QA | `wp_lint`, `wp_typecheck`, `wp_test`, `wp_qa` |
|
|
47
|
+
| Format | `wp_format` |
|
|
48
|
+
| Audits | `wp_audit`, `wp_audits` |
|
|
49
|
+
| Blueprint | blueprint MCP tools + `wp_audit` |
|
|
50
|
+
| PR / CI wait | `wp_pr_status`, `wp_pr_wait` (not multi-sleep loops) |
|
|
51
|
+
| Release | `wp_release_progress` for live Release phases; `wp_release_readiness` for package gates |
|
|
52
|
+
| Large output | `wp_session_execute` / `batch_execute` / `execute_file` |
|
|
53
|
+
| Continuity | `wp_session_capture` for verify summary; avoid paste-back walls |
|
|
54
|
+
| E2E / act | `wp_e2e`, `wp_ci_act` when the change requires them |
|
|
55
|
+
| Outside authority | `wp_review_gate` (authoritative) for plans; `wp_review_gate` with `mode: "advisory"` for implementation |
|
|
56
56
|
|
|
57
57
|
## Iron law — evidence before claims
|
|
58
58
|
|
|
@@ -145,17 +145,21 @@ Run the narrowest checks that prove the touched behavior:
|
|
|
145
145
|
**Before push or PR open/update**, run the pre-push owner end-to-end:
|
|
146
146
|
|
|
147
147
|
```text
|
|
148
|
-
wp_ci_preflight({})
|
|
148
|
+
start = wp_ci_preflight({})
|
|
149
|
+
wp_ci_preflight_wait({ runId: start.details.operation.runId })
|
|
149
150
|
```
|
|
150
151
|
|
|
152
|
+
The start result is not a gate verdict. Poll again when wait returns
|
|
153
|
+
`in_progress`; only terminal `success` authorizes push or PR mutation.
|
|
154
|
+
|
|
151
155
|
MCP-unavailable CLI fallback:
|
|
152
156
|
|
|
153
157
|
```bash
|
|
154
158
|
wp ci-preflight
|
|
155
159
|
```
|
|
156
160
|
|
|
157
|
-
That
|
|
158
|
-
|
|
161
|
+
That runs the repository-owned, branch-scoped required-check plan fail-fast.
|
|
162
|
+
Run it after the final commit and make no further worktree or base-ref
|
|
159
163
|
changes before pushing. Agent-kit's `.husky/pre-push` checks the resulting
|
|
160
164
|
exact-state receipt without rerunning the suite after Git opens the remote
|
|
161
165
|
transport; consumer repos may keep pre-push checks user-owned. Do **not** claim
|
|
@@ -168,7 +172,7 @@ Rules:
|
|
|
168
172
|
- Never claim broader correctness than the commands actually proved.
|
|
169
173
|
- If the repo documents a "full QA" bookend, reserve `wp_qa` / `--full` for the final broad pass rather than every iteration.
|
|
170
174
|
- If CI is already red: read the failed job log, reproduce with the matching
|
|
171
|
-
local `wp_ci_preflight` (or the `wp ci-preflight` CLI fallback), fix, then push **one**
|
|
175
|
+
local `wp_ci_preflight` + `wp_ci_preflight_wait` flow (or the `wp ci-preflight` CLI fallback), fix, then push **one**
|
|
172
176
|
corrective commit — do not burn another full matrix “to check.”
|
|
173
177
|
|
|
174
178
|
## Phase 3 — Cross-surface impact scan
|
|
@@ -259,17 +263,33 @@ Do not substitute mutable branch names for authority when the audit needs a SHA.
|
|
|
259
263
|
SSOT: `evaluateSensitiveReviewPolicy` in `src/review/sensitive-review-policy.ts`;
|
|
260
264
|
CI job in `.github/workflows/pr-policy.yml`.
|
|
261
265
|
|
|
262
|
-
### 2. Sensitive → delivery
|
|
266
|
+
### 2. Sensitive → delivery to terminal verdict
|
|
263
267
|
|
|
264
268
|
When classification is **sensitive**:
|
|
265
269
|
|
|
266
270
|
- Require delivery review via `risk-review-coverage` / `wp_review_gate`
|
|
267
271
|
(purpose delivery) / qualifying lane approvals for the current
|
|
268
|
-
|
|
269
|
-
-
|
|
272
|
+
review subject until `policySatisfied` (**approval** or valid same-subject
|
|
273
|
+
**maintainer-override**). A formal **reject** is a terminal automated-review
|
|
274
|
+
outcome but does **not** satisfy land policy: Product status stays
|
|
275
|
+
`incomplete`, Process status stays `sensitive-blocked` until approval or
|
|
276
|
+
override. Tech-debt is **not** a substitute for delivery approval.
|
|
277
|
+
- Launch **exactly one at a time** `wp_review_gate` delivery attempt with
|
|
270
278
|
`--base-ref <base-sha>` and `--authority-ref <head-sha>`. Do not substitute
|
|
271
279
|
`HEAD` for the authority SHA, and do not relaunch while the same subject has
|
|
272
280
|
an in-progress gate.
|
|
281
|
+
- On formal **reject**: surface the gate `next_action` (`report_delivery_reject`)
|
|
282
|
+
/ reject projection to the user; free-triage against blueprint non-goals;
|
|
283
|
+
address the findings, then re-review only a changed exact subject. The shared
|
|
284
|
+
gate permits five distinct rejected delivery subjects by default. Once that
|
|
285
|
+
budget is exhausted, **do not** set `scope_continue=true` without explicit
|
|
286
|
+
user authorization; agents must not invent the grant. For plan or delivery,
|
|
287
|
+
only an operator may request an absolute finite same-slug ceiling through MCP
|
|
288
|
+
`scope_continue_limit` (10..32); the field still requires
|
|
289
|
+
`scope_continue=true`. MCP wins over `WP_REVIEW_SCOPE_CONTINUE_LIMIT`; when
|
|
290
|
+
neither is present, the plan/delivery defaults are 16/10. Machine enforcement
|
|
291
|
+
does not link successor slugs; creating one to launder or bypass the budget
|
|
292
|
+
remains procedurally forbidden, as do resets and retry schemes.
|
|
273
293
|
- `Review-skip` is **FORBIDDEN** (`sensitive-review-skip-forbidden`).
|
|
274
294
|
- Completed owner blueprint must be present in the PR
|
|
275
295
|
(`sensitive-no-completed-owner` otherwise).
|
|
@@ -289,7 +309,7 @@ When classification is **standard**:
|
|
|
289
309
|
Must be start-of-line. Process label: `standard-skip`.
|
|
290
310
|
|
|
291
311
|
- Otherwise obtain **exactly one sequential** advisory outside voice
|
|
292
|
-
(`
|
|
312
|
+
(`wp_review_gate` with `mode: "advisory"`, or host skill). Process label: `outside-approved`.
|
|
293
313
|
- At most **one OpenCode Go reviewer** counts unless the user asks for more.
|
|
294
314
|
- Invoke the selected reviewer **once**. Do not probe, retry, or rotate
|
|
295
315
|
providers automatically, and **never** fan out parallel multi-host review
|
|
@@ -326,9 +346,25 @@ Never invent a land-now skip. See `land-policy` for the full table.
|
|
|
326
346
|
`not_found` means there is no active or terminal gate for that subject; refresh
|
|
327
347
|
state and start the gate again instead of continuing to wait.
|
|
328
348
|
- Implementation / delivery approval: for sensitive PRs use `wp_review_gate`
|
|
329
|
-
purpose delivery on the immutable subject; for
|
|
330
|
-
|
|
331
|
-
|
|
349
|
+
purpose delivery, default authoritative mode, on the immutable subject; for
|
|
350
|
+
standard advisory use the same `wp_review_gate` call with `mode: "advisory"`
|
|
351
|
+
exactly once with the selected provider. Do not run a separate provider
|
|
352
|
+
probe. A later authoritative call on the same subject may promote a
|
|
353
|
+
matching complete advisory approval to authority with zero provider
|
|
354
|
+
invocation, unless a completed reject already exists for that content at
|
|
355
|
+
either stage.
|
|
356
|
+
- `advisory-exhausted` is a terminal outcome with no ledger event and no
|
|
357
|
+
verdict — treat it as terminal-without-authority. It means this exact
|
|
358
|
+
digest already used its advisory attempt budget; do not retry the same
|
|
359
|
+
content or report it as a failure. Change the reviewed content (which mints
|
|
360
|
+
a new digest) or spend real authoritative budget instead. It is always
|
|
361
|
+
returned synchronously; no `wp_review_gate_wait` poll is ever needed or
|
|
362
|
+
issued for it.
|
|
363
|
+
- An advisory gate and an authoritative gate on the same subject cannot run
|
|
364
|
+
concurrently — unlike the removed `wp_review_run`, an advisory
|
|
365
|
+
`wp_review_gate` call claims the same active marker an authoritative call
|
|
366
|
+
does. If a call reports marker contention, serialize the two calls rather
|
|
367
|
+
than treating contention as an error.
|
|
332
368
|
- Each gate reviewer must return exactly one schema-valid JSON review object;
|
|
333
369
|
never infer a verdict from Markdown. The gate derives approval from typed
|
|
334
370
|
findings: blockers reject, nits approve with nits, and no findings approve.
|
|
@@ -356,7 +392,9 @@ If any required check is missing, the correct result is **not done yet**, not a
|
|
|
356
392
|
|
|
357
393
|
**Tooling friction (optional):** if this session burned medium+ tokens on MCP/CLI/hooks/CI
|
|
358
394
|
gates (not product code), run `/tooling-friction` once and resolve its capture
|
|
359
|
-
destination with `wp_tooling_friction_path({"file":"<file>"})`
|
|
360
|
-
`wp tooling-friction path --file <file>`).
|
|
361
|
-
|
|
362
|
-
|
|
395
|
+
destination with `wp_tooling_friction_path({"file":"<file>"})` — copy the absolute
|
|
396
|
+
path from the tool summary (human CLI: `wp tooling-friction path --file <file>`).
|
|
397
|
+
Do not invent fleet folder slugs or worktree-keyed desktop-state paths. Skip when
|
|
398
|
+
the path was smooth. If the surface cannot be resolved or written, report the skip
|
|
399
|
+
and never fall back to a worktree path. Never blocks land — see the
|
|
400
|
+
`tooling-friction` skill.
|