@webpresso/plugin-codex 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.
- package/.codex-plugin/plugin.json +23 -0
- package/.mcp.json +9 -0
- package/LICENSE +104 -0
- package/bin/wp +60 -0
- package/hooks/hooks.json +3 -0
- package/package.json +40 -0
- package/plugin-skill-ownership.json +99 -0
- package/skills/ai-deslop/SKILL.md +91 -0
- package/skills/autopilot/SKILL.md +77 -0
- package/skills/autoresearch/SKILL.md +49 -0
- package/skills/best-practice-research/SKILL.md +89 -0
- package/skills/browse/SKILL.md +25 -0
- package/skills/claude/SKILL.md +186 -0
- package/skills/codex/SKILL.md +142 -0
- package/skills/deep-interview/LICENSE.txt +28 -0
- package/skills/deep-interview/SKILL.md +269 -0
- package/skills/deep-research/SKILL.md +258 -0
- package/skills/delivery-program/SKILL.md +57 -0
- package/skills/design-review/SKILL.md +26 -0
- package/skills/devex-review/SKILL.md +28 -0
- package/skills/fix/SKILL.md +174 -0
- package/skills/grok/SKILL.md +32 -0
- package/skills/hooks-doctor/SKILL.md +78 -0
- package/skills/investigate/SKILL.md +72 -0
- package/skills/lore-protocol/SKILL.md +84 -0
- package/skills/opencode-go/SKILL.md +97 -0
- package/skills/plan-ceo-review/SKILL.md +27 -0
- package/skills/plan-design-review/SKILL.md +27 -0
- package/skills/plan-devex-review/SKILL.md +19 -0
- package/skills/plan-eng-review/SKILL.md +24 -0
- package/skills/plan-refine/SKILL.md +50 -0
- package/skills/plan-refine/references/full-methodology.md +645 -0
- package/skills/ralplan/SKILL.md +50 -0
- package/skills/team/SKILL.md +77 -0
- package/skills/tech-debt/SKILL.md +79 -0
- package/skills/testing-philosophy/SKILL.md +53 -0
- package/skills/testing-philosophy/references/full-testing-philosophy.md +523 -0
- package/skills/tph/SKILL.md +35 -0
- package/skills/ultragoal/SKILL.md +179 -0
- package/skills/verify/SKILL.md +283 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: skill
|
|
3
|
+
slug: ultragoal
|
|
4
|
+
title: Ultragoal
|
|
5
|
+
status: active
|
|
6
|
+
scope: repo
|
|
7
|
+
applies_to: [agents]
|
|
8
|
+
related: [autopilot, plan-refine, verify, fix, opencode-go]
|
|
9
|
+
created: "2026-07-10"
|
|
10
|
+
last_reviewed: "2026-07-21"
|
|
11
|
+
name: ultragoal
|
|
12
|
+
description: "Run durable multi-blueprint ultragoals through evidence-gated handoffs."
|
|
13
|
+
argument-hint: "<new|status|handoff|run|cancel> [brief]"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Ultragoal
|
|
17
|
+
|
|
18
|
+
Use `wp ultragoal` / MCP `wp_ultragoal_*` as the durable controller for work spanning
|
|
19
|
+
one or more blueprints. Prefer this spine over host-local mega-sessions or ad-hoc
|
|
20
|
+
multi-agent swarms.
|
|
21
|
+
|
|
22
|
+
## Default budgets (override only when the user sets them)
|
|
23
|
+
|
|
24
|
+
| Budget | Default | Meaning |
|
|
25
|
+
| --------------- | -------------------------------- | -------------------------------------------------- |
|
|
26
|
+
| `concurrency` | 4 (max 8) | Parallel ready tasks / implementer lanes |
|
|
27
|
+
| `fix_budget` | 1 | Pre-existing issues fixable via `/fix` this phase |
|
|
28
|
+
| `review_budget` | see `workflow-skills-routing.md` | Outside-voice reviewer paths, local vs merge-ready |
|
|
29
|
+
| `loop` | off | Do not run `/loop` or unbounded stop-hooks |
|
|
30
|
+
|
|
31
|
+
Reject unbudgeted sleep-mode briefs (“complete all”, “full autopilot”, “go to sleep”)
|
|
32
|
+
unless they name a blueprint/slug, budgets, and a stop condition. Route vague briefs
|
|
33
|
+
through `plan-refine` first (or require `force:` only when the user explicitly opts out).
|
|
34
|
+
|
|
35
|
+
## Tooling map (use these; do not reimplement with Bash)
|
|
36
|
+
|
|
37
|
+
| Phase | Prefer MCP / CLI | Purpose |
|
|
38
|
+
| ---------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
39
|
+
| Create / resume | `wp_ultragoal_new`, `wp_ultragoal_status` | Durable controller state |
|
|
40
|
+
| Isolation | `wp_worktree` | Owner / lane worktrees; never primary as controller |
|
|
41
|
+
| Blueprint read | `wp_blueprint_list`, `wp_blueprint_get`, `wp_blueprint_context` | Ready-set and deps |
|
|
42
|
+
| Blueprint write | `wp_blueprint_put`, `wp_blueprint_transition` | Spec edits (MCP-only for blueprints) |
|
|
43
|
+
| Task done | `wp_blueprint_task_verify` only | Evidence-gated completion |
|
|
44
|
+
| Parallel execute | `/goal` (autopilot) or ready-queue + host subagents | Max parallel when deps allow |
|
|
45
|
+
| Context-light delegate | `wp_session_context` | Manifest for subagents (no history paste) |
|
|
46
|
+
| Continuity | `wp_session_capture`, `wp_session_search`, `wp_session_restore`, `wp_session_snapshot` | Decisions / resume |
|
|
47
|
+
| Large command / file | `wp_session_execute`, `wp_session_batch_execute`, `wp_session_execute_file` | Bounded output + index |
|
|
48
|
+
| QA | `wp_qa` (or `wp_lint` + `wp_typecheck` + `wp_test`) | Affected quality gates |
|
|
49
|
+
| PR / land | `wp_pr_upsert`, `wp_pr_status`, `wp_pr_wait`, `wp_pr_merge` | Open early; exact-head merge only |
|
|
50
|
+
| Delivery programs | `wp_delivery_status` | Derive one dispatch/integration action |
|
|
51
|
+
| Fleet / workers | `wp_fleet_status`, `wp_worker_tail` | Multi-session visibility |
|
|
52
|
+
| Token gain | `wp_gain` | Optional efficiency check after heavy execute |
|
|
53
|
+
| Advance loop | `wp_ultragoal_run`, `wp_ultragoal_handoff`, `wp_ultragoal_cancel` | Controller steps only |
|
|
54
|
+
|
|
55
|
+
Fallback to `wp …` CLI only when the matching MCP tool is unavailable. Prefer `wp` >
|
|
56
|
+
`vp` > raw package managers. Never raise timeouts to hide hangs.
|
|
57
|
+
|
|
58
|
+
## Protocol
|
|
59
|
+
|
|
60
|
+
1. Create or resume the ultragoal in a **managed blueprint owner worktree**
|
|
61
|
+
(`wp_worktree` / `wp_blueprint_put`). Never use `main` or the primary checkout
|
|
62
|
+
as controller.
|
|
63
|
+
2. Print the **ready-set**: tasks whose dependencies are satisfied (from blueprint tools).
|
|
64
|
+
3. Launch up to `concurrency` independent ready tasks in parallel (worktree-isolated).
|
|
65
|
+
Serialize only when file ownership overlaps or deps require it.
|
|
66
|
+
4. Execute only the current phase handoff; call `wp_ultragoal_run` again after evidence.
|
|
67
|
+
5. Mark tasks done **only** via `wp_blueprint_task_verify` with passing evidence.
|
|
68
|
+
6. **Opportunistic `/fix`:** at most `fix_budget` pre-existing issues per phase, each with
|
|
69
|
+
named invariant + failing proof. Excess → handoff backlog (do not expand epic).
|
|
70
|
+
7. **Validate / land:** local proof with `wp_qa` / targeted tools; outside review only when
|
|
71
|
+
merge-ready and within `review_budget` — **exactly one sequential** outside voice unless
|
|
72
|
+
the user sets N (the default value lives in `workflow-skills-routing.md`).
|
|
73
|
+
Use `wp_review_gate` only for exact-version draft plan approval/auto-promotion.
|
|
74
|
+
Use advisory `wp_review_run` for implementation/phase outside voice; it never
|
|
75
|
+
mutates blueprint approval state. A CLI delivery gate is explicit
|
|
76
|
+
MCP-unavailable compatibility only, not this MCP contract. Use `wp_pr_*` for
|
|
77
|
+
PR babysit — no
|
|
78
|
+
multi-sleep poll loops; no parallel multi-reviewer stampede.
|
|
79
|
+
8. Stop on `complete`, `cancelled`, blocked guard exhaustion, or `WP_ULTRAGOAL_DISABLE=1`.
|
|
80
|
+
|
|
81
|
+
The blueprint engine owns task status and approval gates. The ultragoal controller must
|
|
82
|
+
never self-approve, directly mark a task done, bypass review provenance, or mutate the
|
|
83
|
+
primary checkout.
|
|
84
|
+
|
|
85
|
+
## Failure / cascade
|
|
86
|
+
|
|
87
|
+
- Hard fail on a task → mark blocked with reason; **cascade-skip** dependents that cannot
|
|
88
|
+
proceed; continue independent ready work.
|
|
89
|
+
- Lifecycle mutation failure → stop (do not continue on stale plan state).
|
|
90
|
+
- On block: call `wp_ultragoal_handoff` and emit a **≤40-line handoff**: goal, done, blockers,
|
|
91
|
+
evidence refs (`wp_session_*` ids if any), next 3 commands. Do not paste full transcripts.
|
|
92
|
+
|
|
93
|
+
## Outside-voice review (required for autopilot)
|
|
94
|
+
|
|
95
|
+
Autopilot and agent-driven ultragoal loops **must** request an **OpenCode Go** outside-voice review after each **goal/phase milestone**, and must pick the model by purpose. Use **`wp_review_gate`** only for exact-version draft plan approval/auto-promotion. Use single-shot **`wp_review_run`** for implementation/phase outside voice; it is advisory and never mutates blueprint approval state. CLI delivery gates are explicit MCP-unavailable compatibility only, not this MCP contract.
|
|
96
|
+
|
|
97
|
+
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.
|
|
98
|
+
|
|
99
|
+
### Milestones that require a review
|
|
100
|
+
|
|
101
|
+
Run `wp_review_gate` only for the plan approval milestone below. Run one
|
|
102
|
+
single-shot `wp_review_run` for implementation/phase milestones; it is advisory
|
|
103
|
+
and does not promote or otherwise mutate blueprint approval state.
|
|
104
|
+
|
|
105
|
+
| Milestone | When |
|
|
106
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
107
|
+
| Plan gate | Before `draft` → `planned`, using the exact version returned by `wp_blueprint_put`; approval may auto-promote the same version |
|
|
108
|
+
| Phase advance | After ultragoal advances `plan` → `execute`, `execute` → `qa`, `qa` → `validate`, `validate` → `land`, or lands `complete` |
|
|
109
|
+
| Task batch handoff | After a meaningful execute batch when the phase remains `execute` (at least once per blueprint before claiming execute-complete) |
|
|
110
|
+
|
|
111
|
+
Do **not** invent ledger approvals. If OpenCode Go is unavailable or hits a provider-wide usage limit, capture the failure evidence and use Grok on the next invocation (`--provider grok` / `/grok`); do not hop OpenCode families or substitute a forged approval.
|
|
112
|
+
|
|
113
|
+
### Purpose → model routing (no hardcoding IDs)
|
|
114
|
+
|
|
115
|
+
Resolve models from the live catalog every time:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
opencode models opencode-go
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Selection order and the purpose→family mapping live in one place: the committed
|
|
122
|
+
reviewer policy (`packages/workflow-skills/src/opencode-reviewer-policy.ts`),
|
|
123
|
+
rendered into the `opencode-go` skill and drift-gated against it.** Follow that
|
|
124
|
+
skill; do not restate the ordering here. A second copy of a preference list is a
|
|
125
|
+
second thing to update, and the copy that goes stale is the one an agent reads.
|
|
126
|
+
|
|
127
|
+
Treat a provider-wide usage limit as terminal for every OpenCode Go model in the current review window; do not hop OpenCode families to evade a usage block. Use Grok as the next outside-voice substitute instead.
|
|
128
|
+
|
|
129
|
+
### Plan gate invocation shape
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
wp_review_gate({
|
|
133
|
+
"project_id": "<project-id>",
|
|
134
|
+
"slug": "<blueprint-slug>",
|
|
135
|
+
"expected_version": "bpv1:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
|
|
136
|
+
"repository_access": "read-only",
|
|
137
|
+
"auto_promote": true,
|
|
138
|
+
"provider": "opencode",
|
|
139
|
+
"model": "<selected-model>",
|
|
140
|
+
"effort": "medium"
|
|
141
|
+
})
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The plan gate has no `purpose` or `target` field. Pass the exact `bpv1:` token
|
|
145
|
+
returned by `wp_blueprint_put`, never a commit hash or `HEAD`. An explicitly
|
|
146
|
+
requested CLI delivery gate is an MCP-unavailable compatibility fallback only.
|
|
147
|
+
If the MCP host returns before a terminal result, poll the same invocation with
|
|
148
|
+
`wp_review_gate_wait`; treat in-progress, not-found, contention, waiter timeout,
|
|
149
|
+
waiter abort, and cancellation as non-verdict observation states. `not_found`
|
|
150
|
+
means no active or terminal gate exists for that subject; refresh state and
|
|
151
|
+
start the gate again instead of spinning a wait loop.
|
|
152
|
+
|
|
153
|
+
### Honesty rules (non-negotiable)
|
|
154
|
+
|
|
155
|
+
- Never self-approve or hand-edit `reviews.md` / `review-events.jsonl` / frontmatter approvals to fake OpenCode Go authority.
|
|
156
|
+
- Never mark blueprint tasks done except through `wp_blueprint_task_verify` with real evidence.
|
|
157
|
+
- Never run ultragoal mutations on `main` or a primary checkout; use the managed blueprint owner worktree.
|
|
158
|
+
- Keep every loop bounded and never increase timeouts.
|
|
159
|
+
- When the controller returns `waiting` (`blueprint-promotion`, `approval-gate`, `blueprint-tasks`, …), fix the named gap; do not spin `wp ultragoal run` without progress.
|
|
160
|
+
|
|
161
|
+
## Tooling-aligned evidence (QA / land)
|
|
162
|
+
|
|
163
|
+
- **QA phase** prefers **GitHub required checks** for the worktree PR (`wp_pr_status` /
|
|
164
|
+
`wp_pr_wait` or `gh pr checks --required`) when PR is `OPEN`/`MERGED`, checks green, and
|
|
165
|
+
PR head matches clean worktree HEAD.
|
|
166
|
+
- If no PR-bound green CI is available, fall back to local **`wp_qa`**.
|
|
167
|
+
- Open a PR early so CI can satisfy QA. Do **not** raise timeouts.
|
|
168
|
+
- **Land** still requires a **MERGED** PR with green required checks bound to the projected
|
|
169
|
+
source snapshot. Use `/verify --merge-ready` (merge-ready `review_budget`, per
|
|
170
|
+
`workflow-skills-routing.md`), not default local verify.
|
|
171
|
+
|
|
172
|
+
## Snapshot / dirty worktree
|
|
173
|
+
|
|
174
|
+
- Ultragoal ledger appends to blueprint `reviews.md` / `review-events.jsonl` /
|
|
175
|
+
`review-artifacts/**`.
|
|
176
|
+
- These paths under both `blueprints/**` and monorepo `webpresso/blueprints/**` are
|
|
177
|
+
**evidence-only dirt** and must not fail `createCleanSourceSnapshot`.
|
|
178
|
+
- Dirty **source** paths (including `_overview.md` task status edits) still fail closed
|
|
179
|
+
until committed. Use `wp_session_snapshot` before risky branch switches.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: skill
|
|
3
|
+
slug: verify
|
|
4
|
+
title: Verify
|
|
5
|
+
status: active
|
|
6
|
+
scope: repo
|
|
7
|
+
applies_to: [agents]
|
|
8
|
+
related: [testing-philosophy, tph]
|
|
9
|
+
created: "2026-05-07"
|
|
10
|
+
last_reviewed: "2026-07-21"
|
|
11
|
+
name: verify
|
|
12
|
+
description: "Post-implementation quality gate: run checks, TPH audit, cleanup, docs, proof."
|
|
13
|
+
argument-hint: "<target> [--full|--merge-ready] where target is: package|file|plan-slug|all"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Verify
|
|
17
|
+
|
|
18
|
+
Post-implementation quality gate. Run after implementation exists, before claiming `done`.
|
|
19
|
+
|
|
20
|
+
`/fix` owns investigation-if-missing, root-cause analysis, and the minimal
|
|
21
|
+
repair. `/verify` owns the broader question: **is this work actually complete,
|
|
22
|
+
integrated, and free of stale garbage?**
|
|
23
|
+
|
|
24
|
+
## Modes
|
|
25
|
+
|
|
26
|
+
| Invocation | Outside voice | When |
|
|
27
|
+
| -------------------------------- | ---------------------------------- | ------------------------------ |
|
|
28
|
+
| `/verify <target>` (default) | **0** | Local completeness / iteration |
|
|
29
|
+
| `/verify <target> --full` | **0** (broader local gates) | Full local QA bookend |
|
|
30
|
+
| `/verify <target> --merge-ready` | **exactly 1** (unless user sets N) | Claiming merge-ready / land |
|
|
31
|
+
|
|
32
|
+
Default `/verify` must **not** spawn outside reviewers. That stampede is a known
|
|
33
|
+
token/time failure mode. Merge-ready runs **one** sequential outside voice via
|
|
34
|
+
the preferred skill (`claude` / `codex` / `grok` / one OpenCode Go), then stops.
|
|
35
|
+
|
|
36
|
+
## Tooling map
|
|
37
|
+
|
|
38
|
+
| Gate | Prefer |
|
|
39
|
+
| ------------------------- | --------------------------------------------------------------------------------------- |
|
|
40
|
+
| Lint / types / tests / QA | `wp_lint`, `wp_typecheck`, `wp_test`, `wp_qa` |
|
|
41
|
+
| Format | `wp_format` |
|
|
42
|
+
| Audits | `wp_audit`, `wp_audits` |
|
|
43
|
+
| Blueprint | blueprint MCP tools + `wp_audit` |
|
|
44
|
+
| PR / CI wait | `wp_pr_status`, `wp_pr_wait` (not multi-sleep loops) |
|
|
45
|
+
| Release | `wp_release_progress` for live Release phases; `wp_release_readiness` for package gates |
|
|
46
|
+
| Large output | `wp_session_execute` / `batch_execute` / `execute_file` |
|
|
47
|
+
| Continuity | `wp_session_capture` for verify summary; avoid paste-back walls |
|
|
48
|
+
| E2E / act | `wp_e2e`, `wp_ci_act` when the change requires them |
|
|
49
|
+
| Outside authority | `wp_review_gate` for plans; `wp_review_run` for implementation |
|
|
50
|
+
|
|
51
|
+
## Iron law — evidence before claims
|
|
52
|
+
|
|
53
|
+
No completion claim without fresh verification evidence.
|
|
54
|
+
|
|
55
|
+
Before saying `done`, `fixed`, `passes`, or `clean`:
|
|
56
|
+
|
|
57
|
+
1. Identify the command or log that proves the claim.
|
|
58
|
+
2. Run it now, or cite the fresh log from the just-completed run.
|
|
59
|
+
3. Read the exit code and summary — do not infer from partial output.
|
|
60
|
+
4. State the actual result, including the log path when the repo records one.
|
|
61
|
+
5. If another agent made the change, inspect the diff yourself before repeating the claim.
|
|
62
|
+
|
|
63
|
+
Not sufficient: "should pass", "looks correct", lint-only evidence for runtime claims, or another agent's success report without independent verification.
|
|
64
|
+
|
|
65
|
+
## Usage
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
/verify <target>
|
|
69
|
+
/verify <target> --full
|
|
70
|
+
/verify <target> --merge-ready
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`<target>` is a file path, package name, blueprint slug, or `all`.
|
|
74
|
+
|
|
75
|
+
Follow the repo's current routing and command surface:
|
|
76
|
+
|
|
77
|
+
- use MCP `wp_*` / repo-owned quality wrappers first
|
|
78
|
+
- use bounded session-memory tooling for large output
|
|
79
|
+
- reuse fresh logs instead of re-running broad commands just to inspect output
|
|
80
|
+
|
|
81
|
+
## Folded health dashboard
|
|
82
|
+
|
|
83
|
+
`/health` is folded into this quality gate. When the user asks for repo health,
|
|
84
|
+
run the available repo facades only as far as needed, then return a concise
|
|
85
|
+
scorecard: score, pass/fail table, top risks, skipped checks with reasons, and
|
|
86
|
+
the next command that most improves confidence.
|
|
87
|
+
|
|
88
|
+
## Folded testing-philosophy gate
|
|
89
|
+
|
|
90
|
+
`/tph` is folded into this quality gate. Every `/verify` run must apply the
|
|
91
|
+
Testing Philosophy Helper, not leave test-quality review as an optional separate
|
|
92
|
+
workflow:
|
|
93
|
+
|
|
94
|
+
1. Load the `tph`/`testing-philosophy` skill guidance before judging changed tests.
|
|
95
|
+
2. Run the repo audit when available:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
wp_audit({"kind":"test-smells"})
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use the global `wp audit test-smells` command only when MCP is unavailable.
|
|
102
|
+
|
|
103
|
+
3. Treat TPH findings as verification findings: over-mocking, weak assertions,
|
|
104
|
+
tautologies, implementation-only spy assertions, wrong test placement, or
|
|
105
|
+
missing integration/E2E coverage can block a `done` or `merge-ready` claim.
|
|
106
|
+
4. If no tests changed, still run or explicitly cite the fresh TPH audit result
|
|
107
|
+
and state that no test-quality diff review was needed.
|
|
108
|
+
|
|
109
|
+
## Phase 0 — Scope and evidence map
|
|
110
|
+
|
|
111
|
+
1. Identify target type (file / package / blueprint slug / all).
|
|
112
|
+
2. Map each claim you plan to make to the exact command or log that proves it.
|
|
113
|
+
3. If the target is a blueprint slug, run the repo's blueprint show/audit surface and record the acceptance boxes that still need proof.
|
|
114
|
+
4. **CI cost / local-first:** treat remote CI as confirmation, not the first
|
|
115
|
+
debugger. Load `ci-cost-local-first` expectations: no hook skips, no
|
|
116
|
+
blind `gh run rerun`, Ubicloud for private non-release jobs.
|
|
117
|
+
|
|
118
|
+
## Phase 1 — Governance gates
|
|
119
|
+
|
|
120
|
+
Run only the gates that apply to the diff:
|
|
121
|
+
|
|
122
|
+
- repo SSOT / schema / config changes → the repo's dedicated check
|
|
123
|
+
- docs or markdown changes → the repo's docs / markdown validation surface
|
|
124
|
+
- blueprint target → the repo's blueprint audit surface
|
|
125
|
+
- agent-surface / catalog changes → the repo's agent or catalog audit surface
|
|
126
|
+
|
|
127
|
+
Hard stop on any failure.
|
|
128
|
+
|
|
129
|
+
## Phase 2 — Surface verification
|
|
130
|
+
|
|
131
|
+
Run the narrowest checks that prove the touched behavior:
|
|
132
|
+
|
|
133
|
+
- `wp_lint` / targeted lint
|
|
134
|
+
- `wp_typecheck` / targeted typecheck
|
|
135
|
+
- `wp_test` / targeted tests
|
|
136
|
+
- `wp_qa`, `wp_e2e`, build / package checks only when the change requires them
|
|
137
|
+
|
|
138
|
+
**Before push or PR open/update**, run the pre-push owner end-to-end:
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
wp_ci_preflight({})
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
MCP-unavailable CLI fallback:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
wp ci-preflight
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
That is fail-fast branch-scoped format → guardrails → typecheck → lint →
|
|
151
|
+
test. Agent-kit itself enforces it from `.husky/pre-push`; consumer repos may
|
|
152
|
+
keep pre-push checks user-owned, so run the command explicitly before pushing.
|
|
153
|
+
Do **not** claim push-ready if preflight failed. Do **not** bypass hooks to ship
|
|
154
|
+
red work.
|
|
155
|
+
|
|
156
|
+
Rules:
|
|
157
|
+
|
|
158
|
+
- Prefer MCP `wp_*` over raw underlying tools.
|
|
159
|
+
- Reuse fresh logs / session-memory indexed output if the runner auto-saves them.
|
|
160
|
+
- Never claim broader correctness than the commands actually proved.
|
|
161
|
+
- If the repo documents a "full QA" bookend, reserve `wp_qa` / `--full` for the final broad pass rather than every iteration.
|
|
162
|
+
- If CI is already red: read the failed job log, reproduce with the matching
|
|
163
|
+
local `wp_ci_preflight` (or the `wp ci-preflight` CLI fallback), fix, then push **one**
|
|
164
|
+
corrective commit — do not burn another full matrix “to check.”
|
|
165
|
+
|
|
166
|
+
## Phase 3 — Cross-surface impact scan
|
|
167
|
+
|
|
168
|
+
Ask:
|
|
169
|
+
|
|
170
|
+
- Did the change alter a public/shared export, type, config shape, command, install path, setup path, update path, operator guidance, or generated surface?
|
|
171
|
+
- Do consumers, mocks, fixtures, docs, help text, generated instruction templates, or skill/catalog references still mention the old shape?
|
|
172
|
+
- Does another package, blueprint, or agent surface need to be updated in the same change?
|
|
173
|
+
|
|
174
|
+
For command-surface, install/setup/update, or operator-guidance changes, explicitly scan affected docs/help/instruction surfaces before proceeding. Include, at minimum:
|
|
175
|
+
|
|
176
|
+
- CLI help text
|
|
177
|
+
- docs/guides
|
|
178
|
+
- generated instruction templates and checked-in generated instruction copies
|
|
179
|
+
- skill text and catalog references
|
|
180
|
+
|
|
181
|
+
Hard stop if a shared contract changed and consumers were not updated.
|
|
182
|
+
|
|
183
|
+
Every session that changes behavior, commands, setup, or operator guidance must
|
|
184
|
+
update every affected doc/help/instruction surface in the same change. Keep
|
|
185
|
+
those doc edits concise and direct.
|
|
186
|
+
|
|
187
|
+
## Phase 4 — Test quality and behavioral audit
|
|
188
|
+
|
|
189
|
+
The passing test suite is necessary, not sufficient.
|
|
190
|
+
|
|
191
|
+
Check that:
|
|
192
|
+
|
|
193
|
+
- the new or changed tests would fail against the old behavior
|
|
194
|
+
- mocks stay at real external boundaries
|
|
195
|
+
- assertions prove the intended behavior rather than incidental implementation details
|
|
196
|
+
- mixed/partial/error-path coverage exists where the feature demands it
|
|
197
|
+
- UX or operator-facing flows include graceful-degradation coverage when applicable
|
|
198
|
+
|
|
199
|
+
Run the folded TPH gate for every verification target. At minimum, execute
|
|
200
|
+
`wp_audit` with the `test-smells` kind when available (use global `wp audit
|
|
201
|
+
test-smells` only as the CLI fallback) and inspect changed tests against the
|
|
202
|
+
`testing-philosophy` checklist. Add E2E or integration evidence when the change
|
|
203
|
+
touches user/operator-facing workflows, batch/list behavior, graceful
|
|
204
|
+
degradation, or other fidelity-sensitive paths.
|
|
205
|
+
|
|
206
|
+
## Phase 5 — Complexity, compatibility, and dead-code sweep
|
|
207
|
+
|
|
208
|
+
Before claiming done:
|
|
209
|
+
|
|
210
|
+
- remove stale compat aliases and "temporary" branches introduced by the change
|
|
211
|
+
- verify no suppressions were added
|
|
212
|
+
- verify no production `any` slipped in except an explicitly allowed repo test idiom
|
|
213
|
+
- justify every new exported/helper surface with a real consumer or test
|
|
214
|
+
- run the repo's dead-code / dependency checks when the change broadened public surface or added new files
|
|
215
|
+
|
|
216
|
+
If behavior is already locked and the remaining work is purely anti-slop
|
|
217
|
+
cleanup, route that pass through `ai-deslop` first rather than broadening
|
|
218
|
+
`verify` into a writer lane.
|
|
219
|
+
|
|
220
|
+
This phase exists to catch the garbage that often slips in beside otherwise-correct work.
|
|
221
|
+
|
|
222
|
+
## Phase 6 — Outside-model approval gate (**`--merge-ready` only**)
|
|
223
|
+
|
|
224
|
+
**Skip this entire phase** for default `/verify` and `/verify --full`. Local
|
|
225
|
+
`done` claims do not require outside voice.
|
|
226
|
+
|
|
227
|
+
Before claiming **merge-ready**, obtain outside-voice approvals only under this policy:
|
|
228
|
+
|
|
229
|
+
Default merge-ready policy:
|
|
230
|
+
|
|
231
|
+
- Require **exactly one** extra model approval unless the user sets a different N.
|
|
232
|
+
- At most **one OpenCode Go reviewer** counts toward the requirement unless the user
|
|
233
|
+
explicitly asks for multiple OpenCode models.
|
|
234
|
+
- Invoke the selected reviewer **once**. Do not probe, retry, or rotate providers
|
|
235
|
+
automatically, and never fan out parallel multi-host review swarms.
|
|
236
|
+
- If the user asks for more, fewer, zero, or specific reviewers, follow that instruction
|
|
237
|
+
and report the chosen requirement.
|
|
238
|
+
- These approvals are model outside-voice approvals, not a substitute for human GitHub
|
|
239
|
+
reviews or branch-protection approvals.
|
|
240
|
+
|
|
241
|
+
Reviewer preference (pick **one** path):
|
|
242
|
+
|
|
243
|
+
- From Codex → Claude or Grok (else one OpenCode Go).
|
|
244
|
+
- From Claude → Codex or Grok (else one OpenCode Go).
|
|
245
|
+
- From Grok → Claude or Codex (else one OpenCode Go).
|
|
246
|
+
- Prefer skills: `claude`, `codex`, `grok`, or one of `opencode-go` / `qwen` /
|
|
247
|
+
`deepseek` / `glm` / `kimi` / `minimax` / `mimo`.
|
|
248
|
+
|
|
249
|
+
Approval evidence requirements:
|
|
250
|
+
|
|
251
|
+
- Blueprint plan approval: use `wp_review_gate` with the current `bpv1` version.
|
|
252
|
+
It records the review and promotes an approved draft atomically by default.
|
|
253
|
+
If the gate is still running or the host wait expires, poll the same exact
|
|
254
|
+
invocation with `wp_review_gate_wait` until a terminal review outcome is
|
|
255
|
+
observed; wait timeout/abort/in-progress/not-found are not reviewer verdicts.
|
|
256
|
+
`not_found` means there is no active or terminal gate for that subject; refresh
|
|
257
|
+
state and start the gate again instead of continuing to wait.
|
|
258
|
+
- Implementation approval: invoke `wp_review_run` exactly once with the selected
|
|
259
|
+
provider and an expected verdict marker. Do not run a separate provider probe.
|
|
260
|
+
- Each gate reviewer must return exactly one schema-valid JSON review object;
|
|
261
|
+
never infer a verdict from Markdown. The gate derives approval from typed
|
|
262
|
+
findings: blockers reject, nits approve with nits, and no findings approve.
|
|
263
|
+
- `APPROVE-WITH-NITS` is terminal approval when every typed finding is
|
|
264
|
+
non-blocking. Preserve detailed nits in the artifact or follow-up backlog; do
|
|
265
|
+
not edit the reviewed subject and rerun the gate just to clear nits.
|
|
266
|
+
- Record as PR comments when a PR exists (model/tool, verdict, reviewed commit).
|
|
267
|
+
- Unavailable reviewer → report the gap and **not merge-ready**. A later explicit
|
|
268
|
+
invocation may select another reviewer after the terminal result is inspected;
|
|
269
|
+
never cycle providers automatically or invent approvals.
|
|
270
|
+
|
|
271
|
+
## Phase 7 — Final completion statement
|
|
272
|
+
|
|
273
|
+
Report:
|
|
274
|
+
|
|
275
|
+
- mode used (`local` / `full` / `merge-ready`)
|
|
276
|
+
- what was verified and which `wp_*` commands/logs prove it
|
|
277
|
+
- which docs/help/instruction surfaces were refreshed when guidance changed
|
|
278
|
+
- outside models only if merge-ready (with PR comment links when applicable)
|
|
279
|
+
- what remains intentionally out of scope
|
|
280
|
+
|
|
281
|
+
When catalog assets or generated instruction surfaces changed, include public-package-safety or package-surface leak checks.
|
|
282
|
+
|
|
283
|
+
If any required check is missing, the correct result is **not done yet**, not a softer claim.
|