Vol. 01 — Folio An occasional journal of computation
Est. MMXXV Rev 2026·04·29 ↑ Signal on
Frontispiece — A Treatise on Computation

Of gates
& machines.

Logic Gate Labs designs high-performance AI systems from first principles — etched in silicon, proven in production, and tuned for the workloads that other shops won't touch.

Practice
AI · HPC · Inference
Posture
Independent studio
Status
Accepting partners
Plate I — Schematic, NAND Drawn from life
§ I — Practice

Three circuits
we run cold.

Specialist work, not a menu of services. Every engagement is bespoke; the categories below are the lens through which we approach a brief.

Fig. I·aAND

Applied AI
development.

Custom systems for problems that don't fit the off-the-shelf prompt-and-pray playbook. Models, data pipelines, evaluation harnesses, the lot — built to outlive the demo.

Fig. I·bOR

High-performance
computing.

Throughput, latency, dollars per inference. We profile, port, fuse and quantise until the workload runs the way the silicon was designed to run it.

Fig. I·cXOR

Machine-learning
integration.

Embedding ML where it has to live alongside the rest of the business: legacy data, hard SLAs, regulated environments. The work nobody finds glamorous, done well.

§ II — Casebook

Selected work,
drawn to spec.

Eight systems off the bench. Grounded in what's actually built, honest about maturity, and chosen because the hard part was real. No client logos — the engineering speaks.

AND · doc·page·quote → claim Drawn to spec
Applied AI · Legal Production-shaped Elixir · Phoenix

Trace

Litigation turns on chains — grievance, response, appeal, exhaustion — not text similarity. So we built the graph, not another chunker.

The problem

Section 1983 prisoner civil-rights work lives in relationships and timelines. Generic RAG hands a lawyer chunks about a question instead of the actual chain of events — and no lawyer can act on an answer they can't trace to the page.

The circuit

A monorepo splits pure model-selection, a multi-provider LLM gateway, a partitioned knowledge plane, and the Phoenix host. Documents flow through an LLM intake pipeline into deduplicated graph nodes and edges; a Case Intelligence Layer fuses vector search with one-hop graph expansion into char-budgeted context for a bounded, seven-tool agent.

  • Provenance is a hard contract: an extraction ships doc + page + verbatim quote, or it's dropped — edges to undefined entities are counted and discarded, never fuzzy-merged.
  • The knowledge plane is its own OTP app and database — 64 hash partitions per table, sized for ~30M nodes and ~60M edges of vector(1536) per firm-year.
  • A pure constraint-propagation router picks the model and emits an elimination-trace you can read back.
ElixirPhoenixpgvectorlibgraphObanReqLLMGKE
Three indexes → one cited answer Drawn to spec
Applied AI · Retrieval Reference build Elixir · pgvector

Intext

Three indexes of one corpus — structure, semantics, relationships — fused into a single cited answer, or an honest refusal.

The problem

A frontier model reasons brilliantly and remembers nothing about your world. Naive RAG — blind chunking plus top-k cosine — discards document structure, cross-references, and the entities that span a whole corpus, then hands the model disconnected fragments.

The circuit

Intext co-locates a per-document nested-set tree with leaf HNSW vectors in one table, so a single SQL statement does vector search and small-to-big structural expansion at once. A corpus-wide knowledge graph binds entities by deterministic key; hybrid retrieval fuses vector and lexical search via reciprocal-rank fusion, then grounds through a resolvable citation contract.

  • Adding the RRF lexical channel lifted golden-query recall@5 from 0.920 to 1.000 and MRR from 0.883 to 0.933 — with no query regressing.
  • Grounded-or-refused: empty retrieval short-circuits before the model runs, and any citation that doesn't match a retrieved passage is marked unverified, not presented as fact.
  • Structure and semantics share one table — a single range + vector-distance query, no application-level glue.
Elixirpgvector · HNSWPostgres FTSRRFClaudeOban
Isolate in · one PR out Drawn to spec
Applied AI · Infra Pre-first-delivery Elixir · GCP

oibrí

File a task; a fleet of agents runs it in isolated VMs — inside your own cloud — and hands back a reviewable pull request.

The problem

Background AI engineers execute untrusted, model-driven code changes that have to run somewhere safe, auditable, and cost-visible — ideally inside the customer's own VPC, not a vendor's.

The circuit

One Elixir umbrella compiles to three release targets — control plane, runner, and in-VM supervisor — selected at boot. Runners dial out over WebSockets and never accept inbound connections, so a runner lives entirely inside a customer's GCP project. Each task provisions a fresh VM whose supervisor dials back over a Channel and streams execution; git credentials never touch argv.

  • A hash-chained audit log writes every state mutation in the same transaction, backed by an append-only compute ledger and a per-org LLM budget with a /spend breakdown.
  • Three swappable compute adapters — real GCE VMs, single-host Docker, and an in-process Fake — sit behind one behaviour, so the whole spine runs on a laptop.
  • The MCP surface is capability-scoped: a personal token acts as its membership, the shared token is read-only, and swapping the gate fails five mutation tests.
ElixirPhoenix ChannelsGCP ComputeTerraformPackerMCP
OR · escalate, never dilute Drawn to spec
ML integration · Security Early-stage Rust · ONNX

Riggs

Endpoint protection that keeps its inference on the machine — no cloud call, no telemetry ever leaving the host.

The problem

Conventional EDR ships sensitive process, file, and network telemetry to a cloud backend to classify it. Riggs inverts that: every model runs locally, so protection works fully offline and endpoint data never leaves the box.

The circuit

Platform sensors feed a normalizer that emits OCSF-shaped events into a staged pipeline: threat-intel bloom lookups, a static-AI stage over 256-float Mach-O/ELF feature vectors, a YARA-X and rules stage, and a behavioral stage. A weighted merger combines their scored verdicts under an escalate-never-dilute rule — the ONNX stages sit behind heuristic fallbacks today; the merger, rules, and DLP paths are live and tested.

  • Eight MITRE ATT&CK techniques ship as individually-tested behavioral detectors — ransomware, injection, lateral movement, exfiltration, and more.
  • A Swift NEFilterDataProvider queries the daemon over a Unix socket for sub-millisecond verdicts; magic-byte detection defeats file-rename evasion.
  • The verdict merger enforces an escalate-never-dilute invariant with 0.7 / 0.3 thresholds, unit-tested down to NaN-poisoning edge cases.
RustTokioONNX · ort/tractYARA-XredbNetworkExtension
Demux · auto / staff / client Drawn to spec
Applied AI · Accounting Foundation complete Elixir · Postgres

Taxon

The model reads every receipt; a confidence gate decides which ones a human ever has to see.

The problem

A firm with ~2,000 clients drowns in receipts, invoices, and statements that must become correctly-categorized ledger entries. Naive LLM extraction isn't accurate or auditable enough for a tax-liability context — and a model's self-reported confidence is noise.

The circuit

A staged Oban pipeline — extract, reconcile, classify, route, notify — runs a cheap model first and escalates behind one provider behaviour. Confidence comes from real signals (beta-smoothed vendor priors, label entropy over logprobs, structural features), never self-report, and routing keys on materiality × ambiguity. Only uncertain items reach a keyboard-first console or a magic-link client portal.

  • Postgres does everything — jobs, pub/sub, and search — and the release ships with distributed Erlang switched off (RELEASE_DISTRIBUTION=none).
  • Tenant isolation is enforced in the database four independent ways: FORCE RLS, a transaction-scoped unprivileged role, a query guard that raises on unscoped access, and a statement trigger refusing tenant-less writes.
  • The audit trail is append-only by DB trigger — no update or delete path — and every model call logs its tokens, cost, and latency.
ElixirPhoenixPostgres 16 · RLSObanVertex AICloud Run
Latch · validate ∧ beat-greedy Drawn to spec
High-perf computing · OR Prototype Elixir · OR-Tools

OneCompany

The enterprise planning department — constraint-complete route optimization — inside a live dispatch board a twelve-tech shop can actually afford.

The problem

Small trades shops get drag-and-drop calendars, not planning. Real advanced scheduling historically meant a proprietary solver and a $250-an-hour consultant. Open solvers and LLMs finally make it deliverable at SMB prices.

The circuit

A Python sidecar solves each shop-day as an arc-based VRPTW mixed-integer program in OR-Tools, behind a typed HTTP contract. Hard feasibility is computed app-side and passed as allowed (tech, job) pairs, so the model never sees an illegal assignment. The app re-validates every solution and keeps the MIP plan only if it beats an in-BEAM greedy heuristic — so a dead sidecar can never break the board.

  • The formulation carries constraints (1)–(6): coverage, degree, big-M time-propagation subtour elimination, time windows, break disjunctions, and overtime caps.
  • Defense-in-depth acceptance: the solver's output is re-checked in Elixir and must beat the greedy baseline to reach the board.
  • A recorded demo day: same 14/14 jobs and 100% SLA as greedy, with drive time cut from 4:36 to 3:50.
ElixirOR-Tools · SCIPPythonOSRM/VROOMPostgresGKE
Mux · learned select line Drawn to spec
Applied AI · Knowledge Deployed · evolving Elixir · pgvector

The Librarian

Own your corpus outright — then let one SQL query, not another subscription, curate the stream.

The problem

The knowledge you depend on is scattered across feeds, browsers, and Evernote, and rented from services that can vanish. Feeds bury you; clipping the good parts works differently in every browser.

The circuit

Phoenix LiveView drives the reader, vault, and search while Oban runs fetching, embedding, tagging, and pruning on a schedule. Articles are embedded in-BEAM with Bumblebee into pgvector, and a "For You" stream is ranked entirely in Postgres SQL — cosine distance to learned interest centroids, a disliked penalty, recency decay, and a reserved exploration budget. Claude, budget-gated, types graph edges between near-neighbor notes.

  • The entire personalized ranking — centroid affinity, disliked penalty, recency decay — runs in one parameterized SQL query, so embeddings never leave the database.
  • Every LLM call is gated on month-to-date spend and its token cost recorded, so a runaway job stops at the budget, not the bill.
  • The graph worker only types edges among a note's vector nearest-neighbors — never O(n²) — and marks the note done even on zero edges.
ElixirPhoenixpgvectorBumblebee · EXLAClaudeWebExtension MV3
Encoder · blocked lights Drawn to spec
Systems · Agent tooling Alpha · v0.1 Rust

Tutti

tmux for AI coding agents — many terminals in, one attention signal out.

The problem

Run a dozen terminal agents at once and every window is opaque: nothing answers "which one needs me right now?" Permission prompts stall in silence while detached agents keep working.

The circuit

A background daemon owns every PTY and runs a per-pane vt100 parser for scrollback and screen classification. A per-agent state machine — in an I/O-free core crate — drives Unknown → Working ⇄ Blocked → Done → Idle, and a versioned wire protocol ships length-prefixed frames with server-computed screen diffs coalesced to a ~16 ms tick. Every TUI action is also a CLI verb over the Unix socket.

  • A four-crate, ~20k-line Rust workspace keeps the core dependency-free so the state machine can be exhaustively unit-tested.
  • The wire protocol is versioned (WIRE_REV 2) and additive-only; the attach handshake warns on version skew.
  • A data-driven agent registry tunes Claude and Codex today and falls back to generic heuristics for ~15 more — Claude hooks upgrade detection to exact signals.
Rusttokioratatuiportable-ptyvt100jj
§ III — Method

A small studio,
seriously equipped.

Practitioners first, technologists second, consultants only by accident. Below: the working brief.

Logic Gate Labs is at the front edge of applied artificial intelligence — not the marketing front edge, the actual one, where models are profiled in nanoseconds and a poorly chosen kernel costs a five-figure cloud bill before lunch.

We build high-performance software that pushes the boundaries of what's possible on the hardware our clients can afford to run. Our team combines low-level systems craft with a working understanding of the businesses we serve. We do not write whitepapers; we ship.

Every brief begins with the same three questions: what is the workload, what is it worth, and what is it allowed to cost? Everything else — the architecture, the framework, the choice of model — falls out of the answers.

We are interested in the boring half of AI: the half that has to keep working at three in the morning when nobody is watching. — House note, 2026
§ IV — Correspondence

Send a signal.

Briefs, problem statements, half-formed hunches. We read everything.

Tell us what's too slow, too expensive, or too strange for the off-the-shelf — and we'll tell you whether it's interesting. Write to info@logicgatelabs.com.