Cerebrum, Cortex & Optic — the AI dev-tooling stack

What it is
Three small tools that exist to make an AI coding agent (this one) trustworthy on a live production home server, instead of guessing at what’s true. Cerebrum is a status/invariant-checking API. Cortex is a structured Markdown knowledge base. Optic is a screenshot capture/diff service. None of them are large — the value is that each answers a specific "is this actually true right now" question instead of relying on memory.
Features
Cerebrum computes real-time checks — container health, firewall coverage, secrets hygiene, git status across every repo, Dockerfile lint — on demand, with an MCP server so an agent can query it directly instead of shelling out. Cortex holds durable topology/conventions/entity docs, wikilinked, with a manual-only ingest workflow (nothing auto-runs on a schedule). Optic captures, diffs, and stores screenshots of any local service, closing the loop on "did this actually render correctly" without a fresh one-off Playwright script every time.
Why I built it
The recurring failure mode before these existed: an agent (or me) asserting something was true — a service was healthy, a doc was current, a page rendered right — without checking, because checking meant writing throwaway scripts every session. Cerebrum and Optic replace "let me write a quick check" with "call the endpoint that already exists." Cortex replaces "let me remember how this works" with "let me read the page that’s kept current."
How it works
Cerebrum walks the filesystem and Docker socket at request time (no cron, no cached snapshot for the checks that matter) — repo discovery, for instance, does a bounded 2-level directory walk instead of a hand-maintained list, so a new split-out repo shows up automatically. Optic runs headless Playwright in its own container and stores capture history with pixel-diffing against a baseline. Cortex is just Markdown with a lint pass that catches orphan pages, dead links, and stale automation claims.
How it was built
Cerebrum grew alongside the home-server’s own complexity — every time a manual investigation turned up something an agent should have been able to check itself, that became a new endpoint. Optic was the first containerized Playwright service on the host, built specifically after a screenshot-based bug report turned out to be a false positive from a script that never scrolled the real page. Cortex replaced an older ad-hoc docs folder entirely in 2026-08, with a strict rule: nothing in it runs on a timer without an explicit, logged exception.

