Paired examples throughout
Good and bad pairs
Destructuring, variable count, control flow and schema definitions each get a two-block comparison. The rule is stated in one line and then shown twice, marked good and bad.

Open source coding agent, built for the terminal.
Twelve code blocks in 161 lines; most style rules show the wrong version beside the right one.
File measured on dev at commit f444236. Analysis written 2026-09-14. Star count is a snapshot from September 2026.
A style guide that argues against abstraction, followed by a set of runtime invariants for its session core. The highest ratio of code to prose in the directory.
Quoted lines are verbatim from the file. Open one to see it where it sits.
Good and bad pairs
Destructuring, variable count, control flow and schema definitions each get a two-block comparison. The rule is stated in one line and then shown twice, marked good and bad.
Behavioral framing
Logic stays in one function unless it is reused, hides a genuinely complex boundary, or has a name that improves the caller. The same instruction appears twice in the file, once in the general principles and once under complex logic.
A single line fixes the allowed direction across six packages, including which layers client runtime code may never reach. It can be checked at an import without opening a config file.
At most three words, hyphenated, no slashes, no type prefixes, with three examples given.
The session core section states properties the type system does not hold: durable admission stays separate from model execution, one provider stream call per turn, no bridging through the legacy loop. They are written as standing constraints rather than as style.
The default branch is dev, a local main ref may not exist, and tests cannot run from the repository root because of a named guard. Three lines, each covering a state an agent would otherwise have to discover.
opencode's file tells an agent how the codebase works. It cannot tell it which bug three customers hit this week. Modem keeps that context current and attaches it to the work.