As written, the bullet banned any interface with a single implementation,
which contradicts the Repository Pattern in rules/common/patterns.md: it
requires business logic to depend on an abstract repository interface,
and a project backed by one database has exactly one implementation.
Scope the rule to speculative abstractions and name the exemption, so the
two files in rules/common/ no longer give opposite instructions.
The YAGNI section states the principle three times in the abstract
("avoid speculative generality", "introduce abstractions when repetition
is real") without naming a threshold an agent can test against. The same
gap exists in the review checklist for bug fixes: nothing tells a
reviewer to look past the reported symptom.
Add one bullet to each, both phrased as a check rather than an
aspiration: the second caller as the bar for introducing an abstraction,
and the sibling callers as the bar for accepting a bug fix.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`common/coding-style.md` has no `paths:` frontmatter, so it is loaded for every
source file regardless of language. Its Naming Conventions section nevertheless
prescribed `camelCase` for variables and functions, which is not idiomatic for
several languages the package supports: `python/coding-style.md` mandates PEP 8
(`snake_case`) and `rust/coding-style.md` mandates `snake_case` for functions,
methods and variables. Both carry `paths:` frontmatter, so for a .py or .rs file
the agent is handed two opposite naming rules in the same context. README.md does
state that language-specific rules take precedence, but that statement lives in
the README rather than in the rule files the agent actually receives.
Replace the casing list with the canonical `**Language note**` marker documented
in rules/README.md, and keep only what is genuinely language-independent:
descriptive names, boolean prefixes, and constants and types being visually
distinct from values, and only where the language draws that distinction at all.
The per-language examples name only languages whose own coding-style.md actually
states a casing standard.
Drop the "Custom hooks: camelCase with a use prefix" line and link to
react/coding-style.md instead — it is React-specific and documented there both as
the `useCamelCase` symbol rule and as the eslint-plugin-react-hooks enforcement
note. react/coding-style.md is path-scoped, so a hook colocated outside
`components/**` or `hooks/**` no longer receives the rule; see the PR description.
Fixes#2830