Skip to content

OutlineDriven/claude-code-complexity-guard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-code-complexity-guard

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.

Install

Clone into a directory inside your Claude Code plugin path, then enable in settings.

Configure

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.

Status

Phase 1 (Rust pilot, hardcoded thresholds). Phase-by-phase scope lives in docs/ once Phase 2 docs land.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages