Architectural snapshot of the lakehouse codebase at the point where the
full matrix-driven agent loop with Mem0 versioning + deletion was
validated end-to-end.
WHAT THIS REPO IS
A clean single-commit snapshot of the lakehouse code. Heavy test data
(.parquet datasets, vector indexes) excluded — see REPLICATION.md for
regen path. Full lakehouse history at git.agentview.dev/profit/lakehouse.
WHAT WAS PROVEN
- Vector retrieval across multi-corpora matrix (chicago_permits + entity
briefs + sec_tickers + distilled procedural + llm_team runs)
- Observer hand-review (cloud + heuristic fallback) gating each candidate
- Local-model agent loop (qwen3.5:latest) with tool use + scratchpad
- Playbook seal on success → next-iter retrieval surfaces it as preamble
- Mem0 versioning + deletion in pathway_memory:
* UPSERT: ADD on new workflow, UPDATE bumps replay_count on identical
* REVISE: chains versions, parent.superseded_at + superseded_by stamped
* RETIRE: marks specific trace retired with reason, excluded from retrieval
* HISTORY: walks chain root→tip, cycle-safe
KEY DIRECTORIES
- crates/vectord/src/pathway_memory.rs — Mem0 ops live here
- crates/vectord/src/playbook_memory.rs — original Mem0 reference
- tests/agent_test/ — local-model agent harness + PRD + session archives
- scripts/dump_raw_corpus.sh — MinIO bucket dump (raw test corpus)
- scripts/vectorize_raw_corpus.ts — corpus → vector indexes
- scripts/analyze_chicago_contracts.ts — real inference pipeline
- scripts/seal_agent_playbook.ts — Mem0 upsert from agent traces
Replication: see REPLICATION.md for Debian 13 clean install + cloud-only
adaptation (no local Ollama).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
135 lines
4.5 KiB
HTML
135 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
<title>Lakehouse · Visual Control Plane</title>
|
|
<link rel="stylesheet" href="/ui.css" />
|
|
</head>
|
|
<body>
|
|
<!-- TOP BAR — service heartbeats + view switcher + run selector -->
|
|
<header id="topbar">
|
|
<div class="brand">
|
|
<span class="sig">◆</span>
|
|
<span>LAKEHOUSE · VCP</span>
|
|
<span class="build" id="build-ts"></span>
|
|
</div>
|
|
<nav id="views">
|
|
<button data-view="map" class="on">MAP</button>
|
|
<button data-view="trace">TRACE</button>
|
|
<button data-view="trajectory">TRAJECTORY</button>
|
|
<button data-view="metrics">METRICS</button>
|
|
<button data-view="kb">KB</button>
|
|
<button data-view="console">CONSOLE</button>
|
|
</nav>
|
|
<div id="hb">
|
|
<span class="hbchip" data-svc="gateway">GW</span>
|
|
<span class="hbchip" data-svc="sidecar">SC</span>
|
|
<span class="hbchip" data-svc="observer">OBS</span>
|
|
<span class="hbchip" data-svc="mcp">MCP</span>
|
|
<span class="hbchip" data-svc="context7">CTX7</span>
|
|
</div>
|
|
</header>
|
|
|
|
<main>
|
|
<!-- MAIN STAGE — view-switched but context panel persists -->
|
|
<section id="stage">
|
|
<!-- System Map view -->
|
|
<div id="view-map" class="view on">
|
|
<div id="overlay-controls">
|
|
<span class="lbl">OVERLAY:</span>
|
|
<button data-ov="status" class="on">status</button>
|
|
<button data-ov="confidence">confidence</button>
|
|
<button data-ov="gradient">gradient</button>
|
|
<button data-ov="verdict">verdict</button>
|
|
<button data-ov="activity">activity</button>
|
|
</div>
|
|
<svg id="map"></svg>
|
|
<div id="legend">
|
|
<span class="lg healthy">● healthy</span>
|
|
<span class="lg degraded">● degraded</span>
|
|
<span class="lg down">● down</span>
|
|
<span class="lg active">◆ active flow</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Trace view -->
|
|
<div id="view-trace" class="view">
|
|
<div class="subhead">
|
|
<span>TASK TRACE — file:</span>
|
|
<span id="trace-file">—</span>
|
|
<span class="spacer"></span>
|
|
<span id="trace-runs"></span>
|
|
</div>
|
|
<div id="trace-timeline"></div>
|
|
<div id="trace-detail"></div>
|
|
</div>
|
|
|
|
<!-- Trajectory view — scrum trajectory, refactor signals, reverse index -->
|
|
<div id="view-trajectory" class="view">
|
|
<div class="traj-header">
|
|
<input id="traj-search" type="text" placeholder="Reverse index: search every scrum review for a phrase ('auth', 'middleware', 'dead code', 'ADR-012', …)" />
|
|
<div id="traj-stats"></div>
|
|
</div>
|
|
<div id="traj-body"></div>
|
|
</div>
|
|
|
|
<!-- Metrics view -->
|
|
<div id="view-metrics" class="view">
|
|
<div class="metric-grid" id="metric-grid"></div>
|
|
</div>
|
|
|
|
<!-- KB view -->
|
|
<div id="view-kb" class="view">
|
|
<div class="kb-grid" id="kb-grid"></div>
|
|
</div>
|
|
|
|
<!-- Console view — per-service live logs -->
|
|
<div id="view-console" class="view">
|
|
<div class="console-toolbar">
|
|
<span class="con-eyebrow">SERVICE LOGS</span>
|
|
<span id="con-tabs">
|
|
<button data-svc="gateway" class="on">gateway</button>
|
|
<button data-svc="sidecar">sidecar</button>
|
|
<button data-svc="observer">observer</button>
|
|
<button data-svc="mcp">mcp</button>
|
|
<button data-svc="context7">ctx7</button>
|
|
<button data-svc="auditor">auditor</button>
|
|
<button data-svc="langfuse">langfuse</button>
|
|
<button data-svc="summary">▣ all</button>
|
|
</span>
|
|
<span class="spacer"></span>
|
|
<span id="con-unit"></span>
|
|
</div>
|
|
<div id="console-log"></div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- CONTINUOUS CONTEXT PANEL — right rail, always visible -->
|
|
<aside id="context">
|
|
<div class="ctx-header">
|
|
<span class="ctx-eyebrow">CONTEXT</span>
|
|
<span id="ctx-target">no selection</span>
|
|
</div>
|
|
<div id="ctx-body">
|
|
<div class="ctx-hint">Click a node or a file in KB to inspect. Context persists across view switches.</div>
|
|
</div>
|
|
</aside>
|
|
</main>
|
|
|
|
<!-- BOTTOM STRIP — btop-style real-time stream -->
|
|
<section id="stream">
|
|
<div class="stream-head">
|
|
<span class="stream-eyebrow">STREAM</span>
|
|
<span class="spacer"></span>
|
|
<span id="stream-file">—</span>
|
|
<span class="dot" id="stream-tick"></span>
|
|
</div>
|
|
<div id="stream-body"></div>
|
|
</section>
|
|
|
|
<script src="https://d3js.org/d3.v7.min.js"></script>
|
|
<script src="/ui.js"></script>
|
|
</body>
|
|
</html>
|