--- name: fuck-over-engineering description: Use when the user asks what could be deleted or reduced to simplify a codebase, says "simplify", "over-engineered", or wants a repo-, folder-, or file-wide audit for over-engineering — hunts dead code, reinvented stdlib, needless dependencies, and single-implementation abstractions, reports ranked cuts, applies only the picks. Not a diff review and not a bug hunt argument-hint: "[path, module, or area — omit for whole repo]" --- # Fuck Over-Engineering Audit the scope for over-engineering and report what to cut. The best outcome is a codebase with less to understand and the same behavior. Less to understand means fewer concepts: a concept is anything a reader must learn before changing the code, such as a module, type, function, flag, option, layer, or dependency. The argument is the scope; without one, the whole tree. Read what the scope holds before judging it, and fan out subagents when it will not fit in context. ## Tags - `delete:` dead code, unused flexibility, speculative feature, special-case branch no input reaches. Nothing replaces it. - `reuse:` hand-written code, or a near-duplicate, that a helper in this codebase or an installed dependency already provides. Name the helper or function. - `stdlib:` hand-rolled thing, or a dependency, that the language's standard library ships. Name the function. - `native:` dependency or code doing what the platform already does. Name the feature. - `yagni:` abstraction with one implementation, factory with one product, wrapper that only delegates, file exporting one thing, config or flag nobody sets, layer with one caller. - `shrink:` same logic, shorter and no harder to read. Show the shorter form. ## Evidence Every finding cites the evidence that makes it a cut: caller count, implementation count, or the stdlib or platform feature and the version that ships it. Count callers through dynamic dispatch, entry points, hooks, and tests, not grep alone. A published package's public export is not a cut at zero in-repo callers: its callers live outside the repo. For a branch no input reaches or a flag nobody sets, cite what rules the input out: the validation upstream, every set site, or the commit that added it. When you cannot settle a count, say so instead of writing 0. Where the scope declares things that exist outside the repo (resources, schemas, scheduled jobs), a finding also says what applying it would change there, or that this is unsettled: removing or renaming a declaration can destroy or replace what it declares. Verify `stdlib:` and `native:` claims against current docs (the `find-docs` skill when present) before asserting them. A finding removes lines or concepts; moving them between files is a refactor, not a cut. Fewer, bigger cuts beat a long list: a `shrink:` that saves two lines earns a slot only when it also removes a concept. ## Output Use `AskUserQuestion` in Claude Code or `request_user_input` in Codex when available. Use plain text when neither tool is available. One line per finding, numbered, ranked biggest cut first, where the size of a cut is how much a reader no longer has to understand and line count only breaks ties: `N. . . . [path:line]` `delete:` omits the replacement sentence. End with `net: - concepts, - lines, - deps possible.`, where `` counts the findings that remove a concept. Nothing to cut: `Lean already. Ship.` - `1. yagni: AbstractRepository with one implementation. Inline it. 1 subclass, 3 call sites typed to the base. [repo.py:88]` - `2. reuse: hand-rolled slugify. python-slugify is installed, slugify(). 1 caller. [utils/text.py:10-31]` - `3. delete: retry wrapper around an idempotent local call. 0 callers outside its own test. [src/net.py:52-71]` Then offer the findings in ranked batches, collect the user's picks, and apply only those. Run the project's checks before the first cut and again after the cuts: a cut that fails a check is reverted and reported, not patched around. In such a scope, passing checks do not show the same behavior: the proof is the tool's preview of changes (a plan, diff, or dry run) showing only what the finding said, and a cut you could not preview is reported as unverified. Done when the checks pass as they did before the cuts and you have reported the actual `net:`. ## Boundaries Over-engineering and complexity only: correctness bugs, security holes, and performance belong to a normal review pass. Trust-boundary validation, data-loss handling, security, and accessibility are never cuts. A single smoke test or assert-based self-check is the minimum, not bloat. Tests enter the report only as a side effect of a deleted target.