ratchetcore-frameworksystem-design

Ratchet

What It Is

A ratchet is a structure that locks in progress after it is made, so the system cannot slide back. The mechanical original is a gear with a pawl: the wheel turns freely forward, and the pawl drops behind each tooth, making reverse rotation physically impossible. The generalization: anything — a boundary, a default, a cached routine, a test, a verifier, an automation, an intermediate configuration — that converts a gain made once into a floor that cannot be given back. Waypoints, paths, and beacons get discovered by search; the ratchet is what holds them once found.

Test suites are the perfect example. Every bug fixed becomes a test; the codebase can move forward freely, but it cannot silently regress past a green suite. The suite is not what found the bug — it is what makes re-losing the fix illegal. Progress can pause; it cannot quietly unwind.

In computational terms: a system without ratchets re-solves the same errors indefinitely, because every trial starts from the same floor. A system with ratchets is monotone — its floor is a non-decreasing function of its history. The definition of progress sharpens accordingly: progress = errors closed AND held closed. Closing an error without installing a lock is not progress; it is a fluctuation that has not yet reverted.

This article sits beside two neighbors it must not be confused with. Prevention architecture deletes transitions into bad states; a ratchet deletes transitions out of good states — the disambiguation gets its own section below. And taste compilation is the fully-worked instance of this law for one domain: judgment, captured into a bundle, is a ratchet on quality. The inequality that article runs on is stated here in its general form.

Ratchets, Not Hill-Climbing

The naive picture of converging on an ideal state is gradient descent powered by will: push uphill every day, and hope the pushing compounds. It doesn't compound — it leaks. Willpower fluctuates, attention reallocates, and every dip surrenders altitude that was already paid for. Will's formulation, designing the weekly loop of a shared goal system:

"Our goal is not to just assume that we can hill climb on it — the strategy of convergence is to test out structures that can serve as ratchets that lock in progress towards it."

The strategy is not push harder; it is test candidate locks. The weekly loop tries structures — boundaries, defaults, containers, automations — and keeps the ones that hold progress. This is selection over design applied to your own scaffolding: locks are sampled and promoted on evidence, not decreed and defended.

The type specimen is small and behavioral. A spending-and-food collapse at a food hall produces a boundary — a standing rule about that place, that state, that card. What makes the rule a ratchet rather than a resolution is what happens on the next approach: the boundary fires, and the crisis does not repeat. The previous incident produced a retained boundary that changed behavior on the next traversal. The lesson did not live in memory or motivation. It lived in structure that was still standing when the same terrain came around again.

Hill-climbingRatcheting
Progress modelContinuous upward pushClose an error, install a lock, move on
What a bad week costsEverything since the last peakNothing below the highest pawl
Powered byWillpower at every stepStructure installed once
Same mistakeRecurs indefinitelyIllegal after first closure
Trajectory shapeSawtooth around a plateauStaircase

Entry-Blocking vs Exit-Blocking

The mandatory disambiguation. Prevention architecture and forcing functions remove transitions into bad states: the donut isn't bought, the app isn't installed, the case never reaches the judge. A ratchet removes transitions out of good states: the fixed bug can't return, the converged skill can't be un-learned by the next agent, the closed boundary holds on the next traversal. Both are the same operator — deleting an edge from the state machine — applied to opposite edges.

Prevention architectureRatchet
BlocksEntry into bad statesExit from good states
Governing question"How do I never end up there?""How do I never lose this?"
Typical failure addressedRelapse into a known trapRegression from a known gain
Cost logicZero willpower per avoided temptationZero re-derivation per retained gain
Time orientationDefends the future from the pastCarries the past into the future

The food-hall rule shows why the lens matters: as a wall, it is prevention (it blocks entry into the crisis state); as a retained wall, it is a ratchet (a closed error stayed closed across trials). Prevention describes what the structure blocks. Ratchet describes the fact that the structure persisted — that the system learned. A life can be full of prevention rules and still reset every month if none of them survive the month. The ratchet claim is about retention, and retention is the part hill-climbers skip.

What Qualifies as a Lock

A lock is a retained structural change that alters the next traversal. Not the memory of a lesson — the lesson made structural. The test: if you showed up amnesiac tomorrow, would the gain still hold? A note-to-self fails the test. A resolution fails. A test suite passes; an automation passes; a default passes; a boundary that fires on approach passes.

The corpus already contains the major lock types; this table names the family:

Lock typeFormCanonical treatment
Behavioral lockForcing function, precommitted rule, boundaryForcing Functions, Prevention Architecture
Neural lockCached habit — a routine burned in until it runs without deliberationDiscipline, 30x30 Pattern
Judgment lockVerifier, golden set, rejection ledgerTaste Compilation, Lockfile
Data lockMonotonic, append-only substrate — captured once, never re-derivedAccrual Substrate
Code lockWrite-path validation — illegal transitions unrepresentableThis article, below

Intermediate Ideal States

Ratcheting changes what a goal decomposes into. Two failure modes bracket the problem. Hill-climbing straight at the terminal state fails on distance:

"The search needs to find ratchet systems and reach intermediate ideal states, otherwise it feels like trying to bench 300lbs while being detrained ... Setting arbitrary milestones like typical goals seems iffy/aspirational/airy and not reality-backed."

And decreed milestones fail on provenance — a number picked in a planning session is aspirational and airy, backed by nothing. The middle path: waypoints discovered, not decreed. An intermediate ideal state is a configuration you actually reached, verified against reality, and can hold with a lock — a macrostate that is both reachable from here and holdable once reached. The search process finds them; the ratchet pins them; the next search leg starts from the pin, not from base camp.

The career form, compressed into one line of advice:

"She did an internship, and after the internship she got an offer from the company. That's cool. You should do that. You should just build up your career in a ratchet."

Sequence positions so each one locks in — internship converts to offer, offer converts to title, title converts to the floor under the next move. Never structure a path so that a failed step surrenders a completed one.

Persistence Is Memory

What is the difference between trying for the 10,000th time and "trying again"?

"I never really thought about persistence as memory. ... You either need the accumulated trials, or repeated trials create something between version one and version two. The value is retained memory."

Not linear time, and not grit. Either the trials accumulate somewhere, or the 10,000th attempt is the first attempt with extra scar tissue. Getting from version N to N+1 requires something retained between trials — and that something is exactly a ratchet.

The general form is an inequality. Let jj be the gain a trial produces and c[0,1]c \in [0,1] the fraction of that gain structurally retained. The system's floor after nn trials rises with cj\sum c \cdot j; the recurring effort stays proportional to (1c)j(1-c) \cdot j. At c=0c = 0 you are the pure hill-climber: full effort forever, floor never moves, and persistence is a personality trait rather than an asset. At cc near 1 the floor climbs every trial and live effort migrates to the frontier — the only place it was ever irreplaceable. Taste compilation instances this for judgment (jj = verdicts exerted, cc = capture into the bundle); the domain-general law is simply: persistence pays only at c>0c > 0. Nothing about raising cc requires more talent. It requires that the lock be installed in the same breath as the gain.

The Code Form: Make Backsliding Unrepresentable

The strongest lock does not detect regression — it makes regression inexpressible. From the design notes of an event-sourced orchestration system:

"Every append validates through the reducer first so illegal transitions cannot reach disk."

A basin without a termination condition refuses to construct; a completion claim with zero commits refuses to record; derived states are computed, never stored. Correctness is enforced at the write path, not caught by review — the bad state is not forbidden, it is unrepresentable. This is structure over request applied to retention: don't ask the system to stay converged, build a topology in which divergence has no encoding. A test suite is the same lock one notch softer — the regression is representable but cannot pass unnoticed.

This is also the mechanism behind the riverbed thesis in Intelligence Is Water: every ratchet you add collapses the accessible microstate space. Each lock is a piece of terrain that bad states can no longer flow through. Enough locks, and the only paths left are the ones you chose to keep.

The Limit: Ratchets Hold Gains; They Don't Generate Them

The lock is half a machine. The boundary of the mechanism arrives with the same lesson that names it:

"You cannot just mistake your way into making money."

Mistake-then-lock is a real learning loop — durable edits were in fact coming from errors followed by retained updates — but a system built only of locks converges on not-losing. It prevents every repeated failure and generates nothing: no experiments, no contacts, no income paths. A pawl with no one turning the wheel is not a ratchet; it is a brake. So every ratchet needs pairing with a generative structure that produces the gains worth holding — the ratchet's job begins only after the gain exists.

The sibling term marks the same boundary from the other side: a basin collects — it catches inbound information, observations, and developments toward a goal. A ratchet retains — it holds gains already made. Distinct verbs, distinct failure modes: a basin can fill forever without anything being locked in, and a ratchet can sit idle with nothing to hold.

Integration with the Mechanistic Framework

Connection to Taste Compilation

The worked instance. Judgment is jj, capture into the bundle is cc, and write-back on every selection event is the pawl clicking. "The system ratchets instead of resets" is this article's law applied to a generation pipeline.

Connection to Prevention Architecture and Forcing Functions

The mirror image and the enforcement family. Prevention deletes edges into bad states; ratchets delete edges out of good ones. Forcing functions supply the enforcement hierarchy both draw on — a lock is only as strong as what makes it fire.

Connection to Accrual Substrate

The data lock. Monotone, append-only capture is retention applied to information: nothing recorded is ever re-derived, so the substrate's floor only rises. An accrual substrate is a ratchet whose gains are observations.

Connection to Macrostate Engineering

Intermediate ideal states are macrostates with two extra predicates: reached (reality-backed, not decreed) and holdable (a lock exists). The waypoint chain converts one impossible macrostate into a staircase of pinnable ones.

Connection to Structure over Request

Each correction that "ratchets into machinery" is a request dying into structure. The write-path form is the limit case: retention you cannot forget to perform, because forgetting has no encoding.

Connection to Discipline and 30x30 Pattern

The neural lock. A habit cached to automaticity is a gain stored in tissue — a routine that no longer needs deliberation cannot be lost to a low-willpower day, which is precisely the pawl's job.

Connection to Basin

Sibling persistence structures: the basin collects toward a goal, the ratchet retains what the pursuit has already won. A complete pursuit system needs both, and they fail independently.

See Also


Core Principle: Progress is errors closed AND held closed. Convergence toward an ideal state is not willpower hill-climbing but a search for locks — retained structural changes that alter the next traversal — and for intermediate ideal states: waypoints discovered and pinned, not decreed. The governing inequality: the floor rises with cj\sum c \cdot j, so persistence pays only when some fraction of each trial's gain is structurally retained; at c=0c = 0 the 10,000th attempt is the first attempt. Prevention blocks entry into bad states; the ratchet blocks exit from good ones. And the ratchet has a limit: it holds gains, it does not generate them — pair every pawl with something that turns the wheel.


Anyone can have a good day. The system that cannot give the day back is the one that converges.