Style

How code, comments, documents and commit messages are written in every OOPS repository. CONVENTIONS holds the project rules: provenance, naming, honest failure, logging, tooling and gates. A repository's own AGENTS.md or CLAUDE.md adds to both and does not restate them.

1. Write what is

Code, comments and documents describe the system as it is, in the present tense.

2. Code

Formatting

A formatter decides layout, and review never discusses it.

Language Formatter and lints
Rust cargo fmt with default settings; clippy with the workspace [lints] table, pedantic on, unsafe_code forbidden or every unsafe documented
C, C++ clang-format with the collection file: LLVM base, 4-space indent, 88 columns, braces on the same line. Each C repository carries a copy of obscene/.clang-format
Shell set -euo pipefail, 4-space indent, shellcheck clean
All LF line endings, final newline, no trailing whitespace

Every repository's check verb (./bin/<project> check) runs its formatter in check mode and fails on a diff. Upstream and vendored code is excluded from formatting and from every rule in this file.

Size

Simplicity

One owner per thing

Before adding a helper, entry point, constant, error type or log facility, look for the existing one:

Shared Rust code goes in oops-libs or the selfish crate that owns the format. Shared C code goes in oops-sdk, or oops-apps common/ when only apps use it. A second copy is a defect even when the first lives in another repository; request the change through the bus (CONVENTIONS section 9) rather than copying.

Consistency

3. Comments

A comment says why the code is the way it is, when the code cannot say it.

Not in comments:

4. Documents

What a repository holds

File Holds
README.md what the project is, how to build it, how to use it
AGENTS.md or CLAUDE.md agent rules this repository adds to the shared ones
docs/<SUBJECT>.md reference, user guide or architecture: one file per subject a reader looks up
docs/decisions/, docs/DECISIONS.md the decisions in force, and their generated index
docs/WORKLOG.md one entry per milestone
CHANGELOG.md one line per user-visible change, under the release that shipped it; only in a repository that tags releases
ACKNOWLEDGEMENTS.md sources consulted
ISSUES.md open defects, gaps and unmeasured facts, one line each; a line is deleted when it is fixed
data/ measured and cited facts, as text with a provenance header

Generated documents are allowed anywhere. Each states the command that generates it, and a gate fails when it is out of date.

Nothing else is hand-written. Before creating a document, extend an existing one. A new file needs a subject a reader will come looking for; a fix, an investigation, a request, a finding or a session is not a subject.

Decisions

A decision records a choice between real alternatives that constrains later work. A measurement, a finding or an implementation detail is not a decision: a measurement goes in data/ or a test, a detail in a code comment or the commit message.

Each decision is one file, docs/decisions/Dnnn-short-title.md, under 40 lines:

# D123 - Noun-phrase title

**Status:** decided
**Date:** 2026-09-26

The decision, in one or two present-tense sentences.

**Why:** the reason, in one to five sentences.

**Rejected:** each alternative, one line each, with the reason.

Worklog

docs/WORKLOG.md has one entry per milestone: a capability that now works end to end (a title reaches a new stage, a tool gains a command, a subsystem is verified on hardware), or a release. Between milestones, commit messages are the record; there are no per-task or per-session entries.

## 2026-09-26 - Milestone name

- What now exists, one fact per bullet.
- Facts learned that are not recorded in code, data or a decision.

An entry is at most about ten bullets, with no narrative.

Status and open work

Open work, known gaps and defects are one line each in the repository's ISSUES.md, grouped by kind and deleted when done. No other hand-written roadmap status, backlog, milestone-state or "where it stands" document. A ROADMAP.md may give the intended order of work, one line per item.

5. Commit messages