Skip to content

Contributing guide: the code rules a reviewer checks, and the habits behind them - #296

Merged
electricessence merged 1 commit into
masterfrom
docs/engineering-guide
Dec 2, 2026
Merged

electricessence merged 1 commit into
masterfrom
docs/engineering-guide

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

Adds CONTRIBUTING.md at the root: the code rules a reviewer checks on every pull request, and the habits that keep a change small, correct and easy to review. Documentation keeps its own guide, docsite/CONTRIBUTING-DOCS.md, which this one points to.

What it covers

  • Layout: chains (first call on the receiver's line, then one call per line), about 80 columns with => on the next line, arguments grouped by meaning instead of one per line, braces on a wrapped header.
  • Resources and async: using / await using var _ = x.ConfigureAwait(false); instead of try/finally around a dispose, ConfigureAwait(false) on every library await, no needless async, when to return ValueTask.
  • Errors: every exception says what is wrong and what to do; one guard at the public entry point; a misuse the compiler can catch is a compile error.
  • Performance: state the per-call or per-row cost; no allocating string work on those paths; flags read with a mask; generated code at least as fast as hand-written; benchmarks that consume what they measure.
  • Pull requests: one topic, split before it grows; the description is the squash commit message; the checks that run before review.
  • Habits: probe before claiming provider or runtime behavior; run the last release before calling something a regression; ask whether real code can reach a bug before guarding it; fix the cause, not the test; record who decided; stay in the release's scope.

Markdown only; no code changes.

🤖 Generated with Claude Code

…behind them

Adds CONTRIBUTING.md at the root: layout (chains, line width, argument groups, braces), resources and async (using over try/finally, ConfigureAwait, ValueTask), errors (messages that say the fix, one guard at the entry point), performance (state the cost, no allocating string work, masks over HasFlag, generated code at least hand-written speed, benchmarks that consume their results), pull requests (one topic, the description is the squash message, the checks), and the habits that kept reviews short: probe before claiming, compare with the last release before calling a regression, ask whether real code can reach a bug before guarding it, record who decided, stay in scope. Points to docsite/CONTRIBUTING-DOCS.md for documentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@electricessence
electricessence merged commit ac3d3e3 into master Dec 2, 2026
9 checks passed
@electricessence
electricessence deleted the docs/engineering-guide branch December 2, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant