LAUNCH CAMPAIGN · Brevio Harness Pro & Studio are 100% FREE (€0) until Dec 31, 2026. We want to learn from diverse engineering teams — your only payment is anonymized run telemetry & honest feedback. Claim Free Access →
Empirical Production Research · Commit SHA Verified

Engineering Research & Post-Mortems

We do not publish generic AI thought pieces. Every study below documents an empirical measurement from our production server, the exact failure mode we encountered, and the deterministic code + regression gate that solved it.

STUDY 01Commit: 4bc6fa0 → 2284da4Published: 2026-10-24·Dataset: 850 Model Calls · 58.2M Tokens · 13 Merged PRs

Anatomy of 58.2M Tokens: Where Autonomous Coding Agents Actually Spend Money

A 14-day empirical audit of 850 model invocations across 32 workflow nodes — why unmerged retries dominate gross spend, and the four architectural changes that cut token waste by 38%.

1. Production Failure Mode

While merged pull requests consumed only 586,759 net tokens on their own task rows (7.6M total), gross server spend reached 4.48M tokens per merge because post-slice developer checks resumed full CLI conversation transcripts up to 4 times per build (35M tokens) and critique loops regenerated PRDs from scratch (8.4M tokens).

2. Architectural Resolution

1) Run all deterministic static checks (completeness, test coverage, typecheck, targeted suites) before a single resumed developer session with the union of findings; 2) Cache PRD/UX/Architecture artifacts by SHA-256 brief digest; 3) Route incremental replans on diff-only critiques; 4) Enforce strict per-role token budgets.

3. Verified Production Impact

35–40% reduction in gross server spend (58.2M → ~35M/14d) and ~400k net tokens per merged PR.

1. Net Task Tokens vs. Gross Server Spend

Most industry benchmarks only report the happy-path tokens of tasks that succeeded. Over 14 days in production (850 model calls, 40.6M input tokens, 17.6M output tokens), we measure both metrics transparently: 586,759 net tokens on merged task rows versus 4,476,923 gross tokens when unmerged retries, background daemons, and planning revisions are included.

Metric                                  | 14d Baseline         | Post-Optimization Target
----------------------------------------+----------------------+---------------------------
Net tokens on merged task rows / PR     | 586,759              | ~400,000
Gross server tokens / merged PR         | 4,476,923            | <= 2,800,000 (-38%)
Developer CLI turns / merged PR         | 9.5 calls (35.0M)    | < 6.0 calls (< 2.0M/merge)
Planning tokens / merged PR (5 roles)   | 650,000 (8.4M total) | < 300,000 (SHA-256 cache)

2. Eliminating Transcript Replay in Resumed CLI Sessions

When a coding agent completes a vertical slice and spawns sequential follow-up processes for completeness, test coverage, typechecking, and linting, each resumed turn re-ingest the entire conversation transcript. Executing all deterministic static gates upfront and batching the union of failures into a single resumed turn eliminates three redundant context replays per slice.

STUDY 02Commit: cfa1f7bPublished: 2026-10-24·Dataset: 14 Agent Roles · 140+ Golden Cases · 5 Model Providers

Why a 10x Cheaper Model Can Cost 2x More per Merged Pull Request

How we benchmark foundation models across 14 specialized engineering roles using 140+ Golden Contracts, tool-less judge sandboxes, and Z = 1.64 production A/B trials.

1. Production Failure Mode

Selecting a model for code generation or architecture based on per-million-token pricing alone is a classic false economy: a model that is 10x cheaper per token but halves first-pass QA pass rates or emits malformed schemas doubles the total compute cost per merged feature.

2. Architectural Resolution

Established 140+ deterministic golden evaluations (minimum 10 contracts per role across Tech Lead, Architect, Security Gate, and Release) paired with strict sandbox separation: fail-closed JSON schema validation, exponential backoff, and hard isolation preventing judge roles from invoking shell tools.

3. Verified Production Impact

100% schema and policy compliance verified offline before any model enters a live 50/50 production trial.

1. Privilege Separation Between Builders and Judges

Code-authoring steps execute inside isolated git worktrees via sandboxed CLIs (Claude Code, Codex, or Antigravity). Conversely, all eight evaluation and external-input roles (QA Engineer, Plan Critic, Security Gate, Market Researcher, Competitor Analyst, Product Manager, and Growth Strategist) execute strictly over tool-less HTTP APIs with zero filesystem write access.

2. One-Sided Z = 1.64 Statistical Promotion

Candidate model configurations run on 50% of production tasks for up to 14 days. A challenger is promoted to default only if total tokens per merged PR drops by at least 10% at Z >= 1.64 (95% one-sided confidence) with non-inferior merge velocity. Learned heuristics that fail to reduce their target error signature by >= 30% are pruned automatically.

STUDY 03Commit: 2284da4Published: 2026-10-24·Dataset: 14 Cryptographic Controls · Multi-Tenant Isolation Suite

Zero-Trust Multi-Tenancy: Cryptographic State Seals & Privacy-Preserving Learning

How Brevio Harness isolates client repositories, blocks proprietary code leakage with deterministic refusal gates, and compounds engineering patterns across workspaces at zero token cost.

1. Production Failure Mode

First-generation agent frameworks commingle tenant state with orchestration code, store unencrypted snapshots on shared disks, and risk leaking proprietary domain literals or business logic into cross-project prompts during continuous learning.

2. Architectural Resolution

Engineered end-to-end cryptographic isolation: per-workspace age-encrypted backups with automated 24-hour restore verification, HMAC-SHA256 state seals around every agent invocation, signed GDPR Art. 17 crypto-erasure certificates, and a deterministic literal refusal gate that blocks any rule containing tenant names, domains, or file paths from leaving the workspace.

3. Verified Production Impact

Zero cross-tenant state leakage across continuous isolation probes; federated stack patterns verified across independent workspaces.

1. Federated Pattern Promotion Without Sharing Code or Secrets

When an instance discovers a reusable engineering pattern (such as Next.js 16 + Prisma connection pooling or Playwright flake elimination), a deterministic refusal filter scans the candidate rule against the workspace's forbidden literals, domains, and paths. Only stack-level patterns corroborated across at least two independent pseudonymized workspaces reach the operator's approval gate.

STUDY 04Commit: 11dc9ddPublished: 2026-10-24·Dataset: 11 Governance Primitives · Discord Command Relay

Executive Command in Discord: Governing 32 Workflow Nodes in Under 15 Minutes a Week

How structured escalation cards, blast-radius budgets, and persistent operator directives let a single founder direct an entire autonomous engineering organization.

1. Production Failure Mode

In conventional agent loops, humans are interrupted too late (after full implementation), chat feedback is lost between context windows, noisy notifications cause alert fatigue, and escalation prompts never quantify the cost of delay.

2. Architectural Resolution

Built an audited operator-signal ledger injected live into every downstream model call, interactive Discord decision cards with 1-tap approvals, /hint and /rule slash commands, explicit wait-cost and default actions on every escalation, and a strict weekly interrupt budget.

3. Verified Production Impact

Over 90% of operator responses directly alter downstream execution while requiring under 15 minutes per week of human review.

1. Quantified Blast Radius and Default-Action Escalations

Rather than streaming noisy terminal logs into chat, Brevio Harness enforces a strict weekly interrupt budget. High-risk changes touching billing, authentication, or database migrations emit a structured decision card stating the exact file blast radius, the cost of waiting, the automatic fallback action on timeout, and 1-tap controls ([Approve], [/hint], [/rule]).

STUDY 05Commit: 0316ff9 → 5dd671aPublished: 2026-10-25·Dataset: 122 Rules · 3 Squad Roles · ~4,200 Tokens Saved per Feature

122 Best-Practice Rules at Zero Extra Tokens: Deterministic AST & Regex Auto-Healers for Dev, Design, and PM

How we replaced prompt-stuffed rulebooks and multi-turn LLM critique loops with 3-Layer Zero-Token Engines across Software Engineering (42 rules), Product Design (40 rules), and Product Management (40 rules).

1. Production Failure Mode

Injecting 100+ engineering, UX, and product rules into every agent system prompt wastes 3,000–5,000 input tokens per call and degrades instruction adherence. Worse, when a Product Manager or Designer emitted a weak acceptance criterion or sub-12px typography token, the pipeline triggered 2–3 extra LLM repair calls (~3,500 tokens each).

2. Architectural Resolution

Engineered a 3-Layer Zero-Token Architecture (dev_rules.py, design_rules.py, pm_rules.py): Layer 0 runs deterministic Python auto-healers (<2ms, 0 LLM tokens) that rewrite weak Gherkin ACs, link (source: F#) research citations by lexical overlap, and upgrade sub-12px Tailwind classes in place; Layer 1 runs 0-token diff/AST/regex auditors; Layer 2 injects a <110-token file-extension or domain-routed micro-brief only when a retry occurs.

3. Verified Production Impact

Net token-negative enforcement: ~65% token reduction in PM/UX node retries and 100% deterministic compliance across 122 rules.

1. Layer 0 Auto-Healing vs. Multi-Turn LLM Repair

Instead of paying an LLM 3,500 tokens to fix a missing threshold in an acceptance criterion or replace a banned sub-12px font class, deterministic Python healers repair the artifact on disk before the linter runs. Across test suites, PM node invocations dropped from 3 LLM calls to exactly 1 call while maintaining 1.0 AC testability.

Engine Module                   | Catalog Size | Layer 0 Zero-Token Auto-Healer                | Net Token Delta
--------------------------------+--------------+-----------------------------------------------+-------------------
brevio/pipeline/dev_rules.py    | 42 Rules     | Git diff added-line scanner + targeted brief  | 0 tokens on pass
brevio/pipeline/design_rules.py | 40 Rules     | Auto-heal text-[10px]/h-6/gradients in <1ms   | -1,800 tokens/run
brevio/pipeline/pm_rules.py     | 40 Rules     | Auto-heal weak ACs, (source: F#) & 3-tier KPI | -4,150 tokens/run