ADR 0001: Repository tooling
Context
Section titled “Context”The stack of Rhumbatron contains Bun 1.3.14, Turborepo, TypeScript, Biome, Zod, and Vitest. The repository also needs secret scanning, Git hooks, dependency hygiene, and a check of project policy. These are developer tools. They do not change the runtime stack.
Decision
Section titled “Decision”Rhumbatron uses these developer tools.
| Concern | Tool | Reason |
|---|---|---|
| Lint and format (TS, JSON, CSS) | Biome | Frozen choice. |
| Type checking | TypeScript (tsc) through Turborepo |
Frozen choice. |
| Secret scanning | gitleaks (system binary) | Default rules plus the custom rules in .gitleaks.toml. |
| Git hooks | lefthook (dev dependency) | One binary, parallel jobs, no shell scripts. |
| Commit messages | commitlint, conventional config, scope-enum in commitlint.config.ts |
One commit format. A scope names a module or a Compose service. |
| Unused code and dependencies | knip | Fails on undeclared and unused dependencies. |
| Monorepo package hygiene | sherif | Finds version mismatches across workspaces. |
| Project policy | scripts/check-guardrails.ts |
Fails when a local secret file is tracked, or when a service other than the socket proxy mounts the Docker socket. |
| Migrations | scripts/check-migrations.ts |
Migrations in migrations/d1 are append-only and safe. |
| Installs | Bun isolated linker, exact versions (bunfig.toml) |
A package cannot import a dependency that it does not declare. |
| Checks against the stack | bun run smoke local, bun run e2e local, bun run journeys local <ids>, bun run test:ui (Playwright, e2e/ui), bun run lighthouse |
They run on a developer machine against the Compose stack at https://rhumbatron.localhost. |
Consequences
Section titled “Consequences”- Contributors need
gitleaksonPATH, and Docker for the checks against the stack. bun run checkruns lint, typecheck, guardrails, the migration guard, knip, sherif, and gitleaks.bun installinstalls the Git hooks through thepreparescript..github/workflows/ci.ymlruns the checks on each pull request and each push tomain. It also validatescompose.yamlwithdocker compose config. It uses no secrets and deploys nothing.- The commit scopes are
repo,web,api,coordinator,agents,event-router,integration,indexer,protocol,model-router,sandbox,apps,core,platform,git,sandboxd,edge,stack,migrations,containers,docs,docs-site, andscripts. A commit with another scope gets a warning. - The checks against the stack (
smoke,e2e,journeys,test:ui,lighthouse) run on a developer machine. bun scripts/journeys.ts local <ids>runs the named journeys, for exampleA1,A2, orall.playwright.config.tstargetshttps://rhumbatron.localhostwithignoreHTTPSErrors.e2e/ui/build-app.spec.tsstarts from a blank Project, sends one instruction, and waits for a working live app.
Diagram
Section titled “Diagram”lefthook.yml defines the local gates.
flowchart LR commit["git commit"] --> pre["pre-commit (parallel)"] pre --> biome["biome check --write"] pre --> leaks["gitleaks git --staged"] pre --> guard["check-guardrails.ts"] commit --> msg["commit-msg"] --> cl["commitlint"] push["git push"] --> prepush["pre-push (parallel)"] prepush --> tc["bun run typecheck"] prepush --> deps["check:deps (knip, sherif)"]