docs/merge-rubric.md
Rules for deciding whether a bug-fix PR gets merged into claude-mem. A PR must pass every section. One failure anywhere is a rejection — no partial credit, no "but the rest of it is good." If half the diff qualifies, the fix should be resubmitted as only that half.
A bug is incorrect behavior that exists today: wrong output, lost data, a crash, a wrong status code, a path that never matched, a flag that was never passed.
Not bugs:
fix: prefix.The test for any conditional in the diff: does it correct the logic at the root cause, or does it notice a failure and arrange to survive it? The first is a fix. The second is a rejection, in all of its costumes:
try/catch that logs-and-continues, never-throws wrappers,
"best-effort by design," tolerate-N-failures-then-drop counters. A guard's
defining property: after it fires, the failure still exists and is now quieter.limit parameter at
the correct point in the pipeline is semantics, not truncation.)What is allowed — and encouraged:
if statement is fine when it is the correct logic,
rather than a bouncer standing in front of incorrect logic.The fix must live inside the system that has the bug. Rejected on sight:
Tests are exempt: regression tests are part of the fix, not a second system.
The size of the fix should be proportional to the size of the logic error. One wrong line → roughly one changed line plus tests. When a one-line defect arrives inside a 400-line diff, the extra 399 lines are one of the costumes from section 2 — find which one, then reject it.
Origin: distilled from a full audit of 100 open PRs (2026-07-22), where the passing minority were uniformly small root-cause corrections — and every rejection was some flavor of machinery for surviving the bug instead of fixing it.