agentleFS
augments-labsaugments-labs/sdlc-skills/skills/common/yagni/SKILL.md

yagni

Skill1 starsChanged 4 months agoMITView on GitHub

Challenges scope so only what the task needs gets built, and built completely. Use when code, files, flags, or dependencies are being removed as unused, dead, or legacy; when scope drifts toward speculative or incomplete delivery; when a proposal needs a strict pre-edit challenge; or when anyone says we might need this later or let's make it configurable. Skip throwaway spikes and content or configuration with no behavior.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write the completion checklist from the accepted task, the commitments above, and the project's coding-standards exemplar.

    line 30
  2. Distinctive:

    Only then, the minimum code that fully works.

    line 45
  3. Distinctive:

    Add no abstraction for hypothetical variation.

    line 48
  4. Distinctive:

    Read every changed line against the Step 1 checklist.

    line 64
  5. Distinctive:

    Delete only what you proved unused: no static, runtime, reflection, config, generated, or external consumer, or a completed deprecation.

    line 72
  6. Very specific:

    Before done: real checks pass, implied inputs work, and no required path has a stub/TODO/placeholder.

    line 98
  7. Distinctive:

    Never cut trust-boundary validation, data-loss prevention, security, accessibility, or explicit user scope.

    line 100
  8. Distinctive:

    Never compress domain names, non-obvious why, or governing conventions.

    line 108
  9. Very specific:

    Never delete by confidence.

    line 109
  10. Very specific:

    Only a requested strict challenge with no dispatch action goes to dispatching-parallel-agents Step 2's question.

    line 115

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

YAGNI — build only what's needed, and make it work

Cut scope, never correctness. "Needed" means: satisfies the accepted task and every commitment it inherits — preserved behavior, durable data, public compatibility, supported environments, security, privacy, accessibility, observability, recovery, rollback, accepted assurance gates — and runs. The latest prompt need not repeat those for them to bind.

When to use

  • Code, files, flags, or dependencies are being removed as unused, dead, or legacy.
  • Scope drifts toward a speculative addition or an incomplete delivery — "we might need this later".
  • A proposal needs a strict pre-edit challenge.
  • A skill that hands off here invokes it directly, and its own trigger governs: the router, debugging, and receiving-code-review send a change that affects behavior through test-driven-development and this skill before the first edit.
  • Skip a throwaway spike answering one question, and non-behavioral config or content.

Step 1: Before the first edit

  1. Write the completion checklist from the accepted task, the commitments above, and the project's coding-standards exemplar. No exemplar → the nearest file in the codebase that does the same kind of thing. List names, structure, idioms, where a non-obvious why is explained.
  2. Trace the real flow. Change the owner of the behavior, not the first path that shows the symptom. Unknown cause → invoke debugging first.
  3. For each piece of the change, walk the ladder and stop at the first rung that holds:

    1. Speculative need → skip it and say so.
    2. Something in the codebase fits, same semantics, owner, dependency, lifecycle → reuse it.
    3. Standard library → use it.
    4. A native feature or constraint → use it over owned machinery.
    5. An installed dependency → use it. Add none for a few lines.
    6. One line → one line.
    7. Only then, the minimum code that fully works.

    Arguable rung → read references/yagni-in-depth.md before choosing.

  4. Add no abstraction for hypothetical variation. One real volatile or external boundary earns a seam only for measured impedance, a failure policy, or test isolation.
  5. Lasting surface (new dependency, service or process, generalized abstraction, public extension point or config knob, verification system) the user explicitly asked for → the request is its owner; dispatch nothing. Any other, or a strict challenge requested → fill assets/yagni-challenger.md with assets/challenge-report.md before dispatching it read-only per dispatching-parallel-agents Step 2; wait. Read the report; match Proposal and Challenge inputs to the request. Missing, mismatched, conflicting, or invalid verdict → inconclusive. revise → blocked as written. decision → its accountable owner decides (the user, unless a plan names another); wait. inconclusive → not clearance.

Step 2: Before calling it ready

  1. Read every changed line against the Step 1 checklist. A green test waives no convention visible in the file. A neighbour already drifted → report it; do not migrate it.
  2. Sort every candidate cut into two lists. Cut only from the first.
    • Minimal: removes abstractions, files, dependencies, or lines while every guarantee holds.
    • Unfinished: removes behavior or an inherited commitment, or leaves a stub, TODO, unhandled path, untested logic, unreadable code.
  3. Delete only what you proved unused: no static, runtime, reflection, config, generated, or external consumer, or a completed deprecation. A search proves unused only when its scope is known: a tool skipping ignored, binary, generated, or vendored paths yields "not searched", not proof; state the scope or rerun without the skips. Unknown → stays, or goes to migration or refactor ownership.
  4. REQUIRED SUB-SKILL: invoke verification-before-completion before the claim leaves this skill.

When you're tempted to call it done

The thoughtThe reality
"Simplest version: just stub this / return a placeholder"A stub is an unsolved task, not a simpler solution.
"I'll keep it minimal and leave a TODO"YAGNI defers unneeded features, never needed behaviour.
"Shortest diff wins, so I'll touch the smallest spot"Smallest diff in the wrong place is a second bug.
"Skipped the error/edge handling to stay lean"Correctness is never the thing you minimise.
"Simple enough to be obviously right — didn't run it"Unverified is not done. Run it.
"Deleted that code, it looked unused"Removing needed behaviour to shrink the diff is under-delivery.
"Ship the quick version, clean it up later"Later never comes; every future change pays the re-reading cost. Readable now is the cheaper path.
"Clear names and comments are gold-plating"Gold-plating is unneeded features. Clarity is maintenance cost — the thing this skill exists to protect.

Hard stops

  • Minimal ≠ incomplete. Smaller breaks ties only between solutions that both solve the task and run.
  • Before done: real checks pass, implied inputs work, and no required path has a stub/TODO/placeholder; confirm through verification-before-completion.
  • Never cut trust-boundary validation, data-loss prevention, security, accessibility, or explicit user scope.
  • Never minimise away: preservation, compatibility/parity, durable-data safety, observability, recovery/rollback, or a required migration/assurance gate. Their owning contracts define the guarantee; YAGNI cannot silently weaken it.
  • Minimise only ceremony owning no guarantee: duplicate gates, speculative abstractions, and uncommitted platforms/knobs.
  • Never compress domain names, non-obvious why, or governing conventions.
  • Never delete by confidence. Prove static/runtime/reflection/config/generated/ external consumer absence or completed deprecation; unknowns stay or route to migration/refactor ownership.

Gotchas

  • Only a requested strict challenge with no dispatch action goes to dispatching-parallel-agents Step 2's question. Answering inconclusive yourself blocks a surface the user explicitly asked for.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.