Claude Code plugin that auto-blocks AI-driven edits when cognitive complexity or helper sprawl exceed configured budgets.
V1 ships two metrics on the PostToolUse hook for Rust files:
- CCS — Cognitive Complexity Score per function (Campbell 2018 cognitive complexity).
- HSI — Helper Sprawl Index: new private single-caller functions / patch LoC.
DR (Displacement Ratio) is Phase 2.5 and is not active in V1. The Stop hook is registered as a no-op stub.
Clone into a directory inside your Claude Code plugin path, then enable in settings.
Phase 1 uses hardcoded default-preset thresholds (CCS per_function 30, new_function 20; HSI 0.01). Phase 2 introduces .cogcomp.yml for preset selection and overrides.
Phase 1 (Rust pilot, hardcoded thresholds). Phase-by-phase scope lives in docs/ once Phase 2 docs land.