Skip to content
LuminaBrainFailures →

Brain.The system behind the chat.

Lumina is the AI embedded across this portfolio. Everything she does — every tool she calls, every byte she stores, every model decision — is visible on this page or one click away in the public source. Operator-grade transparency is the brand contract.

01 · Model configuration

Model
claude-haiku-4-5-20251001Pinned snapshot of Anthropic's Haiku 4.5. No alias.
Temperature
0.6Default for visitor chat — middle of warm and deterministic.
Step cap
stepCountIs(5)Claude may chain up to four tool calls before being forced to answer.
Runtime
edgeWeb Fetch + KV only. Lab routes run nodejs for the AWS SDK; voice STT runs nodejs for Whisper.
Streaming
ai-sdk/anthropic streamTextResponse streams as UIMessageStreamResponse; client renders deltas as they arrive.

02 · Tool registry

Thirteen tools across four groups. Every execute()body is server-side; nothing runs in the visitor's browser. The lab- invocation tools loopback to the existing /api/lab routes with the visitor's IP forwarded so rate limits and cost caps stay attributed to them. The repo-aware tools read this very repo via direct fetch to GitHub's public REST API — KV-cached so the same file isn't fetched twice per hour.

Portfolio reads

  • listProjectsReturns every project on the portfolio with its id, title, status, and short description.
  • getProjectDetailsFull case-study record for one project — description, tech stack, status, live + GitHub URLs.
  • searchNotesSubstring match across the long-form notes; returns the top five hits.
  • getRecentCommitsThe single most-recent commit Emre pushed. KV-cached from the GitHub Events feed.

Operator reads

  • getCurrentTelemetrySix-metric snapshot — Lumina p95, auto-tweet successes, lab runs, npm weekly downloads, notes audio plays.
  • getRecentEngineeringLast five commits with the WHY paragraph parsed from each commit body.
  • getLabStatusCurrent /lab experiment registry — each entry's name, purpose, status, and URL.

Lab invocation

  • translateIamPolicyLoopback to /api/lab/iam-translate — runs the IAM Policy Translator with the visitor's IP forwarded.
  • rescuePromptLoopback to /api/lab/prompt-rescue — runs the Prompt Rescuer.
  • narrateCommitsLoopback to /api/lab/narrate-commits — runs the Commit Narrator on a public GitHub URL.

Repo-aware reads

  • readSourceFileVerbatim file contents from the public portfolio repo. Path-validated, 50 KB cap, KV-cached 1h.
  • explainCommitRationaleSubject + WHY paragraph + diff stats for a specific commit SHA. KV-cached 7d (immutable).
  • diffArchitecturesStructural diff of two projects' tech stacks. In-memory off data/projects.ts; no network.

03 · Memory contract

Persistence
anonymous sessionId minted client-side, kept in localStorage
TTL
14 days (refreshes on every save; operator can extend up to 30 days via V5_MEMORY_TTL_DAYS)
Verbatim context cap
last 8 turns sent to the model
Older turns
Haiku-generated 2-3 sentence recap, cached in a sibling KV key
Storage cap
100 messages per session (oldest dropped)
Redaction
emails, Turkish/international phones, AWS access keys, IPv6 + IPv4 addresses, Turkish national IDs (TC Kimlik, checksum-validated), and common API-key prefixes (sk-, ghp_, xoxb-, AIza…) — applied on write
Pages index (V5)
optional per-session list of recently-visited page slugs in a sibling KV key (lumina:session:<id>:pages, max 20 entries, same TTL). Foundation only in Sub-PR 6.4 — no observer mounted; Phase 10 ambient awareness will read this without ever mentioning it
Opt-out
Database icon in the chat header — when off, no KV reads or writes for the duration; preference persists across visits
Forget control
eraser icon in the chat header — deletes both KV buckets server-side

Live adoption

$ memory.adoption.snapshotNo adoption data yet — counters fire on the next chat turn with KV available.

04 · Runtime topology

Edge wherever possible; Node only where the dependency forces it (AWS Bedrock SDK + Whisper transcribe binary upload).

SurfaceRuntimeDepends on
/api/chat (POST)edgeAnthropic API, KV (optional)
/api/chat/load (GET)edgeKV (graceful no-op without)
/api/chat/forget (POST)edgeKV (graceful no-op without)
/api/voice/transcribe (POST)edgeOpenAI Whisper, KV rate limit
/api/voice/tts (POST)edgeElevenLabs
/api/lab/iam-translate (POST)nodejsAWS Bedrock (SigV4 needs Node)
/api/lab/prompt-rescue (POST)nodejsAWS Bedrock
/api/lab/narrate-commits (POST)nodejsAWS Bedrock + GitHub Octokit

05 · Privacy contract

  • Anonymous sessionId only — no account, no fingerprint, no cross-device link.
  • PII (emails, phone numbers, AWS access keys) is redacted before storage. The KV bucket never holds raw values.
  • The eraser icon in the chat header deletes both KV buckets server-side and wipes local state. One click, no confirmation dialog, no toast.
  • Lab tool invocations carry your IP via the standard forwarded headers so per-IP rate limits and the $5/day per-experiment cost caps stay attributed to you across surfaces.
  • No conversation is ever shared across visitors. No fingerprinting, no third-party trackers.

06 · Source files

The verbatim text for every behavior on this page lives in the public repo. Click any row to read the file on GitHub.

07 · Tool consistency eval

A deterministic consistency check runs over every tool in the registry: it verifies the tool exists in lib/lumina/tools.ts, has a matching spinner label in TOOL_LABEL, has a row in the manifest above, and that its execute() body is wrapped in withTelemetry so its invocation count fires. The script is the public, runnable surface — invoke it locally and the result is yours to read directly.

$ npm run eval:lumina
(or: node scripts/eval-lumina-tools.mjs)

Exit 0 means every tool surfaces consistently across the four files; exit 1 flags the regression. Source at scripts/eval-lumina-tools.mjs.

09 · Sub-agents

One sub-agent runs alongside the default Lumina chat, routed deterministically by a heuristic classifier (no second LLM call). Ambiguous or unrelated turns always land on the default — the constitutional MUST “fail back to single-agent mode” is satisfied at the router boundary.

architecture-critic
Routed when the visitor's most recent message contains a critique verb (review, evaluate, audit, etc.) AND an architecture noun (system design, tradeoff, pipeline, etc.) — or explicitly opens with @architecture-critic. Read the full agent transparency →

Visible orchestration trace: when the sub-agent fires you'll see an engaging architecture-critic pill in the chat-status strip before the response streams. That pill is the trace surface the V4 § 4.4 directive mandates.

08 · Live tool usage

Per-tool invocation counters fire on every chat turn — one fire-and-forget KV HINCRBY per call. Refreshed at the brain page's hourly ISR cadence; latency contributed to the chat is < 5 ms.

No tool invocations recorded yet. Counters land here the moment a chat turn calls a tool.

Public transparency·V4 § 2.3·Corrections log →