diff --git a/CHANGELOG.md b/CHANGELOG.md index 77769351..fceea30e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- A technical principle, "Sane defaults, where a default serves better than an explicit ask". A default suits a value most callers want, does no harm when wrong, and can be seen and changed. It lives at the program's edge, such as a CLI; a library still asks for data, the clock and randomness. - larv-review's principles audit reads only the files under `~/.claude/principles/` that apply to the project, launching a file's auditor when unsure. A file's `Applies to` line says what it covers; one without the line covers every project. The summary names each file left out. After its first round, the architecture pass reruns the scoring run and only the reviewers whose 🔴 or 🟡 the fixes answer, unless the fixes carry an architectural decision. - When `loop-claude`'s judge rules a chunk unfinished, the resumed worker is shown the passage the judge quoted as the work remaining. A loop started before this change exits 1 at its next reload; rerun it. - larv-review's architecture pass and full security scan get short names, `Architecture` and `Full scan`. Each round's commit is titled with its pass's name in lower case: `Answer full scan round 1: …`. diff --git a/principles/technical-principles.md b/principles/technical-principles.md index 48e67994..beed63ec 100644 --- a/principles/technical-principles.md +++ b/principles/technical-principles.md @@ -47,6 +47,10 @@ * Explicit over implicit. - Avoid magic, avoid "clever" solutions, only abstract when the API can clearly describe what is happening. - Prefer explicit, descriptive names over generic ones (`invoiceRowsService`, not `service`). +* Sane defaults, where a default serves better than an explicit ask. + - A default earns its place where most callers want the same value, a wrong guess does no harm, and the caller can see and change it through a `--help` line or a documented option. Anything else is asked for. + - Defaults live at the program's edge: a CLI, a config file, a library's public API. A library still asks for every input that can change between runs, such as data, the clock and randomness; only the code that wires a program together, such as its CLI, defaults those, as "Functional core, imperative shell" asks. + - BANNED: a CLI that refuses to run until given `--data-path` and `--seed`, when nearly every run wants the shipped data and fresh randomness. GOOD: it uses the shipped data and fresh randomness unless a flag overrides them, and `--help` names those flags. * Functional core, imperative shell. - Decisions live in pure functions, data in and data out; the shell around them performs the effects and holds no branching of its own. - Every side effect comes from outside: output, time, randomness, network and storage are injectable, so a test runs exactly the code production runs.