- Behavior is data where possible. What models exist, what they cost, what a team may use, and how agent flows are shaped are YAML files, not code — see Model routing and the scenarios catalog in the hub.
- Env arrives via
envFrom.secretRef. Aterraform applyupdates the Kubernetes Secret, but pods keep stale values until the deployment is rolled (kubectl rollout restart). Worth knowing during any config change that “didn’t take”.
Config files (repo config/)
The catalog paths must be absolute in any container (
MODEL_CATALOG_PATH, TEAM_CONTROLS_PATH) — a relative default once resolved to nothing and silently disabled every provider but Anthropic.
Mother AI (Rust ingest)
Worker (Python orchestrator)
Auth service
Documented on its component page — see Auth. The load-bearing ones:BETTER_AUTH_COOKIE_DOMAIN (must be a parent of every app host), TRUSTED_ORIGINS (CORS + Better Auth allowlist), ADMIN_EMAILS (auto-promotion), GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRET (the OAuth client is manual external state — its redirect URIs live in Google Cloud Console, not Terraform).
Frontend (Next.js on Vercel)
Internationalization (frontend)
- Slug ↔ tag split. URL prefixes and message files use slugs (
en,cn); the internal locale tag (en,zh-Hans) differs on purpose —cnis a region code, not a language, andIntlsilently falls back on it (new Intl.NumberFormat("cn")resolves to en-US formatting).lib/i18n/config.tsis the single registry tying slug, tag, and display label together; its test asserts every tag survivesIntl. - Routing. next-intl with
localePrefix.prefixes(/cnis a custom prefix), always-prefixed routes, a one-year locale cookie, and locale detection on — azh-*browser 307s to the prefixed path.lib/i18n/navigationreturns slug-stripped pathnames, so anything reading a path must keep receiving the stripped form. Static redirects innext.config.tsmust duplicate the slug alternation (/:slug(en|cn)/…) becauseredirects()runs before the proxy and cannot read the registry. - Adding a language. Add the BCP-47 tag to
LOCALES, the slug toLOCALE_SLUGS, its own-language label, amessages/<slug>.jsoncatalog, and the slug to the redirect alternation. The registry/messages tests fail until all of it lands; catalog parity is asserted including ICU argument names as sets (plural categories differ — Chinese has noone). - Gotcha. Next 16.1.6’s
experimental.globalNotFounddoes not compile under Turbopack — it was removed rather than fought.
Ingest (hub pipeline)
Kubernetes & Terraform
Deployments are provisioned byterraform/modules/* (workers, auth, qdrant, provider-secrets, cerebrum-workloads). Provider keys are Secrets Manager secrets under cerebrum/providers/* — Terraform owns the naming; pre-existing secrets must be imported before Terraform manages them. In-cluster secrets reach pods via envFrom.secretRef (see the rollout gotcha above). The docs site itself is configured by the exporter — see the Mintlify export runbook.