Item 4 of the ledger-and-loop build sequence: escalation as data, not vibes.
Every failing run close advances the project's open ladder one rung; the
rung injects a level-specific instruction + the last failure reason into
the NEXT autopilot dispatch (both assembly paths) — the objection goes
back to the agent first, humans see only what agents can't route around.
The ladder never dispatches anything itself: cadence stays owned by the
existing autopilot loop and its cooldowns, so no new spend paths.
- schema: run_escalations (one open row per user+project; rows kept after
resolution — escalation rate per rung is the point)
- queries: advanceEscalation (failing close, alert+Telegram once at the
top rung), resolveEscalation (success or manual), getOpenEscalationBlock
- hooks: updateOrchestrationRun (failing → advance, success → resolve),
reaper (bypasses the funnel; advances per reaped failing row)
- prompts: escalation block in assembleInjectPrompt AND inject-core's
withContext — covers queue, next_best, and custom dispatches
- brake SSOT: FAILURE_BRAKE_STREAK = ESCALATION_HUMAN_STREAK (4) — the
brake trips exactly when the ladder reaches 'human', one constant, so
'autopilot stops' and 'operator alerted' can never drift (was 3; the
extra bounded attempt is the replan rung)
- test: scripts/test/escalation-ladder.ts (mapping, block, brake invariant)
Co-authored-by: test <test@test>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>