docs(memory): 📝 Update non-regression testing documentation to define clear feedback expectations and best practices for preventing regressions

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-04-10 09:32:13 -07:00
parent 3b3ee4dda0
commit 18dfd70d47

View file

@ -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"