checkpoint: matrix-agent-validated (2026-04-25)
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>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "ui"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
dioxus = { version = "0.7", features = ["web"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tracing = "0.1"
|
||||
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
|
||||
web-sys = { version = "0.3", features = ["Window", "Location"] }
|
||||
@@ -0,0 +1,9 @@
|
||||
[application]
|
||||
name = "lakehouse"
|
||||
asset_dir = "assets"
|
||||
|
||||
[web.app]
|
||||
title = "Lakehouse"
|
||||
|
||||
[web.resource.dev]
|
||||
style = ["/assets/style.css"]
|
||||
@@ -0,0 +1,217 @@
|
||||
:root {
|
||||
--bg: #0a0a0f;
|
||||
--surface: #12121a;
|
||||
--surface2: #1a1a28;
|
||||
--border: #2a2a3a;
|
||||
--text: #e0e0e8;
|
||||
--text-dim: #888898;
|
||||
--accent: #6c5ce7;
|
||||
--accent-dim: #4a3db8;
|
||||
--accent-glow: rgba(108, 92, 231, 0.15);
|
||||
--success: #00d2a0;
|
||||
--error: #ff6b6b;
|
||||
--warn: #ffa94d;
|
||||
--mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
|
||||
}
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: var(--mono); background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.5; }
|
||||
|
||||
.app { display: grid; grid-template-rows: 52px 1fr; height: 100vh; overflow: hidden; }
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
display: flex; align-items: center; padding: 0 24px; gap: 32px;
|
||||
background: var(--surface); border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.header h1 { font-size: 16px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); }
|
||||
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
|
||||
.ds-count { font-size: 11px; color: var(--text-dim); }
|
||||
|
||||
/* Tabs */
|
||||
.tabs { display: flex; gap: 2px; }
|
||||
.tab {
|
||||
background: none; border: none; color: var(--text-dim); font-family: var(--mono);
|
||||
font-size: 13px; padding: 8px 18px; cursor: pointer; border-bottom: 2px solid transparent;
|
||||
transition: all 0.15s; font-weight: 500;
|
||||
}
|
||||
.tab:hover { color: var(--text); }
|
||||
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
background: var(--accent); color: white; border: none; padding: 10px 20px;
|
||||
border-radius: 6px; font-family: var(--mono); font-size: 13px; cursor: pointer;
|
||||
font-weight: 600; white-space: nowrap; transition: all 0.15s;
|
||||
}
|
||||
.btn:hover { background: var(--accent-dim); transform: translateY(-1px); }
|
||||
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
|
||||
.btn-ask { padding: 12px 28px; font-size: 14px; }
|
||||
.btn-sm { padding: 4px 10px; font-size: 11px; }
|
||||
.refresh-btn {
|
||||
background: none; border: 1px solid var(--border); color: var(--text-dim);
|
||||
padding: 4px 10px; border-radius: 4px; font-family: var(--mono); font-size: 12px; cursor: pointer;
|
||||
}
|
||||
.refresh-btn:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Content */
|
||||
.content-full { overflow-y: auto; flex: 1; }
|
||||
.panel { padding: 32px; max-width: 1000px; margin: 0 auto; }
|
||||
|
||||
/* States */
|
||||
.loading { color: var(--accent); padding: 24px; text-align: center; }
|
||||
.error { color: var(--error); background: rgba(255,107,107,0.08); border: 1px solid rgba(255,107,107,0.2); padding: 14px 18px; border-radius: 6px; font-size: 12px; margin-top: 12px; }
|
||||
.error-inline { color: var(--error); font-size: 12px; }
|
||||
.empty { color: var(--text-dim); padding: 48px 24px; text-align: center; font-size: 13px; }
|
||||
.empty-sm { color: var(--text-dim); padding: 16px; text-align: center; font-size: 12px; }
|
||||
|
||||
/* === ASK PANEL === */
|
||||
.ask-panel { max-width: 860px; }
|
||||
.ask-hero { margin-bottom: 28px; }
|
||||
.ask-hero h2 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
|
||||
.subtitle { color: var(--text-dim); font-size: 14px; }
|
||||
|
||||
.ask-input-row { display: flex; gap: 10px; margin-bottom: 12px; }
|
||||
.ask-input {
|
||||
flex: 1; background: var(--surface); border: 2px solid var(--border); color: var(--text);
|
||||
font-family: var(--mono); font-size: 15px; padding: 14px 18px; border-radius: 8px; outline: none;
|
||||
}
|
||||
.ask-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
|
||||
.ask-input::placeholder { color: var(--text-dim); }
|
||||
|
||||
.ask-examples { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; font-size: 11px; color: var(--text-dim); align-items: center; }
|
||||
.example-btn {
|
||||
background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim);
|
||||
font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 4px; cursor: pointer;
|
||||
}
|
||||
.example-btn:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
.generated-sql {
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
|
||||
padding: 16px; margin-bottom: 20px;
|
||||
}
|
||||
.sql-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); display: block; margin-bottom: 8px; }
|
||||
.sql-code { font-size: 13px; color: var(--accent); white-space: pre-wrap; word-break: break-all; }
|
||||
|
||||
/* === EXPLORE PANEL === */
|
||||
.explore-panel { max-width: 1100px; }
|
||||
.explore-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; min-height: 500px; }
|
||||
.ds-cards h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 12px; }
|
||||
|
||||
.ds-card {
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
|
||||
padding: 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s;
|
||||
}
|
||||
.ds-card:hover { border-color: var(--accent); }
|
||||
.ds-card.active { border-color: var(--accent); background: var(--accent-glow); }
|
||||
.ds-card-name { font-weight: 600; font-size: 14px; }
|
||||
.ds-card-meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
|
||||
|
||||
.ds-detail h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
|
||||
|
||||
.summary-box {
|
||||
background: var(--accent-glow); border: 1px solid rgba(108,92,231,0.3); border-radius: 8px;
|
||||
padding: 16px; margin-bottom: 20px;
|
||||
}
|
||||
.summary-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); display: block; margin-bottom: 8px; font-weight: 600; }
|
||||
.summary-text { font-size: 13px; line-height: 1.7; }
|
||||
|
||||
.section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); display: block; margin-bottom: 10px; font-weight: 600; }
|
||||
.schema-box, .preview-box { margin-bottom: 24px; }
|
||||
|
||||
/* === SQL PANEL === */
|
||||
.sql-editor { margin-bottom: 16px; }
|
||||
.sql-textarea {
|
||||
width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
|
||||
font-family: var(--mono); font-size: 14px; padding: 16px; border-radius: 8px;
|
||||
resize: vertical; min-height: 120px; outline: none; margin-bottom: 10px;
|
||||
}
|
||||
.sql-textarea:focus { border-color: var(--accent); }
|
||||
.sql-actions { display: flex; gap: 8px; }
|
||||
.results-area { margin-top: 8px; }
|
||||
|
||||
/* === STATUS PANEL === */
|
||||
.status-hero { margin-bottom: 28px; }
|
||||
.status-hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
|
||||
.status-hero .btn { margin-top: 16px; }
|
||||
|
||||
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
|
||||
.check-card {
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
|
||||
padding: 16px; display: flex; gap: 14px; align-items: flex-start;
|
||||
}
|
||||
.check-card.pass { border-left: 3px solid var(--success); }
|
||||
.check-card.fail { border-left: 3px solid var(--error); }
|
||||
.check-icon { font-size: 18px; font-weight: 700; min-width: 24px; text-align: center; }
|
||||
.pass .check-icon { color: var(--success); }
|
||||
.fail .check-icon { color: var(--error); }
|
||||
.check-info { flex: 1; min-width: 0; }
|
||||
.check-name { font-weight: 600; font-size: 13px; }
|
||||
.check-desc { font-size: 11px; color: var(--text-dim); margin: 2px 0; }
|
||||
.check-msg { font-size: 11px; color: var(--text-dim); word-break: break-word; overflow: hidden; text-overflow: ellipsis; max-height: 3em; }
|
||||
.pass .check-msg { color: var(--success); }
|
||||
.fail .check-msg { color: var(--error); }
|
||||
|
||||
/* Results table */
|
||||
.results-info { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }
|
||||
.table-wrap { overflow-x: auto; }
|
||||
table { width: 100%; border-collapse: collapse; font-size: 12px; }
|
||||
th {
|
||||
text-align: left; padding: 10px 14px; background: var(--surface2); border-bottom: 2px solid var(--accent);
|
||||
font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
|
||||
color: var(--accent); position: sticky; top: 0;
|
||||
}
|
||||
td { padding: 8px 14px; border-bottom: 1px solid var(--border); }
|
||||
tr:hover td { background: var(--accent-glow); }
|
||||
|
||||
/* Dashboard */
|
||||
.dashboard-hero { margin-bottom: 28px; }
|
||||
.dashboard-hero h2 { font-size: 32px; font-weight: 700; }
|
||||
|
||||
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 32px; }
|
||||
.stat-card {
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
|
||||
padding: 20px 16px; text-align: center;
|
||||
}
|
||||
.stat-card.accent { border-color: var(--accent); background: var(--accent-glow); }
|
||||
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
|
||||
.stat-card.accent .stat-value { color: var(--accent); }
|
||||
.stat-label { font-size: 11px; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||
|
||||
.architecture-section, .phases-section { margin-bottom: 28px; }
|
||||
.architecture-section h3, .phases-section h3 { font-size: 16px; font-weight: 600; color: var(--text-dim); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
|
||||
|
||||
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
|
||||
.arch-card {
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
|
||||
padding: 14px; border-left: 3px solid var(--accent);
|
||||
}
|
||||
.arch-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--accent); }
|
||||
.arch-items { font-size: 11px; color: var(--text-dim); line-height: 1.6; }
|
||||
|
||||
.phase-list { display: flex; flex-direction: column; gap: 2px; }
|
||||
.phase-item {
|
||||
display: grid; grid-template-columns: 40px 180px 1fr; gap: 12px; align-items: center;
|
||||
padding: 8px 12px; border-radius: 6px; font-size: 12px;
|
||||
background: var(--surface); border-left: 3px solid var(--success);
|
||||
}
|
||||
.phase-num { font-weight: 700; color: var(--accent); text-align: center; }
|
||||
.phase-name { font-weight: 600; }
|
||||
.phase-detail { color: var(--text-dim); }
|
||||
|
||||
/* Ingest */
|
||||
.table-list { margin-top: 12px; }
|
||||
.table-item {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px;
|
||||
}
|
||||
.table-item:hover { background: var(--accent-glow); }
|
||||
|
||||
/* Phase 19 — Playbook panel */
|
||||
.boosted-row { background: rgba(120, 200, 120, 0.10); }
|
||||
.boosted-row td { border-top: 1px solid rgba(120, 200, 120, 0.30); }
|
||||
.mono-cell {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
||||
font-size: 11px; color: var(--text-dim);
|
||||
max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
}
|
||||
.panel-section + .panel-section { margin-top: 18px; }
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": "6d0002ef-28de-4b92-abed-0bfb7ab5fb6f",
|
||||
"name": "candidates",
|
||||
"schema_fingerprint": "auto",
|
||||
"objects": [
|
||||
{
|
||||
"bucket": "data",
|
||||
"key": "datasets/candidates.parquet",
|
||||
"size_bytes": 10592165,
|
||||
"created_at": "2026-03-28T01:54:06.898505222Z"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-03-28T01:54:06.898506121Z",
|
||||
"updated_at": "2026-03-28T01:54:06.898506121Z",
|
||||
"description": "",
|
||||
"owner": "",
|
||||
"sensitivity": null,
|
||||
"columns": [],
|
||||
"lineage": null,
|
||||
"freshness": null,
|
||||
"tags": [],
|
||||
"row_count": null
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": "73a4ef71-5b2a-4124-a2c2-fcefdde99624",
|
||||
"name": "job_orders",
|
||||
"schema_fingerprint": "auto",
|
||||
"objects": [
|
||||
{
|
||||
"bucket": "data",
|
||||
"key": "datasets/job_orders.parquet",
|
||||
"size_bytes": 905534,
|
||||
"created_at": "2026-03-28T01:54:07.007332060Z"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-03-28T01:54:07.007332775Z",
|
||||
"updated_at": "2026-03-28T01:54:07.007332775Z",
|
||||
"description": "",
|
||||
"owner": "",
|
||||
"sensitivity": null,
|
||||
"columns": [],
|
||||
"lineage": null,
|
||||
"freshness": null,
|
||||
"tags": [],
|
||||
"row_count": null
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": "b56694bb-f4f7-447d-b4d6-ac89103a6a3a",
|
||||
"name": "call_log",
|
||||
"schema_fingerprint": "auto",
|
||||
"objects": [
|
||||
{
|
||||
"bucket": "data",
|
||||
"key": "datasets/call_log.parquet",
|
||||
"size_bytes": 35951077,
|
||||
"created_at": "2026-03-28T01:54:15.457573021Z"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-03-28T01:54:15.457573701Z",
|
||||
"updated_at": "2026-03-28T01:54:15.457573701Z",
|
||||
"description": "",
|
||||
"owner": "",
|
||||
"sensitivity": null,
|
||||
"columns": [],
|
||||
"lineage": null,
|
||||
"freshness": null,
|
||||
"tags": [],
|
||||
"row_count": null
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": "daa5a11b-6898-40ba-a811-3bd4b6f5b750",
|
||||
"name": "email_log",
|
||||
"schema_fingerprint": "auto",
|
||||
"objects": [
|
||||
{
|
||||
"bucket": "data",
|
||||
"key": "datasets/email_log.parquet",
|
||||
"size_bytes": 16768671,
|
||||
"created_at": "2026-03-28T01:54:17.356056562Z"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-03-28T01:54:17.356057529Z",
|
||||
"updated_at": "2026-03-28T01:54:17.356057529Z",
|
||||
"description": "",
|
||||
"owner": "",
|
||||
"sensitivity": null,
|
||||
"columns": [],
|
||||
"lineage": null,
|
||||
"freshness": null,
|
||||
"tags": [],
|
||||
"row_count": null
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": "dd396ee4-3a1a-4939-af60-84d409eebed4",
|
||||
"name": "clients",
|
||||
"schema_fingerprint": "auto",
|
||||
"objects": [
|
||||
{
|
||||
"bucket": "data",
|
||||
"key": "datasets/clients.parquet",
|
||||
"size_bytes": 21971,
|
||||
"created_at": "2026-03-28T01:54:06.904379300Z"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-03-28T01:54:06.904379793Z",
|
||||
"updated_at": "2026-03-28T01:54:06.904379793Z",
|
||||
"description": "",
|
||||
"owner": "",
|
||||
"sensitivity": null,
|
||||
"columns": [],
|
||||
"lineage": null,
|
||||
"freshness": null,
|
||||
"tags": [],
|
||||
"row_count": null
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": "f85285e3-111a-4a55-aa58-05fd740ed862",
|
||||
"name": "timesheets",
|
||||
"schema_fingerprint": "auto",
|
||||
"objects": [
|
||||
{
|
||||
"bucket": "data",
|
||||
"key": "datasets/timesheets.parquet",
|
||||
"size_bytes": 17539932,
|
||||
"created_at": "2026-03-28T01:54:11.947773535Z"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-03-28T01:54:11.947778065Z",
|
||||
"updated_at": "2026-03-28T01:54:11.947778065Z",
|
||||
"description": "",
|
||||
"owner": "",
|
||||
"sensitivity": null,
|
||||
"columns": [],
|
||||
"lineage": null,
|
||||
"freshness": null,
|
||||
"tags": [],
|
||||
"row_count": null
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": "ffa72582-dc11-4454-a46e-35839a7d04bb",
|
||||
"name": "placements",
|
||||
"schema_fingerprint": "auto",
|
||||
"objects": [
|
||||
{
|
||||
"bucket": "data",
|
||||
"key": "datasets/placements.parquet",
|
||||
"size_bytes": 1213820,
|
||||
"created_at": "2026-03-28T01:54:07.109218264Z"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-03-28T01:54:07.109219070Z",
|
||||
"updated_at": "2026-03-28T01:54:07.109219070Z",
|
||||
"description": "",
|
||||
"owner": "",
|
||||
"sensitivity": null,
|
||||
"columns": [],
|
||||
"lineage": null,
|
||||
"freshness": null,
|
||||
"tags": [],
|
||||
"row_count": null
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user