-
Notifications
You must be signed in to change notification settings - Fork 0
taste: keep prescribed fixes minimal #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
70fa70e
taste: prescribe reuse or delete, not new LOC
Octember 0de8ab9
refactor(prompt): simplify and remove negative instructions
Octember 27aa6ed
style: run oxfmt
Octember 1fcf7e0
refactor(prompt): further simplify prompt construction
Octember 683421b
refactor(prompt): encourage lighter review on tests and non-blocking …
Octember ef092ec
taste: every additional line of code is a liability
Octember File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,31 @@ | ||
| # Anti-slop rubric — what counts as slop (the taste, alongside `CORPUS.md`) | ||
|
|
||
| Edit it to match your team. Findings fall into three categories — and the first is the one the checks miss. | ||
|
|
||
| ## Confident-wrong — the whole change, judged against the simplest version (NO corpus citation needed) | ||
|
|
||
| The slop that passes every check: it compiles, it's tidy, it reads confidently — and it's still the wrong | ||
| change. Flag these on the CHANGE AS A WHOLE, on confidence, even when no single line is locally "wrong" and you | ||
| can't cite a corpus primitive. Judge against the bar: the smallest change that solves the REAL problem. | ||
|
|
||
| - `kind: wrong-premise` — solves a problem that isn't real, or rests on an unproven theory; the premise behind | ||
| the diff doesn't hold. The fix is "don't do this / prove the premise first," not a code tweak. | ||
| - `kind: overbuilt` — materially bigger than the problem: an invented fallback / retry / polling path, | ||
| speculative UI, a new layer or abstraction, or special-case proliferation where one default suffices. The fix | ||
| is the smaller version — name what to cut. | ||
| - `kind: confident-noop` — confidently claims a fix but doesn't change the real behavior (a no-op, or a change | ||
| at the wrong layer). Verify the actual effect against the checkout. | ||
|
|
||
| ## Just wrong — flag regardless of the corpus | ||
|
|
||
| - `kind: bug` — correctness bugs; off-by-one; broken null/empty handling; wrong condition. | ||
| - `kind: type-lie` — a type/annotation that does not match what the code actually returns | ||
| (e.g. annotated `T | null` but every path returns a non-null value cast to `T`). | ||
| - `kind: dead-code` — unreachable or dead branches; a declared-and-unused const/import/function. | ||
| - `kind: footgun` — swallowed errors / catch-and-continue with no owned degraded state; silent fallbacks; | ||
| test-only special-casing (`NODE_ENV === 'test'`, env-name string checks) leaking into production code. | ||
|
|
||
| ## Taste / reuse — relative to the corpus and the simpler way | ||
|
|
||
| - `kind: reinvents-primitive` — a NEW abstraction/layer/wrapper/facade/shim/fallback-reader when a corpus | ||
| primitive already does it (name the primitive). Or hand-rolling what a corpus file does. | ||
| - `kind: slop` — bigger / more abstract / more speculative than the corpus pattern for the same job: | ||
| - speculative `unknown` in hand-authored types; `TResult = unknown` generic defaults; | ||
| `z.unknown()` / `z.array(z.unknown())` | ||
| - generic-parameter explosion on a call site that is not actually reused generically | ||
| - `let best*/latest*` imperative argmax/latest accumulator loops | ||
| - throwaway one-call helpers, or wrapper functions that add no value — a pure pass-through to another fn | ||
| with the same signature; inline it / call the inner directly | ||
| - a defensive `?.` / `??` fallback on a value the type or schema already guarantees — e.g. `x?.foo ?? x.y.foo` | ||
| when `x` is required (or should be). Drop the optional chain and the fallback (it's `x.foo`); if `x` is | ||
| wrongly optional, fix the schema/type, don't paper over it at the call site | ||
| - denormalized parallel constants or hardcoded membership lists (derive a Set/Record from ONE `as const` array) | ||
| - speculative config seams / unused `mode` switches / injectable-override defaults nothing needs yet | ||
| - additive churn on a cleanup; code that "looks productive" over the minimal change | ||
|
|
||
| ## Fine — do NOT flag | ||
|
|
||
| - `unknown` at a real parse boundary fed into a normalizer; `Record<string, unknown>` context bags | ||
| - Set/Map-building or dedupe loops (not argmax accumulators) | ||
| - a single choke-point helper its owner reuses | ||
|
|
||
| ## Weigh the fix against the owner | ||
|
|
||
| Right-size the remedy to the code that owns it. Don't prescribe a heavier primitive than the context warrants: | ||
| a one-off script shouldn't grow a schema library, glue code shouldn't sprout an interface, a guaranteed-shape | ||
| boundary doesn't need the validation an untrusted one does, and an unattended job usually wants a loud default | ||
| over a hard exit. Demanding more rigor than the owner needs is its own slop. If the minimal fix is a one-liner, | ||
| the fix is the one-liner — propose that, not an architecture. | ||
| # Anti-slop rubric | ||
|
|
||
| ## Confident-wrong (judge against the simplest version) | ||
|
|
||
| - `kind: wrong-premise` — Solves a fake problem or rests on an unproven theory. Fix: "don't do this". | ||
| - `kind: overbuilt` — Materially bigger than the problem (invented fallbacks, speculative UI, new abstractions). Fix: name what to cut. | ||
| - `kind: confident-noop` — Claims a fix but doesn't change real behavior. | ||
|
|
||
| ## Just wrong | ||
|
|
||
| - `kind: bug` — Correctness bugs, off-by-one, broken null handling. | ||
| - `kind: type-lie` — Type annotation doesn't match actual return. | ||
| - `kind: dead-code` — Unreachable branches, unused declarations. | ||
| - `kind: footgun` — Swallowed errors, silent fallbacks, test-only code in prod. | ||
|
|
||
| ## Taste / reuse | ||
|
|
||
| - `kind: reinvents-primitive` — Hand-rolling what a corpus primitive already does. | ||
| - `kind: slop` — Bigger/more abstract than the corpus pattern: | ||
| - Speculative `unknown` or generic defaults. | ||
| - Generic-parameter explosion without reuse. | ||
| - Imperative argmax/latest accumulator loops. | ||
| - Throwaway one-call helpers (inline them). | ||
| - Defensive `?.` / `??` on guaranteed values. | ||
| - Denormalized parallel constants. | ||
| - Speculative config seams. | ||
| - Additive churn on a cleanup. | ||
|
|
||
| ## Weigh the fix | ||
|
|
||
| Right-size the remedy. Don't encourage over-building. Avoid prescribing heavy-handed fixes, instead note them as non-blocking unless truly needed. For example, PRs touching existing race conditions should be noted, not blocked on. Every additional line of code is a liability. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠
.review/REVIEW-PROMPT.md:1· overbuilt · conf 0.91This PR says it is only constraining prescribed fixes to stay minimal, but it rewrites the whole review contract and drops concrete safeguards around untrusted inputs, prior-review convergence, blocking vs non-blocking findings, and exact body formatting. The minimal change is a sentence in the existing fix guidance, not replacing the spec with a compressed version.
→ Fix: keep the existing spec/rubric text and add only the “delete/inline/call what's there; don't add LOC” constraint where fixes are prescribed.