@@ -534,59 +534,89 @@ When stuck in debugging loops:
5345343. **Document the issue** comprehensively for a fresh approach
5355354. Format for portability (using quadruple backticks)
536536
537- # # Shipped vs. Branch-Internal Narrative
537+ # # AI Slop Prevention
538+
539+ Treat AI slop as **review-hostile noise**, not as proof that text or
540+ code is wrong. The goal is to maximize information density by removing
541+ artifacts that make the repository harder to trust or navigate.
542+
543+ # ## The Anti-Slop Rubric
544+
545+ Before committing, audit all AI-assisted changes for these noise
546+ patterns :
547+
548+ - **AI Signatures:** Remove "Generated by", footers, conversational
549+ filler ("Certainly!", "Here is..."), unexplained emojis (🤖, ✨), and
550+ AI-tool metadata.
551+ - **Brittle References:** Avoid hard-coded line numbers, fragile
552+ file/test counts, dated "as of" claims, bare SHAs, and local
553+ absolute paths unless they are strict evidentiary artifacts (e.g.,
554+ benchmark logs).
555+ - **Diff Narration:** Do not restate what moved, was renamed, or was
556+ removed in artifacts the downstream reader holds : code, docstrings,
557+ README, CHANGES, PR descriptions, or release notes. The diff and
558+ commit message already carry this history.
559+ - **Branch-Internal Narrative:** Do not mention intermediate branch
560+ states, abandoned approaches, or "no longer" behavior unless users
561+ of a published release actually experienced the old state (**The
562+ Published-Release Test**).
563+ - **Low-Value Scaffolding:** Remove ownerless TODOs (`TODO: revisit`),
564+ unused future-proofing, debug artifacts, and defensive wrappers that
565+ do not protect a currently reachable failure mode.
566+ - **Prose Inflation:** Replace generic AI "tells" like *comprehensive,
567+ robust, seamless, production-ready, leverage, delve, tapestry,* and
568+ *best practices* with concrete descriptions of behavior,
569+ constraints, or trade-offs.
570+
571+ # ## Preservation & Context
572+
573+ **When unsure, leave the text in place and ask.** Subjective cleanup
574+ must never be a reason to remove load-bearing rationale.
575+
576+ - **Preserve the "Why":** You MUST NOT delete comments that document
577+ invariants, protocol constraints, platform quirks, security
578+ boundaries, and upstream workarounds.
579+ - **Evidence is Immune:** Preserve exact counts, dates, and SHAs when
580+ they serve as evidence in benchmark results, release notes, stack
581+ traces, or lockfiles.
582+ - **Behavior Over Inventory:** A useful description explains what
583+ changed for the *system or user*; it does not provide an inventory
584+ of files or functions the diff already shows.
585+
586+ # ## The Published-Release Test
538587
539588Long-running branches accumulate tactical decisions — renames,
540- refactors, attempts-then-reverts, intermediate states. Commit messages
541- and the diff hold *what changed* and *why*. Do not restate either in
542- artifacts the downstream reader holds : code, docstrings, README,
543- CHANGES, PR descriptions, release notes, migration guides.
544-
545- When deciding what counts as branch-internal, use trunk or the parent
546- branch as the baseline — not intermediate states inside the current
547- branch.
548-
549- **The Published-Release Test**
550-
551- Before adding rename history, "previously" / "formerly" / "no longer
552- X" phrasing, "removed" / "moved" / "refactored" / "fixed" diff
553- paraphrases, or `### Fixes` entries to a user-facing surface, ask:
589+ refactors, attempts-then-reverts. When deciding what counts as
590+ branch-internal, use trunk or the parent branch as the baseline — not
591+ intermediate states inside the current branch. Ask :
554592
555593> Did users of the most recently published release ever experience
556594> this old name, old behavior, or bug?
557595
558- If the answer is no, it is branch-internal narrative. Move it to the
559- commit message and describe only the current state in the artifact.
560-
561- **Keep in shipped artifacts**
596+ If the answer is **no**, it is branch-internal narrative. Move it to
597+ the commit message and describe only the final state in the artifact.
562598
599+ **Keep in shipped artifacts:**
563600- Deprecations and migration guides for symbols that actually shipped.
564601- ` ### Fixes` entries for bugs that affected users of a published
565602 release.
566- - Comments explaining *why the current code looks this way* —
567- invariants, platform quirks, upstream bug workarounds — that make
568- sense to a reader who never saw the previous version.
569-
570- **Default**: when in doubt, keep the artifact clean and put the story
571- in the commit.
603+ - Comments explaining *why the current code looks this way*
604+ (invariants, platform quirks) that make sense to a reader who never
605+ saw the previous version.
572606
573607# ## Cleanup in Hindsight
574608
575- When applying this rule retroactively from inside a feature branch,
609+ When applying these rules retroactively from inside a feature branch,
576610first establish scope by diffing against the parent branch (or trunk)
577611to identify which commits this branch actually introduced. Then :
578612
579- - **Commits introduced in this branch** — prompt the user with two
580- options : ` fixup!` commits with `git rebase --autosquash` to address
581- each causal commit at its source, or a single cleanup commit at
582- branch tip. User chooses.
583- - **Commits already in trunk or a parent branch** — default to
584- leaving them alone. Do not raise them as cleanup candidates; act
585- only on explicit user instruction. If the user opts in, fold the
586- cleanup into a single commit at branch tip and do not rewrite trunk
587- or parent-branch history.
588- - **Scope guard** — if cleaning in-branch bleed would touch a
589- colleague's in-flight work or expand the branch beyond its stated
590- goal, default to staying in lane : protect the project's current
591- goal, leave prior bleed alone, and don't introduce new bleed in the
592- current change.
613+ - **In-branch commits:** Prompt the user with two options: `fixup!`
614+ commits with `git rebase --autosquash` to address each causal commit
615+ at its source, or a single cleanup commit at branch tip.
616+ - **Trunk/Parent commits:** Default to leaving them alone. Act only on
617+ explicit user instruction. If the user opts in, fold the cleanup
618+ into a single commit at branch tip; do not rewrite shared history.
619+ - **Scope guard:** If cleaning prior slop would touch a colleague's
620+ work or expand the branch beyond its stated goal, stay in lane :
621+ protect the current goal and leave prior slop alone.
622+
0 commit comments