What problem does it solve?
clj-refactor helps you identify where Clojure code mixes reusable, stable logic with business-specific decisions, so your system stays easier to test, reuse, and evolve.
Core Features & Use Cases
- Mixed code detection: Flags functions/modules where mechanism and policy are tangled and explains where the boundary should be drawn.
- Extraction candidates: Recommends specific pieces of logic to move into separate, context-free modules suitable for reuse and isolation.
- Misplaced policy discovery: Spots business assumptions that have leaked into lower-level infrastructure and specifies where they belong.
- Concrete refactoring proposals: Suggests before/after structural changes while preserving existing behavior and avoiding premature abstraction.
Quick Start
Use clj-refactor to scan a Clojure directory for mechanism/policy tangling and propose structural extractions that preserve behavior.