From 18dfd70d4782885496b9e6c3e6ccfc8e58ae5d46 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Fri, 10 Apr 2026 09:32:13 -0700 Subject: [PATCH] =?UTF-8?q?docs(memory):=20=F0=9F=93=9D=20Update=20non-reg?= =?UTF-8?q?ression=20testing=20documentation=20to=20define=20clear=20feedb?= =?UTF-8?q?ack=20expectations=20and=20best=20practices=20for=20preventing?= =?UTF-8?q?=20regressions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../memory/feedback_never_regress.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .claude/projects/-var-home-lilith-Code--projects--magic-civilization/memory/feedback_never_regress.md diff --git a/.claude/projects/-var-home-lilith-Code--projects--magic-civilization/memory/feedback_never_regress.md b/.claude/projects/-var-home-lilith-Code--projects--magic-civilization/memory/feedback_never_regress.md new file mode 100644 index 00000000..7f3ae878 --- /dev/null +++ b/.claude/projects/-var-home-lilith-Code--projects--magic-civilization/memory/feedback_never_regress.md @@ -0,0 +1,18 @@ +--- +name: NEVER regress, bypass, or reduce functionality +description: Critical directive — agents must never rewrite files that destroy existing work, even if verify passes +type: feedback +--- + +NEVER REGRESSION. NEVER BYPASS. NEVER REDUCE FUNCTIONALITY. + +**Why:** Iter 8k balance-tuner agent rewrote processor.rs (205 tool calls) and destroyed all PvP combat, siege, terrain, and enemy-seeking code from iter 8g-8h (~300 lines). The `./run verify` gate passed because it only checks compilation + lint, not feature presence. This wasted an entire iteration (combat-restorer) just recovering to the previous state. + +**How to apply:** +- Agents touching processor.rs (or any heavily-iterated file) MUST read the full file first and understand what's there +- Changes must be ADDITIVE edits, not full rewrites — use Edit tool on specific functions, never Write the whole file +- Before making changes, grep for key functions that MUST be preserved (nearest_enemy, process_pvp_combat, process_siege, terrain_movement_cost, etc.) +- After changes, verify key features still exist: `grep "nearest_enemy\|process_pvp\|process_siege\|terrain_movement_cost" processor.rs` +- If a feature count drops, the change is REJECTED +- Agent prompts should explicitly list functions that MUST NOT be removed +- Consider adding a regression test: "step() with 2 players produces pvp_kills > 0"