@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,258 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: skill
|
|
3
|
+
slug: deep-research
|
|
4
|
+
title: Deep Research
|
|
5
|
+
status: active
|
|
6
|
+
scope: repo
|
|
7
|
+
applies_to: [agents]
|
|
8
|
+
related: []
|
|
9
|
+
created: "2026-05-07"
|
|
10
|
+
last_reviewed: "2026-05-07"
|
|
11
|
+
name: deep-research
|
|
12
|
+
description: "Deep web research with dated credible sources, pro/con synthesis, and project-alignment notes."
|
|
13
|
+
argument-hint: "<subject or question to research>"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<Purpose>
|
|
17
|
+
Deep Research is a multi-phase web research workflow that produces a balanced, citation-backed analysis of a subject. It collects both positive and negative sentiments from credible sources, evaluates alignment with the project's vision and tech stack, identifies 2026 state-of-the-art best practices, and logs the result to `docs/research/` with a date-prefixed filename.
|
|
18
|
+
</Purpose>
|
|
19
|
+
|
|
20
|
+
<Use_When>
|
|
21
|
+
|
|
22
|
+
- Evaluating a technology, library, pattern, or product direction
|
|
23
|
+
- Comparing alternatives before making an architectural or product decision
|
|
24
|
+
- The user says "research", "deep research", "investigate", or "what does the community think about"
|
|
25
|
+
- You need a balanced view of trade-offs before recommending something
|
|
26
|
+
</Use_When>
|
|
27
|
+
|
|
28
|
+
<Do_Not_Use_When>
|
|
29
|
+
|
|
30
|
+
- The user wants a quick factual lookup (use WebSearch directly)
|
|
31
|
+
- The user wants codebase exploration (use explore)
|
|
32
|
+
- The user wants a requirements interview (use deep-interview)
|
|
33
|
+
- The answer is already well-established and non-controversial
|
|
34
|
+
</Do_Not_Use_When>
|
|
35
|
+
|
|
36
|
+
<Output_Contract>
|
|
37
|
+
A single markdown file written to:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
docs/research/{YYYY-MM-DD}-{slug}.md
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Where `{YYYY-MM-DD}` is today's date and `{slug}` is a kebab-case summary of the subject.
|
|
44
|
+
|
|
45
|
+
The file MUST have this frontmatter and structure (see Phase 5 for full template).
|
|
46
|
+
</Output_Contract>
|
|
47
|
+
|
|
48
|
+
<Steps>
|
|
49
|
+
|
|
50
|
+
## Phase 0: Scope and Context Load
|
|
51
|
+
|
|
52
|
+
1. Parse `{{ARGUMENTS}}` into a research subject and any qualifiers (e.g., "for our use case", "vs X").
|
|
53
|
+
2. Derive a short kebab-case slug for the filename.
|
|
54
|
+
3. Read `docs/research/product/VISION.md` (or the project's equivalent — check `docs/` for a vision doc) to load the current vision context. Skip if not present.
|
|
55
|
+
4. Identify the relevant tech stack context by reading project config files (e.g., `package.json` workspaces, `tsconfig.json`, key dependencies) — keep this lightweight, just enough to judge alignment.
|
|
56
|
+
5. Announce the research plan to the user:
|
|
57
|
+
- Subject
|
|
58
|
+
- Key questions to investigate
|
|
59
|
+
- Output path
|
|
60
|
+
|
|
61
|
+
## Phase 1: Broad Discovery (parallel)
|
|
62
|
+
|
|
63
|
+
Run **5-8 parallel WebSearch queries** covering different angles:
|
|
64
|
+
|
|
65
|
+
1. **Overview**: `"{subject} 2026 overview best practices"`
|
|
66
|
+
2. **Positive sentiment**: `"{subject} benefits advantages why use 2026"`
|
|
67
|
+
3. **Negative sentiment / criticism**: `"{subject} problems criticism drawbacks 2026"`
|
|
68
|
+
4. **Community opinion**: `"{subject} reddit hacker news experience production 2026"`
|
|
69
|
+
5. **Comparison / alternatives**: `"{subject} vs alternatives comparison 2026"`
|
|
70
|
+
6. **State of the art**: `"{subject} state of the art latest 2026"`
|
|
71
|
+
7. **(If applicable)** Stack-specific: `"{subject} TypeScript Cloudflare Workers React 2026"`
|
|
72
|
+
8. **(If applicable)** Domain-specific query based on the project's problem space
|
|
73
|
+
|
|
74
|
+
For each search, record:
|
|
75
|
+
|
|
76
|
+
- Source URL
|
|
77
|
+
- Source type (docs, blog, forum, official, academic)
|
|
78
|
+
- Key claims or data points
|
|
79
|
+
- Sentiment direction (positive / negative / neutral)
|
|
80
|
+
|
|
81
|
+
## Phase 2: Deep Dive (sequential, selective)
|
|
82
|
+
|
|
83
|
+
From Phase 1 results, identify the **5-10 most credible and information-dense sources**.
|
|
84
|
+
|
|
85
|
+
Use `WebFetch` on each to extract deeper detail. Prioritize:
|
|
86
|
+
|
|
87
|
+
- Official documentation or announcements
|
|
88
|
+
- Production experience reports (postmortems, migration stories)
|
|
89
|
+
- Benchmark data or technical comparisons
|
|
90
|
+
- Strong critical takes with specific evidence
|
|
91
|
+
|
|
92
|
+
For each fetched source, extract:
|
|
93
|
+
|
|
94
|
+
- Specific claims with evidence
|
|
95
|
+
- Sentiment and strength (strong positive, mild positive, neutral, mild negative, strong negative)
|
|
96
|
+
- Credibility assessment (official docs > production experience > blog opinion > forum anecdote)
|
|
97
|
+
|
|
98
|
+
## Phase 3: Triangulate and Score
|
|
99
|
+
|
|
100
|
+
1. **Cluster findings** into themes (e.g., "developer experience", "performance", "ecosystem maturity", "production readiness").
|
|
101
|
+
2. **Cross-reference claims**: if only one source makes a claim, flag it as unverified. Claims supported by 2+ independent sources get higher weight.
|
|
102
|
+
3. **Score source credibility** using:
|
|
103
|
+
- Official docs / specs: high
|
|
104
|
+
- Production postmortems with data: high
|
|
105
|
+
- Respected engineering blogs: medium-high
|
|
106
|
+
- Community forums (HN, Reddit) with detail: medium
|
|
107
|
+
- Marketing material / vendor blogs: low (note bias)
|
|
108
|
+
- Undated or anonymous content: very low
|
|
109
|
+
4. **Identify gaps**: what questions remain unanswered? If critical gaps exist, run 1-2 additional targeted searches.
|
|
110
|
+
|
|
111
|
+
## Phase 4: Vision and Stack Alignment Analysis
|
|
112
|
+
|
|
113
|
+
Using the project's vision from Phase 0 and the research findings:
|
|
114
|
+
|
|
115
|
+
1. **Vision alignment**: How does this subject relate to the project's stated mission? Does it help or hinder current priorities?
|
|
116
|
+
2. **Tech stack fit**: How well does this integrate with the existing stack (read `package.json`, key deps, framework choices)? What's the integration cost?
|
|
117
|
+
3. **Trade-off assessment**: Given the project's current stage, what are the most relevant trade-offs?
|
|
118
|
+
4. **Recommendation**: Based on the evidence, what's the suggested path? Be explicit about confidence level.
|
|
119
|
+
|
|
120
|
+
## Phase 5: Write Report
|
|
121
|
+
|
|
122
|
+
Write the report to `docs/research/{YYYY-MM-DD}-{slug}.md` using this template:
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
---
|
|
126
|
+
type: research
|
|
127
|
+
title: "{Title}"
|
|
128
|
+
subject: "{subject}"
|
|
129
|
+
date: { YYYY-MM-DD }
|
|
130
|
+
confidence: { high|medium|low }
|
|
131
|
+
verdict: { adopt|trial|assess|hold|reject }
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
# {Title}
|
|
135
|
+
|
|
136
|
+
> One-line summary of the finding.
|
|
137
|
+
|
|
138
|
+
## TL;DR
|
|
139
|
+
|
|
140
|
+
3-5 bullet executive summary covering: what it is, key finding, recommendation.
|
|
141
|
+
|
|
142
|
+
## What This Is
|
|
143
|
+
|
|
144
|
+
Brief neutral description of the subject being researched.
|
|
145
|
+
|
|
146
|
+
## State of the Art (2026)
|
|
147
|
+
|
|
148
|
+
Current best practices, latest developments, where the ecosystem stands today.
|
|
149
|
+
Cite sources inline as [Source Name](url).
|
|
150
|
+
|
|
151
|
+
## Positive Signals
|
|
152
|
+
|
|
153
|
+
Evidence-backed reasons in favor. Group by theme.
|
|
154
|
+
Each point should cite its source and note credibility level.
|
|
155
|
+
|
|
156
|
+
### {Theme 1}
|
|
157
|
+
|
|
158
|
+
- ...
|
|
159
|
+
|
|
160
|
+
### {Theme 2}
|
|
161
|
+
|
|
162
|
+
- ...
|
|
163
|
+
|
|
164
|
+
## Negative Signals
|
|
165
|
+
|
|
166
|
+
Evidence-backed criticism and risks. Group by theme.
|
|
167
|
+
Each point should cite its source and note credibility level.
|
|
168
|
+
|
|
169
|
+
### {Theme 1}
|
|
170
|
+
|
|
171
|
+
- ...
|
|
172
|
+
|
|
173
|
+
### {Theme 2}
|
|
174
|
+
|
|
175
|
+
- ...
|
|
176
|
+
|
|
177
|
+
## Community Sentiment
|
|
178
|
+
|
|
179
|
+
What practitioners actually say. Include direct quotes where available.
|
|
180
|
+
Note the balance: if sentiment skews one way, say so explicitly.
|
|
181
|
+
|
|
182
|
+
## Project Alignment
|
|
183
|
+
|
|
184
|
+
### Vision Fit
|
|
185
|
+
|
|
186
|
+
How this relates to the project's current goals.
|
|
187
|
+
|
|
188
|
+
### Tech Stack Fit
|
|
189
|
+
|
|
190
|
+
Integration with the project's stack (from `package.json`, framework configs).
|
|
191
|
+
|
|
192
|
+
### Trade-offs for Current Stage
|
|
193
|
+
|
|
194
|
+
What matters most given where the project is now.
|
|
195
|
+
|
|
196
|
+
## Recommendation
|
|
197
|
+
|
|
198
|
+
Clear recommendation with confidence level and reasoning.
|
|
199
|
+
Include conditions under which the recommendation would change.
|
|
200
|
+
|
|
201
|
+
## Sources
|
|
202
|
+
|
|
203
|
+
Numbered list of all sources used, with:
|
|
204
|
+
|
|
205
|
+
- [N] [Title](url) — type, credibility, sentiment direction
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Phase 6: Present Summary
|
|
209
|
+
|
|
210
|
+
After writing the file, present to the user:
|
|
211
|
+
|
|
212
|
+
1. The output file path
|
|
213
|
+
2. The verdict and confidence
|
|
214
|
+
3. A 3-line summary of the key finding
|
|
215
|
+
4. Any critical gaps or caveats
|
|
216
|
+
|
|
217
|
+
</Steps>
|
|
218
|
+
|
|
219
|
+
<Quality_Gates>
|
|
220
|
+
|
|
221
|
+
- Minimum 8 distinct sources cited
|
|
222
|
+
- At least 2 sources per major claim
|
|
223
|
+
- Both positive AND negative signals sections must be substantive (not token)
|
|
224
|
+
- Sources section must include credibility and sentiment annotations
|
|
225
|
+
- Vision alignment section must reference specific project goals (not generic)
|
|
226
|
+
- All inline citations must be clickable links
|
|
227
|
+
- Frontmatter must include confidence and verdict fields
|
|
228
|
+
</Quality_Gates>
|
|
229
|
+
|
|
230
|
+
<Verdict_Scale>
|
|
231
|
+
|
|
232
|
+
- **adopt**: Strong evidence, clear fit, community consensus positive. Use it.
|
|
233
|
+
- **trial**: Promising evidence, worth a bounded experiment. Try it in a limited scope.
|
|
234
|
+
- **assess**: Mixed signals or insufficient evidence. Research more before committing.
|
|
235
|
+
- **hold**: Significant concerns or poor fit. Don't invest now, revisit later.
|
|
236
|
+
- **reject**: Clear evidence against. Don't use this.
|
|
237
|
+
</Verdict_Scale>
|
|
238
|
+
|
|
239
|
+
<Tool_Usage>
|
|
240
|
+
|
|
241
|
+
- `WebSearch` for broad discovery (Phase 1) and gap-filling (Phase 3)
|
|
242
|
+
- `WebFetch` for deep source extraction (Phase 2)
|
|
243
|
+
- `Read` for loading vision and tech stack context (Phase 0)
|
|
244
|
+
- `Write` for the final report (Phase 5)
|
|
245
|
+
- `Agent` with `subagent_type=Explore` if codebase context is needed for alignment analysis
|
|
246
|
+
- Use parallel tool calls wherever searches are independent
|
|
247
|
+
</Tool_Usage>
|
|
248
|
+
|
|
249
|
+
<Common_Mistakes>
|
|
250
|
+
|
|
251
|
+
- Writing a report that's all positive or all negative — always find both sides
|
|
252
|
+
- Citing marketing material as if it were neutral evidence — flag vendor bias
|
|
253
|
+
- Making alignment claims without reading the actual vision doc
|
|
254
|
+
- Using stale search results — always include "2026" in queries
|
|
255
|
+
- Writing the report before triangulating — don't just concatenate search results
|
|
256
|
+
</Common_Mistakes>
|
|
257
|
+
|
|
258
|
+
Task: {{ARGUMENTS}}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: skill
|
|
3
|
+
slug: delivery-program
|
|
4
|
+
title: Delivery Program
|
|
5
|
+
status: active
|
|
6
|
+
scope: repo
|
|
7
|
+
applies_to: [agents]
|
|
8
|
+
related: [ultragoal, team, verify]
|
|
9
|
+
created: "2026-07-29"
|
|
10
|
+
last_reviewed: "2026-07-29"
|
|
11
|
+
name: delivery-program
|
|
12
|
+
description: "Run merge-last multi-blueprint programs through a typed delivery branch."
|
|
13
|
+
argument-hint: "<parent-roadmap-slug>"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Delivery Program
|
|
17
|
+
|
|
18
|
+
Use this workflow when a typed `parent-roadmap` owns multiple child blueprints:
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
delivery_branch: delivery/<program>
|
|
22
|
+
delivery_base: main
|
|
23
|
+
child_review_quorum: 1
|
|
24
|
+
final_review_quorum: 1
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Child membership comes only from `parent_roadmap`; do not maintain a second list.
|
|
28
|
+
|
|
29
|
+
## Loop
|
|
30
|
+
|
|
31
|
+
1. Call `wp_delivery_status({ slug })`.
|
|
32
|
+
2. Treat its `version`, blockers, and exact returned action as the current derived
|
|
33
|
+
truth. Do not reconstruct state from transcripts.
|
|
34
|
+
3. Dispatch only returned `wp_worktree` actions. Child work starts from the
|
|
35
|
+
delivery branch and child PRs target that branch.
|
|
36
|
+
4. Integrate at most one child at a time. Recheck status immediately before
|
|
37
|
+
calling `wp_pr_merge` with the exact returned head SHA.
|
|
38
|
+
5. An `enqueued` merge is not integrated. Call `wp_delivery_status` again and
|
|
39
|
+
wait for the merged postcondition.
|
|
40
|
+
6. After every child PR is merged, verify the delivery branch and land its final
|
|
41
|
+
PR to `delivery_base` through the same exact-SHA merge tool.
|
|
42
|
+
|
|
43
|
+
## Invariants
|
|
44
|
+
|
|
45
|
+
- Executors do not merge their own PRs or act as their own outside reviewer.
|
|
46
|
+
- Never push directly to the delivery branch or `main`.
|
|
47
|
+
- Never use admin override, auto-merge, branch deletion, or a caller-invented SHA.
|
|
48
|
+
- GitHub head matching is atomic; base matching is not. Preserve the reported
|
|
49
|
+
pre/post base evidence and rerun status after every mutation.
|
|
50
|
+
- Use `queue_policy: merge_queue` only when policy explicitly requires it and
|
|
51
|
+
CI has a valid `merge_group` workflow. Queued state remains serialized.
|
|
52
|
+
- Unknown dependencies, unverified completed children, stale heads, wrong bases,
|
|
53
|
+
path overlaps, missing review evidence, and partial provider state block landing.
|
|
54
|
+
- Provider timeouts and discovery limits return blockers/warnings; do not increase
|
|
55
|
+
timeouts or bypass guards.
|
|
56
|
+
|
|
57
|
+
Fallback when MCP is unavailable: `wp pr merge` uses the same exact-SHA service.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-review
|
|
3
|
+
description: "Report-first visual/browser design audit for hierarchy, spacing, consistency, responsive, a11y, and interactions."
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Grep
|
|
9
|
+
- Bash
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Design review
|
|
13
|
+
|
|
14
|
+
Use for live visual QA or design polish requests. For pre-implementation plan critique, use `/plan-design-review`.
|
|
15
|
+
|
|
16
|
+
## Default behavior
|
|
17
|
+
|
|
18
|
+
- The `allowed-tools` frontmatter is an audited disclosure for supported hosts;
|
|
19
|
+
pretool-guard remains the enforced mutation backstop when a host does not prove
|
|
20
|
+
skill-frontmatter enforcement.
|
|
21
|
+
- Report first; do not edit source unless the user explicitly asks for fixes.
|
|
22
|
+
- Inspect key viewports and states.
|
|
23
|
+
- Capture evidence with browser screenshots or precise observations.
|
|
24
|
+
- Rank findings by user impact and implementation effort.
|
|
25
|
+
|
|
26
|
+
If fixes are authorized, make small visual changes and verify before/after.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devex-review
|
|
3
|
+
description: "Report-first developer-experience audit for onboarding, docs, examples, CLI help, and time-to-hello-world."
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Grep
|
|
9
|
+
- Bash
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Live DX review
|
|
13
|
+
|
|
14
|
+
Use after or during developer-facing work to test the real user journey.
|
|
15
|
+
|
|
16
|
+
This is report-only by default. The `allowed-tools` frontmatter is an audited
|
|
17
|
+
disclosure for supported hosts; pretool-guard remains the enforced mutation
|
|
18
|
+
backstop when a host does not prove skill-frontmatter enforcement.
|
|
19
|
+
|
|
20
|
+
## Evidence to gather
|
|
21
|
+
|
|
22
|
+
- Docs route or README entrypoint.
|
|
23
|
+
- Install/setup command path.
|
|
24
|
+
- CLI help and error messages.
|
|
25
|
+
- Time-to-hello-world estimate.
|
|
26
|
+
- Browser evidence for docs or local app flows when relevant.
|
|
27
|
+
|
|
28
|
+
Return a scorecard with blockers, papercuts, screenshots/artifacts when available, and concrete next fixes.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: skill
|
|
3
|
+
slug: fix
|
|
4
|
+
title: Fix
|
|
5
|
+
status: active
|
|
6
|
+
scope: repo
|
|
7
|
+
applies_to: [agents]
|
|
8
|
+
related: [verify, testing-philosophy]
|
|
9
|
+
created: "2026-05-13"
|
|
10
|
+
last_reviewed: "2026-07-21"
|
|
11
|
+
name: fix
|
|
12
|
+
description: "Root-cause fix workflow that runs investigate first when diagnosis or failing proof is still missing."
|
|
13
|
+
argument-hint: '<target> where target is: file|symptom|error|test|"free-text description"'
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Fix Command
|
|
17
|
+
|
|
18
|
+
Fix the issue at its root, future-proof, aligned with repo philosophy.
|
|
19
|
+
|
|
20
|
+
**Arguments**: $ARGUMENTS
|
|
21
|
+
|
|
22
|
+
This command turns "please fix it well" into an enforceable workflow: diagnose
|
|
23
|
+
first, repair at the owner, prove the repair, and escalate to `/verify` when
|
|
24
|
+
the blast radius is broader than a local fix.
|
|
25
|
+
|
|
26
|
+
## Tooling map
|
|
27
|
+
|
|
28
|
+
| Need | Prefer |
|
|
29
|
+
| ---------------------- | --------------------------------------------------------------------------- |
|
|
30
|
+
| Reproduce / large logs | `wp_session_execute`, `wp_session_batch_execute`, `wp_session_execute_file` |
|
|
31
|
+
| Recall prior evidence | `wp_session_search`, `wp_session_restore`, `wp_session_retrieve` |
|
|
32
|
+
| Capture decisions | `wp_session_capture` (do not paste full reports back as user text) |
|
|
33
|
+
| Scoped proof | `wp_test`, `wp_lint`, `wp_typecheck`, or `wp_qa` |
|
|
34
|
+
| Audits | `wp_audit` / `wp_audits` |
|
|
35
|
+
| Worktree isolation | `wp_blueprint_put` / `wp_worktree` — never thrash primary checkout |
|
|
36
|
+
| PR follow-up | `wp_pr_status`, `wp_pr_upsert` when landing the fix |
|
|
37
|
+
|
|
38
|
+
## Non-negotiable invariants
|
|
39
|
+
|
|
40
|
+
1. **Root cause, not symptom.** Trace the failure to the invariant that actually broke. Do not patch callers when the owner is fixable.
|
|
41
|
+
2. **Loud failures, no silent fallbacks.** No default shims, sentinel returns, or catch-and-continue behavior that hides missing config, bad state, or broken boundaries.
|
|
42
|
+
3. **Use the repo's real execution surface.** Prefer MCP `wp_*` tools and repo wrappers over host Bash for search/test/lint. Use bounded session-memory paths for large output.
|
|
43
|
+
4. **Regression proof is mandatory.** Add or strengthen a test or other reliable proof that would fail against the old behavior.
|
|
44
|
+
5. **Raising timeouts is not a fix.** If a timeout fires, investigate the bottleneck. Only raise a bound when the repo already documents that workload and you can cite measurement.
|
|
45
|
+
6. **Zero suppressions, zero papering over.** No lint disables, ts-ignore, compat aliases, or "temporary" branches to sneak the fix through.
|
|
46
|
+
7. **Minimal correct diff.** Update every consumer of a changed contract in the same change, but do not bundle unrelated cleanup.
|
|
47
|
+
8. **Primary checkout is sacred.** If HEAD is detached, primary is dirty with unrelated work, or you are not on a managed worktree for non-trivial edits → **stop** and move to `wp_worktree` / blueprint owner. Never leave the primary checkout broken.
|
|
48
|
+
|
|
49
|
+
## Opportunistic fix budget (when called from ultragoal / autopilot)
|
|
50
|
+
|
|
51
|
+
- At most **`fix_budget` (default 1)** pre-existing issues per controller phase.
|
|
52
|
+
- Each must have: named invariant, failing proof, owning path.
|
|
53
|
+
- If the repair needs its own blueprint or expands epic scope → **handoff backlog**, do not inline.
|
|
54
|
+
- Additional discoveries: list in the final report; do not thrash.
|
|
55
|
+
|
|
56
|
+
## Protocol
|
|
57
|
+
|
|
58
|
+
### Step 0a — Worktree preflight
|
|
59
|
+
|
|
60
|
+
Before editing: confirm you are on a managed worktree or an explicitly allowed branch.
|
|
61
|
+
If the primary checkout is dirty/detached with unrelated state, stop and isolate first.
|
|
62
|
+
|
|
63
|
+
### Step 0 — Run the investigate phase when evidence is missing
|
|
64
|
+
|
|
65
|
+
Before editing, check whether the current context already contains all of the
|
|
66
|
+
following:
|
|
67
|
+
|
|
68
|
+
- a named root-cause hypothesis
|
|
69
|
+
- a failing proof tied to that hypothesis
|
|
70
|
+
- the owning boundary that should be repaired
|
|
71
|
+
|
|
72
|
+
If any of those are missing, run the `investigate` phase inline first:
|
|
73
|
+
|
|
74
|
+
- reproduce or capture the failure
|
|
75
|
+
- read the full error site and one nearby working pattern
|
|
76
|
+
- disconfirm cheap alternative explanations
|
|
77
|
+
- produce failing proof
|
|
78
|
+
- stop only when you can name the broken invariant and owner
|
|
79
|
+
|
|
80
|
+
Do not skip this phase because the fix "looks obvious". If the evidence is not
|
|
81
|
+
there, the investigation work is part of `fix`.
|
|
82
|
+
|
|
83
|
+
### Step 1 — Reproduce and name the broken invariant
|
|
84
|
+
|
|
85
|
+
- Run the exact command, test, or user flow that surfaces the failure.
|
|
86
|
+
- Capture the evidence that matters: error text, file:line, exit code, failing assertion, or log path.
|
|
87
|
+
- Read enough surrounding code to say the broken invariant in one sentence.
|
|
88
|
+
- If the issue is nondeterministic, gather evidence until you can describe the slow/flaky/failing case without guessing.
|
|
89
|
+
|
|
90
|
+
If the "issue" is actually several unrelated failures, stop and ask which one to fix first.
|
|
91
|
+
|
|
92
|
+
### Step 2 — Decide where the fix belongs
|
|
93
|
+
|
|
94
|
+
State briefly:
|
|
95
|
+
|
|
96
|
+
- the broken invariant
|
|
97
|
+
- the owner that should enforce it
|
|
98
|
+
- whether the fix changes a public contract
|
|
99
|
+
- which direct consumers must change in the same diff
|
|
100
|
+
|
|
101
|
+
If the blast radius is broader than the owner + direct consumers, keep going with `/fix` only if the change is still one coherent repair. If the work becomes a broader hardening pass, plan a `/verify` handoff before claiming done.
|
|
102
|
+
|
|
103
|
+
### Step 3 — Write failing proof first when feasible
|
|
104
|
+
|
|
105
|
+
- For a reproducible bug, write or strengthen the smallest regression test that fails on the old behavior.
|
|
106
|
+
- Verify that it fails for the right reason before changing production code.
|
|
107
|
+
- If test-first is genuinely infeasible at that boundary, record why and create the nearest reliable proof instead (for example a deterministic integration reproduction, fixture, or logged command).
|
|
108
|
+
|
|
109
|
+
Do not keep production code written before the test as "reference". If you wrote code first, throw it away and restart from the failing proof.
|
|
110
|
+
|
|
111
|
+
### Step 4 — Implement the minimal correct fix
|
|
112
|
+
|
|
113
|
+
- Edit the file or module that owns the invariant.
|
|
114
|
+
- Update every changed consumer in the same diff. No half-migrations.
|
|
115
|
+
- Delete compat shims, dead aliases, and TODO branches made obsolete by the repair.
|
|
116
|
+
- Keep complexity down by extracting helpers instead of nesting conditionals.
|
|
117
|
+
|
|
118
|
+
### Step 5 — Run scoped verification
|
|
119
|
+
|
|
120
|
+
Run the narrowest checks that prove the repaired behavior on the real repo surface:
|
|
121
|
+
|
|
122
|
+
- `wp_test` / targeted tests for the repaired path
|
|
123
|
+
- `wp_lint` / `wp_typecheck` for changed surfaces
|
|
124
|
+
- `wp_qa` only when the blast radius needs the bookend
|
|
125
|
+
- Before push: `wp_ci_preflight` (use global `wp ci-preflight` only when MCP is
|
|
126
|
+
unavailable). Do not use remote CI
|
|
127
|
+
re-runs as the primary fix loop (`ci-cost-local-first`).
|
|
128
|
+
|
|
129
|
+
Rules:
|
|
130
|
+
|
|
131
|
+
- Prefer MCP `wp_*` over raw host Bash.
|
|
132
|
+
- Reuse fresh logs / session-memory indexed output; do not re-run long commands just to re-read.
|
|
133
|
+
- Read the exit code and summary before making a claim.
|
|
134
|
+
- Never `git push --no-verify` to land an unproven fix.
|
|
135
|
+
|
|
136
|
+
Escalate to `/verify <target>` (local) or `/verify <target> --merge-ready` when any of these are true:
|
|
137
|
+
|
|
138
|
+
- the fix crosses packages
|
|
139
|
+
- the fix changes a public or shared contract
|
|
140
|
+
- the fix touched docs, plans, blueprints, or repo SSOT
|
|
141
|
+
- the fix needs dead-code / compat / broad regression review before claiming done
|
|
142
|
+
|
|
143
|
+
If the repaired behavior is already green but the diff still needs a bounded
|
|
144
|
+
cleanup pass, use `ai-deslop` before the final verify handoff.
|
|
145
|
+
|
|
146
|
+
### Step 6 — Report with evidence
|
|
147
|
+
|
|
148
|
+
Keep it short:
|
|
149
|
+
|
|
150
|
+
- what invariant broke
|
|
151
|
+
- how the change restores it
|
|
152
|
+
- what proof ran (tests, commands, log paths, exit codes)
|
|
153
|
+
- adjacent issues noticed but intentionally not fixed
|
|
154
|
+
|
|
155
|
+
## Done looks like
|
|
156
|
+
|
|
157
|
+
- [ ] Root cause named in one sentence
|
|
158
|
+
- [ ] Fix applied at the owning boundary
|
|
159
|
+
- [ ] Regression proof fails against the old behavior
|
|
160
|
+
- [ ] Minimal code change restores the invariant
|
|
161
|
+
- [ ] Scoped verification passed on the changed surface
|
|
162
|
+
- [ ] `/verify` handoff used when blast radius exceeded a local fix
|
|
163
|
+
- [ ] Report cites evidence, not intent
|
|
164
|
+
|
|
165
|
+
## Anti-patterns this command refuses
|
|
166
|
+
|
|
167
|
+
- Fixing the nearest symptom while leaving the real invariant broken
|
|
168
|
+
- Catching an error and returning a sentinel to "keep things moving"
|
|
169
|
+
- Raising a timeout, retry count, or polling interval instead of finding the bottleneck
|
|
170
|
+
- Adding a deprecated alias instead of updating consumers
|
|
171
|
+
- Introducing `any`, suppressions, or lint disables to unblock the fix
|
|
172
|
+
- Bundling unrelated refactors with the repair
|
|
173
|
+
- Claiming done from intuition, partial output, or another agent's success message
|
|
174
|
+
- Writing a planning/doc artifact when the user asked for a fix
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grok
|
|
3
|
+
description: "Grok outside-voice review."
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Use for bounded Grok Build outside-voice review.
|
|
8
|
+
|
|
9
|
+
- One bounded review invocation per request.
|
|
10
|
+
- No fan-out, probe, retry, account rotation, or provider switch unless the user sets `review_budget`/`N` > 1.
|
|
11
|
+
- Use `wp_review_run` unless MCP is unavailable.
|
|
12
|
+
- Grok review is prompt-only: gather diff excerpts and verification yourself;
|
|
13
|
+
pass that supplied artifact to Grok.
|
|
14
|
+
- Call `wp_review_run` exactly once with `repository_access: "none"`. The runtime
|
|
15
|
+
owns the empty execution workspace.
|
|
16
|
+
- The prompt must say "supplied artifact text only", "do not inspect a
|
|
17
|
+
workspace", "do not announce future work", and require a final `VERDICT:` line.
|
|
18
|
+
|
|
19
|
+
```jsonc
|
|
20
|
+
{
|
|
21
|
+
"prompt": "You are doing a bounded advisory code review of the supplied artifact text only. Do not inspect a workspace. Do not announce future work. <diff excerpts + verification + questions>. Final line must start with VERDICT:",
|
|
22
|
+
"provider": "grok",
|
|
23
|
+
"repository_access": "none",
|
|
24
|
+
"skipProbe": true,
|
|
25
|
+
"stage": "review",
|
|
26
|
+
"expectedMarker": "VERDICT:",
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`wp_review_gate` is plan-only exact-version draft approval/auto-promotion.
|
|
31
|
+
Implementation/phase review uses advisory `wp_review_run` and never mutates
|
|
32
|
+
blueprint approval state. CLI delivery gates are MCP-unavailable compatibility only.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: skill
|
|
3
|
+
slug: hooks-doctor
|
|
4
|
+
title: Hooks Doctor
|
|
5
|
+
status: active
|
|
6
|
+
scope: repo
|
|
7
|
+
applies_to: [agents]
|
|
8
|
+
related: []
|
|
9
|
+
created: "2026-05-07"
|
|
10
|
+
last_reviewed: "2026-05-07"
|
|
11
|
+
name: hooks-doctor
|
|
12
|
+
description: "Webpresso hook/plugin doctor: verify install health and debug broken hooks or plugin integration."
|
|
13
|
+
argument-hint: "[--skip-mcp]"
|
|
14
|
+
allowed-tools:
|
|
15
|
+
- Bash
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Hooks Doctor
|
|
19
|
+
|
|
20
|
+
Verify the webpresso plugin hooks installation is healthy. Run this first when:
|
|
21
|
+
|
|
22
|
+
- A hook seems not to be firing
|
|
23
|
+
- The plugin was just installed or updated
|
|
24
|
+
- Claude Code can't find expected tools
|
|
25
|
+
- Any plugin integration issue arises
|
|
26
|
+
|
|
27
|
+
## Running the Check
|
|
28
|
+
|
|
29
|
+
Run the doctor command directly:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
wp hooks doctor
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or skip the MCP server check (for CI environments):
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
wp hooks doctor --skip-mcp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Interpreting Results
|
|
42
|
+
|
|
43
|
+
Each check prints `[x]` (pass) or `[ ]` (fail) with a detail line:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
[x] pretool-guard
|
|
47
|
+
[x] post-tool (lint-after-edit)
|
|
48
|
+
[x] stop (qa-changed-files)
|
|
49
|
+
[x] guard-switch
|
|
50
|
+
[x] sessionstart
|
|
51
|
+
[x] test-quality-check
|
|
52
|
+
[x] plugin.json integrity
|
|
53
|
+
[x] MCP server liveness: MCP server already running (sentinel found)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Failure Remediation
|
|
57
|
+
|
|
58
|
+
| Check | Likely Cause | Fix |
|
|
59
|
+
| ------------------------------------------------ | -------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
60
|
+
| `pretool-guard` / `post-tool` / etc. — not found | `wp run build` not run after install | `wp run build` |
|
|
61
|
+
| `pretool-guard` / etc. — not executable | `chmod +x` not persisted | Re-run `wp run prepare` or `wp run build` which runs `chmod-bins` |
|
|
62
|
+
| `plugin.json integrity` — missing | Claude adapter manifest absent from `@webpresso/plugin-claude` | Re-run `wp setup --host claude` or reinstall the Claude plugin |
|
|
63
|
+
| `MCP server liveness` — timeout | MCP server cold-start too slow | Wait and retry, or run `wp hooks doctor --skip-mcp` |
|
|
64
|
+
| Any check — not found at `dist/esm/...` | Build artifacts missing | Run `wp run build` in the webpresso repo |
|
|
65
|
+
|
|
66
|
+
After fixing, re-run `wp hooks doctor` to confirm.
|
|
67
|
+
|
|
68
|
+
## How It Works
|
|
69
|
+
|
|
70
|
+
The doctor runs five categories of checks:
|
|
71
|
+
|
|
72
|
+
1. **Bin existence** — each hook binary exists at the expected `dist/esm/hooks/...` path
|
|
73
|
+
2. **Executable bit** — bins have execute permission (skipped on Windows)
|
|
74
|
+
3. **stdin response** — interactive hooks (`pretool-guard`, `guard-switch`, `sessionstart`) respond to `{}` input with valid JSON and exit 0; fire-and-forget hooks (`lint-after-edit`, `qa-changed-files`) exit 0
|
|
75
|
+
4. **plugin.json integrity** — adapter manifest exists, has required fields, and all referenced bins exist on disk
|
|
76
|
+
5. **MCP server liveness** — spawns the MCP server and sends a `tools/list` JSON-RPC request; times out at 5s (soft-fail — warning only, does not fail the overall check)
|
|
77
|
+
|
|
78
|
+
If `isMcpReady()` detects a live MCP sentinel, the MCP check fast-passes without spawning.
|