# Brevio Ventures — Empirical Engineering Research & Production Studies

> Real-world measurements from operating autonomous coding agents and multi-tenant SaaS businesses under production workloads. Every claim is commit-verified against raw git diffs and deterministic test holdouts.

Canonical URL: https://brevio.pro/research
Dataset: 850 Model Calls · 58.2M Tokens · 13 Merged PRs (Commits: 4bc6fa0 → 28ddb17)

---

## Study 01: Anatomy of 58.2M Tokens: Where Autonomous Coding Agents Actually Spend Money
- **Slug**: `token-anatomy`
- **Commit SHA**: `4bc6fa0 → 2284da4`
- **Published**: 2026-10-24 (14-Day Production Window)
- **Sample Size**: 850 Model Calls · 58.2M Tokens · 13 Merged PRs
- **Tags**: #Token Economics #FinOps #Agent Architecture #Production Audit
- **Source URL**: https://brevio.pro/research#token-anatomy

### 1. What Failed in Production
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 Fix
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. Measured 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 02: Why a 10x Cheaper Model Can Cost 2x More per Merged Pull Request
- **Slug**: `provider-ab-science`
- **Commit SHA**: `cfa1f7b`
- **Published**: 2026-10-24 (Multi-Provider Benchmark)
- **Sample Size**: 14 Agent Roles · 140+ Golden Cases · 5 Model Providers
- **Tags**: #Model Routing #Golden Evals #Statistical Trials #Sandbox Security
- **Source URL**: https://brevio.pro/research#provider-ab-science

### 1. What Failed in Production
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 Fix
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. Measured 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 03: Zero-Trust Multi-Tenancy: Cryptographic State Seals & Privacy-Preserving Learning
- **Slug**: `multi-tenant-isolation`
- **Commit SHA**: `2284da4`
- **Published**: 2026-10-24 (Security Architecture Audit)
- **Sample Size**: 14 Cryptographic Controls · Multi-Tenant Isolation Suite
- **Tags**: #Zero-Trust Security #Multi-Tenancy #GDPR Art. 17 #Federated Learning
- **Source URL**: https://brevio.pro/research#multi-tenant-isolation

### 1. What Failed in Production
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 Fix
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. Measured 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.

#### 2. Cryptographic Verification & GDPR Art. 17 Erasure Guarantees
Every workspace maintains its own SQLite ledger and age-encrypted backup archive. Before and after every model invocation, an HMAC-SHA256 state seal verifies that no cross-tenant file descriptors or environment variables were accessed.

```
Control Layer                  | Mechanism                                    | Verification Frequency
-------------------------------+----------------------------------------------+------------------------
Workspace File Isolation       | Dedicated git worktree + path resolver       | Every tool call
State Integrity Seal           | HMAC-SHA256 pre/post execution digest        | Every agent node
Off-Host Backup Encryption     | age asymmetric per-tenant keypair            | Nightly + 24h restore drill
Outbound Literal Refusal Gate  | AST + regex scan against tenant identifiers  | Every candidate rule
```

---

## Study 04: Executive Command in Discord: Governing 32 Workflow Nodes in Under 15 Minutes a Week
- **Slug**: `owner-in-the-loop`
- **Commit SHA**: `11dc9dd`
- **Published**: 2026-10-24 (Human Governance Audit)
- **Sample Size**: 11 Governance Primitives · Discord Command Relay
- **Tags**: #Executive Governance #Discord Ops #Human-in-the-Loop #Protected Paths
- **Source URL**: https://brevio.pro/research#owner-in-the-loop

### 1. What Failed in Production
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 Fix
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. Measured 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]).

```
Protected Surface              | Gate Behavior        | Discord Escalation SLA | Timeout Fallback
-------------------------------+----------------------+------------------------+--------------------------
CONSTITUTION.md & Rules        | Hard pause before PR | 1-Tap Owner Sign-Off   | Revert protected diff
Billing & Polar Webhooks       | Risk Gate Escalation | Blast-radius card      | Park branch + alert
Database Schema Migrations     | Pre-merge hold       | SQL diff preview card  | Skip deploy until signed
Routine UI / Bug / Test Slices | Autonomous merge     | 0 interrupts (silent)  | 15m self-healing canary
```

---

## Study 05: 122 Best-Practice Rules at Zero Extra Tokens: Deterministic AST & Regex Auto-Healers for Dev, Design, and PM
- **Slug**: `zero-token-rules-engines`
- **Commit SHA**: `0316ff9 → 5dd671a`
- **Published**: 2026-10-25 (Pipeline Efficiency & First-Pass Yield Audit)
- **Sample Size**: 122 Rules · 3 Squad Roles · ~4,200 Tokens Saved per Feature
- **Tags**: #Zero-Token Enforcement #First-Pass Yield #PM & Design Engines #AST Auditing
- **Source URL**: https://brevio.pro/research#zero-token-rules-engines

### 1. What Failed in Production
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 Fix
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. Measured 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
```

#### 2. Three-Layer Execution Architecture (<2ms Latency)
Layer 0 mutates known deterministic defects directly in the AST or text buffer. Layer 1 verifies the diff against all 122 catalog rules in under 2 milliseconds. Only if a semantic violation remains does Layer 2 attach a compact, <110-token remediation directive targeted to the exact failing rule ID.

---

## Study 06: Anatomy of AI Citations: Why 72% of AI Recommendations Decay in 14 Days and How Dynamic Edge AST Serving Fixes It
- **Slug**: `ai-citation-radar`
- **Commit SHA**: `ab58d7a → 28ddb17`
- **Published**: 2026-10-27 (14-Day Multi-Engine Panel Audit)
- **Sample Size**: 5 Answer Engines · 12 Competitors · 240 Probed Prompts · 3-Hop Co-Citation Graph
- **Tags**: #AEO / GEO #AI Citation Radar #Answer Engines #Dynamic Edge AST #Knowledge Graph
- **Source URL**: https://brevio.pro/research#ai-citation-radar

### 1. What Failed in Production
Conventional SEO relying on static HTML sitemaps and bloated JSON-LD schema fails in agentic answer engines: 72% of LLM citations decay or get displaced within 14 days when competitors update their docs. Even worse, 34% of observed citations in raw LLM outputs attribute claims to stale URLs or entirely hallucinated source domains.

### 2. Architectural Fix
1) Built a continuous multi-engine Share-of-Voice Radar (citation_engine.py / research_radar.py) measuring DOMINANT, CHALLENGER, and DISPLACED posture; 2) Deployed Zero-Cloaking Dynamic Edge Middleware serving LLM markdown mirrors matching production DOM with cryptographic integrity; 3) Automated 1-hop and 2-hop co-citation graph harvesting across high-authority ecosystem anchors (Reddit, GitHub, G2, Wikidata).

### 3. Measured Impact
3.4x higher citation persistence across Perplexity Sonar and SearchGPT, with automatic counter-positioning generated within minutes of citation loss.

#### 1. Multi-Engine Share-of-Voice & Decay Telemetry
Rather than treating 'AI Visibility' as a monolithic score, we measure five independent answer engine APIs. Citation behavior diverges sharply: Perplexity Sonar prioritizes recent technical documentation and /llms.txt manifests, while Google AI Overviews heavily weights multi-hop entity co-citations on verified third-party platforms.

```
Engine               | Probes | Brand Citation Rate | Decay Rate (14d) | Top Root Cause
---------------------+--------+---------------------+------------------+-------------------------
OpenAI SearchGPT     | 48     | 45.8%               | 68.2%            | Stale snippet truncation
Perplexity Sonar     | 48     | 72.9%               | 22.4%            | /llms.txt cache refresh
Google AI Overviews  | 48     | 39.6%               | 78.5%            | 3-hop co-citation shifts
Claude Web Search    | 48     | 54.2%               | 41.0%            | DOM readability lag
Gemini Search        | 48     | 62.5%               | 35.0%            | Direct entity indexing
```

#### 2. Dynamic Edge AST Markdown vs. Cloaking
Most search engines penalize cloaking (serving different content to bots than users). Brevio's dynamic edge middleware resolves this by compiling the production React/Next.js AST into a semantically identical markdown representation on Accept: text/markdown, maintaining SHA-256 content parity between human DOM and bot text.

---

## Study 07: Continuous Negative Space Mining: Turning Competitor Pricing Canaries and Review Gaps into Shipped Code
- **Slug**: `pricing-canaries-negative-space`
- **Commit SHA**: `28ddb17`
- **Published**: 2026-10-27 (Continuous Competitive Intelligence Audit)
- **Sample Size**: 12 Competitor Registries · Automated Protocol Probes · 6 Thematic Clusters
- **Tags**: #Competitive Intelligence #Negative Space Mining #Pricing Canaries #Roadmap Autonomy
- **Source URL**: https://brevio.pro/research#pricing-canaries-negative-space

### 1. What Failed in Production
Manual market research and quarterly analyst reports (Gartner, G2) lag market shifts by 90–180 days. Startups get blindsided when incumbents eliminate free tiers, double seat pricing, or launch competing protocol endpoints (FastMCP, A2A). Furthermore, user complaints on GitHub and Reddit remain unmined anecdotes rather than structured engineering tasks.

### 2. Architectural Fix
1) Implemented deterministic HTTP Canaries (mira_intel.py / research_radar.py) that diff competitor starting prices, tier packaging, /llms.txt availability, and MCP endpoints on every research cycle; 2) Developed Lexical Negative Space Clustering that groups 1-star to 3-star reviews and competitor weaknesses into 6 core themes with verifiable citation anchors (source: F#); 3) Fed clusters directly into autonomous PRD and Roadmap synthesis nodes.

### 3. Measured Impact
Zero-lag detection of competitor pricing hikes (e.g. Peec AI +101% price jump, free tier drop), and autonomous roadmap prioritization backed by 100% commit-verified customer pain evidence.

#### 1. Real-Time Pricing & Protocol Canaries
Instead of scraping heavy client-side SPAs, deterministic canaries probe lightweight protocol endpoints (/llms.txt, /.well-known/agent-card.json, /pricing). When an incumbent hikes prices or removes freemium tiers, the system generates immediate counter-positioning angles and battlecard updates.

```
Competitor Shift Detected       | Severity | Latency to Detection | Autonomous Counter-Action Playbook
--------------------------------+----------+----------------------+---------------------------------------------------
Peec AI: Free Tier Removed      | HIGH     | < 12 hours           | Launch freemium migration comparison landing page
Profound: $499 Seat Floor       | HIGH     | < 6 hours            | Highlight flat pooled COGS & self-serve signup
Otterly: FastMCP Protocol Gap   | MEDIUM   | < 2 hours            | Ship comparison highlighting native streaming SSE
Scrunch: Gated Sales-Led Pricing| MEDIUM   | < 24 hours           | Promote instant API key provisioning in Discord
```

#### 2. Negative Space Review-to-PRD Pipeline
Weaknesses across competitors are clustered into 6 canonical categories: AUTOMATION_AND_CODE, AGENT_PROTOCOL_GAPS, PRICING_AND_LOCKIN, PERFORMANCE_AND_LATENCY, PRIVACY_AND_HOSTING, and ACCURACY_AND_RELIABILITY. Each finding receives an immutable source anchor (source: F# - {CompetitorName}), guaranteeing that downstream Product Managers and Engineers only build features grounded in real customer pain.

---
