# Project export: Quad

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: UC Berkeley AI Hackathon 2026
- Tagline: Knowledge infrastructure for every agent. AI employees that prove their work with every answer grounded in evidence, gated by approval, and re-playable end to end.
- Devpost: https://devpost.com/software/quad-iv8l4h
- GitHub: https://github.com/notandruu/quad
- Demo: http://quad.stephenhung.me/
- Video: https://www.youtube.com/embed/eTYqFaXadIs?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 3 GitHub contributor(s) — Stephen Hung (128 commits), silaswu4 (48 commits), andrewliu (39 commits)

## Devpost submission (written by the team)

### Inspiration

Every company knows more than its public surface says. The team remembers what got decided in a meeting; the website still shows last year's pricing. Support answers a question one way; the docs say another. AI search engines then read the stale version and repeat it with total confidence. We kept hitting the same failure. AI tools are great at generating answers and terrible at proving them. A chatbot will happily tell a customer something that contradicts your own internal truth, with zero evidence and zero paper trail. For anything customer-facing, "sounds right" isn't good enough. So we built Quad: an AI employee that proves its work. Not a chatbot. An employee with a company brain, real browser-grounded evidence, live execution, and an approval-first contract.

### What it does

Quad connects to your systems of record and continuously audits them. It finds conflicting claims, stale facts, and broken links across every tool your company runs on, and traces every answer back to the exact source document that produced it. Every fix is drafted in your brand voice and queued for one-click approval before anything ships. Every AI-generated conversation gets evaluated for quality in production. Quad also joins meetings. It listens live, in real time, and turns conversation into structured memory the moment it's said. Ask ASI:One "what did we decide on the Q3 budget" and Quad retrieves it, sourced back to the exact meeting and moment. Quad takes action. It operates a real browser, executes the fix, and orchestrates other agents through Agentverse to get the work done. Quad gets better from doing the work. Every meeting it sits in, every gap it finds and fixes, every correction a human makes, trains the system that runs the next one. The system running next month answers better than the system running today. Every claim Quad makes carries proof. This is Quad Chain. When Quad says your refund window is 30 days, it shows the exact source. When it compresses a long meeting trace into a short memory, it proves what was kept and what was dropped, so an agent or a human downstream can verify the summary before acting on it. Quad traces a claim all the way back to the moment it was true, a document or a sentence someone said in a call.

### How we built it

Connect: integrates with the systems of record knowledge actually lives in. Audit: a continuous pass across every connected source finds conflicts, stale facts, and gaps. Live meeting capture: Quad joins meetings and listens in real time, converting conversation into structured, sourced memory as it happens. Memory: a persistent, embeddings-backed company brain, queryable retroactively through ASI:One, accumulating from documents and conversations. Quad Chain: verifiable receipts on every memory and every claim. Compression with proof of what was preserved. Tamper-evident, anchorable on-chain, private data stays off-chain. Learning loop: outcomes from real meetings and real corrections feed back into the system, so accuracy and usefulness improve with usage. Trace: every answer resolves back to its source, with drafted fixes in brand voice queued for approval. Action: real browser execution via Browserbase, real multi-agent orchestration via Agentverse, registered and callable as a live agent through the Fetch.ai Agent Chat Protocol and ASI:One. Reasoning: a multi-call Anthropic pipeline does analysis, drafting, independent verification of each draft against its evidence, and synthesis. Observability: Arize traces and evals on every cognitive step, scoring groundedness and hallucination risk before anything ships. Reliability: Sentry-instrumented end to end so a failed step degrades instead of taking down the run. Retrieval: OpenAI embeddings power recall across the memory graph. Quadchain Modern agent systems do not just need shorter prompts; they need compressed memory that can be routed, audited, repaired, and rejected when declared obligations are missing. We introduce QuadChain, an obligation-verifiable context compression architecture for multiagent LLM systems. QuadChain couples extractive compression with explicit evidence obligations, answer-concept checks, role-aware routing, omission manifests, handoff integrity metadata, and verified selective rehydration. The output is not a proof of semantic faithfulness; it is a verifiable memory packet that tells downstream agents which declared facts were preserved, which spans were omitted, what was repaired, and whether the handoff should be accepted. In controlled coding-agent fixtures and public-benchmark-style local adapters, the measured 4-agent workflow drops from 9,000 raw tokens to 2,283 routed tokens (74.63% reduction). Verified selective rehydration reaches 0.9390 deterministic task score with 88.89% mean token reduction and 210/240 accepted packets under matched budgets. These results do not establish state-of-the-art prompt compression; they support a narrower systems claim: compressed agent memory should be accountable, rejectable, and selectively repairable rather than blindly summarized.

### Challenges we ran into

Reinforcement learning from real conversations had to improve answers, not just add to the model indiscriminately. We gated the loop so only verified outcomes feed it. Live meeting capture had to stay reliable enough to demo. We built a fallback path that keeps the session running if a piece of the pipeline hiccups. The action layer and the knowledge layer had to work as one system. We built them on the same backend from the start. Accomplishments we're proud of A knowledge platform that connects, audits, traces, drafts, and evaluates, and also captures knowledge that never existed in a document. A verifiable memory protocol, Quad Chain, that's infrastructure-grade. Real agent orchestration through Agentverse with real execution. An agent that's genuinely discoverable and callable through ASI:One. A reinforcement loop where the system improves with usage.

### What we learned

Auditing documents is the easy part of this problem. The hard part is the knowledge that was never written down, the meeting where the real decision got made, and proving that what an agent remembers is still true by the time it acts on it.

### What's next

Extend live capture into every channel knowledge moves through. Deepen the learning loop so improvement compounds faster with usage. Open Quad Chain as the verifiable memory layer other agents ground themselves against.

## README (from the GitHub repository)

# Quad

> Knowledge infrastructure for every agent.

Quad is a company-aware AI employee that connects to systems of record, builds a scoped company brain, audits customer-facing surfaces against that brain, and turns gaps into approved work with verifiable receipts.

**Landing:** [quad.stephenhung.me](https://quad.stephenhung.me) | **Dashboard:** [app.quad.stephenhung.me](https://app.quad.stephenhung.me)
**Research:** [QuadChain paper](public/papers/quad-chain-research-paper.pdf)

## What Quad Does

1. Ingests company context from docs, websites, meetings, transcripts, and connector events.
2. Scopes memory by organization, workspace, team, user, freshness, visibility, and approval state.
3. Audits public claims, security answers, and customer-facing content against verified internal context.
4. Streams work live through the run event spine so dashboard, worker, and agent surfaces share the same trace.
5. Drafts fixes, answers, tasks, and connector actions, then gates writes behind approval.
6. Emits QuadChain packets for memory writes, agent handoffs, audit reports, trust packets, approvals, and connector actions.

Technically, Quad is a shared runtime for agents that need to know what the company knows, prove where it came from, and act only when the proof is good enough.

## Product Loop

```text
connect sources -> capture context -> retrieve scoped memory -> audit claims
  -> draft action -> verify evidence -> request approval -> execute or block
  -> write receipt -> learn back into the brain
```

The same loop is exposed through the dashboard, external agent routes, worker queue, chat, voice, meeting capture, and future connector surfaces.

## Architecture

| Layer | Implementation |
| --- | --- |
| Web app | Next.js App Router, React, TypeScript, Tailwind |
| Operator UI | `QuadWorkspaceDashboard`, operator console, live logs, trust trail, QuadChain workbench |
| Company brain | Postgres/Supabase + pgvector schema, metadata sidecars, permissions, seeded local fallback |
| Runtime facade | `/api/core/run` for chat and queued audits across dashboard, voice, worker, and external agents |
| Run/event spine | Redis streams when configured, bounded in-memory fallback for zero-key demos and tests |
| Jobs | Durable audit queue, worker loop, canary route, retry/dead-letter accounting |
| Browser/action layer | Browserbase render path with static fetch fallback, publish dry-run/execute contracts |
| Meeting and voice | Deepgram transcription, meeting intelligence, context capture, approval-backed memory proposals |
| External agents | Fetch/Agentverse-style descriptor and run handoff routes backed by the same core runtime |
| QuadChain | Hash-backed packets, evidence obligations, omission manifests, answer-readiness checks, optional anchoring metadata |
| Observability | OpenTelemetry/Phoenix traces, Sentry, runtime receipts, usage meter, eval surfaces |

## QuadChain

QuadChain is the verifiable memory layer behind Quad. It treats compressed context as an object with obligations, not just a shorter string.

Each packet can include:

- source hashes and packet hashes
- required evidence obligations
- answer concepts that must survive compression
- omitted span manifests
- token before/after accounting
- verifier version and policy hash
- handoff id and certificate id
- open obligations such as missing evidence, required approval, or blocked connectors

A downstream agent can accept or reject a packet based on declared evidence and concepts. When obligations are missing, QuadChain supports selective rehydration: fetch the minimum source spans needed for repair instead of blindly expanding the whole context.

The research paper frames the boundary clearly: QuadChain is not a proof of semantic faithfulness and does not claim state-of-the-art prompt compression. It is a systems primitive for accountable, rejectable, selectively repairable agent memory.

Measured results from the paper:

- 4-agent workflow: 9,000 raw tokens to 2,283 routed tokens, a 74.63% reduction, with 41/41 required evidence items and 38/38 answer concepts preserved.
- Verified selective rehydration: 0.9390 deterministic task score with 88.89% mean token reduction and 210/240 accepted packets under matched budgets.
- Handoff smoke checks reject tampered Merkle roots, dropped required evidence, stale registry receipts, and invalid routes.

Private raw context, evidence strings, transcripts, screenshots, prompts, responses, credentials, and customer documents stay off public registries. Optional anchoring is limited to ids, hashes, Merkle roots, verifier versions, policy metadata, and handoff records.

## Key API Surfaces

| Surface | Purpose |
| --- | --- |
| `POST /api/core/run` | Shared runtime command contract for chat and queued audits |
| `GET /api/agent/describe` | Public external-agent descriptor for discovery and handoff metadata |
| `POST /api/agent/run` | External-agent entrypoint that delegates into the same core queue path |
| `GET /api/operator` | Workspace, memory, run, approval, capability, evidence, worker, and usage summary |
| `POST /api/ingest` | Stage or write company memory with scope and approval metadata |
| `POST /api/context/capture` | Normalize meeting, voice, chat, docs, or connector events into durable context signals |
| `GET /api/connectors/registry` | Safe connector registry with auth mode, scopes, lifecycle state, credential state, risk, and playbook bindings |
| `GET /api/connectors/audit-log` | Safe service-account audit logs for connector credential installs and revokes |
| `GET /api/brain/graph` | Safe context graph with freshness, scope, relationship, and receipt summaries |
| `GET /api/playbooks` | Safe skill/playbook registry with guardrails, evidence requirements, approval tiers, and verifier checks |
| `POST /api/enterprise-proof` | Answer trust/security questions from brain memory plus connector documents |
| `GET /api/quadchain/packets` | List packet summaries for runs and handoffs |
| `POST /api/quadchain/verify` | Verify a packet certificate and declared obligations |
| `POST /api/publish/dry-run` | Stage connector writes only when capabilities and approval gates allow it |
| `POST /api/publish/execute` | Record approved connector execution receipts |
| `POST /api/voice/transcribe` | Transcribe voice, optionally remember it, then route through the shared chat runtime |
| `POST /api/jobs` | Queue website audit and enterprise proof runs for the worker |
| `GET /api/jobs/health` | Report queue depth, retries, dead letters, heartbeat, and canary status |

Hosted routes use the same bearer/api-key auth shape: `Authorization: Bearer $QUAD_API_SECRET` or `x-quad-api-key: $QUAD_API_SECRET`. Service tokens can be scoped by org and capability. Zero-key local mode stays available for demos through seeded data and in-memory fallbacks.

## Repository Map

```text
src/app/                  Next.js pages and API routes
src/components/           Dashboard, operator console, live logs, voice, QuadChain UI
src/lib/core/             Shared runtime facade and agent-loop traces
src/lib/brain/            Memory schema, ingest, retrieval, permissions, refresh, graph
src/lib/context-capture/  Event-to-memory signal extraction
src/lib/connectors/      Connector credentials, documents, registry, auth posture
src/lib/quad-chain/       Packet construction, verification, registry, metrics, workbench
src/lib/runs/             Runs, tasks, artifacts, approvals, receipts, access checks
src/lib/jobs/             Queue, worker, scheduler, canary
src/lib/fde/              Trust packets, verification, publishing, execution receipts
src/lib/metaregistry/     Capability catalog, install plans, runtime tool routing
src/lib/meeting/          Meeting intelligence and sourced follow-ups
src/lib/observability/    Runtime traces, evals, status, Sentry/Phoenix wiring
landing/                  Public site and research paper assets
docs/                     Backend schema, readiness not

[README truncated for size]

## Detected evidence (automated analysis)

Indexed codebase: 395 recognized source files, 2208 KB.
- Anthropic (technology) — detected in the code
- CSS (language) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Next.js (technology) — detected in the code
- PostgreSQL (technology) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- SQL (language) — detected in the code
- Supabase (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- Redis (technology) — claimed on Devpost, not found in the code
- AI coding agent: Claude Code — evidence: config files committed to the repository; commit authorship or trailers
- AI coding agent: Codex — evidence: config files committed to the repository

## Codebase structure (from repository index)

### Files (120 of 451)

```
.env.example
.github/workflows/ci.yml
.gitignore
.vercelignore
agent/.env.example
agent/Procfile
agent/quad_agent.py
agent/README.md
agent/requirements.txt
agent/run.sh
agent/runtime.txt
agent/test_quad_agent.py
AGENTS.md
CLAUDE.md
docs/audit-engine.md
docs/backend/platform-schema.sql
docs/backend/production-readiness.md
docs/brand.md
docs/debug-drawer.md
docs/demo-script.md
docs/enterprise-devex-runtime.md
docs/eve-alignment.md
docs/fde-shipping-workflows.md
docs/gap-shipping-plan.md
docs/grand-master-delta-audit.md
docs/metaregistry-plugin-system.md
docs/operator-console-plan.md
docs/proof-carrying-handoffs.md
docs/quadchain-token-compression/demo/observability-demo.html
docs/quadchain-token-compression/MANIFEST.md
docs/quadchain-token-compression/papers/research-paper.md
docs/quadchain-token-compression/papers/whitepaper.md
docs/quadchain-token-compression/README.md
docs/quadchain-token-compression/reports/benchmark-report.md
docs/quadchain-token-compression/reports/eval-report.md
docs/quadchain-token-compression/results/baseline-matrix.json
docs/quadchain-token-compression/results/quad-chain-eval.json
docs/quadchain-token-compression/results/quadchain-benchmark.jsonl
docs/quadchain-token-compression/results/role-evidence-audit.json
docs/quadchain-token-compression/results/task-success.json
docs/quadchain-token-compression/scripts/build-observability-demo.py
docs/quadchain-token-compression/scripts/frontier-benchmark.py
docs/security-data-governance.md
docs/sponsor-proof-runbook.md
docs/voice-agent-surface.md
docs/workstream-ownership.md
instrumentation.ts
landing/.gitignore
landing/bun.lock
landing/next.config.ts
landing/package.json
landing/postcss.config.mjs
landing/public/assets/images/1d0115c5-OOLGXHSuKyfETWSRhoPx3T3L2Jo.avif
landing/public/assets/images/350e321f-Xg8VOxHHhtCfv6xPIMgjCcMo3lo.avif
landing/public/assets/images/38261670-sTkDNWiGSgNVYUobZW2EbLqOmLk.avif
landing/public/assets/images/4b7729bc-B3enOKlCSnZAPJJg9mNtMzl67HU.avif
landing/public/assets/images/4c75e590-RZp0DCmjTg27KV8Q2X3oyjJJgK4.avif
landing/public/assets/images/56e9fe5e-Dem7tgvYd5xIdkhs6RVMC8Sgaeo.avif
landing/public/assets/images/57a3b974-tpa68x0Iaoe8bwwcNi3v40MaY.avif
landing/public/assets/images/6e885280-dvjihLhp9whD26v7qSJT2pbwPo.avif
landing/public/assets/images/7061d6c8-26IxJRQBhhv3c10HSCIpaXeO7s.avif
landing/public/assets/images/7b2dc3d0-RGRwc8sBpnPTFdpUw2BuujmAM.avif
landing/public/assets/images/7bf11c11-yoCTSOxleoeINQPMrWNi0UJl4Dg.avif
landing/public/assets/images/862f46d4-027B2NJZowoMM4YvobleMlZAhk.avif
landing/public/assets/images/89aade8e-ulcXvIyGAAVize8JErf8PAXotsM.avif
landing/public/assets/images/a85bd724-MpRGc4i4MXpMO5GsLNDLDZaK8.avif
landing/public/assets/images/d8814724-GZbGeCw2EwQ8flQ19dRFmvyJbI.avif
landing/public/assets/images/df599c94-GowFEHJy2dAOEojE8Z3i45XSzq0.avif
landing/public/assets/images/ed3298a6-igLxFxW18yX5l5VnJJ3NJ2zdWW8.avif
landing/public/quad-dashboard.html
landing/public/research-paper
landing/src/app/fonts/Canela-Medium.otf
landing/src/app/fonts/Canela-Regular.otf
landing/src/app/globals.css
landing/src/app/layout.tsx
landing/src/app/page.tsx
landing/src/components/Grain.tsx
landing/src/components/Header.tsx
landing/src/components/HoverText.tsx
landing/src/components/IntegrationsOrbit.tsx
landing/src/components/IntroBanner.tsx
landing/src/components/IsoDiagram.tsx
landing/src/components/MemoryGraph.tsx
landing/src/components/Panel.tsx
landing/src/components/Parallax.tsx
landing/src/components/ProofDemo.tsx
landing/src/components/Reveal.tsx
landing/src/components/sections/Capabilities.tsx
landing/src/components/sections/Content.tsx
landing/src/components/sections/FAQ.tsx
landing/src/components/sections/Features.tsx
landing/src/components/sections/Footer.tsx
landing/src/components/sections/Hero.tsx
landing/src/components/sections/Integrations.tsx
landing/src/components/sections/Intro.tsx
landing/src/components/sections/Numbers.tsx
landing/src/components/sections/QuadChain.tsx
landing/src/components/sections/Security.tsx
landing/src/components/sections/TrustGaps.tsx
landing/src/components/SecurityFlow.tsx
landing/src/components/SecurityViz.tsx
landing/src/components/SmoothScroll.tsx
landing/src/components/SplitReveal.tsx
landing/src/components/SponsorLogos.tsx
landing/src/components/ui.tsx
landing/tsconfig.json
landing/vercel.json
next.config.mjs
package.json
playwright.config.ts
postcss.config.mjs
public/fonts/Canela-Medium.otf
public/fonts/Canela-Regular.otf
public/pitch/deck.js
public/pitch/index.html
public/pitch/README.md
public/quad-dashboard.html
public/research-paper
railway.json
README.md
[331 more files omitted for size]
```

### Dependencies

- agent/requirements.txt: python-dotenv@>=1.0.1, requests@>=2.32.3, uagents@>=0.22.0, uagents-core@>=0.3.0
- landing/package.json: @gsap/react@^2.1.2, @tailwindcss/postcss@^4.0.0, @types/node@^22.10.7, @types/react@^19.0.7, @types/react-dom@^19.0.3, eslint-config-next@15.5.19, framer-motion@^12.40.0, gsap@^3.12.7, lenis@^1.1.20, next@15.5.19, postcss@^8.5.1, react@19.0.0, react-dom@19.0.0, tailwindcss@^4.0.0, typescript@^5.7.3
- package.json: @anthropic-ai/sdk@^0.30.0, @browserbasehq/sdk@^2.0.0, @gsap/react@^2.1.2, @opentelemetry/api@^1.9.0, @opentelemetry/exporter-trace-otlp-http@^0.52.0, @opentelemetry/resources@^1.25.0, @opentelemetry/sdk-trace-node@^1.25.0, @opentelemetry/semantic-conventions@^1.25.0, @playwright/test@^1.61.0, @sentry/nextjs@^8.20.0, @supabase/supabase-js@^2.108.2, @types/node@^20.14.0, @types/pg@^8.11.0, @types/react@^18.3.3, @types/react-dom@^18.3.0, @upstash/redis@^1.34.0, autoprefixer@^10.4.19, dotenv@^17.4.2, gsap@^3.15.0, next@^14.2.35, pg@^8.12.0, playwright-core@^1.61.0, postcss@^8.4.39, react@^18.3.1, react-dom@^18.3.1, tailwindcss@^3.4.6, tsx@^4.20.6, typescript@^5.5.3, vite-tsconfig-paths@^5.1.4, vitest@^2.1.9, zod@^3.23.8

### Recent commits (newest first)

- Derive capability validation checks
- Simplify technical README
- Surface external agent runtime status
- Add playbook registry
- Add connector credential audit logs
- Add capability lifecycle states
- Route meeting handoffs through Agentverse
- Lock landing and app domains
- Add connector registry
- Expose capability catalog
- Update README.md
- Add internal usage metering
- Stream normalized run events
- Add autonomy policy receipts
- Harden live meeting agent streaming
- Show trust packet proof metrics
- Add return button for meeting mode
- Show approved execution outcome proof
- Update Recall bot payload for v1.11
- Merge pull request #6 from notandruu/add-pitch-deck

## Key source files (fetched from GitHub, selected and truncated for size)

### CLAUDE.md

```markdown
# Quad — team rules

## identity

Never mention Claude, AI, or any assistant in:
- git commits, branch names, PR titles, PR descriptions, changelogs
- no "generated by" or "co-authored-by" attributions
- write as if a human developer authored everything

## standard

The marginal cost of completeness is near zero. Do the whole thing. Do it with tests. Do it with docs.
Never present a workaround when the real fix exists. Never leave a dangling thread when tying it off takes five more minutes.
The standard is not "good enough" — it is "holy shit, that's done."
Tests before shipping. Type-check passes before committing.

Before every commit:
```
npm run typecheck && npm test && npm run build
```

## repo layout

```
src/lib/types/      frozen data contracts — do not refactor existing types, additive only
src/lib/redis/      Redis event spine
src/lib/brain/      company brain (pgvector + in-memory fallback)
src/lib/tools/      audit worker, Browserbase, page discovery, action tools
src/lib/runtime/    intent, permissions, quality gates, audit prompts, employee loop
src/lib/llm/        Anthropic client helpers
src/lib/observability/  Sentry spans, Phoenix tracing, LLM-as-judge evals
src/lib/voice/      Moshi voice session scaffold
src/lib/debug/      backend status logic (pure, testable)
src/components/     UI components
src/app/            Next.js App Router pages and API routes
src/data/seed/      demo org (BrightPath) company brain
docs/               architecture docs
```

## lane ownership

Two devs work in parallel. The only shared freeze zone is `src/lib/types/` and `package.json` (additive only in both).

**Lane A — engine & brain** (Andrew)
- `lib/tools/`, `lib/brain/`, `lib/runtime/`, `lib/llm/`, `lib/redis/`, `lib/observability/evals.ts`
- `app/api/{chat,audit,ingest}/`
- Branch: `feature/engine` → PR #1

**Lane B — experience & observability** (teammate)
- `components/`, `app/page.tsx`, `app/layout.tsx`, `lib/voice/`, `lib/observability/{sentry,phoenix}.ts`
- `instrumentation.ts`, `sentry.*.config.ts`, `app/api/{settings,sessions}/`, `data/seed/`, `lib/debug/`
- Branch: `feature/experience` → PR #2

If you need to cross a lane boundary, talk to the other dev first.

## git

- Squash to a single commit before pushing PRs or after addressing review feedback
- No em dashes anywhere: messages, PR bodies, code comments, docs, commits
- Commit early and often on your branch; squash before PR

## environment

Copy `.env.example` to `.env.local`. The app runs with zero keys — every backend has a working fallback.

```
ANTHROPIC_API_KEY       audit analysis + grounded chat
DATABASE_URL            Postgres + pgvector (schema in src/lib/brain/schema.sql)
QUAD_REDIS_REST_URL     Upstash REST URL
QUAD_REDIS_REST_TOKEN   Upstash REST token
BROWSERBASE_API_KEY     browser-rendered audits
BROWSERBASE_PROJECT_ID
PHOENIX_COLLECTOR_ENDPOINT  Arize Phoenix
PHOENIX_API_KEY
SENTRY_DSN
NEXT_PUBLIC_SENTRY_DSN
MOSHI_SERVER_URL        voice transport
```

## adding
[truncated — 829 more characters]
```

### AGENTS.md

```markdown
<claude-mem-context>
# Memory Context

# [quad] recent context, 2026-06-20 9:15pm PDT

Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision 🚨security_alert 🔐security_note
Format: ID TIME TYPE TITLE
Fetch details: get_observations([IDs]) | Search: mem-search skill

Stats: 46 obs (20,961t read) | 392,741t work | 95% savings

### Jun 20, 2026
868 1:21p ⚖️ Hackathon Project Named "ts quad" for AI Berkeley
869 " 🔵 Quad Hackathon Plan: Full Architecture and Sponsor Strategy Documented
870 1:22p 🔵 AI Hackathon 2026 Sponsor Details Confirmed via Gmail
871 " 🔵 Project Repository at /Users/stephenhung/Documents/GitHub/quad is Nearly Empty
872 " ✅ tasks/ Directory Created in quad Repo
873 " ✅ tasks/todo.md Created with Sponsor Alignment Strategy and Build Checklist
874 1:27p ⚖️ quad Reframed as Production-Grade Product, Not Just Hackathon Demo
875 " 🔴 tasks/todo.md Updated to Reflect Production-Grade Build Standard
876 " ✅ tasks/todo.md Upgraded to Production-Grade Build Plan; tasks/lessons.md Created
877 1:46p 🔵 quad Project Has Two-Dev Lane Structure on GitHub (notandruu/quad)
878 " 🔵 quad feature/experience Branch Has Full Scaffold — Key Files Mapped
879 1:47p 🔵 Quad Codebase Full Architecture Mapped — Key Implementation Details Found
880 " 🔵 Quad feature/experience Branch Builds Clean — Baseline Confirmed
881 " 🔵 Quad Audit Engine and UI Layer Fully Mapped — Implementation Details for Lane B
882 1:48p 🟣 LiveLogs Panel Polished — Pure Logic Layer + Animated Counter Progress Bars + Tone-Coded Log Rows
883 " 🔴 LiveLogs.tsx Stale Code Fragment Removed After Patch Collision
884 " 🟣 LiveLogs Polish Complete — 12 Tests Pass Across 3 Test Files
885 " ✅ LiveLogs Polish Build Verified Clean; .env.local Created from Example
886 1:49p 🔵 Quad Dev Server Starts on Port 3001 — Port 3000 Already in Use
887 " 🔵 Playwright Browser QA Blocked — JS Sandbox Missing sandboxPolicy Field
888 " 🔵 Playwright Browsers Not Installed — npx playwright install Required Before Browser QA
889 " ✅ Playwright Chromium Binaries Installed — Browser QA Now Available
890 1:50p 🔵 Playwright QA Script Timed Out — Audit Flow Taking Longer Than 30s
891 " 🔵 Playwright QA Failed — ChatBar Placeholder Text Doesn't Match getByPlaceholder Selector
892 " 🔵 LiveLogs UI Renders Correctly in Browser — Audit Not Triggered by Chat Text Without URL Chip
893 1:51p 🔵 Audit Route Returns 200 But Zero Events Reach LiveLogs — SSE Replay Gap Confirmed
894 " 🔵 LiveLogs UI Visually Confirmed Working — Screenshot Shows Correct Layout and Empty State
895 1:52p 🔵 Root Cause of Empty LiveLogs After Audit: SSE Batches Events Post-Run, publishAuditEvent Returns Events But Route Only Replays After runAudit Completes
896 1:55p ⚖️ New Claude Session Resumed on quad feature/experience — Same Context Re-Established
897 1:56p 🔵 FindingCard.tsx and FindingsPanel.tsx Current State — Screenshot Viewer Absent
898 " ⚖️ Next Lane B Feature: FindingCard Screenshot Viewer (Building Now
[truncated — 1329 more characters]
```

### package.json

```
{
  "name": "quad",
  "version": "0.1.0",
  "private": true,
  "description": "Quad Live Audit Employee: a company-aware AI employee that audits a website against its company brain, streams the work live, and turns gaps into approved fixes.",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "typecheck": "tsc --noEmit",
    "test": "vitest run",
    "test:watch": "vitest",
    "check": "npm run typecheck && npm test && npm run build",
    "check:full": "npm run check && npm run e2e",
    "validate": "node scripts/validate.mjs",
    "db:migrate": "node scripts/migrate-platform.mjs",
    "db:migrate:dry": "node scripts/migrate-platform.mjs --dry-run",
    "db:status": "node scripts/check-platform-schema.mjs",
    "e2e": "playwright test",
    "e2e:api": "node scripts/e2e.mjs",
    "demo": "node scripts/demo.mjs",
    "sponsor:proof": "tsx scripts/sponsor-proof.ts",
    "canary:worker": "node scripts/worker-canary.mjs",
    "worker:preflight": "node scripts/worker-preflight.mjs",
    "worker": "tsx scripts/worker.ts",
    "worker:once": "tsx scripts/worker.ts --once",
    "smoke:prod": "node scripts/prod-smoke.mjs"
  },
  "dependencies": {
    "@anthropic-ai/sdk": "^0.30.0",
    "@browserbasehq/sdk": "^2.0.0",
    "@gsap/react": "^2.1.2",
    "@opentelemetry/api": "^1.9.0",
    "@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
    "@opentelemetry/resources": "^1.25.0",
    "@opentelemetry/sdk-trace-node": "^1.25.0",
    "@opentelemetry/semantic-conventions": "^1.25.0",
    "@sentry/nextjs": "^8.20.0",
    "@supabase/supabase-js": "^2.108.2",
    "@upstash/redis": "^1.34.0",
    "gsap": "^3.15.0",
    "next": "^14.2.35",
    "pg": "^8.12.0",
    "playwright-core": "^1.61.0",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "zod": "^3.23.8"
  },
  "devDependencies": {
    "@playwright/test": "^1.61.0",
    "@types/node": "^20.14.0",
    "@types/pg": "^8.11.0",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "autoprefixer": "^10.4.19",
    "dotenv": "^17.4.2",
    "postcss": "^8.4.39",
    "tailwindcss": "^3.4.6",
    "tsx": "^4.20.6",
    "typescript": "^5.5.3",
    "vite-tsconfig-paths": "^5.1.4",
    "vitest": "^2.1.9"
  }
}

```

### agent/requirements.txt

```
python-dotenv>=1.0.1
requests>=2.32.3
uagents>=0.22.0
uagents-core>=0.3.0

```

### landing/package.json

```
{
  "name": "dispatch-handport",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev -p 5180",
    "build": "next build",
    "start": "next start -p 5180",
    "lint": "next lint"
  },
  "dependencies": {
    "@gsap/react": "^2.1.2",
    "eslint-config-next": "15.5.19",
    "framer-motion": "^12.40.0",
    "gsap": "^3.12.7",
    "lenis": "^1.1.20",
    "next": "15.5.19",
    "react": "19.0.0",
    "react-dom": "19.0.0"
  },
  "devDependencies": {
    "typescript": "^5.7.3",
    "@types/node": "^22.10.7",
    "@types/react": "^19.0.7",
    "@types/react-dom": "^19.0.3",
    "tailwindcss": "^4.0.0",
    "@tailwindcss/postcss": "^4.0.0",
    "postcss": "^8.5.1"
  }
}

```

### src/app/page.tsx

```typescript
import { QuadWorkspaceDashboard } from "@/components/QuadWorkspaceDashboard";

export default function Home() {
  return <QuadWorkspaceDashboard />;
}

```

### src/app/layout.tsx

```typescript
import type { Metadata } from "next";
import "./globals.css";

export const metadata: Metadata = {
  title: "Quad live audit employee",
  description:
    "A company-aware AI employee that audits a website against its company brain, streams the work live, and turns gaps into approved fixes.",
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body className="min-h-screen antialiased">{children}</body>
    </html>
  );
}

```

### src/lib/connectors/index.ts

```typescript
export * from "./credentials";
export * from "./registry";

```

### src/lib/observability/index.ts

```typescript
export * from "./sentry";
export * from "./phoenix";
export * from "./evals";
export * from "./status";
export * from "./runtime";

```

### src/lib/types/index.ts

```typescript
export * from "./brain";
export * from "./employee";
export * from "./tool";
export * from "./audit";
export * from "./voice";
export * from "./runtime";

```

[380 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]