1---2name: yagni-slice3description: Use when implementing a feature or change request. Deliver the smallest slice that satisfies the ask; refuse speculative abstractions, unused extension points, and "while we're here" work.4---56# YAGNI Slice78## When to use910- Building a new feature, endpoint, CLI flag, or UI flow from a concrete ask.11- A change request is vague enough that over-building is a risk.12- Reviewing your own plan and noticing frameworks, plugins, or generics "for later".1314## When not to use1516- The user explicitly requested a reusable library, public API, or multi-tenant design.17- Migrating an established pattern already used elsewhere in the codebase.18- Hardening for a documented compliance or security requirement.1920## Assumptions2122- Access to the repo, issue/PR text, and ability to run existing tests.23- Product intent is the written ask (issue, message, acceptance criteria) — not inferred future needs.24- Do **not** delete large modules, force-push, or rewrite public APIs without explicit confirmation.2526## Workflow27281. Quote the acceptance criteria in one short list (what "done" means).292. Draft the thinnest implementation path that hits every criterion.303. Cut anything not required for those criteria (extra configs, indirection, unused types).314. Implement the slice; stop when criteria are met and tests prove it.325. List deferred ideas in the PR/notes — do not code them.3334## Steps35361. **Ask → checklist** — Convert the request into 3–7 testable bullets. If a bullet is "support every X", challenge it down to the needed X.372. **Reuse first** — Search the repo for an existing helper before inventing a new layer.383. **One path** — Prefer a straight-line implementation over strategy/plugin/factory patterns unless two real call sites already exist.394. **No speculative files** — Do not add empty `utils/`, `types/future.ts`, or feature flags "just in case".405. **Diff budget** — If the diff grows beyond the ask, split or delete the extras before merging.416. **Name deferrals** — In the PR body, note follow-ups explicitly so they are not smuggled into this change.4243## Success criteria4445- [ ] Every acceptance bullet is met by the change.46- [ ] No unused abstractions, dead config keys, or unreachable code paths were introduced for hypothetical needs.47- [ ] Diff is explainable as one concern in a short summary.48- [ ] Deferred work is written down, not partially implemented.49- [ ] Destructive or breaking cleanup was confirmed or avoided.5051## Out of scope5253- Large-scale architecture redesigns requested as the primary goal.54- Dependency policy (use a dedicated no-new-deps style skill).55- Incident response where speed overrides elegance (use incident-hotfix).