← ClaudeAtlas

code-conventionslisted

Trigger: writing production code or tests, applying test naming/assert style, extracting constants, placing DTOs or characterization tests. Andres's personal code and test conventions.
andresnator/agents-orchestrator · ★ 0 · Testing & QA · score 66
Install: claude install-skill andresnator/agents-orchestrator
# Code Conventions ## Activation Contract Load this skill when writing production code or tests. Executable-change producers select its name through `sdd-execution-skills`; they do not load this body. Do not use for documentation, prose artifacts, or infrastructure config with no code. ## Precedence These conventions are the default for new code and for repos without an established convention. When the target repo already follows a different convention consistently, the repo wins; note the deviation in the plan or summary instead of fighting it. ## Production Code - **No magic literals**: extract hardcoded numbers and strings into named constants placed where tests can reuse them. Tests reuse constants for fixtures and setup; when the constant itself IS the behavior under test, assert against the expected literal value to avoid tautological tests. - **Top-level DTOs**: DTOs and helper types are independent top-level classes/files — never inner or nested classes (Java), even when only one private method uses them. In TS, exported types in their own module following the repo layout. - **Stepdown order (soft)**: code reads top-down like a page; private methods appear in the order they are called. A preference for new or already-touched code, never a reason to churn diffs. - **Principles that carry weight**: Single Responsibility and Open-Closed. Introduce interfaces or dependency inversion only for real variation, test seams, or architectural boundaries — never as SOLID d