Clean-code law
The budget
Section titled “The budget”Every source file is budgeted at 250 words (hard cap 350, enforced by a pre-write hook and CI — not a review comment). Bloat physically cannot land. Big features become small, navigable modules; DRY is checked against the knowledge graph, not memory.
The framework holds itself to the same cap — every .py in Atelier passes its
own audit.
The ponytail reflex
Section titled “The ponytail reflex”Before every line, the agent interrogates itself on a descending ladder and stops at the first rung that holds:
- Does this need to exist at all? (YAGNI)
- Already in this codebase? Reuse it.
- Standard library does it? Use it.
- Can it be one line? One line.
- Only then — the minimum that works.
Deliberate shortcuts are marked with a ponytail: comment naming the ceiling
and the upgrade path, so deferred work is tracked instead of forgotten.
Comment policy
Section titled “Comment policy”Comments state constraints the code can’t show — never what the next line does or why a change is correct. Root-cause fixes over symptom patches: one guard in the shared function beats a guard in every caller.
Full text: skills/clean-code-law/SKILL.md