// ENGINEER VIEW — systems topology for engineers const { useState } = React; const SERVICES = [ { name: "orchestrator", type: "Railway Worker", role: "Primary interface · routes exchanges · assembles context · dispatches to specialists", status: "live" }, { name: "FalkorDB", type: "Railway Database", role: "Graph storage · OpenCypher · vector search at 384 dims · append-only write target", status: "live" }, { name: "write-workers", type: "Railway Workers", role: "Write-time consolidation · decompose · tag · embed · write · stateless + horizontal", status: "live" }, { name: "append-workers", type: "Railway Workers", role: "Taxonomy re-tag · correction appends · Insight generation · background traversal", status: "live" }, { name: "auditor", type: "Railway Worker", role: "Async classification audit · samples write-worker output · human escalation queue", status: "live" }, { name: "cataloger", type: "Railway Worker", role: "Session cataloger · predictive state model · lateral awareness · one step behind", status: "live" }, { name: "insight-library",type: "Railway Web", role: "Read-only Insight graph browse · filterable by context · time · entity", status: "live" }, ]; const STATUS_META = { live: { label: "LIVE", color: "#3dd68c", bg: "rgba(61,214,140,0.1)" }, }; const GRAPH_NODES = [ { id: "user", x: 60, y: 50, label: "User", color: "#38d4c8" }, { id: "session", x: 200, y: 50, label: "Session", color: "#38d4c8" }, { id: "message", x: 340, y: 50, label: "Message", color: "#38d4c8" }, { id: "chunk", x: 480, y: 50, label: "Chunk", color: "#9d7ee8" }, { id: "context", x: 590, y: 140, label: "Context", color: "#e8a84c" }, { id: "topic", x: 480, y: 140, label: "Topic", color: "#e8a84c" }, { id: "entity", x: 370, y: 140, label: "Entity", color: "#e8a84c" }, { id: "insight", x: 590, y: 0, label: "Insight ★", color: "#3dd68c" }, ]; const GRAPH_EDGES = [ { from: "user", to: "session", label: "PARTICIPATED_IN", color: "#38d4c8" }, { from: "session", to: "message", label: "CONTAINS", color: "#38d4c8" }, { from: "message", to: "chunk", label: "CONTAINS", color: "#38d4c8" }, { from: "chunk", to: "context", label: "IN_CONTEXT", color: "#e8a84c" }, { from: "chunk", to: "topic", label: "TAGGED", color: "#e8a84c" }, { from: "chunk", to: "entity", label: "MENTIONS", color: "#e8a84c" }, { from: "insight", to: "chunk", label: "DERIVED_FROM ★", color: "#3dd68c", planned: true }, { from: "insight", to: "context", label: "IN_CONTEXT ★", color: "#3dd68c", planned: true }, ]; const ABAC_RULES = [ { title: "Write access", body: "Cara cluster only. No agent writes to the graph directly. Graph topology is owned by consolidation workers, not agents." }, { title: "Read access — Orchestrator", body: "Full traversal within the principal's graph. Cross-context reads within the user's access profile." }, { title: "Read access — Specialists", body: "Scoped to permitted contexts. Specialist A reads business_deal context. Specialist B reads operational context. Cross-contamination structurally impossible." }, { title: "Read access — Auditor", body: "Cross-context read for audit purposes only. Auditor decisions are logged. Every read is traceable." }, { title: "Multi-context chunks", body: "Chunks that span contexts carry multiple IN_CONTEXT edges. Retrieval checks the full access profile before surfacing." }, { title: "Forgetting", body: "Tombstone records retire chunks from retrieval. The original node is preserved. Forgetting is auditable." }, ]; const EMBEDDING_SPEC = [ { k: "Model", v: "sentence-transformers/all-MiniLM-L6-v2" }, { k: "Dimensions", v: "384" }, { k: "Runtime", v: "Local to write worker — no external API" }, { k: "Version tracking", v: "embedding_model_version on every Chunk node" }, { k: "Re-embed policy", v: "Full re-embed on major version change" }, { k: "Cross-version retrieval", v: "Degraded but non-zero utility" }, ]; const CARA_WORKERS = [ { type: "Write Workers", color: "#38d4c8", trigger: "POST /chunk from orchestrator", ops: ["Semantic chunking (Haiku)", "Context tagging", "384-dim embedding", "FalkorDB write"], scale: "Horizontal — stateless", status: "live", }, { type: "Append Workers", color: "#9d7ee8", trigger: "Schedule + write worker activity", ops: ["Taxonomy re-tagging", "Correction appends (superseding)", "Insight generation (traversal)", "Tombstone writes"], scale: "Lower-priority queue", status: "live", }, ]; function ServiceTable() { return (
{["Service", "Type", "Role", "Status"].map(h => (
{h}
))}
{SERVICES.map((s, i) => { const st = STATUS_META[s.status]; return (
{s.name}
{s.type}
{s.role}
{st.label}
); })}
); } function GraphSchemaViz() { const nodeById = Object.fromEntries(GRAPH_NODES.map(n => [n.id, n])); const W = 680, H = 200; return ( {/* Edges */} {GRAPH_EDGES.map((e, i) => { const from = nodeById[e.from]; const to = nodeById[e.to]; if (!from || !to) return null; const fx = from.x + 38, fy = from.y + 14; const tx = to.x + 38, ty = to.y + 14; const markerColor = e.color === "#38d4c8" ? "teal" : e.color === "#e8a84c" ? "amber" : "green"; return ( {e.label} ); })} {/* Nodes */} {GRAPH_NODES.map(n => ( {n.label} ))} {/* Legend */} ★ planned node / relationship ); } function CaraWorkerDiagram() { return (
{CARA_WORKERS.map(w => { const st = STATUS_META[w.status]; return (
{w.type}
{st.label}
trigger{w.trigger}
{w.ops.map((op, i) => (
{op}
))}
scale{w.scale}
); })} {/* Queue between them */}
task queue
Primary workers enqueue background jobs · Append workers drain at lower priority · FalkorDB is the only write target
asyncio / Redis Queue
); } function EngineerView() { const [abacOpen, setAbacOpen] = useState(null); return (
{/* Header */}

Systems Topology

Target stack on
Railway.

Seven services. All independently deployable on Railway. The write worker cluster is stateless and horizontally scalable. The graph is the source of truth.

{/* Service Table */}
Service Registry
{/* Graph Schema + Cara Workers */}
{/* Graph Schema */}
Graph Schema
{/* Node property reference */}
{[ { label: "Chunk", props: "content · embedding[384] · embedding_model_version · created_at" }, { label: "Context", props: "name — business_deal | personal | operational | research" }, { label: "Topic", props: "name — negotiation | analysis | planning | ops | support …" }, { label: "Insight ★", props: "content · confidence · insight_type · source_context" }, ].map(n => (
{n.label}
{n.props}
))}
{/* Cara Workers */}
Graph Worker Cluster
{/* Embedding spec */}
Embedding Model
{EMBEDDING_SPEC.map(s => (
{s.k} {s.v}
))}
{/* ABAC Model */}
ABAC Model — Access by Graph Topology

Access boundaries are structural, not procedural.{" "} Context membership is attached to chunks at write time by the write worker. The graph topology contains no traversal paths from a restricted query origin to out-of-scope chunks. A principal with access to context:business_deal cannot retrieve chunks tagged exclusively context:personal — not because a policy engine checked the request, but because no traversal path exists.

{ABAC_RULES.map((r, i) => (
setAbacOpen(abacOpen === i ? null : i)} style={{ background: abacOpen === i ? "var(--surface2)" : "var(--surface)", border: `1px solid ${abacOpen === i ? "#e8a84c40" : "var(--border)"}`, borderRadius: 6, padding: "12px 14px", cursor: "pointer", transition: "all 0.2s", }} onMouseEnter={e => { if (abacOpen !== i) e.currentTarget.style.borderColor = "#e8a84c20"; }} onMouseLeave={e => { if (abacOpen !== i) e.currentTarget.style.borderColor = "var(--border)"; }} >
{r.title}
{abacOpen === i &&
{r.body}
}
))}
{/* Engineer Tenets */}
Systems Tenets
{[ "All writes additive — tombstones, not deletions", "Context membership attached at write time by write workers only", "No agent writes to the graph directly", "Cataloger always one exchange behind — never in response path", "Auditor samples async — never blocks write path", "Human review queue is the accountability mechanism, not automated override", ].map((t, i) => (
{t}
))}
); } window.EngineerView = EngineerView;