# The earned-autonomy ladder, per operation

Autonomy in Bucker is earned, one rung at a time, and only for the thing it was earned in. The
original ladder (`docs/autonomy.md`) does that for fix proposals, per agent and RCA category. F-14
generalises it to every governed operation: **per (organization, actor, category, environment
class)**, from measured outcomes, with a shadow trial before a rung is even offered and automatic
demotion after.

This page describes the mechanism (P3-26). **Promoting a family past its starting rung is ACP-20 and
Phase 5**: until then the ladder offers a promotion to a person and applies none.

## The key

| Part | Value |
| --- | --- |
| Actor | `a:<agentId>` for an agent; `c:<clientIdentityId>:<humanPrincipalId>` for an OAuth client, **with the person it acts for**. One person's outcomes never earn autonomy for another person's sessions through the same client. A person in their own right and a service have no ladder. |
| Category | A name in Table F-14.1 (`pipeline_tuning`, `flag_safety`, `infra_restart`, …). `security_triage:<finding kind>` is earned per kind. An RCA label is the **fix** ladder, which is unchanged. |
| Environment class | `production` or `non_production`, from the project's environment mapping. With no mapping row, `production` and `prod` are production and **every other name is production too**: only a person's mapping (`environment_mapping.update`, human-only, `org:admin`) can say a name is not. |

A rung earned in staging is never read in production: they are different rows.

## What a rung does

An operation ladder **starts at DRAFT_PR**: every request asks a person. The table's
`startRung: RCA_ONLY` is the fix ladder's start (the agent may only explain); for an operation,
RCA_ONLY is the demoted state, where every request needs at least two approvers.

The engine reads the actor's standing after the taint floors and sets the approvers an ASK needs
(`approversAtRung`). **The rung only raises the policy row's count.** The one way under the CRITICAL
default of two is an actor at AUTO_ATTEMPT on a category that says one, with no stored policy row,
no dual-control floor and no ask floor.

The effective rung is the stored rung under every cap, and a cap is never a demotion:

| Cap | Holds the rung at |
| --- | --- |
| The category's maximum (Table F-14.1, as the organization may have lowered it) | that maximum |
| F-13 authority (error or cost budget `low`/`exhausted`; a safety category is exempt) | DRAFT_PR |
| A `nonProductionOnly` category (`prompt_label`) in production | DRAFT_PR |
| Input provenance `untrusted_text` | DRAFT_PR |
| Input provenance `telemetry` on an outward-facing act | DRAFT_PR |
| Input provenance `public_count` on a safety family, not corroborated | DRAFT_PR |

A write from untrusted runtime text never runs at a higher rung than the same write from code (a
property test over every rung, kind and flag).

## The promotion floor

A ladder is **offered** a promotion only when all six conditions hold, each computed from the
operation rows and the F-15 claims, never copied:

1. **validated_streak**: 10 validated, human-approved operations in 90 days, and the 5 most recent settled ones validated. `inconclusive`, `not_measured` and a stopped window break the streak.
2. **clean_recent**: none of the last 10 settled operations invalidated or reverted by a person.
3. **reversal_debt**: no reversal debt open longer than 24 hours, no inverse failure in 30 days.
4. **no_incident**: no attributed or missed incident. Suppression's answers `not_available` until MON-31 (Phase 4).
5. **attention**: at least 2 distinct humans, none flagged as rubber-stamping, a median time to decide of at least 20 s, and evidence opened at least half the time. A figure nobody has computed answers `unknown`.
6. **shadow_trial**: 14 days of shadow candidates that humans approved and the verifier validated, and no disagreement.

Only `met` passes: `unmet`, `unknown` and `not_available` all block. Stricter area bars (`area-bars.ts`)
can raise a count, shorten a window or add an exclusion, and never loosen one.

## The shadow trial

Whenever a request is taken at its current rung and the next rung would have applied it without
asking, the engine leaves a `SHADOW_CANDIDATE` event on the ladder. The request still asks. A
candidate a person approved and the verifier validated counts; one a person rejected, or the verifier
invalidated, fails the trial.

## Demotion

The ladder demotes on its own, as the SERVICE principal `bucker-autonomy`:

| Trigger | Drops to |
| --- | --- |
| An invalidated verdict, a revert by a person, an inverse failure, an overdue reversal debt | one rung (an ask-floored lever family: straight to RCA_ONLY) |
| An attributed or missed incident, a write by a quarantined-taint actor (and a threat-lane review), a HIGH anomaly of the agent | RCA_ONLY |
| 30 days without an operation | AUTO_ATTEMPT to DRAFT_PR |

An error-budget cap is not a demotion: no row moves.

## Safety families

A safety family (`flag_safety`, `rollout_pause`, `surveys_update`) at AUTO_ATTEMPT records what it
**would have** applied (`SafetyShadowRecord`) and applies nothing until OD-DP-11 is decided: the code
constant `SAFETY_EARNED_NARROWING_APPLIES` is `false`. The public-count gap is closed by
corroboration (a source no public client key can write), never by counts alone.

## Surfaces

* `GET /orgs/:o/autonomy/ladders?actor=&category=&environmentClass=`, per category: the rung, the cap, the unmet conditions with the ids they were read from, the shadow candidates, and what the actor may do without asking.
* `GET /orgs/:o/autonomy/category-policies`, `PUT /orgs/:o/autonomy/category-policies/:category` (`ladder_category_policy.update`: human-only, owner, **lower-only**; the audit row carries the previous value).
* `agent_context_get` carries `ladders`; `decision_preview` carries a `rung` block naming the count and what set it.
* The dashboard's autonomy screen has a Categories tab.

## Never reached

`LADDER_FORBIDDEN` (human-only acts, operator acts, the verbs widen, launch, ship, resume, publish,
certify, verify, delete, merge, erase, purge, and the objects host and credential) is enforced at the
engine: no rung ever covers any of them, and the never-reach test walks every action in the registry.
Merge is human-only at every rung.
