Skip to main content
Two conventions matter more than any single variable:
  • 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. A terraform apply updates 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 — cn is a region code, not a language, and Intl silently falls back on it (new Intl.NumberFormat("cn") resolves to en-US formatting). lib/i18n/config.ts is the single registry tying slug, tag, and display label together; its test asserts every tag survives Intl.
  • Routing. next-intl with localePrefix.prefixes (/cn is a custom prefix), always-prefixed routes, a one-year locale cookie, and locale detection on — a zh-* browser 307s to the prefixed path. lib/i18n/navigation returns slug-stripped pathnames, so anything reading a path must keep receiving the stripped form. Static redirects in next.config.ts must duplicate the slug alternation (/:slug(en|cn)/…) because redirects() runs before the proxy and cannot read the registry.
  • Adding a language. Add the BCP-47 tag to LOCALES, the slug to LOCALE_SLUGS, its own-language label, a messages/<slug>.json catalog, 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 no one).
  • Gotcha. Next 16.1.6’s experimental.globalNotFound does not compile under Turbopack — it was removed rather than fought.

Ingest (hub pipeline)

Kubernetes & Terraform

Deployments are provisioned by terraform/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.