- implements blueprint 028 - rewrite 290 cross-skill markdown links across 59 files to unchecked backtick-wrapped /skill-name prose (R-023), so skill content resolves under any install depth — symlinked, flat-copied, or whole-tree - add skills/productivity/conjure-a-skill/scripts/skill-ref-check — validates every /skill-name mention resolves to a real skill folder, the replacement coverage link-check lost on these references - add scripts/link-skills.sh, mirroring mattpocock/skills, symlinking every skill into ~/.claude/skills and ~/.agents/skills - docs(readme): point Install at link-skills.sh and npx skills@latest add for non-Claude-Code harnesses
90 lines
3.8 KiB
Markdown
90 lines
3.8 KiB
Markdown
---
|
|
name: winnow
|
|
description: After-the-fact debloat audit; only removes; ends with a net: -N lines scoreboard.
|
|
disable-model-invocation: true
|
|
---
|
|
|
|
# winnow
|
|
|
|
## When to use
|
|
- User says "winnow", "/winnow", "debloat", "what can we delete", "is this
|
|
over-engineered", "find what to cut", "simplify review".
|
|
- A diff or file is written and working; you want a separate pass that hunts
|
|
*only* for removable mass.
|
|
- **Not** a judgment gate — that is `/sieve`.
|
|
Winnow runs *after* the fact and argues *only* for deletion. It blows the
|
|
chaff off the grain; it never adds.
|
|
|
|
## Core principle
|
|
**Only removes, and proves it with a number.** Every finding names something
|
|
to cut and its replacement; the audit ends with a line-count delta. A pass
|
|
that can't show a negative number found nothing — it's just talk. The
|
|
scoreboard is what makes minimalism rationalization-proof.
|
|
|
|
## Tags
|
|
|
|
One finding per line:
|
|
|
|
```
|
|
<file>:<line>: <tag> <what>. <replacement>.
|
|
```
|
|
|
|
| tag | finds |
|
|
|---|---|
|
|
| `delete` | dead code, unused flexibility — no replacement needed |
|
|
| `stdlib` | hand-rolled logic the standard library already provides |
|
|
| `native` | code/dependency duplicating a platform-native feature |
|
|
| `yagni` | abstraction with one implementation, single-caller layer |
|
|
| `shrink` | logic reducible to fewer lines with a cleaner pattern |
|
|
|
|
Close with: `net: -<N> lines possible.`
|
|
|
|
## Over-engineering signals
|
|
- A 27-line validator class where a guard clause suffices.
|
|
- A framework dependency solving one trivial problem.
|
|
- An ABC / Protocol / interface with exactly one concrete implementation.
|
|
- A configuration layer nobody configures.
|
|
- A retry wrapper around an idempotent local operation.
|
|
- A manual loop where a built-in (`map`, `sum`, comprehension) applies.
|
|
|
|
## The brake — prove redundant before you cut
|
|
|
|
A "redundant" idiom may be **load-bearing**. Every `delete`/`shrink` is the
|
|
claim *"this is redundant"* — refute it before you act
|
|
(`/review-angles`); the type-checker
|
|
is one skeptic. A real review flagged a
|
|
repeated `tuple(r) for r in conn.execute(...)` wrapper and a
|
|
`cast(int | None, line)` as noise. Both were genuine no-ops at *runtime* —
|
|
but deleting the wrapper **broke the type-checker**: the raw cursor row
|
|
isn't positionally subscriptable, and the wrapper was normalising it.
|
|
|
|
So, before emitting any `delete`/`shrink`:
|
|
- **Run the type-checker, not just the tests.** Tests stay green when you
|
|
remove a type-only crutch; the checker is the one that bites.
|
|
- When an idiom turns out load-bearing, **centralise it** (one helper that
|
|
normalises once) — don't scatter it back, and don't just revert. The cut
|
|
becomes a *consolidation*, still net-negative, still honest.
|
|
- A finding whose only payoff is "fewer lines" but which a reader needs for
|
|
clarity, or the checker needs for soundness, fails the audit — it was
|
|
never chaff.
|
|
|
|
## Scope
|
|
Winnow ignores **correctness bugs, security, and performance** — those are
|
|
`/review-angles` and `/code-review`.
|
|
This pass is *only* structural complexity. Staying single-axis is what keeps
|
|
it sharp.
|
|
|
|
## See also
|
|
- `/sieve` — the judgment gate. Sieve decides
|
|
what earns its place; winnow mechanically clears what doesn't.
|
|
- `/nuke-review` — *structural-quality* review (code-judo). Pairs naturally — nuke-review judges shape; winnow clears chaff.
|
|
- `/design-codebase` — the
|
|
**deletion test** formalised: if removing a module makes complexity
|
|
vanish, it was a pass-through; if it reappears across N callers, it earned
|
|
its keep. The `delete` and `yagni` tags are this test mechanised.
|
|
- `/bdd` — file the
|
|
architectural follow-ups a winnow surfaces; don't auto-cut them mid-pass.
|
|
- `/review-angles` — the *correctness*
|
|
axis winnow deliberately does not touch.
|
|
- `/review-blueprint` — the *blueprint-fidelity* axis winnow also does not touch.
|