Simulation · synthetic factory and data · independent project

System map

How Earned Autonomy works

Four pictures: where things run, how a plan is made, how a plan becomes a factory change (or is refused), and how trust moves up and down.

  • data or control flow
  • the path that costs money or executes
  • refusal or automatic demotion
  • dashed: labeled test path, or never runs

1 · Where things run

The browser only ever talks to Convex. Convex alone holds the state, the Anthropic key and the safety rules.

VERCEL · NEXT.JS 16Public pagesresults · replay · evidenceno login, read-onlyReview panelplanner and qainspect and approve plansQA consoleqa onlyauthorize · run · advanceproxy.tscarries the Clerk sessionmakes no access decisionsCONVEX · STATE AND LOGICQueriesread-only,role-awareMutationsrequireRole onevery oneActionspropose · suite· replayexecuteActionone atomictransactionSchedulertrial fan-out,shift boundaryMonitorreview windows,automatic demotionDatabase22 tables, every row carries sessionIdrevisions, approvals and permission changesare append-only: nothing updates themeverything above reads and writes hereEXTERNALClaude APIOpus 5.5, effort lowthe key exists onlyinside ConvexClerksign-in happens inthe browser; Convexonly verifies the JWTSentryapp errors, plusdemoted · refused ·incomplete eventslive queriesand mutationsone callper planJWT withrole claimevents sentafter commit

2 · How a plan is made

Money is reserved before the model is called, and the plan is stored in the same transaction that settles the cost.

1 Build the inputload the release (manifest)and the factory snapshotsend only what its data viewallows; record sources + agesreadsmanifest, factory, ages2 Reserve budgetworst-case cost of this callis set aside before it startsover $18 → no call is made:status budget_blockedwritesattempt, reservation3 Call Claudemodel, effort and token limitall come from the manifestone call, no retries;reply parsed against the schemano database accesswhile the API call runs4 Settle and storeactual cost replaces the estimateattempt recorded either way:ok, refusal, timeout, parse failif ok: plan + guardrail resultwrites, one transactionattempt, proposal, rev 1returns a receipt: attemptId · status · proposalId · revisionId · costUsdthe plan itself stays in the stored revision; nothing here approves or runs it

3 · How a plan becomes a change, or a refusal

A queued plan is checked again at the moment it would run, and a demotion is committed before the queue is released. That ordering is what makes the headline refusal happen.

Superviseda person approvesbound to this revisionLimited autonomyqueued without approvalreviewed afterwardsShadowrecorded, but never runsAction queueone plan per scopeper shift; a newerapproved plan replacesSHIFT BOUNDARY · ORDERED, RESUMABLE1 Close the periodthe clock moves forward one shift2 Evaluate the monitorany demotion is committed here, before step 33 Release the queueexecuteAction runs for each due actioneach due actionEXECUTEACTION · ONE TRANSACTION1 Already executed?yes → return the stored result2 Permission right now?read at this moment, not at approval3 Approval valid?this revision, this manifest4 Re-run G1–G8on the factory as it is now5 Write the diffexactly what was approvedall passRetry-safea repeated call returns the stored result; nothing runs twiceRefusedreason, evidence ids and an audit entry are recordedstate version unchangedreturns normally and never throws: a thrownmutation would roll back its own refusal recordshadowno valid approvala guardrail failsExecutedwrites exactly the diff; state version +1; execution recorded

4 · How trust moves

Trust belongs to one manifest in one session. It goes up only with evidence and a person, and it goes down automatically.

Shadowsuggests onlySupervisedapproves every planLimited autonomyacts on its ownDemotedacts as supervisedsuite passed+ QArecovery gatemonitor alarmautomaticrecovery gatelabeled fault-injection override (replay session only)A new manifest starts at Shadow. Trust never transfers from one manifest to another.Recovery gate: rs-1.0 passed including slow-machine · at least 80 fresh supervised reviews · 95% lower bound ≥ 90% · QA authorizes.

Drawn from the code: convex/operator.ts, convex/execute.ts, convex/boundary.ts, convex/monitor.ts and convex/permissions.ts. The demotion, recovery and monitoring rules are this project's own design.