---
name: c9n-clean-code-typescript
description: Clean Code principles adapted for TypeScript by the C9N team.
  Use whenever writing or refactoring TypeScript — naming, functions,
  classes, SOLID, error handling, and testing.
---
# Rules
Variables: meaningful names, named constants, default args.
Functions: ≤2 args (options object), one thing, one abstraction level.
Objects: `readonly`, type aliases.
Classes: composition over inheritance, access modifiers, SRP.
SOLID: SRP, Open/Closed, Liskov, Interface Segregation, Dependency Inversion.
Errors: subclass `Error`; never strings; never empty `catch`.
Tests: one concept per test; descriptive names; Arrange-Act-Assert.
Reference: https://github.com/labs42io/clean-code-typescript
