What it is
Your coding agent already writes down everything it does. Every tool call, every retry, every token, every wall-clock gap — sitting in JSONL on your disk, rotating away on a timer, read by nobody.
ratchet reads it. It ingests those transcripts into SQLite, prices them against a date-keyed rate table, detects eight recurring shapes of friction, and ranks the hotspots by what they actually cost you. The point is not a dashboard. The point is that the next agent to open your project can query what went wrong last time instead of rediscovering it.
Everything stays on the machine. Transcripts are stored verbatim in a
local SQLite file and never leave it. There is no service, no account and no telemetry. One
request goes out: once a day the scheduled run downloads latest.json to see
whether a newer version exists. It sends nothing about you beyond what any web request carries,
such as your IP address, and ratchet update --no-version-check turns it off. The only tier designed to be portable is the derived
findings layer, which holds shapes — never your paths, commands, or project names.
Why these exist
Two claims. Each has a table further down that tests it, and a limit stated up front.
Files are the wrong first index for code
Most of what you need to know about code is relational: who calls this, what extends it,
where a value is set, what breaks if it changes. None of those is a filesystem question, so
every answer is a scan, and every agent in every session runs it again. Large companies
build the index themselves. Everyone else memorises it. atlas is that index, small enough
to ship: declarations, callers, subclasses, importers, endpoints and config keys, each
answered with a verified file:line.
Tested by — atlas against graphify: callers, subclasses and importers scored against ground truth.
Not claimed — a grep replacement. Most searches are literals grep already answers correctly, and a map replaces exploring, not understanding.
Agents cannot feel the slow path
A six-minute command and a tenth-of-a-second one look the same in a transcript, and token spend never shows up in the context window at all. Boredom and irritation make a person stop repeating a slow step and build a tool instead. Agents have neither, so their waste no longer limits itself. ratchet is the missing sensor. It reads the transcripts agents already write and turns the cost into a number the next session can query. It asks nothing of the agent.
Tested by — ingestion coverage and query wall time: a meter has to read all of what it captured, quickly, before its numbers are worth steering by.
Not claimed — a quality gate. ratchet measures time lost, never whether the work was right. A clean sweep means it found no friction it can model, and nothing more.
Why the caveats are load-bearing. A number that does not add up is one of the few things an agent reliably reacts to, and it reacts just as hard to a wrong one. So every figure ratchet emits carries its confidence, whether it is comparable, and what was dropped to produce it. Those fields keep a wrong number from steering the next session.
Why one installer ships both. They are two halves of one loop. ratchet shows where the time went, atlas is the first fix built from that list, and the meter is how atlas gets judged. That judgement is still open: the head-to-head below measures what atlas can answer, not yet whether agents that have it lose less time.
The eight signatures
These are not lint rules. Each one is a shape that showed up repeatedly in real agent transcripts and cost real time:
WAITA call far above its own tool's median duration. The slow thing you stopped noticing.
REPEATThe same region of a file read again with no edit between. Context that should have been held.
PAGINGDifferent regions of one file read in sequence — too large to hold in a single read. It indicts the file, not the agent: the fix is an index or a split.
REPHRASEA run of consecutive searches with no edit between them. The tool or the store is mis-shaped.
SERIALLong runs of single-call read-only turns. Independent work that never got batched.
CEREMONYA call fails, then the same command is retried with a tweak. Steps that serve the tool, not the goal.
BYPASS since 0.6.9A hand-rolled sqlite3 against a store a registered tool already serves. It records whether that tool was tried first, because the usual truth is that its query surface did not answer.
TRAIN since 0.6.9Three or more consecutive calls of one tool on the same target. A watcher that should have been armed once, or a loop that should have been a batch.
Quick start
macOS on Apple silicon, or Linux on x86_64 (glibc). No Rust toolchain needed:
curl -fsSL https://ratchet.daystra.com/install.sh | sh
That installs two tools — ratchet, and atlas (below) — each a published build
whose SHA-256 is verified before anything is written, installs them to
~/.ratchet/bin, adds that to your PATH, registers both MCP servers,
and registers a schedule that ingests every 30 minutes (launchd on macOS, a
systemd --user timer on Linux). A missing checksum entry is a hard
failure, not a skip — "nothing to verify" and "verified" must never reach the same branch.
Everything lives under $HOME; nothing needs sudo. The store is
~/.ratchet/ratchet.db, logs are in ~/.ratchet/logs/, and the schedule
is ~/Library/LaunchAgents/com.cybercussion.ratchet.plist (on Linux,
~/.config/systemd/user/ratchet.timer). Open a new terminal (or
exec $SHELL -l) after installing.
It also verifies the job is really loaded before claiming success, and if it can't schedule
the new one it restores the schedule it replaced. An install that can't move you
forward should at least not move you backward. On a Linux box with no
systemd --user at all (a container, a cloud sandbox) it wires everything
else and says systemd=unavailable — schedule ratchet run yourself.
# pin either tool alone, skip scheduling, or leave PATH alone
VERSION=0.3.9 curl -fsSL https://ratchet.daystra.com/install.sh | sh
ATLAS_VERSION=0.1.2 curl -fsSL https://ratchet.daystra.com/install.sh | sh
RATCHET_NO_SCHEDULE=1 curl -fsSL https://ratchet.daystra.com/install.sh | sh
RATCHET_NO_PATH=1 curl -fsSL https://ratchet.daystra.com/install.sh | sh
Then, at any time:
ratchet report # the human summary
ratchet grade # what agents spend before their first edit, per project
ratchet hotspots # ranked friction, machine-readable
ratchet doctor # health contract; non-zero exit when something is wrong
ratchet enabled # what agents can actually reach on this machine
ratchet update # self-update of BOTH tools, checksums verified in-process
atlas <word> # code lookup in whatever project you are standing in
Building from source instead? Clone the tree and run scripts/dev-install.sh,
which compiles locally rather than downloading.
Grade your project
How much does your agent spend finding its way around before it changes anything? Your transcripts already hold the answer.
ratchet run # ingest now instead of waiting for the schedule
ratchet grade # every project with at least 5 editing sessions
ratchet brief <project> # the diagnosis, and what will not help
The grade is a set of measurements, not a letter. This is ratchet's own row, trimmed to the measurements:
ratchet sessions=82 pre-edit reads median=22 [p25=11 p75=36] research=0 rework=0
ratchet files=7 reads=9 reads/file=1.3
Diagnosis: LOW — no cost dominates.
Pre-edit reads counts read-only calls before a session's first edit, and research counts searches re-run in that stretch. Rework is churn after the first edit, so lowering the first number by editing sooner and fixing later shows up here. The second line is how much the agent had to load per session.
ratchet brief turns those numbers into one diagnosis:
| Diagnosis | What it means | What it points to |
|---|---|---|
WORKING_SET | The agent keeps going back to files it already opened | An index into the hot file, or a cohesive split. An orientation map will not help. |
SMEARED | Many files, each read once | Fewer files per task. An index will not help. |
PROCESS | The re-reading lands on specs, plans and notes | How the work is run. A code-level fix will not touch it. |
LOW | No cost dominates | Nothing needs fixing. |
INSUFFICIENT | Under 5 editing sessions, or nothing recorded | No verdict is offered, because it would be an anecdote. |
Compare a project against itself. Sessions are not sorted by task, so a hard job and a confusing codebase read the same. That makes this a poor way to rank projects or teams, and it should never be a KPI. Its one causal use is your own before and after: change something, then see whether the numbers moved. It measures time lost, not whether the work was right.
Wire it into your agent
The installer connects Claude Code by itself. Everything else is one command, and every one of them is safe to re-run: when the state already matches, it writes nothing.
What install does without asking
- Registers the ratchet and atlas MCP servers in Claude Code
(
~/.claude.json). Opt out withRATCHET_NO_MCP=1. - Schedules the ingest every 30 minutes, so there is something to query by the next session.
ratchet updatelater re-wires everything: a registration, schedule, hook or skill that went missing or out of date is fixed in the same step, unless you removed it on purpose.- Once a day, the scheduled run checks for a newer version.
ratchet doctorandratchet enabledreport it, andratchet update --no-version-checkturns it off.
That gives an agent the tools. The skills and hook below tell it when to reach for them.
What it adds to Claude Code
The install and ratchet update also put the skills and the orientation hook in
place and print what they changed, so a machine doesn't quietly stop getting them. Both write
outside ratchet's own folder. Removing one is remembered, and updates leave it out. A skill file
ratchet didn't write is reported and never overwritten. Teaching blocks stay off until you ask,
because they write into your repositories.
| Component | Default | Change it | Writes into |
|---|---|---|---|
| Skills, one per tool | On | RATCHET_NO_SKILL=1 or ratchet skill --remove | ~/.claude/skills/ |
| Orientation packet at every session start | On | RATCHET_NO_HOOK=1 or ratchet hook install --remove | ~/.claude/settings.json, user scope |
| Teaching blocks, per project | Off | RATCHET_BLOCKS=1 or ratchet agents-block --write --all | AGENTS.md in every measured project root |
# also add the blocks, in CLAUDE.md instead of AGENTS.md
RATCHET_BLOCKS=1 RATCHET_BLOCKS_FILE=CLAUDE.md curl -fsSL https://ratchet.daystra.com/install.sh | sh
Blocks are written between ratchet:start / ratchet:end markers, so a
re-run updates them in place and never touches a byte outside. A project whose tree moved or
no longer has a repository marker is reported and skipped, never guessed at. Add
--dry-run to see the plan first.
Other harnesses
| Harness | MCP servers |
|---|---|
| Claude Code | automatic at install |
| Codex | ratchet wire --harness codex |
| Grok | ratchet wire --harness grok |
| Antigravity | ratchet wire --harness agy |
| Gemini CLI, opencode | not supported |
--harness all does every supported one. ratchet registers only through each
harness's own mcp add, never by editing its config, and reads the result back
through that harness's own listing. Gemini CLI and opencode are refused because their
mcp commands are interactive-only or do not respond. For teaching, write the
blocks into whichever file your harness reads. Claude Code reads CLAUDE.md, and has
been seen reading AGENTS.md only in projects that have no CLAUDE.md.
The skills and the hook reach it either way.
Check it, and two traps
ratchet enabled # binaries, MCP per harness, hook, skills
ratchet enabled --projects # per project: sessions, brief baked, atlas manifest, blocks
Anything missing is shown with the command that wires it. It never exits non-zero, because
an un-wired project is a normal state, not a fault. Health is ratchet doctor's job.
- Restart the agent session after an update. An MCP server starts with its
session and keeps serving the binary it started with. atlas says so with a
STALE_BINARYnotice. - The atlas MCP server does not know your project. It inherits the directory
the client was launched from. An agent asking about another project should pass
path(any absolute path inside it). When nothing was searched, atlas answersNO_ROOTrather than an empty result.
The second tool: atlas
The same installer lands atlas — a stdlib-only, single-file manifest of
pointers for whatever codebase you are standing in: declarations, name substrings, file
paths, path routes, endpoints, config keys. atlas <any word> from anywhere
inside a project — no verb, no setup, no index checked into your tree. Every answer carries
a file:line verified against disk at answer time; an empty answer means the live
tree was already grepped; and every answer ends with a footer naming what was searched, what
was not, and what this build does not model at all.
Independently versioned on purpose (currently v0.1.17) — pin it alone with
ATLAS_VERSION=, opt out with RATCHET_NO_ATLAS=1. Full reference:
ATLAS.md.
Why the numbers are different
Cache reads are not input tokens
Collapsing the four token buckets into "input" and "output" is the single largest source of wrong cost figures. On the corpus this was built against, cache reads outnumbered uncached input tokens by roughly a thousand to one — and they bill at a tenth the rate. Price that store naively and the total comes out 6.7× too high. Same data, same rate card, one modelling decision.
Unknown is never free
When ratchet cannot price something, the cost is NULL — never 0.
A zero would quietly vanish into every total and understate real spend, which is the one
thing a cost tool must never do. Rates are keyed by date and immutable: an action from
January prices at January's rate even after a July rate lands in the same table.
It tells you when it is lying
Every report ends with computed caveats about its own output. Not boilerplate — conditions it checks each run:
- Approval wait is not machine time — most harnesses state a real duration
for almost nothing, so a "slow call" figure is usually an elapsed call→result gap that
includes however long a permission prompt sat unanswered. Those rows are labelled
derived_upper_bound: a ceiling on machine time, never an execution cost. This correction demoted the store's #1 "slow tool" from 8.9 hours to 37 minutes — the median grep was 197 ms all along. - Suspicious duration — a hotspot averaging over 15 minutes per call is far more likely to be a gap where you walked away than real tool latency. It is shown, not suppressed, and labelled as unverified.
- Blind harness — a harness whose records this build can capture but not model is announced, so its absence from the rankings never reads as zero friction.
- Occurrence floor — signatures below the minimum count are dropped from rankings, and the report says exactly how many were dropped. Invisible, not absent.
- Single machine — one laptop cannot distinguish a fleet-wide property from a local habit. It says so, every time.
That last one is not hypothetical. Run across two machines, the top time-eating verb on one did not appear in the other's top twelve at all. What generalises is the shape — "your top verb eats hours" — never the specific verb.
Three tiers
| Tier | Contents | Leaves the machine |
|---|---|---|
raw_record | Your transcripts, verbatim | Never |
action | Normalized and priced | Never |
finding | Derived shapes only | By design |
Keeping raw records is what makes coverage retroactive. Add a model to the rate table a month from now and the history already on disk reprices itself — nothing is stranded at the value it happened to have when it was first seen.
Built for agents
Both tools speak MCP (ratchet mcp-server, atlas mcp-server) and are
registered at install. ratchet_context is the one-call orientation — health,
coverage, top hotspots by count and by time, trend gates, findings — and
ratchet_orient serves the same <ratchet-orient> packet a
SessionStart hook injects at the top of
every Claude Code session: the project's measured working set, traps, real median command
times and import hubs. Computed from the store, never authored, ~2 KB, and silent when
there is nothing measured to say.
ratchet agents-block --write --all pastes the teaching blocks into every measured
project, and
ratchet enabled --projects audits what agents can actually reach — never exiting
non-zero, because an un-enabled project is a normal state, not a fault.
Measured, not claimed
Every figure below comes from an installed release and a command anyone can re-run. The ratchet figures were taken on 2026-10-27 against live stores, and the atlas figures on 2026-10-26. Two machines report: mac (Apple silicon, macOS) and linux (x86_64, Omarchy). Counts and percentages travel between machines. Seconds do not: they are only comparable within one machine's row, never across.
ratchet: how much of what it captured it can read
ratchet query coverage --json. In scope is the share of captured records
that are agent actions, as opposed to attachments, thinking blocks and progress events.
Coverage is the share of in-scope records that a normalizer actually measured.
This is coverage of ingestion, not of your task. 100% means the parser kept up.
It says nothing about whether the work was right.
| Harness (v0.6.29) | mac: captured | in scope | coverage | linux: coverage |
|---|---|---|---|---|
| Claude Code | 1,098,153 | 482,635 | 100% | 100% |
| Rift | 716,052 | 20,528 | 100% | nothing in scope (pre-instrumentation records) |
| Grok | 389,006 | 12,018 | 100% | 100% |
| Codex | 12,322 | 3,579 | 100% | 100% |
| Antigravity | 1,532 | 1,368 | 100% | 100% |
| Gemini CLI | 16 | 0 | blind | not captured |
| All | 2,217,081 | 520,128 | 100.0% | 100.0% |
The linux store is younger and smaller: 86,774 records captured, 20,884 in scope. All 18,665 rift records on that box predate the record version its normalizer reads, so there is nothing in scope to measure. That is shown as such, not as 100%.
Until v0.6.29 grok read 99.1% (mac) and 95.7% (linux). The gap was a defect, not noise: a grok body has no
uuid, so records whose action was already stored under a different key were
counted as unread. They are now matched on the event id that grok's normalizer stores.
Gemini is
reported as blind (captured, with no normalizer) rather than left out, so its absence never
reads as zero friction.
ratchet: query wall time
Second of two consecutive runs, --json, against the live 6.8 GB store. The heaviest datasets are computed once per scheduled sweep and then
served from that stored result. Each answer says whether it came from the stored result
or was computed on the spot, and the stored result is discarded when the store changes.
| Query (mac) | before 0.6.28 | v0.6.29 |
|---|---|---|
query trends | 6.0 s | 0.92 s |
query orientation | 7.1 s | 2.2 s |
query hotspots | — | 1.24 s |
query coverage | — | 0.19 s |
Repeated runs agree to within 0.03 s. Readings taken an hour earlier on the same machine were 0.80 s and 1.94 s, so treat about 15% as this table's noise band. The gain in the first two rows is 6–7× for trends and 3–4× for orientation; the noise does not change that.
There is no linux row, deliberately. That store is ten days old, and orientation drops every project in it below the occurrence floor, so timing it would time an empty answer. A number for a workload that did nothing is not a benchmark.
atlas: against graphify, on real searches
graphify 0.9.95 is the best-funded tool of the same shape: a code graph plus an agent hook. Both were run on identical scratch copies, with graphify in code-only mode and no LLM. Replay means that every search agents actually ran in a project (taken from ratchet's store) is put to each tool, and the score is the share each could answer. That is an upper bound, because it matches on the pattern alone. Hand-scoring a sample for precision (n=30 per tool, roughly ±17 points each) brings it down to ≈20% for atlas and ≈12% for graphify.
| Probe | truth | atlas 0.1.14 | graphify 0.9.95 |
|---|---|---|---|
| Replay, Rust project (3,354 real searches) | — | 28.7% | 17.8% |
| Replay, vanilla-JS project (2,096) | — | 16.6% | 9.5% |
| Cross-module callers (two Rust symbols) | 4 · 17 | 4 · 17 | 0 · 0 |
| Subclasses of a JS base class | 35 | 35 | 3 |
| Importers of a JS module | 22 | 22 | 3 |
On neutral ground (FastAPI at a pinned commit, neither tool tuned on it, symbols sampled with a fixed seed and scored against grep):
| FastAPI | atlas 0.1.14 | graphify 0.9.95 |
|---|---|---|
Declaration at the exact file:line (30, seed 7) | 100% | 96.7% |
| Callers, names with no homonyms (25) | 100% | 70.3% |
| Subclasses (21) | 100% | 80.6% |
| Index build | 1.15 s | 10.65 s |
graphify won the declarations probe the first time, 96.7% to 90%. All three misses were
Python definitions nested inside functions, which atlas's extractor never walked. The
100% above is the reading after that fix, on the same seed. On seeds never used during
development, both tools score 100% on declarations, so this row is a tie, not a
lead. The limits: the probes are small, the
languages are Rust, vanilla JS and Python only, and graphify may do better on TypeScript
or Go. Reproduce with scripts/atlas-h2h/h2h.py and
neutral_probe.py in the source tree.
Status
ratchet v0.6.37 · atlas v0.1.14, the 56th published version. macOS (Apple silicon) and Linux (x86_64); the Linux build is installed and run on a second machine, not only cross-compiled. 1,092 tests pass on macOS. 1,091 pass on Linux, which runs one fewer because one probe reads a macOS-only hardware id. 101 atlas invariants. Modelled harnesses: Claude Code, Codex, Grok, Rift, Antigravity; Gemini CLI is captured raw and reported honestly as blind until normalizers exist. It is a tool built to answer a specific question — where is my agent wasting time — and it is deliberately more willing to say "I can't measure that" than to print a confident number it cannot support. History: CHANGELOG.md · field results: RESULTS.md · agent quick-start: llms.txt.