yagni-gate
Adapted from DietrichGebert/ponytail (MIT) — the "laziest senior dev in the
room" ruleset. Same ladder, same guardrails; examples adapted to this toolkit.
The build-discipline sibling of caveman: caveman compresses what you say,
yagni-gate compresses what you build. The best code is the code never written.
Persistence
Active for EVERY code-producing response once triggered. Off only when the user
says "stop yagni-gate", "normal mode", or "be normal again". Composes with
caveman — run both for minimum talk and minimum build.
First: understand the problem
The ladder runs after you understand the problem, not instead of it. Read the
task fully and trace the real flow end-to-end before picking a rung — a
wrong-rung shortcut ships a minimal solution to the wrong problem, and that
rework costs more than every line the shortcut saved.
The ladder
Before writing code, stop at the FIRST rung that holds:
- Does this need to exist at all? No → skip it (YAGNI)
- Already in this codebase? Reuse the helper/util/pattern — don't rewrite it
- Stdlib does it? Use it
- Native platform feature covers it? Use it
- Already-installed dependency solves it? Use it
- Can it be one line? Make it one line
- Only then: write the minimum that works
Corollaries: no unrequested abstractions; no new dependency when a higher rung
holds; shortest working diff wins; deletion beats addition; when two options are
the same size, take the one the stdlib already made edge-case-correct. Bug fixes
target the root cause — fix the shared function once, don't patch each caller
(three caller-side guards are three future bugs wearing bandages).
When NOT to be lazy
The load-bearing half: the ladder without these is just an excuse to
under-build. Lazy means efficient, never negligent — these are never on the
chopping block:
- Input validation at trust boundaries
- Error handling that prevents data loss
- Security and accessibility
- Understanding the problem first (the section above)
- Anything the user explicitly asked for — YAGNI gates speculative scope,
never requested scope
One runnable check
Lazy code without its check is unfinished: every non-trivial change leaves ONE
runnable check behind — the smallest thing that fails if the logic breaks (an
assert-based self-check or one small test file; no frameworks, no fixtures).
Trivial one-liners need none.
Mark deliberate simplifications
When a rung deliberately skips something real, leave a yagni: comment naming
the limitation and the upgrade path — the shortcut then reads as a decision,
not an oversight, and nobody re-litigates it in review. (Upstream marks these
ponytail:; the marker is renamed with the skill.)
Examples
- Ask: "add a date picker." Over-built: install flatpickr, write a wrapper
component, add a stylesheet, discuss timezones. Minimal:
<input type="date">.
- Ask: "dedupe this list." Over-built: a
Deduplicator class with a strategy
interface. Minimal: [...new Set(items)].
- Bug: three callers crash on null. Over-built: null-guard each caller.
Minimal: fix the shared function once.
Siblings
architecture-rescue — post-hoc: finds what over-building already did to the
codebase (the deletion test). yagni-gate is the up-front reflex that keeps
that cleanup from being needed.
plan-intake's over-build (YAGNI) pass — the same lens applied to work
items; yagni-gate applies it to code.
caveman — the same discipline applied to response tokens.
Triggering test
- Must trigger: "yagni mode", "stop over-building this", "keep it minimal — YAGNI".
- Must NOT trigger: "improve architecture" (that's
architecture-rescue),
"be terse" (that's caveman).
1---2name: yagni-gate3version: 1.0.14description: >-5 Gate every build behind a persistent YAGNI ladder — the laziest senior dev in6 the room, adapted from DietrichGebert/ponytail (MIT). Before any code: does7 this need to exist, can something already present do it, can it be one line —8 only then the minimum that works. Never lazy about trust-boundary validation,9 data-loss error handling, security, accessibility, or understanding the10 problem first; every non-trivial change leaves one runnable check. Persists11 until 'stop yagni-gate' or 'normal mode'. Use when code keeps getting12 over-built, a tiny ask balloons into scaffolding, or you want a standing13 minimal-code gate on a session. Trigger on: 'yagni-gate', '/yagni-gate',14 'yagni mode', 'YAGNI', 'stop over-building', 'over-engineered', 'keep it15 minimal', 'minimum code', 'lazy mode', 'don't gold-plate', 'ponytail', 'less16 code'.17requires_agent_teams: false18requires_claude_code: false19min_plan: starter20owns:21 directories: []22 patterns: []23 shared_read: ["*"]24allowed-tools: ["Read", "Grep", "Glob"]25composes_with: ["caveman", "architecture-rescue", "plan-intake"]26spawned_by: []27metadata:28 source: https://skillmd.com/skills/ivy00johns/yagni-gate29---3031# yagni-gate3233> Adapted from `DietrichGebert/ponytail` (MIT) — the "laziest senior dev in the34> room" ruleset. Same ladder, same guardrails; examples adapted to this toolkit.3536The build-discipline sibling of `caveman`: caveman compresses what you *say*,37yagni-gate compresses what you *build*. The best code is the code never written.3839## Persistence4041Active for EVERY code-producing response once triggered. Off only when the user42says "stop yagni-gate", "normal mode", or "be normal again". Composes with43`caveman` — run both for minimum talk and minimum build.4445## First: understand the problem4647The ladder runs *after* you understand the problem, not instead of it. Read the48task fully and trace the real flow end-to-end before picking a rung — a49wrong-rung shortcut ships a minimal solution to the wrong problem, and that50rework costs more than every line the shortcut saved.5152## The ladder5354Before writing code, stop at the FIRST rung that holds:55561. **Does this need to exist at all?** No → skip it (YAGNI)572. **Already in this codebase?** Reuse the helper/util/pattern — don't rewrite it583. **Stdlib does it?** Use it594. **Native platform feature covers it?** Use it605. **Already-installed dependency solves it?** Use it616. **Can it be one line?** Make it one line627. **Only then:** write the minimum that works6364Corollaries: no unrequested abstractions; no new dependency when a higher rung65holds; shortest working diff wins; deletion beats addition; when two options are66the same size, take the one the stdlib already made edge-case-correct. Bug fixes67target the root cause — fix the shared function once, don't patch each caller68(three caller-side guards are three future bugs wearing bandages).6970## When NOT to be lazy7172The load-bearing half: the ladder without these is just an excuse to73under-build. Lazy means efficient, never negligent — these are never on the74chopping block:7576- Input validation at trust boundaries77- Error handling that prevents data loss78- Security and accessibility79- Understanding the problem first (the section above)80- Anything the user explicitly asked for — YAGNI gates *speculative* scope,81 never requested scope8283## One runnable check8485Lazy code without its check is unfinished: every non-trivial change leaves ONE86runnable check behind — the smallest thing that fails if the logic breaks (an87assert-based self-check or one small test file; no frameworks, no fixtures).88Trivial one-liners need none.8990## Mark deliberate simplifications9192When a rung deliberately skips something real, leave a `yagni:` comment naming93the limitation and the upgrade path — the shortcut then reads as a decision,94not an oversight, and nobody re-litigates it in review. (Upstream marks these95`ponytail:`; the marker is renamed with the skill.)9697## Examples9899- Ask: "add a date picker." Over-built: install flatpickr, write a wrapper100 component, add a stylesheet, discuss timezones. Minimal: `<input type="date">`.101- Ask: "dedupe this list." Over-built: a `Deduplicator` class with a strategy102 interface. Minimal: `[...new Set(items)]`.103- Bug: three callers crash on null. Over-built: null-guard each caller.104 Minimal: fix the shared function once.105106## Siblings107108- `architecture-rescue` — post-hoc: finds what over-building already did to the109 codebase (the deletion test). yagni-gate is the up-front reflex that keeps110 that cleanup from being needed.111- `plan-intake`'s over-build (YAGNI) pass — the same lens applied to *work112 items*; yagni-gate applies it to *code*.113- `caveman` — the same discipline applied to response tokens.114115## Triggering test116117- Must trigger: "yagni mode", "stop over-building this", "keep it minimal — YAGNI".118- Must NOT trigger: "improve architecture" (that's `architecture-rescue`),119 "be terse" (that's `caveman`).