code-conventions

Installation
SKILL.md

Code Conventions

Activation Contract

Load this skill when writing production code or tests. Planners select its name through implementation-skill-routing; 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 dogma (consistent with the dependency-inversion skill).
Installs
4
First Seen
Jul 12, 2026
code-conventions — andresnator/agents-orchestrator