Engineering

A litigation intelligence platform. Source files, sidecars, manifest rows, patterns, and deadlines — one navigable command surface.

Artifacts
Patterns
Matters
Cast
Brain
Open Public Portal Live Analytics Engineering Digest

What it does

Stonewall is a corpus engine for institutional analysis. It ingests raw evidence, normalizes it into searchable form, links it across cases and characters, and surfaces patterns of behavior with chronology, citations, and provenance intact.

Ingest

Multi-source evidence pipeline

Documents, transcripts, emails, and screenshots flow in from disparate reservoirs and emerge as a single searchable, cross-referenced corpus.

Analyze

Phenomenology pattern detection

A 274-pattern taxonomy classifies behaviors across the corpus, instantiated against artifacts so any pattern can be traced back to source evidence on demand.

Recall

Cast and chronology graph

Every cast member, case, date, and citation is indexed. Ask who, what, when, or where and the system answers from the underlying ground truth.

Operate

Tactical decision surface

Live deadlines, settlement posture, expert deadline status, and matter-level readiness — the system stays current with the work, not after it.

Architecture at a glance

Three layers cooperate: a prompt core that orchestrates behavior, a flat-file catalog that tracks every artifact, and a codex layer that enforces canon and chronology across the corpus.

Source Reservoirs Flat-File Catalog Prompt Core Brain & Codex Public Portal
Prompt Core

Stonewall Brain

The orchestration layer — defines retrieval priorities, operational guardrails, and the companion skills that handle specialized tasks.

Flat-File Database

Catalog System

The primary artifact index, searchable by character, pattern, date, case, or keyword. Derived indexes give alternative access paths into the same ground truth.

Codex Layer

Canonical References

Cast codex, case codex, artifact codex, phenomenology registry, and deposition codex govern identity, chronology, patterns, and matter posture.

Automation

Pipeline & Sync

Document ingestion, transcription, email consolidation, and bidirectional sync with the operational systems where the work actually happens.

The stack

What runs underneath. Three runtimes, two static surfaces, one bot service, one corpus database, one operator console.

Languages Python 3.12 Node 24 TypeScript Markdown
Corpus database Flat-file (Markdown + JSON) SQLitecatalog/manifest.md is the single source of truth; SQLite mirrors it for keyword search.
Public surfaces Cloudflare Pages Vercel — landing + portal SPA + insights + this page, all statically rendered with public-corpus data.
Corpus API FastAPI Uvicorn httpxapi.stonewall.esq serves the canonical corpus stats and reader endpoints from the same flat-file manifest the static surfaces consume.
Operator console Next.js 15 React Tailwindapp.stonewall.esq, authenticated, carries the live-matter workspaces, readers, billing, and command palette.
Bot runtime Railway Docker Telegram Bot API — Stonewall Telegram Bot, polling, deployed from the repo root scripts/stonewall_bot/.
AI surface Claude Opus Whisper Gemini TTS-1-HD — orchestration core, voice-to-text, music analysis, voice output. Brain pack mirrors the canonical codices.
Sync & intake pypdfium2 Tesseract extract-msg Notion API — gold-standard 300dpi raster OCR sidecars, email consolidation, Filevine/Domo bridges.
CI & gates GitHub Actions pytest Vitest Playwright — verify-all suite gates manifest consistency, ontology validation, language audit, and brain-pack drift.

Operational surfaces

The control plane spans the repository, the workspace, and external evidence reservoirs. These are the living surfaces, not historical snapshots.

Repository

Catalog indexes, codex references, source artifacts, and the analytics site. The flat-file database lives here, version-controlled and inspectable.

Workspace Integration

Matter registry, archive database, communication surface, and task backlog — with cross-database relations and morning operational briefs.

Evidence Reservoirs

Source documents, transcripts, exports, and screenshots flow from upstream reservoirs into the repository for normalization and analysis.

Public Portal

Aggregate dashboard with corpus search, deadline counts, pattern reach, and public-facing portfolio views. The operator console carries the authenticated operator record.

Open Public Portal