@webpresso/claude-plugin 3.1.3

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.
@@ -0,0 +1,129 @@
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-05-22"
11
+ name: fix
12
+ description: "Root-cause fix workflow for bugs, failures, regressions, and errors; reproduce, repair owner, test, verify."
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: reproduce, identify the broken invariant, repair it at the owner, prove the repair, and escalate to `/verify` when the blast radius is broader than a local fix.
23
+
24
+ ## Merged debugging discipline
25
+
26
+ `/investigate` and `systematic-debugging` are folded into this workflow. Keep the
27
+ old iron law: no fixes before evidence. Reproduce or capture the failure, read
28
+ the complete error/stack, trace the bad value or broken invariant to its owner,
29
+ compare with a working local pattern, and disconfirm cheap hypotheses before
30
+ editing. If the issue crosses component boundaries, add temporary diagnostics at
31
+ each boundary, run once, then remove or convert them to durable tests.
32
+
33
+ ## Non-negotiable invariants
34
+
35
+ 1. **Root cause, not symptom.** Trace the failure to the invariant that actually broke. Do not patch callers when the owner is fixable.
36
+ 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.
37
+ 3. **Use the repo's real execution surface.** Prefer repo-owned wrappers and injected routing guidance over host-specific tool assumptions. If the repo exposes quality wrappers, use them. Use bounded inspection paths for large-output investigation.
38
+ 4. **Regression proof is mandatory.** Add or strengthen a test or other reliable proof that would fail against the old behavior.
39
+ 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.
40
+ 6. **Zero suppressions, zero papering over.** No lint disables, ts-ignore, compat aliases, or "temporary" branches to sneak the fix through.
41
+ 7. **Minimal correct diff.** Update every consumer of a changed contract in the same change, but do not bundle unrelated cleanup.
42
+
43
+ ## Protocol
44
+
45
+ ### Step 1 — Reproduce and name the broken invariant
46
+
47
+ - Run the exact command, test, or user flow that surfaces the failure.
48
+ - Capture the evidence that matters: error text, file:line, exit code, failing assertion, or log path.
49
+ - Read enough surrounding code to say the broken invariant in one sentence.
50
+ - If the issue is nondeterministic, gather evidence until you can describe the slow/flaky/failing case without guessing.
51
+
52
+ If the "issue" is actually several unrelated failures, stop and ask which one to fix first.
53
+
54
+ ### Step 2 — Decide where the fix belongs
55
+
56
+ State briefly:
57
+
58
+ - the broken invariant
59
+ - the owner that should enforce it
60
+ - whether the fix changes a public contract
61
+ - which direct consumers must change in the same diff
62
+
63
+ 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.
64
+
65
+ ### Step 3 — Write failing proof first when feasible
66
+
67
+ - For a reproducible bug, write or strengthen the smallest regression test that fails on the old behavior.
68
+ - Verify that it fails for the right reason before changing production code.
69
+ - 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).
70
+
71
+ 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.
72
+
73
+ ### Step 4 — Implement the minimal correct fix
74
+
75
+ - Edit the file or module that owns the invariant.
76
+ - Update every changed consumer in the same diff. No half-migrations.
77
+ - Delete compat shims, dead aliases, and TODO branches made obsolete by the repair.
78
+ - Keep complexity down by extracting helpers instead of nesting conditionals.
79
+
80
+ ### Step 5 — Run scoped verification
81
+
82
+ Run the narrowest checks that prove the repaired behavior on the real repo surface:
83
+
84
+ - targeted test(s) for the repaired path
85
+ - targeted lint/typecheck/build checks for changed files or packages
86
+ - any boundary-specific verification the repo requires for the touched surface
87
+
88
+ Rules:
89
+
90
+ - Prefer repo-owned wrappers or routed quality tools over raw host-specific commands.
91
+ - Reuse fresh logs if the repo auto-saves them; do not re-run long commands just to re-read output.
92
+ - Read the exit code and summary before making a claim.
93
+
94
+ Escalate to `/verify <target>` when any of these are true:
95
+
96
+ - the fix crosses packages
97
+ - the fix changes a public or shared contract
98
+ - the fix touched docs, plans, blueprints, or repo SSOT
99
+ - the fix needs dead-code / compat / broad regression review before claiming done
100
+
101
+ ### Step 6 — Report with evidence
102
+
103
+ Keep it short:
104
+
105
+ - what invariant broke
106
+ - how the change restores it
107
+ - what proof ran (tests, commands, log paths, exit codes)
108
+ - adjacent issues noticed but intentionally not fixed
109
+
110
+ ## Done looks like
111
+
112
+ - [ ] Root cause named in one sentence
113
+ - [ ] Fix applied at the owning boundary
114
+ - [ ] Regression proof fails against the old behavior
115
+ - [ ] Minimal code change restores the invariant
116
+ - [ ] Scoped verification passed on the changed surface
117
+ - [ ] `/verify` handoff used when blast radius exceeded a local fix
118
+ - [ ] Report cites evidence, not intent
119
+
120
+ ## Anti-patterns this command refuses
121
+
122
+ - Fixing the nearest symptom while leaving the real invariant broken
123
+ - Catching an error and returning a sentinel to "keep things moving"
124
+ - Raising a timeout, retry count, or polling interval instead of finding the bottleneck
125
+ - Adding a deprecated alias instead of updating consumers
126
+ - Introducing `any`, suppressions, or lint disables to unblock the fix
127
+ - Bundling unrelated refactors with the repair
128
+ - Claiming done from intuition, partial output, or another agent's success message
129
+ - Writing a planning/doc artifact when the user asked for a fix
@@ -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 | `pnpm build` not run after install | `pnpm build` |
61
+ | `pretool-guard` / etc. — not executable | `chmod +x` not persisted | Re-run `pnpm prepare` or `pnpm build` which runs `chmod-bins` |
62
+ | `plugin.json integrity` — missing | Claude adapter manifest absent from `@webpresso/claude-plugin` | 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 `pnpm build` in the webpresso repo |
65
+
66
+ After fixing, re-run `wp hooks doctor` to confirm.
67
+
68
+ ## How It Works
69
+
70
+ The doctor runs five categories of checks:
71
+
72
+ 1. **Bin existence** — each hook binary exists at the expected `dist/esm/hooks/...` path
73
+ 2. **Executable bit** — bins have execute permission (skipped on Windows)
74
+ 3. **stdin response** — interactive hooks (`pretool-guard`, `guard-switch`, `sessionstart`) respond to `{}` input with valid JSON and exit 0; fire-and-forget hooks (`lint-after-edit`, `qa-changed-files`) exit 0
75
+ 4. **plugin.json integrity** — adapter manifest exists, has required fields, and all referenced bins exist on disk
76
+ 5. **MCP server liveness** — spawns the MCP server and sends a `tools/list` JSON-RPC request; times out at 5s (soft-fail — warning only, does not fail the overall check)
77
+
78
+ If `isMcpReady()` detects a live MCP sentinel, the MCP check fast-passes without spawning.
@@ -0,0 +1,84 @@
1
+ ---
2
+ type: skill
3
+ slug: lore-protocol
4
+ title: lore-protocol
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: []
9
+ created: "2026-05-07"
10
+ last_reviewed: "2026-05-07"
11
+ name: lore-protocol
12
+ description: "Manual Lore commit-message trailers with wp audit commit-message; no hook enforcement because PRs squash."
13
+ ---
14
+
15
+ # lore-protocol
16
+
17
+ Use Lore commit-message trailers manually with `wp audit commit-message`. Hook enforcement is intentionally not installed because this repo uses squash commits.
18
+
19
+ Lore is a lightweight protocol for embedding decision context directly into
20
+ commit messages — constraints, rejected alternatives, confidence, and
21
+ forward-looking directives — so future engineers understand _why_ a change
22
+ was made, not just _what_ changed.
23
+
24
+ ## Quick start
25
+
26
+ ```bash
27
+ # Validate a commit message file (hard-fail mode — exits non-zero on violations)
28
+ wp audit commit-message --message-file .git/COMMIT_EDITMSG --require-lore
29
+
30
+ # Soft-warn mode — emits warnings but always exits 0 (adoption ramp)
31
+ wp audit commit-message --message-file .git/COMMIT_EDITMSG --lore-warn
32
+
33
+ # Opt in per-commit by adding [lore] to the subject line:
34
+ # feat(auth): prevent silent session drops [lore]
35
+ ```
36
+
37
+ ## Hook policy
38
+
39
+ Lore trailers are advisory/manual. Do not install commit-msg or pre-push hooks for Lore enforcement; squash commits are the durable review boundary.
40
+
41
+ ## Trailer format
42
+
43
+ ```
44
+ <intent line: why the change was made, not what changed>
45
+
46
+ <body: narrative context — constraints, approach rationale>
47
+
48
+ Constraint: <external constraint that shaped the decision>
49
+ Rejected: <alternative considered> | <reason for rejection>
50
+ Confidence: <low|medium|high>
51
+ Scope-risk: <narrow|moderate|broad>
52
+ Directive: <forward-looking warning for future modifiers>
53
+ Tested: <what was verified>
54
+ Not-tested: <known gaps in verification>
55
+ ```
56
+
57
+ ## Required trailers (for `--require-lore` or `[lore]` subject tag)
58
+
59
+ | Trailer | Required | Allowed values |
60
+ | -------------------------------------------- | ------------ | -------------------------------- |
61
+ | `Confidence:` | yes | `low`, `medium`, `high` |
62
+ | `Constraint:` or `Rejected:` or `Directive:` | at least one | free text |
63
+ | `Scope-risk:` | optional | `narrow`, `moderate`, `broad` |
64
+ | `Reversibility:` | optional | `clean`, `messy`, `irreversible` |
65
+ | `Tested:` | optional | free text |
66
+ | `Not-tested:` | optional | free text |
67
+ | `Related:` | optional | free text |
68
+
69
+ ## Example commit
70
+
71
+ ```
72
+ Prevent silent session drops during long-running operations
73
+
74
+ The auth service returns inconsistent status codes on token
75
+ expiry, so the interceptor catches all 4xx responses.
76
+
77
+ Constraint: Auth service does not support token introspection
78
+ Rejected: Extend token TTL to 24h | security policy violation
79
+ Confidence: high
80
+ Scope-risk: narrow
81
+ Directive: Error handling is broad — do not narrow without verifying upstream behavior
82
+ Tested: Single expired token refresh (unit)
83
+ Not-tested: Auth service cold-start > 500ms behavior
84
+ ```
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: opencode-go
3
+ description: "OpenCode Go aggregate outside-voice reviewer for read-only plan, code, or implementation critique."
4
+ license: MIT
5
+ ---
6
+
7
+ # OpenCode Go aggregate reviewer via OpenCode Go
8
+
9
+ Use when the user asks for an OpenCode Go aggregate reviewer / OpenCode Go review. Treat output as external advice until independently verified.
10
+
11
+ ## Model routing
12
+
13
+ Rendered from the committed OpenCode reviewer policy. It does not hardcode model IDs; it resolves the live `opencode models opencode-go` catalog.
14
+ Use the aggregate reviewer when the user wants an OpenCode Go review but did not specify a family. The default outside-voice lane is Kimi K2.7 Code first for coding quality, then DeepSeek V4 Pro for deeper review depth, then DeepSeek V4 Flash for cheap/high-availability follow-up passes; only after that should it fall back to the remaining families.
15
+ Use the aggregate reviewer for general outside-voice plan critique, implementation review, or when the user wants the current best OpenCode Go lane without naming a family.
16
+
17
+ ## Auth and availability check
18
+
19
+ ```bash
20
+ opencode providers list >/dev/null
21
+ opencode models opencode-go >/dev/null
22
+ ```
23
+
24
+ ## Portable prompt file
25
+
26
+ ```bash
27
+ PROMPT_FILE=$(mktemp -t wp-opencode-go-review.XXXXXX)
28
+ trap 'rm -f "$PROMPT_FILE"' EXIT
29
+ ```
30
+
31
+ ## Review command
32
+
33
+ Use read-only prompts. Run from the repo directory; do NOT pass `--dir "$PWD"` because opencode already uses the current directory and the extra index can stall reviews.
34
+
35
+ ```bash
36
+ # Aggregate reviewer: honor the canonical reviewer policy (Kimi K2.7 Code → DeepSeek V4 Pro → DeepSeek V4 Flash first, then cross-family fallbacks).
37
+ CATALOG=$(opencode models opencode-go)
38
+ MODEL=$(echo "$CATALOG" | grep '^opencode-go/kimi' | grep -- '-code$' | sort -V | tail -1)
39
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/deepseek' | grep -- '-pro$' | sort -V | tail -1)
40
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/deepseek' | grep -- '-flash$' | sort -V | tail -1)
41
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/qwen' | grep -- '-max$' | sort -V | tail -1)
42
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/glm' | sort -V | tail -1)
43
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/minimax' | sort -V | tail -1)
44
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | grep '^opencode-go/mimo' | grep -- '-pro$' | sort -V | tail -1)
45
+ [ -z "$MODEL" ] && MODEL=$(echo "$CATALOG" | sort -V | tail -1)
46
+
47
+ # Fail fast on blocked quota before launching a long review.
48
+ [ -n "$MODEL" ] || { echo "No OpenCode Go model resolved for this reviewer." >&2; exit 2; }
49
+ OPENCODE_GO_REVIEW_EFFORT=${OPENCODE_GO_REVIEW_EFFORT:-medium}
50
+ [ "$OPENCODE_GO_REVIEW_EFFORT" = medium ] || [ "$OPENCODE_GO_REVIEW_EFFORT" = high ] || { echo "OPENCODE_GO_REVIEW_EFFORT must be one of: medium, high" >&2; exit 2; }
51
+ OPENCODE_GO_PROBE_TIMEOUT=${OPENCODE_GO_PROBE_TIMEOUT:-20}
52
+ PROBE_LOG=$(mktemp -t wp-opencode-go-probe.XXXXXX)
53
+ PROBE_RC=0
54
+ node - "$MODEL" "$OPENCODE_GO_PROBE_TIMEOUT" "$PROBE_LOG" "$OPENCODE_GO_REVIEW_EFFORT" <<'JS' || PROBE_RC=$?
55
+ const { spawnSync } = require('node:child_process')
56
+ const { writeFileSync } = require('node:fs')
57
+
58
+ const [model, timeoutSecondsRaw, logPath, reviewEffort] = process.argv.slice(2)
59
+ const timeoutSeconds = Number(timeoutSecondsRaw)
60
+ if (!Number.isFinite(timeoutSeconds) || timeoutSeconds <= 0) {
61
+ console.error('OPENCODE_GO_PROBE_TIMEOUT must be a positive number of seconds')
62
+ process.exit(2)
63
+ }
64
+
65
+ const result = spawnSync(
66
+ 'opencode',
67
+ ['run', '--format', 'json', '--variant', reviewEffort, '--model', model, '--title', 'opencode-go-credit-probe', 'Reply exactly OPENCODE_GO_OK.'],
68
+ { encoding: 'utf8', timeout: timeoutSeconds * 1000, maxBuffer: 1024 * 1024 },
69
+ )
70
+
71
+ let output = ''
72
+ if (result.stdout) output += result.stdout
73
+ if (result.stderr) output += result.stderr
74
+ if (result.error?.code === 'ETIMEDOUT') {
75
+ output += `\nOPENCODE_GO_PROBE_TIMEOUT after ${timeoutSeconds}s\n`
76
+ writeFileSync(logPath, output)
77
+ process.exit(124)
78
+ }
79
+ if (result.error) {
80
+ output += `${result.error.message}\n`
81
+ writeFileSync(logPath, output)
82
+ process.exit(1)
83
+ }
84
+ writeFileSync(logPath, output)
85
+ process.exit(typeof result.status === 'number' ? result.status : 1)
86
+ JS
87
+ if [ "$PROBE_RC" -ne 0 ]; then
88
+ echo "OpenCode Go probe failed or timed out for $MODEL after ${OPENCODE_GO_PROBE_TIMEOUT}s; skipping this reviewer instead of starting the full review." >&2
89
+ sed -n '1,80p' "$PROBE_LOG" >&2
90
+ rm -f "$PROBE_LOG"
91
+ exit "$PROBE_RC"
92
+ fi
93
+ rm -f "$PROBE_LOG"
94
+ opencode run --variant "$OPENCODE_GO_REVIEW_EFFORT" --model "$MODEL" "$(cat "$PROMPT_FILE")"
95
+ ```
96
+
97
+ If `$MODEL` is empty, run `opencode models opencode-go` and choose a present reviewer.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: plan-ceo-review
3
+ description: "CEO/founder plan review for scope, ambition, customer value, sequencing, and whether the plan is the right bet."
4
+ license: MIT
5
+ ---
6
+
7
+ # CEO plan review
8
+
9
+ Review the plan as a founder accountable for product leverage and customer value.
10
+
11
+ ## Modes
12
+
13
+ Choose one mode explicitly:
14
+
15
+ - **Scope expansion:** the plan is too timid; propose a bigger wedge.
16
+ - **Selective expansion:** keep the core but add one or two high-leverage improvements.
17
+ - **Hold scope:** ambition is right; demand sharper execution and proof.
18
+ - **Scope reduction:** remove distracting work and ship the smallest valuable slice.
19
+
20
+ ## Review checklist
21
+
22
+ 1. Who urgently wants this outcome and why now?
23
+ 2. What is the 10-star version, and what is the smallest credible slice of it?
24
+ 3. What should be deleted because it does not advance the wedge?
25
+ 4. What proof will convince us the work mattered?
26
+
27
+ Return a verdict, the recommended mode, and specific plan edits.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: plan-design-review
3
+ description: "Designer plan review for UI/UX clarity, hierarchy, interaction quality, accessibility, and visual coherence."
4
+ license: MIT
5
+ ---
6
+
7
+ # Design plan review
8
+
9
+ Review the plan as a product designer before code is written.
10
+
11
+ ## Scorecard
12
+
13
+ Rate each dimension from 0-10 and explain what would make it a 10:
14
+
15
+ - User intent and primary task clarity
16
+ - Information hierarchy and content structure
17
+ - Interaction states and error recovery
18
+ - Accessibility and keyboard/screen-reader paths
19
+ - Visual coherence, spacing, and affordances
20
+ - Responsiveness and empty/loading states
21
+
22
+ ## Output
23
+
24
+ - Overall score and verdict
25
+ - Top three design risks
26
+ - Minimal plan edits that improve the score
27
+ - Acceptance criteria for visual and accessibility verification
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: plan-devex-review
3
+ description: "Developer-experience plan review for onboarding, docs, CLI/API ergonomics, migration risk, and time-to-hello-world."
4
+ license: MIT
5
+ ---
6
+
7
+ # Developer-experience plan review
8
+
9
+ Use before implementing developer-facing features, setup flows, CLIs, docs, SDKs, or migrations.
10
+
11
+ ## Review checklist
12
+
13
+ - Who is the developer and what are they trying to do?
14
+ - Is the first successful path obvious and short?
15
+ - Are errors actionable and copy-pastable?
16
+ - Does the plan preserve existing workflows and migration safety?
17
+ - What docs, examples, and smoke tests prove the experience?
18
+
19
+ Return DX score, blockers, simplifications, and acceptance tests.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: plan-eng-review
3
+ description: "Engineering-manager plan review for architecture, data flow, sequencing, edge cases, tests, and rollout risk."
4
+ license: MIT
5
+ ---
6
+
7
+ # Engineering plan review
8
+
9
+ Review the plan as an engineering manager who must make it safe to execute.
10
+
11
+ ## Process
12
+
13
+ 1. Identify the target outcome, non-goals, constraints, owners, and stop condition.
14
+ 2. Map the implementation path: changed files, data flow, public interfaces, migrations, and backward-compatibility concerns.
15
+ 3. List edge cases and failure modes by severity.
16
+ 4. Check test shape: unit, integration, e2e, fixtures, regression coverage, and verification commands.
17
+ 5. Recommend the smallest plan repair that materially reduces risk.
18
+
19
+ ## Output
20
+
21
+ - **Verdict:** ready / ready with edits / not ready
22
+ - **Blocking issues:** concrete fixes required before coding
23
+ - **Recommended edits:** concise patch-level plan changes
24
+ - **Verification contract:** commands and evidence required before completion
@@ -0,0 +1,49 @@
1
+ ---
2
+ type: skill
3
+ slug: plan-refine
4
+ title: Plan Refinement Methodology
5
+ status: active
6
+ scope: repo
7
+ applies_to: [agents]
8
+ related: []
9
+ created: "2026-05-07"
10
+ last_reviewed: "2026-07-03"
11
+ name: plan-refine
12
+ description: "Blueprint hardening: fact-check assumptions, run plan reviews, split parallel tasks, and lock verification."
13
+ ---
14
+
15
+ # Plan Refinement Methodology
16
+
17
+ Use when a blueprint or implementation plan needs fact-checking, architecture hardening, parallel task shaping, or review consolidation before execution.
18
+
19
+ ## Core principle
20
+
21
+ A plan is only as strong as its weakest unchecked assumption and only as fast as its coarsest task granularity.
22
+
23
+ ## Required workflow
24
+
25
+ 1. **Technology fact-check.** Verify API, version, runtime, platform, and package claims against official/upstream sources when external behavior matters.
26
+ 2. **Codebase verification.** Confirm file paths, exports, existing patterns, dependency availability, and local command surfaces in the repo.
27
+ 3. **Architecture review.** Challenge race conditions, error cascades, ownership boundaries, concurrency, auth/session edges, public-package leakage, and unnecessary abstractions.
28
+ 4. **Plan-review lenses.** Folded `/autoplan`: run the relevant CEO/founder, design, engineering, and DevEx review lenses; consolidate keep/change/drop decisions, unresolved taste calls, tests, and go/no-go.
29
+ 5. **Blueprint enforcement.** Split tasks for independent execution, declare dependencies, identify file conflicts, require TDD/proof steps, and preserve acceptance criteria.
30
+ 6. **Apply and record.** Update edge cases, risks, technology choices, cross-plan references, and verification gates. Do not edit implementation code during plan refinement.
31
+
32
+ ## Mandatory gates
33
+
34
+ - Apply DRY, SOLID, YAGNI, and KISS; reject speculative abstractions.
35
+ - For package, catalog, generated-surface, or release changes, require package-surface and public-content checks.
36
+ - Prefer deletion/reuse over new layers or dependencies.
37
+ - Stop on unverified external claims, unresolved shared-file conflicts, or missing authority for destructive work.
38
+
39
+ ## Output
40
+
41
+ Return a concise plan review with:
42
+
43
+ - verdict: ready / ready with edits / blocked
44
+ - material corrections with evidence
45
+ - task/dependency changes needed for parallel execution
46
+ - required tests and audits
47
+ - residual risks or explicit blockers
48
+
49
+ For the full historical checklist and examples, read `references/full-methodology.md` only when deeper plan surgery is needed.