Expand description
Edit-time cognitive-complexity delta.
Computes how an edit changes per-function cognitive complexity without
touching the index — pure and deterministic, so it can run inside the
edit path (ctx_edit, ctx_patch) and the native-edit hook to prevent
complexity drift at the moment it is introduced. Functions are matched by
name (their stable identity across an in-place edit).
Structs§
- Cognitive
Delta - One function’s cognitive-complexity change across an edit.
Functions§
- cognitive_
delta - Compare cognitive complexity of every function between
oldandnewsource for fileext. Returns only functions whose complexity changed, sorted by name. Empty when tree-sitter is disabled or nothing changed. - format_
gate_ notice - Deterministic one-line edit-gate notice. No timestamps/counters → #498-safe.
- worst_
regression - The most significant increase that ends above
threshold, if any. This is what the edit-gate surfaces (one line, the worst offender).