What problem does it solve?
Enforces a consistent set of clean code rules during code generation and refactoring so produced code is maintainable, testable, and easy to reason about. It prevents common anti-patterns like oversized functions, poor naming, improper layering, and premature abstractions that increase technical debt.
Core Features & Use Cases
- SOLID enforcement: Guidance to structure modules and services with single responsibility, open/closed design, and dependency inversion.
- Style and safety rules: DRY, KISS, YAGNI, atomic functions, guard clauses, immutability, encapsulation, and composition over inheritance.
- Documentation and boundaries: Encourage JSDoc for business intent, strict boundary validation, separation of concerns, and error handling placement.
- Practical use cases: Refactor an imperative handler into small pure functions, design repository interfaces with segregation, produce TypeScript-safe APIs, and create readable, testable components.
Quick Start
Apply clean-code-principles to the following code generation task and refactor the implementation to follow SOLID, DRY, guard clauses, immutability, expressive naming, and JSDoc for business intent.