Skip to main content
Vibgrate AI Context

Token-cost benchmarks: AI sessions with and without the code map

Every question you ask an AI assistant about your codebase starts with the assistant re-reading your codebase — and that re-reading is most of the token bill. Vibgrate AI Context replaces it with answers from a pre-built code map. This page publishes what that is worth, measured: the same tasks, the same model, with and without the map, at equal verified success — including the repo sizes where the map is not worth it.

Measured, in the open

~29% fewer tokens, same results

The same coding tasks, the same model, with and without the Vibgrate code map — on a ~300-file codebase. We count only the tasks both runs solved, so it is fewer tokens for the same result, never “cheaper because it gave up”.

Measured with a frontier coding model. On tiny repositories grep already finds the code and the map costs more — we publish that part of the curve too.

How the numbers are measured

Same model, twice

Each coding task runs twice with the same model on two fresh copies of the repo: once with generic file tools (list, search, read, write), once with Vibgrate AI Context (vg serve) for discovery.

Only discovery differs

Both runs can read and write files. The only difference is how the model finds the right code: walking and grepping the tree, or asking the pre-built code map.

Success is verified, not assumed

After each run, a deterministic verifier executes the edited code in the language’s real runtime and checks behaviour. A run that fails the verifier counts for nothing.

Savings only count when results match

Reduction is computed only across tasks both runs solved. The headline is “fewer tokens, same results” — never “cheaper because it gave up”. Tiers where the map saves nothing are published too.

The tasks are symptom-described — “the total is wrong after a promotion”, “refunds omit the tax” — the shape a real bug report takes, not “change function X”. They run against a ~300-file commerce codebase plus small fixtures, so the curve shows where a code map earns its keep and where grep already wins. The mix is fixed in advance (a written pre-registration) so the result can’t be tuned after the fact. Tokens are the model’s own reported usage summed across every step. The run is expensive (a live model over the whole corpus), so it is measured intermittently against a pinned CLI build and reviewed before publication — not on every release. The report below is pinned to the version it was last measured on.

Latest report — Vibgrate CLI v2026.814.2

Model gpt-5.4-mini · measured 2026-08-17 · step cap 30 · 35 of 38 tasks solved by both runs. This is one A/B run against the shipped build; the mix was run three times and the discovery-tier median held at +33.8% fewer tokens (per-task variance is large, so the median is the honest figure).

The curve — result by repository size

Repo sizeTasks comparedFile-tools tokensAI Context tokensResult
Small (3–5 files)4/69,98523,663137% more
Mid (~300 files)30/31771,704549,34128.8% fewer
XL (~1,000 files)1/125,82517,45832.4% fewer

A code map earns little on tiny repositories — any tool finds the code instantly, so the map’s fixed overhead shows as a cost. The saving appears as the repository grows and discovery becomes the dominant token cost. We publish the whole curve, not a single flattering number.

Every task, every repository

TaskRepositoryLanguageFilesFile toolsAI ContextResult
Fix order total to apply the discountorders-apiJavaScript52,632 tok · 4 steps6,749 tok · 4 steps156.4% more
Fix the cents/dollars mixup in shipping quotes (mid repo)meridian-commerceJavaScript32323,373 tok · 5 steps10,928 tok · 4 steps53.2% fewer
Stop billing shipping on packaging weight (mid repo)meridian-commerceJavaScript32319,885 tok · 5 steps17,135 tok · 6 steps13.8% fewer
Implement the statement balance from its usage (mid repo)meridian-commerceJavaScript32318,453 tok · 6 steps19,654 tok · 5 steps6.5% more
Stop reporting amounts from dropping cents (mid repo)meridian-commerceJavaScript32393,850 tok · 8 steps25,702 tok · 6 steps72.6% fewer
Fix the tax-exemption boundary (mid repo)meridian-commerceJavaScript32310,664 tok · 4 steps9,092 tok · 4 steps14.7% fewer
Apply the checkout promotion to invoice totals (Ruby)ledger-appRuby11621,644 tok · 5 steps13,255 tok · 5 steps38.8% fewer
Apply discount with README cents roundingcommerce-docsJavaScript64,290 tok · 5 stepsdid not finish
Make slugify lowercase and punctuation-safeslug-libJavaScript42,305 tok · 4 steps7,047 tok · 5 steps205.7% more
Stop charging sales tax on the shipping fee (mid repo)meridian-commerceJavaScript32340,278 tok · 7 steps10,342 tok · 4 steps74.3% fewer
Charge the card fee on the original captured amount (mid repo)meridian-commerceJavaScript32343,834 tok · 7 steps13,184 tok · 5 steps69.9% fewer
Implement the late-fee calculator from its usage (mid repo)meridian-commerceJavaScript32311,348 tok · 4 steps23,024 tok · 6 steps102.9% more
Raise the free-shipping minimum everywhere (mid repo)meridian-commerceJavaScript32330,071 tok · 8 steps10,792 tok · 7 steps64.1% fewer
Apply the checkout promotion to invoice totals (XL repo)meridian-commerce-xlJavaScript96325,825 tok · 4 steps17,458 tok · 6 steps32.4% fewer
Apply the checkout promotion to invoice totals (Java)inventory-forgeJava8814,514 tok · 5 steps15,035 tok · 5 steps3.6% more
Fix tiny-validate 1.2 call site from library docslibdocs-miniJavaScript42,304 tok · 4 steps4,905 tok · 4 steps112.9% more
Implement parseArgs from how it is usedargv-cliJavaScript3did not finishdid not finish
Fix wholesale lines billing below the agreed price (mid repo)meridian-commerceJavaScript32318,441 tok · 6 steps10,157 tok · 4 steps44.9% fewer
Free shipping should use the pre-discount subtotal (mid repo)meridian-commerceJavaScript32324,456 tok · 6 steps44,100 tok · 11 steps80.3% more
Fix the monthly-to-annual rate conversion (mid repo)meridian-commerceJavaScript32359,887 tok · 5 steps46,470 tok · 5 steps22.4% fewer
Make the two discount helpers agree (mid repo)meridian-commerceJavaScript32319,715 tok · 4 steps10,200 tok · 4 steps48.3% fewer
Apply the checkout promotion to invoice totals (Python)atlas-crmPython13718,337 tok · 5 steps10,516 tok · 4 steps42.7% fewer
Apply the checkout promotion to invoice totals (PHP)storefront-cartPHP10614,618 tok · 5 steps10,952 tok · 4 steps25.1% fewer
Prefix normalizeId once; keep all callers on coreimpact-miniJavaScript52,744 tok · 4 steps4,962 tok · 4 steps80.8% more
Apply the checkout promotion to invoice totals (mid repo)meridian-commerceJavaScript32322,723 tok · 5 steps17,185 tok · 6 steps24.4% fewer
Include the sales tax in return credits (mid repo)meridian-commerceJavaScript32322,099 tok · 5 steps9,770 tok · 4 steps55.8% fewer
Fix subscription invoices billing 100× too high (mid repo)meridian-commerceJavaScript3233,383 tok · 5 steps10,296 tok · 4 steps204.3% more
Fix the sign on account running balances (mid repo)meridian-commerceJavaScript323did not finishdid not finish
Round totals to the nearest cent, not truncate (mid repo)meridian-commerceJavaScript32332,304 tok · 6 steps18,935 tok · 7 steps41.4% fewer
Apply the checkout promotion to invoice totals (TypeScript)harbor-apiTypeScript1286,464 tok · 4 steps10,492 tok · 4 steps62.3% more
Apply the checkout promotion to invoice totals (Bash)ops-toolkitBash955,689 tok · 4 steps10,295 tok · 4 steps81% more
Implement the refund amount calculator (mid repo)meridian-commerceJavaScript32335,854 tok · 7 steps39,829 tok · 9 steps11.1% more
Stop loyalty credits from reducing taxable amount (mid repo)meridian-commerceJavaScript32329,188 tok · 6 steps18,127 tok · 6 steps37.9% fewer
Apply gift cards as a fixed dollar amount (mid repo)meridian-commerceJavaScript32311,124 tok · 4 steps13,029 tok · 5 steps17.1% more
Raise the sales-tax rate everywhere it is applied (mid repo)meridian-commerceJavaScript32349,061 tok · 8 steps21,680 tok · 6 steps55.8% fewer
Round refund amounts to cents (mid repo)meridian-commerceJavaScript32358,355 tok · 6 steps50,534 tok · 9 steps13.4% fewer
Apply the checkout promotion to invoice totals (Go)freight-routingGo865,240 tok · 4 steps17,767 tok · 6 steps239.1% more
Apply the checkout promotion to invoice totals (C)sensor-hubC706,852 tok · 5 steps10,864 tok · 4 steps58.6% more

“did not finish” means that run failed the behaviour verifier; such tasks are excluded from every aggregate on this page.

Previous reports

  • v2026.722.240.7% fewer overall · 31/35 tasks comparable2026-07-22
  • v2026.718.222.6% fewer overall · 33/35 tasks comparable2026-07-20
  • v2026.711.233.6% fewer overall · 32/35 tasks comparable2026-07-13
  • v2026.708.332.5% fewer overall · 32/35 tasks comparable2026-07-09
  • v2026.704.122.9% fewer overall · 24/25 tasks comparable2026-07-04

These reports sit alongside the CLI release benchmarks (scan correctness, code-graph extraction, retrieval accuracy, performance) and follow the same rule: measured on a pinned corpus, reviewed by a human before anything appears here. Unlike those, which run with every release, this token-savings run is measured intermittently because it drives a live model.

Vibgrate Graph

See the code graph in action

A replay of the actual CLI querying the code map — ask a question in plain English, trace a change’s blast radius, follow a path between symbols. Nothing executes in your browser.

Replay
demo@vibgrate — bash
npx @vibgrate/cli scan
 
╭──────────────────────────────────────────╮
Vibgrate Drift Report
╰──────────────────────────────────────────╯
 
── node-turborepo (node) .
Runtime: >=18.0.0 (6 majors behind)
Frameworks:
Turbo: 1.13.4 → 2.10.11 (1 behind)
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Dependencies:
1 current 1 1-behind 3 2+ behind 1 unknown
 
── @repo/admin (node) apps/admin
Frameworks:
TanStack Query: 5.101.4 → 5.101.4 (current)
React: 18.3.1 → 19.2.8 (1 behind)
React DOM: 18.3.1 → 19.2.8 (1 behind)
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Vite: 5.4.21 → 8.2.1 (3 behind)
Dependencies:
3 current 9 1-behind 3 2+ behind 4 unknown
 
── @repo/api (node) apps/api
Frameworks:
Express: 4.22.2 → 5.2.1 (1 behind)
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Vitest: 1.6.1 → 4.1.11 (3 behind)
Dependencies:
7 current 5 1-behind 3 2+ behind 4 unknown
 
── @repo/web (node) apps/web
Frameworks:
Next.js: 14.2.35 → 16.3.1 (2 behind)
React: 18.3.1 → 19.2.8 (1 behind)
React DOM: 18.3.1 → 19.2.8 (1 behind)
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Dependencies:
2 current 6 1-behind 3 2+ behind 5 unknown
 
── @repo/config (node) packages/config
Frameworks:
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Dependencies:
2 current 2 1-behind 5 2+ behind 0 unknown
 
── @repo/database (node) packages/database
Frameworks:
Prisma: 5.22.0 → 7.9.1 (2 behind)
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Dependencies:
1 current 0 1-behind 3 2+ behind 1 unknown
 
── @repo/types (node) packages/types
Frameworks:
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Dependencies:
0 current 0 1-behind 1 2+ behind 1 unknown
 
── @repo/ui (node) packages/ui
Frameworks:
React: 18.3.1 → 19.2.8 (1 behind)
TypeScript: 5.9.3 → 7.0.2 (2 behind)
React: 18.3.1 → 19.2.8 (1 behind)
Dependencies:
1 current 4 1-behind 1 2+ behind 1 unknown
 
── @repo/utils (node) packages/utils
Frameworks:
TypeScript: 5.9.3 → 7.0.2 (2 behind)
Vitest: 1.6.1 → 4.1.11 (3 behind)
Dependencies:
0 current 1 1-behind 2 2+ behind 1 unknown
 
Tech Stack
Frontend: React, React DOM
Meta-frameworks: Next.js
Bundlers: tsx, Turbo, Vite
CSS / UI: Autoprefixer, PostCSS, Tailwind CSS
Backend: Express
ORM / Database: Prisma, Prisma Client
Testing: Vitest
Lint & Format: ESLint, ESLint Prettier, ESLint React, Prettier, typescript-eslint
 
Services & Integrations
Auth: JWT 9.0.3
Databases: Prisma 5.22.0
 
TypeScript
v5.3.3 · strict ✔ · MIXED · target: ES2022
 
Build & Deploy
Package Managers: pnpm
Monorepo: npm-workspaces, pnpm-workspaces, turbo
 
Product Purpose Signals
Frameworks: react, nextjs
Evidence: 177
Top Signals:
- [heading] Dashboard (apps/admin/src/pages/Dashboard.tsx)
- [title] Revenue Overview (apps/admin/src/pages/Dashboard.tsx)
- [copy] workspace:* (packages/ui/package.json)
- [copy] ./dist (packages/ui/tsconfig.json)
- [copy] ./src/index.ts (packages/ui/package.json)
- [copy] @repo/config/tsconfig-base.json (packages/ui/tsconfig.json)
- [copy] @repo/ui (packages/ui/package.json)
- [copy] #3b82f6 (apps/admin/src/pages/Dashboard.tsx)
Unknowns:
- No pricing or billing evidence found.
- No integrations/connectors evidence found.
- No route structure evidence found.
 
Security Posture
Lockfile ✖ · .env ✔ · node_modules ✔
 
Platform
Native modules: turbo
 
Code Quality
Files: 36 · Functions: 183 · Avg complexity: 2.62 · Avg length: 21.13 lines
Max nesting: 2 · Circular deps: 0 · Dead code: 0%
God files: apps/admin/src/pages/Products (448 lines)
 
Database Schema
postgresql · 8 models · 1 enum
Models: Address, CartItem, Category, Order, OrderItem (+3 more)
 
Findings (16 errors, 11 warnings)
Node.js runtime ">=18.0.0" reached end-of-life on 2025-04-30 (latest: 24.0.0).
vibgrate/runtime-eol in .
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in .
60% of dependencies are 2+ major versions behind in node-turborepo.
vibgrate/dependency-rot in .
@types/node is 6 major versions behind (spec: ^20.11.0, latest: 26.2.0).
vibgrate/dependency-major-lag in .
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in apps/admin
Vite is 3 major versions behind (current: 5.4.21, latest: 8.2.1).
vibgrate/framework-major-lag in apps/admin
vite is 3 major versions behind (spec: ^5.0.12, latest: 8.2.1).
vibgrate/dependency-major-lag in apps/admin
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in apps/api
Vitest is 3 major versions behind (current: 1.6.1, latest: 4.1.11).
vibgrate/framework-major-lag in apps/api
@types/node is 6 major versions behind (spec: ^20.11.0, latest: 26.2.0).
vibgrate/dependency-major-lag in apps/api
vitest is 3 major versions behind (spec: ^1.2.1, latest: 4.1.11).
vibgrate/dependency-major-lag in apps/api
Next.js is 2 major versions behind (current: 14.2.35, latest: 16.3.1).
vibgrate/framework-major-lag in apps/web
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in apps/web
@types/node is 6 major versions behind (spec: ^20.11.0, latest: 26.2.0).
vibgrate/dependency-major-lag in apps/web
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in packages/config
56% of dependencies are 2+ major versions behind in @repo/config.
vibgrate/dependency-rot in packages/config
eslint-plugin-react-hooks is 3 major versions behind (spec: ^4.6.0, latest: 7.1.1).
vibgrate/dependency-major-lag in packages/config
Prisma is 2 major versions behind (current: 5.22.0, latest: 7.9.1).
vibgrate/framework-major-lag in packages/database
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in packages/database
75% of dependencies are 2+ major versions behind in @repo/database.
vibgrate/dependency-rot in packages/database
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in packages/types
100% of dependencies are 2+ major versions behind in @repo/types.
vibgrate/dependency-rot in packages/types
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in packages/ui
TypeScript is 2 major versions behind (current: 5.9.3, latest: 7.0.2).
vibgrate/framework-major-lag in packages/utils
Vitest is 3 major versions behind (current: 1.6.1, latest: 4.1.11).
vibgrate/framework-major-lag in packages/utils
67% of dependencies are 2+ major versions behind in @repo/utils.
vibgrate/dependency-rot in packages/utils
vitest is 3 major versions behind (spec: ^1.2.1, latest: 4.1.11).
vibgrate/dependency-major-lag in packages/utils
 
╭──────────────────────────────────────────╮
Top Priority Actions
╰──────────────────────────────────────────╯
 
1. Upgrade EOL runtime in node-turborepo
End-of-life runtimes no longer receive security patches and block ecosystem upgrades.
./.
>=18.0.0 → 24.0.0 (6 majors behind)
Impact: −10 drift points (runtime & EOL)
 
2. Fix security posture: no lockfile found
Without a lockfile, installs are non-deterministic. Run the install command to generate one and commit it.
./
Missing: package-lock.json, pnpm-lock.yaml, or yarn.lock
 
3. Upgrade Vite 5.4.21 → 8.2.1 in @repo/admin (+2 more)
3 major versions behind. Major framework drift increases breaking change risk and blocks access to security fixes and performance improvements.
./apps/admin
Vite: 5.4.21 → 8.2.1 (3 majors behind)
./apps/api
Vitest: 1.6.1 → 4.1.11 (3 majors behind)
./packages/utils
Vitest: 1.6.1 → 4.1.11 (3 majors behind)
Impact: −5–15 drift points
 
4. Reduce dependency rot in @repo/types (100% severely outdated)
1 of 1 dependencies are 2+ majors behind. Run `npm outdated` and prioritise packages with known CVEs or breaking API changes.
./packages/types
typescript: 5.9.3 → 7.0.2 (2 majors behind)
Impact: −5–10 drift points
 
5. Reduce dependency rot in @repo/database (75% severely outdated)
3 of 4 dependencies are 2+ majors behind. Run `npm outdated` and prioritise packages with known CVEs or breaking API changes.
./packages/database
@prisma/client: 5.22.0 → 7.9.1 (2 majors behind)
prisma: 5.22.0 → 7.9.1 (2 majors behind)
typescript: 5.9.3 → 7.0.2 (2 majors behind)
Impact: −5–10 drift points
 
╭──────────────────────────────────────────╮
Architecture Layers
╰──────────────────────────────────────────╯
 
Archetype: nextjs (80% confidence)
Files classified: 24 (11 unclassified)
Folders classified: 8
apps/admin/src presentation 100% 4 files
apps/admin/src/pages presentation 100% 2 files
apps/api/src/middleware middleware 100% 2 files
apps/api/src/routes routing 100% 2 files
apps/web/src/app presentation 100% 4 files
apps/web/src/app/products presentation 100% 2 files
apps/web/src/app/products/[id] presentation 100% 1 file
packages/ui/src presentation 100% 6 files
Unclassified source (sample): 11
 
presentation 15 files drift ████████████████████ 100 risk high
routing 4 files drift ████████████████████ 100 risk high
middleware 2 files drift ███████▍░░░░░░░░░░░░ 37 risk moderate
config 2 files drift ░░░░░░░░░░░░░░░░░░░░ 0 risk none
shared 1 file drift ████████████████████ 100 risk high
 
╭──────────────────────────────────────────╮
DriftScore Summary
╰──────────────────────────────────────────╯
 
DriftScore: 66/100
Risk Level: HIGH
Projects: 9
Classified: 8 nano · 1 micro · 0 small · 0 standard
Billable: 0.42 · 9 detected → 0.42 billable projects (micro-project pricing)
0.1 micro · 0.32 nano
These fractions add up across repositories, then round down to whole billable projects.
 
Score Breakdown
Runtime: ████████████████████ 100
Frameworks: █████████▏░░░░░░░░░░ 46
Dependencies: ██████▏░░░░░░░░░░░░░ 31
EOL Risk: ████████████████████ 100
 
Scanned at 2026-08-19T10:20:40.993Z · 5.9s · 286 files scanned · 56 workspace files · 27 dirs
Press Run to start.