One prompt that makes a Cowork session audit how your build motion spends tokens — from evidence, not vibes — then write the rules and stage the fixes.
The problem it solves. AI build motions rarely burn tokens on one dramatic runaway session. They burn on volume: many innocent-looking sessions each re-reading the same big files, an expensive model doing typing a cheaper one could do, boot documents that grow a little every session, and throwaway scripts regenerated instead of reused. Each leak looks small; multiplied by every session, they dominate the bill. When Jeremy audited Points & Prompts, the spike day was 290M tokens — and 255M of them were one model re-reading the same 6,600-line file across 26 small tasks. The fix wasn't "use AI less," it was three structural changes.
EFFICIENCY-DOCTRINE.md next to your CLAUDE.md and stages the big structural changes as ready-to-run tasks for a cheaper model. Nothing is refactored in the audit session itself.Safe to run any time — it's diagnosis only, and it's told to never touch CI, RLS, or anything in your safety inventory.
You're auditing the token efficiency of my Claude Cowork build motion for
GuideFlow (multi-tenant Next.js 16 + Supabase on Vercel; the repo runs on an
operating protocol of root markdown files — CLAUDE.md, ROADMAP.md, PROGRESS.md,
HANDOFF.md, /specs — that every session reads first and writes last). Diagnose
from EVIDENCE, not vibes, then give me staged fixes. The Notion page "GuideFlow
— the system" has architecture context, but verify against the real repo — it
runs slightly stale.
EVIDENCE PASS — gather all of this before concluding anything:
1. Usage: run `ccusage daily --json` (or read whatever usage logs exist). Get
tokens/day trend, spike days, cache-read vs fresh ratio, cost by model, and
which sessions/directories the top-cost days trace to.
2. Boot cost: wc -l CLAUDE.md ROADMAP.md PROGRESS.md HANDOFF.md and everything
the session ritual requires reading. PROGRESS.md is a running log — check
whether it grows without bound; an append-only work log read at every boot
is a tax that compounds weekly. Same check for ROADMAP.md.
3. Session shape: list recent sessions, read 1-2 long transcripts. Flag: the
expensive model doing mechanical work (bulk file reads, edits, research),
big tool outputs landing in long-running chat context, builds run as watched
in-chat turns, and whether subagents get an explicit cheaper model — the
Agent tool's model param INHERITS THE PARENT unless you pass
model:"sonnet", so an Opus session that fans out work without saying so
runs every subagent on Opus. That's the silent leak.
4. Repo shape: find the largest frequently-edited files (components, lib/,
schema.sql, page routes). Any file most feature work must re-read is a
recurring cost; note candidates over ~1,000 lines.
5. One-off scripts and repeated rituals: count throwaway debug/verification
scripts, and estimate the per-session cost of the end-of-session
ROADMAP/PROGRESS/HANDOFF rewrite (rewriting big docs vs appending a delta).
6. Scheduled tasks: list them; flag duplicates, expensive default models, and
anything chatty or outliving its purpose.
DIAGNOSIS — rank the top 3-5 leaks by estimated share of spend, each tied to
real numbers and filenames. Patterns to test: boot-ritual cost x session count,
growing log files, no model division of labor (one expensive session doing
strategy AND execution), monolith files, regenerated one-off scripts.
FIXES — write an EFFICIENCY-DOCTRINE.md next to CLAUDE.md with concrete rules:
which model does what (strategy/review in the expensive seat, execution
delegated to Sonnet subagents that return summaries of 20 lines or less); a
STATE.md that's overwritten each session so boot reads one short file, with
PROGRESS.md demoted to append-only history nobody reads at boot; module-read
rules for the biggest files ("read only the module the task names"); batching
policy (group small fixes into one session, not one session each). Stage the
1-3 biggest structural changes as ready-to-run tasks. Tell me the single
biggest lever first, with the number that justifies it.
Constraints: diagnosis + staged fixes only — no refactors this session. Never
touch ci.yml, the RLS policies, or anything in the safety inventory. Practice
the doctrine while writing it: delegate bulk reading to Sonnet subagents, keep
this chat lean.
Three signs the audit landed: the diagnosis names numbers and filenames, not vibes ("255M of 264M daily tokens were cache-reads of app.js across 26 sessions" beats "you might be re-reading files"); the biggest fix is structural, not behavioral — split the monolith, shrink the boot, batch the tasks — because rules you have to remember get forgotten and files don't; and the expensive model's transcript afterward is mostly decisions and verifications, not greps and edits. If your Opus session ends its day having personally typed a refactor, the doctrine leaked.
Pairs with the Session Boot Prompts — that page keeps sessions from losing state; this one keeps them from overpaying for it. Run the audit once now, then again in a month once the fixes have data behind them.