@@ -0,0 +1,26 @@
|
||||
---
|
||||
description: Hunt speculative complexity and propose deletions
|
||||
---
|
||||
|
||||
Read the code and find what has not earned its place. Propose removals; change nothing yet.
|
||||
|
||||
Look for:
|
||||
- Interfaces with one implementation. Type parameters with one instantiation.
|
||||
- Function parameters, struct fields, config knobs, or frontmatter keys with no real caller
|
||||
or no real author using them.
|
||||
- Two implementations of the same idea (parsing, path joining, slugging, date handling).
|
||||
- Abstractions built ahead of their counter: a pipeline at two transforms, a resolver at one
|
||||
route, an extension registry before its counter is due.
|
||||
- Files and functions over the advisory sizes in `scripts/budgets.env`; nesting past 4.
|
||||
- Error handling that logs and returns, or wraps without adding information.
|
||||
- Tests that assert on private helpers, or that need a mock to exist.
|
||||
- Dead code, commented-out code, `TODO`s older than the feature that introduced them.
|
||||
- Comments that narrate control flow.
|
||||
- Anything in `docs/` describing code that no longer exists — excluding `ideas/` and
|
||||
`reference/`, which are never audited against the code and must not be opened here.
|
||||
|
||||
Report as a table: item, location, why it has not earned its place, LOC recovered if deleted,
|
||||
and risk of deleting. Order by LOC recovered, descending. Recommend a top three.
|
||||
|
||||
Then stop. Deletions happen as their own small changes, with a go-ahead each, and each one runs
|
||||
`./scripts/verify.sh`.
|
||||
Reference in New Issue
Block a user