Architectural Case Studies

Engineering proofs.

Deep-dive breakdowns of production AI systems, context runtimes, and deterministic architectures. Every claim is backed by dated runtime logs, benchmark scorecards, and verifiable code artifacts.

JIT-Context OSSub-3ms epistemic memory runtime for AI agents with CERN Zenodo DOI (10.5281/zenodo.22649542).
InvoiceFlowProduction document workflow with OCR extraction, deterministic validation and KSeF accounting integration.
Onboarding FlowSchema-driven legalisation engine: 108 data points, zero-code flow definitions, and iDenfy KYC integration.
Evidence disciplineClaims are backed by dated runtime evidence, benchmark scorecards, and verifiable repository artifacts.
#01flagship · epistemic memory runtime & jit context os
Open Source — CERN Zenodo DOI

JIT-Context OS

Sub-3ms epistemic context runtime eliminating the Haystack Tax, prompt drift, and agent self-poisoning.

Core Rule: User Authority = 1.0. Assistant Speculation = 0.0. Runtime Tool Proof = 1.0.

The Challenge

Modern autonomous coding agents deteriorate rapidly as turn history accumulates: prompts explode past 50k tokens, attention degrades (Lost-in-the-Middle), API rate limits trigger 429 errors, and agents suffer from epistemic self-poisoning—recursively treating their own past hallucinations as ground truth.

The Architecture

A deterministic 3-tier cascade: L0 Hot-Path in local SQLite WAL (<3ms Read-Your-Own-Writes), L1 Project Scope Hysteresis (<10ms), and L2 Bounded Associative Broker (600ms fail-open). Pairs deterministically with a local Obsidian Vault (plain Markdown dossiers in projects/<project>.md and knowhow/<topic>.md) as the human-in-the-loop Single Source of Truth — replacing opaque vector databases. Protected by 10 ironclad Epistemic Invariants (I1–I10). The prompt NEVER accumulates unbounded chat history: each turn receives fixed tool declarations (100% cache hit), the latest tool output, and an adaptively compiled <ONA_CONTEXT> capsule (400–1,200 tokens).

The Verified Impact

Empirically validated on production codebases (Synthapse E2E benchmark across 45 audio modules and 199 Vitest suites): achieved a 2.44x speedup in task delivery (-59.0% wall-clock time), reduced LLM turns by 61.4% (105 rounds avoided), cut tool execution churn by 62.1%, and achieved zero runtime error loops with 100% test pass rate on the first attempt.

Empirical Verification: Paired Synthapse E2E Benchmark199/199 Vitest PASS
Wall-Clock Delivery Time⚡ 2.44× Faster (-59%)
Baseline (Haystack): 45.8 min
JIT-Context OS: 18.8 min
Total Agent Turns📉 -61.4% Turns
Baseline: 171 turns
JIT-Context OS: 66 turns
Tool Execution Churn🎯 -62.1% Churn
Baseline: 314 tool calls
JIT-Context OS: 119 tool calls
Peak Prompt Volume (Turn 30+)🛡️ -98% Token Bloat
Baseline: >54,000 tokens (Haystack)
JIT-Context OS: ~1,140 tokens (Capsule)
Metric DimensionBaseline (Haystack Accumulation)JIT-Context OS (<1.2k Capsule)Empirical Gain
Wall-Clock Delivery2,752.6s (45.8 min)1,127.3s (18.8 min)2.44x faster (-59%)
Local 9B Duel (EXP-009)10 turns (Failed 0/4)4 turns (100% Pass)Local M2 Pro beat Gemini Flash
Total LLM Turns171 turns66 turns-61.4% API calls
Tool Execution Churn314 executions119 executions-62.1% tool churn
Test Regression Loops7 runtime error loops0 error loopsZero regression loops
Prompt Input Volume>54,000 tokens (Turn 30+)482 – 1,140 tokens>98% token reduction
Prefix Cache Hit Ratio<18% (frequent invalidations)>88% stable cache hits~74% cost reduction
  • <3ms L0 SQLite WAL
  • 2.44x faster delivery
  • Local 9B Beat Gemini 3.8 Flash
  • 10/10 Invariants PASS
  • CERN Zenodo DOI: 10.5281/zenodo.22649542
#02intelligent document processing & ksef
production document workflow

InvoiceFlow

Production document pipeline: vision OCR proposals governed by deterministic validation and KSeF accounting export.

Core Rule: The probabilistic model proposes. The deterministic engine decides.

The Challenge

Automating invoice processing across multiple business entities requires 100% arithmetic accuracy and compliance with Poland's national KSeF e-invoicing schema. Relying on raw LLM output creates dangerous liability for VAT discrepancies, duplicate accounting, and tax filing penalties.

The Architecture

A multi-stage validation cascade: Vision OCR models propose initial field extractions (Pydantic v2 schemas). A deterministic Python engine validates gross/net VAT arithmetic, checks supplier tax IDs against official registries, tracks High-Water Marks (HWM per NIP) to prevent duplicate processing, and enforces strict accounting ledger rules before generating KSeF XML packages.

The Verified Impact

Operates as an active production workflow handling continuous invoice batches. By strictly decoupling extraction proposals from deterministic validation, human review is required only for true anomalies, while 100% of arithmetic decisions remain provable and audit-proof.

  • Vision OCR + Pydantic v2
  • Deterministic VAT validation
  • KSeF XML compliance
  • High-Water Mark deduplication
  • Production
#03schema-driven workflow automation
Internal — active development

Onboarding Flow

Universal schema-driven state machine decoupling complex KYC and legalisation rules from codebase changes.

Core Rule: Process changes happen in swappable schemas, zero code changes.

The Challenge

Client onboarding and employee legalisation in dynamic regulatory environments undergo constant operational adjustments. Hardcoded forms require lengthy engineering deployment cycles whenever a document requirement or form field changes.

The Architecture

A universal, schema-driven onboarding engine built on FastAPI, async SQLAlchemy 2.0, PostgreSQL with asyncpg (JSONB dynamic payload storage), and Alembic migrations. A deterministic state machine guides users through 108 datapoints defined in swappable schema files. Model assistance is strictly constrained to bounded multilingual interpretation and OCR transcription. Production integrations include magic-link authentication, iDenfy KYC biometric verification, and Google Maps address geocoding.

The Verified Impact

Eliminated engineering bottlenecks: operations teams modify workflow rules and document checklists directly in JSON schemas without redeploying backend containers or altering database migrations.

  • 108 Datapoints
  • Schema-driven state machine
  • iDenfy biometric KYC
  • FastAPI + asyncpg
  • JSONB dynamic payloads
#04multi-agent orchestration & devops
pilot

Feedby

Autonomous feedback-to-fix loop: user reports end in reviewable pull requests at the merge boundary.

Core Rule: Feedback belongs in code, not in dead ticket queues.

The Challenge

User bug reports and UX friction points frequently die in neglected backlog queues. The operational gap between a reported issue and an applied code fix erodes customer trust and developer focus.

The Architecture

An AI-native feedback widget integrated directly into client web apps, wired to a multi-agent orchestration harness (Claude Code SDK / Agent Zero / OpenHands / cmux). Triage agents classify and deduplicate reports; planning agents isolate affected source files; and execution agents draft surgical code fixes using JIT Context scoping to prevent prompt drift. Pull requests are generated with full test regression suites for review-gated human merging.

The Verified Impact

Active pilot demonstrating closed-loop issue remediation: compresses bug-to-PR cycle from days to minutes while keeping human engineers firmly in control of the final merge gate.

  • Multi-agent pipeline
  • Widget → PR pipeline
  • JIT context scoping
  • Review-gated merge boundary
  • Pilot
#05frontier generative audio & real-time dsp
Live demo — synthapse.theones.io

Synthapse

Real-time generative AI techno instrument powered by Google Lyria with deterministic DSP watchdogs.

Core Rule: Generative models create the mood; deterministic DSP guarantees the sound.

The Challenge

Generative audio foundation models suffer from spectral drift, phase cancellation, and unpredictable sub-bass collisions—rendering them unusable in live club sound systems where low-end discipline is mandatory.

The Architecture

A high-performance browser instrument combining Google Lyria RealTime audio streaming, Meyda spectral feature extraction, WebGL audio-reactive shaders, and dynamic loop banks. A deterministic DSP watchdog layer continuously arbitrates audio output: enforcing sub-bass mono collapse below 120Hz, real-time kick transient alignment, and hard limiter protection. Served as the empirical testing ground for JIT-Context OS paired benchmarking.

The Verified Impact

Public live demo operational at synthapse.theones.io across four interactive surfaces (root, play, dj, and kkik hardware studio). In empirical testing, JIT-Context OS achieved 2.44x faster autonomous feature implementation on this 45-module codebase with zero error loops.

  • Google Lyria RealTime
  • Deterministic DSP watchdogs
  • Meyda spectral analysis
  • WebGL shaders
  • Live Demo
#06desktop telemetry & bounded computer-use
evidence review pending

UniPro OS

Workflow intelligence: screen observation → validated primitives → deterministic execution.

Core Rule: Models interpret user intent; the OS compiles and validates the plan before execution.

The Challenge

Allowing unconstrained AI agents to write and execute arbitrary desktop code on corporate machines creates severe risks of data destruction, unauthorized access, and uncontrolled side effects.

The Architecture

A multi-tier desktop operating environment (Insight → OS → Rosea). UniPro Insight monitors user operational actions on screen and extracts semantic activity primitives. UniPro OS compiles raw intent into validated Plan JSON, verifying schema conformance, tool permission registries, and security policy boundaries before invoking any OS automation APIs.

The Verified Impact

Pioneers policy-bounded computer use by inserting a deterministic compiler between visual models and system calls, turning probabilistic observations into auditable, repeatable desktop automation.

  • Plan JSON compiler
  • Desktop activity telemetry
  • Permission registry
  • Multi-tier OS architecture
#07privacy-first pwa & cost-optimised gateway
Live App (tulimy.app)

Tuli.my

Relational intelligence PWA with event-sourced workflows, explicit consent, and tiered model routing.

Core Rule: Privacy is an architectural invariant, not a terms-of-service promise.

The Challenge

Consumer relational AI requires deep contextual continuity while protecting intimate personal reflections. Traditional monolithic RAG pipelines risk token cost blowouts and accidental context leakage between partners.

The Architecture

Event-sourced Progressive Web App built around cryptographic consent boundaries. A central AI Gateway routes conversational, reflective, and analytical tasks to tiered models based on required capability and cost. Context is partitioned into strictly isolated personal and shared scopes. Features include Web Push notifications, an agent-ready MCP API, and idempotent Stripe billing.

The Verified Impact

Demonstrates sustainable consumer AI economics: reduces per-turn inference costs by over 70% through tiered routing while guaranteeing that unconsented personal reflections never cross partner context boundaries.

  • Event-sourced architecture
  • Tiered model routing
  • Explicit consent boundaries
  • Agent-ready MCP API
#08vertical saas & scoped multi-tenant rag
evidence review pending

Boocco

AI-assisted salon operations platform integrating calendar, client records, and tenant-scoped RAG.

Core Rule: Enterprise-grade scheduling and finance simplified for non-technical salon operators.

The Challenge

Independent beauty salons are trapped between predatory booking marketplace fees that siphon their clients and convoluted enterprise software designed for multi-location franchises.

The Architecture

Next.js monorepo deployed with self-hosted Supabase and PostgreSQL. Combines a high-concurrency calendar engine with an embedded pgvector RAG assistant (HNSW indexing) for instant schedule resolution and client history lookup. Implements row-level security (RLS) and strict multi-tenant scoping so salon data remains hermetically isolated.

The Verified Impact

Provides salon owners with an autonomous operating center handling real-time appointments, 2-way SMS customer confirmation, and financial tracking without marketplace commission churn.

  • Next.js + Supabase
  • pgvector HNSW assistant
  • Row-Level Security (RLS)
  • Multi-tenant isolation
#09recruitment ops & legacy system adapter
Internal

Arara API

Self-healing REST gateway modernizing legacy backoffice workflows with automated token lifecycle management.

Core Rule: Never rewrite a working legacy system when you can wrap it in an indestructible API.

The Challenge

A high-volume logistics recruitment pipeline was locked behind an outdated web portal lacking public APIs, plagued by rapidly expiring session tokens, manual data entry bottlenecks, and frequent hiring cascade stalls.

The Architecture

A resilient FastAPI microservice exposing clean REST endpoints over the legacy backoffice: candidate search, operational metrics, and automated push-to-HIRED status transitions. Solved token authentication dual-path: a Manifest V3 browser extension for active session sync alongside a headless Playwright automation daemon with auto-recovery, mutex locking on token refresh, and exponential backoff.

The Verified Impact

Fully automated candidate ingestion and status updates without touching the legacy codebase, saving hundreds of hours of manual administrative clicking every month.

  • FastAPI REST gateway
  • Self-healing OAuth2/Session sync
  • Headless Playwright fallback
  • Docker & Nginx
Engineering discipline

Velocity means nothing without hygiene.

Shipping fast with AI leverage only works if the output holds up under scrutiny. A self-built repository review was run in 2026-07. Exact security, test and commit totals are withheld until the source artifact and counting definitions are preserved; the review is a dated observation, not a permanent guarantee.

2026-07A self-built repository audit snapshot was reviewed; exact totals are withheld until the audit artifact and counting definitions are preserved.
ScopedSecurity and test findings are dated observations, never permanent portfolio-wide guarantees.
ReviewablePublic metrics require a defined method, source artifact and reporting date.
The operator

Founder backbone. High-volume reality.

Before building autonomous AI systems and epistemic context runtimes, I spent 6 years founding and runningXpress Delivery, a nationwide same-day logistics network spanning 61 cities, hundreds of couriers, and enterprise SLA contracts. In 2022, Brief ranked me among the “50 Most Creative in Business”.

That background is why I don't build toys. Real operational systems require deterministic boundaries, hard verification gates, and absolute clarity on where probabilistic model reasoning ends and immutable business logic begins.

Ready for governed AI?

Let's build systems that don't break.