Explorar el Código

Give the dead-field sweep a real trigger and command

Paul Klumpp hace 1 semana
padre
commit
fb48031dd5
Se han modificado 1 ficheros con 11 adiciones y 2 borrados
  1. 11 2
      AGENTS.md

+ 11 - 2
AGENTS.md

@@ -186,8 +186,17 @@ see *Typed access* below for why that trade hides real bugs.
 written but never read: Ruff's F841 stops at locals, and pyright counts an
 attribute assignment as a use. Leftovers from long-gone features therefore
 survive indefinitely (`_dedup`, `_resume_cursor`, the `_ws_*` trio and the
-`_token`/`_user_*` mirrors all lived here unnoticed). Every few feature
-cycles, sweep the adapter's `self.*` fields: count assignments vs. other
+`_token`/`_user_*` mirrors all lived here unnoticed). Run the sweep whenever
+a feature is removed from or reworked in the adapter — that is when its
+state gets orphaned:
+
+```bash
+git grep -hoE 'self\.[a-z_][a-z0-9_]*' -- '*.py' ':!vendor' \
+  | sort | uniq -c | sort -n
+```
+
+A low count is a suspect, not a verdict — a lone mention can be dead data,
+but just as well a one-shot helper method. Count assignments vs. other
 mentions per name, confirm each suspect against the test fixtures and the
 Hermes base class, and delete whatever nothing touches.