Skip to content

code-conventions

Applies to ALL languages and frameworks; kit rules extend it in code-conventions-{kit}.md. Full lists: docs/code-conventions.md.

SOLID; self-documenting names; one responsibility per file, ≤200 lines, guard clauses over nesting, immutability by default; no magic numbers / empty catch / merged-TODO; test public behavior.

Data-Driven Over Hardcoded. Never hardcode mappings (command→skill/role/agent, keyword→module) — read registries at runtime.

No Duplicated Logic. Search lib/ first; use resolveClaudeDir() for every .claude/ path.

No Derived Fields. Never store derived fields (C = f(A,B) computed at use); the materialized exception has four required conditions.

Seams by feature, only when they pass the seam-worth test. Full text: docs/code-conventions.md.