Phase 1 — Software Architecture Diagrams
Two diagrams, drawn from direct repository inspection this session — no new architecture introduced while drawing. Current-state claims are cited against real files; proposed-state components are marked Planned and do not exist in code today.
One shared encoding for both diagrams below.
Hub, Spoke, Control Plane, both databases, Merlin's three built surfaces, the live Anthropic path, trust boundaries, and audit destinations — as they exist in the repo right now.
console.warn, not a durable record.Undercroft (Hub-local Postgres) holds all operational KEEP data. KEEPMSP.io's Neon Postgres holds licensing/billing/account data. CLAUDE.md's own rule forbids merging them.
Spoke→Hub (device telemetry, tunneled), Hub→Anthropic (descriptive customer telemetry, plaintext HTTPS to a third party), Hub→Control Plane (license state, heartbeat), Spoke→Control Plane (its own independent license state and heartbeat, never relayed through the Hub). Each is drawn as a distinct crossing rather than folded into one generic "external calls" arrow, since each carries a different kind of data and a different trust question.
MerlinProviderRequest (merlin-provider.ts) has no field a caller could put a credential in — this is structural, not caller discipline. True for all three Merlin routes.
The pipeline agreed this investigation. Governance/Rule Boundary is drawn where it actually executes today — as a gate immediately after a request is made, before any context-gathering — not at the end of the chain, since a refused request never reaches the Correlation or Knowledge Engine. Nothing in the Planned tier exists in code.
Rule Boundary evaluation runs first, in all three live routes — a request is either allowed through or refused before any data is even gathered.
Every route checks merlinProvider.isConfigured() before touching the database. The Planned "Offline / Degraded Path" upgrades that from a hard failure (502/503) to a still-useful structured answer — it does not invent offline behavior from nothing.
Confirmed by code inspection, not the proposed diagram — this is true today.
/api/merlin/device-diagnosis)/api/merlin/onboarding-analysis)/api/incidents/[id]/merlin)