* docs(agents): Loki is the execution plane, not engineering The plane was renamed 2026-09-20 (orangecat src/config/ecosystem.ts ECOSYSTEM_PILLARS); this sentence still carried the old label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * feat(audits): hold every doc and every live page to what is true Agents read README / CLAUDE.md / AGENTS.md / .claude/ before code and act on them; visitors read pages rendered from components nobody greps. Both drifted silently: one pass over nine repos on 2026-10-19 found a merge policy said to live in a repo that no longer holds it, dozens of paths to deleted files, scripts not in package.json, "Next 15 / TS 5.8 / Tailwind 3.3" in a repo on 16 / 6 / 4, and a retired host presented as production in forty files. - docs-truth-audit.mjs: holds each repo's docs to its OWN tree — backticked paths, relative links, `pnpm run X`, stack majors vs package.json, retired names. Never judges prose; a line saying the thing is gone is history. Modes: --dir (working tree), --repo, --repo --pr (only what a PR adds), --sweep --check (every repo, ratcheted by docs-truth.baseline). - auto-merge sweep: the docs gate. A PR that ADDS docs drift — including by deleting a file a doc still names — is held with one comment per head commit naming each line and the fix. Exit 2 (could not look) never holds a merge. The sweep is the one workflow every repo calls, so this needs no per-repo copy. DOCS_TRUTH=0 opts a repo out. - live-claims-audit.mjs: fetches every live site in Loki's map (home + the pages it links first) and flags retired names/hosts, forbidden claims, a past copyright year and dead same-site links. Daily, ratcheted. - repo-metadata-audit: a GitHub description may not carry a retired name or a forbidden claim. - registers/org.json gains forbiddenClaims; org-drift-audit.sh reads it, so the document and served-page gates share one list. - Workflows docs-truth.yml and live-claims.yml (daily); both test suites run per-PR in ci.yml. AGENTS.md states the four gates once; README lists them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * feat(audits): fewer false positives, and homepages follow the register docs-truth: a removal stated across a line break is history; `cd sub && pnpm run x` reads the sub-package; an example path (e.g. …) is not a claim; a file that describes other repos by design (dotfiles' global CLAUDE.md) opts its paths out with <!-- docs-truth: paths-elsewhere -->. All four came from the first cleanup pass over the fleet. repo-metadata: --fix writes a homepage the register already holds, and repo-metadata.yml runs it daily with FLEET_PAT before the report — five homepages were missing or wrong on 2026-10-19 and every fleet PR inherited the red. Descriptions are prose and stay reported, never written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * feat(docs-truth): a name kept on purpose is marked on its line <!-- docs-truth: keep — why --> records a deliberate exception (a JWT issuer that still carries a retired name because changing it signs everyone out) instead of leaving it as drift the gate cannot tell apart from a mistake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * fix(docs-truth): links in code spans are markup; /file links resolve under public/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs(templates): AGENTS.md pointer names the local docs check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * ci: judge live repo metadata on its own schedule, not per PR The per-PR --check reads live GitHub state no PR can change; on 2026-10-19 it was red on every fleet PR over five untouched repos, including the PR adding the reconciler that repairs them. repo-metadata.yml (daily) fixes homepages from the register, then reports; the unit test stays per-PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD --------- Co-authored-by: Claude <noreply@anthropic.com>
6.2 KiB
fleet
The fleet's central automation: the checks that run from this repo against every other repo, the golden CI templates, and the shared-package registry. One copy of each, so nothing can drift.
Moved out of dotfiles on 2026-08-28 — a repo holding someone's .bashrc is
the wrong place for the machinery that gates thirty other repos, and keeping
them together made every fleet change look like an environment change and vice
versa. dotfiles is the environment again; this repo is the automation.
SHARED.md |
the shared-package registry and the duplication ratchet — read before building anything cross-cutting |
STACK.md |
the blessed technology per job — ONE ORM, ONE test runner, ONE auth stack; deviations are documented exceptions, not habits |
registers/readings.json |
derived nightly: the numbers the bet rests on — stars, forks, npm downloads, paying clients and CHF/month, originator share paid — as a time series that gains a row only when a reading changes. Zero is a reading. |
registers/origin.json |
derived nightly: for every public repo, GitHub's first commit, the OpenTimestamps manifest and Bitcoin block it is proven in, and its Software Heritage snapshot. What bitbaum.orangecat.ch says about origin comes from here. |
registers/org.json |
machine-readable register of org facts — agents read this, not READMEs. A new claim is a register row or it does not ship. |
scripts/ci/auto-merge-sweep.sh |
the canonical merge policy; the fleet calls it via the reusable workflow below. Includes the contributor gate: an outside PR merges only when every commit is Signed-off-by and a maintainer approved its head commit, certifying bitbaum/.github/CONTRIBUTING.md — the DCO plus the licence grant that keeps relicensing possible |
scripts/ci/model-pin-audit.mjs |
runs daily: is any model id the fleet pins still served by its vendor? |
scripts/ci/verify-floor-audit.sh |
does every repo's verify actually run lint + typecheck + test? |
scripts/ci/shared-inventory.sh |
counts duplication across the fleet and holds it as a ratchet |
scripts/ci/org-drift-audit.sh |
does any public document contradict the org register? A ratchet that prevents new lies from landing. |
scripts/ci/docs-truth-audit.mjs |
does each repo's documentation describe its own code — paths, links, scripts, stack majors, retired names? Runs inside the auto-merge sweep on every PR (a PR may not add drift) and daily over every repo as a ratchet. |
scripts/ci/live-claims-audit.mjs |
runs daily: does any live site serve a retired name, a forbidden claim, a past copyright year or a dead same-site link? |
scripts/ci/cicd-hygiene-audit.sh |
is the pipeline AROUND the gates sound — no self-cancelling deploys, no deploy re-running CI's bundle, no cold Next builds? |
scripts/ci/version-currency.mjs |
measures every repo against blessed-versions.json (SSOT of blessed majors + internal-package tags) and holds the gap count as a ratchet |
scripts/ci/ui-defect-audit.mjs |
do any live sites ship WCAG AA contrast failures or misaligned stacks? |
scripts/ci/origin-proof.sh |
runs nightly: stamps every repo's HEAD through OpenTimestamps and asks Software Heritage to snapshot it — third-party proof of WHEN the code existed, since git dates prove nothing. Proofs live in proofs/origin/. |
scripts/ci/bus-factor-audit.sh |
runs weekly: could someone who is not Cato operate each live app? Are its secrets NAMED in a committed env example (ratchet), and with --box: can it roll back, is its database dump fresh, do dumps leave the disk |
scripts/ci/nextauth-origin-audit.mjs |
runs daily: does every next-auth app advertise its own public origin, or is it publishing localhost from behind Caddy? |
scripts/fleet/ |
local upkeep: worktree GC, stranded-work guard |
templates/app/ |
the starter every new product is created from — Next.js, next-intl (en/de/fr), better-auth accounts, CSP, ai-kit, mail-kit, limitkit, bip-kit, CI/CD. Render with scripts/templates/render-app.sh; Loki's kickoff and new-site.sh produce the same app. Rendered, installed, verified and signed into on every PR here |
templates/ci/ |
golden CI workflows + pre-commit — deliberately ONE central copy |
templates/CONTRIBUTING.md |
a pointer only: the terms live in bitbaum/.github, which GitHub shows on every repo's PR form. Do not copy them into a repo |
The reusable auto-merge sweep
Repos adopt it with ~10 lines:
jobs:
sweep:
uses: bitbaum/fleet/.github/workflows/auto-merge-sweep.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
All sixteen callers point here directly. The forwarding shim that briefly
lived in bitbaum/dotfiles was removed once the last one migrated — a shim
that forwards nothing is just a second place the sweep appears to live, and
drift between copies is the problem this repo exists to end.
Org drift prevention
Agents read the register and apps.conf. They do not restate the org story. A new claim is a register row or it does not ship.
The register (registers/org.json) holds facts that have no other producer:
public name, legal status, house domain, host, design system. The drift audit
(scripts/ci/org-drift-audit.sh) fails when a public document contradicts it.
Existing violations are baselined; new ones cannot land. The inventory is
generated, and the number is a ratchet.
Live doors come from bitbaum/loki:scripts/hetzner/apps.conf, the SSOT
manifest for self-hosted apps. A README claiming a door that disagrees with
apps.conf is a drift violation.
Rules of the house
- Every audit has a test suite beside it (
test-*.sh,test-*.mjs). Keep it that way — these gate every repo, so a broken checker is a fleet-wide outage. - The duplication ratchet (
scripts/ci/shared-inventory.sh --check) runs weekly, not per PR — a PR runs its network-free self-test. Counts may fall, may hold, and may never rise.