Add sane defaults as a technical principle, at the edge beside explicit over implicit

This commit is contained in:
2026-10-04 21:51:27 +02:00
parent 5baedb58df
commit 7146b447ab
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -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, and it lives where the program meets a person, such as a CLI.
- 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: …`.
+4
View File
@@ -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: a `--help` line, a documented option. Anything else is asked for.
- Defaults live where the program meets a person: a CLI, a config file, the code that wires the program together. Below that, every value is passed in, as "Explicit over implicit" asks.
- BANNED: a library constructor that quietly loads data, reads the clock or seeds its own randomness. GOOD: the library asks for each, and its CLI fills in the shipped data, the system clock and fresh randomness unless a flag says otherwise.
* 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.