Contributing
This project has a deliberately small, strict set of engineering rules. They keep
the codebase readable, dependency-free, and easy to hack on. The full list lives
in CONTRIBUTING.md;
the highlights:
- ≤ 150 lines per
.js/.cjs/.mjsfile. Hard cap, CI-enforced byscripts/check-lines.jswith no path exceptions — over the cap → split by responsibility. Non-JS assets (HTML/CSS underpublic/) aren’t counted, and the docs live in their own repo, not this one. - One responsibility per file. Name the file after the one thing it does.
- Strict layering:
server.js(wiring) →lib/routes/*(controllers) →lib/<domain>/*(services + pure engine). No layer-skipping. - Zero runtime dependencies — Node stdlib only.
- Pure engine functions; isolate side effects (
fs, network,child_process) in named modules. - Validate every request at the boundary. Never trust client input.
- No secrets in git, ever. No telemetry.
- One runnable self-check per non-trivial module (
--selftest). - Docs as you go — every tool has a README; every feature has a page here.
Running the checks
Section titled “Running the checks”node scripts/check-lines.js # the 150-line gate (also runs in CI)npm test # each installed tool's --selftest