The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
docs(rules): add Rule Priority section to resolve language-specific vs common rule conflicts
Pangerkumzuk Longkumere78b8f256058
diff --git a/rules/README.md b/rules/README.mdindex 57de9d382..10d8ef231 100644--- a/rules/README.md+++ b/rules/README.md@@ -1,5 +1,4 @@# Rules-## StructureRules are organized into a **common** layer plus **language-specific** directories:@@ -80,3 +79,22 @@ To add support for a new language (e.g., `rust/`):> This file extends [common/xxx.md](../common/xxx.md) with <Language> specific content.```4. Reference existing skills if available, or create new ones under `skills/`.++## Rule Priority++When language-specific rules and common rules conflict, **language-specific rules take precedence** (specific overrides general). This follows the standard layered configuration pattern (similar to CSS specificity or `.gitignore` precedence).++- `rules/common/` defines universal defaults applicable to all projects.+- `rules/golang/`, `rules/python/`, `rules/typescript/`, etc. override those defaults where language idioms differ.++### Example++`common/coding-style.md` recommends immutability as a default principle. A language-specific `golang/coding-style.md` can override this:++> Idiomatic Go uses pointer receivers for struct mutation — see [common/coding-style.md](../common/coding-style.md) for the general principle, but Go-idiomatic mutation is preferred here.++### Common rules with override notes++Rules in `rules/common/` that may be overridden by language-specific files are marked with:++> **Language note**: This rule may be overridden by language-specific rules for languages where this pattern is not idiomatic.