Expand description
Edit-time code-health gate — shared by ctx_edit, ctx_patch, and the
native-edit hook.
Drift prevention is the lever lean-ctx has that a post-hoc scanner does not:
it sits in the edit path, so it can catch a complexity regression at the
moment it is introduced. The gate is pure except for reading [code_health]
config, and its notice text is deterministic (#498-safe).
Enums§
- Gate
Outcome - Decision of the edit-gate for one edit.
Functions§
- evaluate
- Evaluate the gate for an edit from
old→newsource in a file withext, using the active[code_health]config (threshold + mode). - evaluate_
with - Pure gate evaluation with explicit
mode/threshold— the unit-tested core.