Engineering
Coding rules
Where Kevin's coding standards live, how language rules apply by path, how a repo's own manual takes precedence, and the default test policy.
Kevin reads rules from three places, and the most specific one wins:
- The repo's manual. A code repo keeps a full
AGENTS.mdat its root, with a.claude/CLAUDE.mdholding@../AGENTS.mdfor Claude Code, each harness file in its own dot-folder and no symlinks. Kevin reads both before touching the repo, every time. The repo's build loop, conventions, and test policy beat everything below. - Language rules, applied by file path. They sit in
.claude/rules/in your agent home and apply automatically when a matching file is in play. - The operating manual's Engineering Standards in your home's
AGENTS.md: think before coding, simplicity, surgical changes, goal-driven execution, the index of the principles, toolchain, code style, and comments.
Language rules
| Rule | Applies to | Holds |
|---|---|---|
typescript.md | **/*.ts, **/*.tsx | Discriminated unions, branded ids, the narrowing order with as last, schema-first parsing, exhaustive switches, and house idioms |
swift.md | **/*.swift | Value types, typed throws, enums with payloads, exhaustive switches, Swift concurrency traps, Swift Testing |
xcode.md, xcode-project.md | Xcode pack only | The toolchain through the Xcode MCP, one build driver at a time, project files never hand-edited |
Claude Code reads .claude/rules/; Codex doesn't. The same guidance lives in the engineer skill's language-neutral principles, so Codex still gets it when it works on code.
Tests
The repo's manual decides how much to test. Without one, the default is lean:
- unit tests on shared low-level utilities, where a bug would corrupt everything downstream;
- a regression test for a fixed bug when a cheap local test exists;
- no integration or end-to-end suites unless the repo asks for them.
A test that would still pass if every imported function returned undefined observes nothing, so it gets rewritten or deleted.
Comments
None by default. A comment keeps only a why the code can't show, and the comment pass runs before any diff reaches you.