Coding standards
Who this is for
Section titled “Who this is for”Everyone who writes or reviews code.
When to use it
Section titled “When to use it”While writing and reviewing code.
- Must: Code in the repo is formatted and linted the way that repo already runs in CI or pre-commit. Do not argue style that the toolchain already enforces.
- Must: Names and structure describe the outcome. Do not leave debug dumps, commented-out blocks, or secrets in the merge.
- Must: Handle failure where the user or operator will feel it: validation, timeouts, and errors that need a log line.
- Should: Prefer clear code over clever code. If you need a comment to explain what, rename instead.
- Should: Match the patterns already in the file you are editing, unless you are deliberately changing the pattern in that PR.
- Team decides: Language-specific lint rules. Put stack-only rules on the stack page.
What good looks like
Section titled “What good looks like”A reviewer spends time on behavior and risk, not on tabs vs spaces.
What to do
Section titled “What to do”- Run the repo’s format and lint locally before you open the PR.
- Remove secrets, dead code, and leftover debug.
- Add or update tests for behavior you change. See Automated tests.
- If you introduce a new pattern, say why in the PR.