---
title: "Rates and earned autonomy"
url: /work/quality
---

# Rates and earned autonomy

> What a human step costs, what each worker earns, and how a step earns a lighter check: quality plans, calibration on gold tasks, holdouts and findings.

Rates say what each human step costs you. A quality plan says how its work is checked, and when the step earns a lighter check.

**How a step earns autonomy.** A new step.

1. Every output: a person checks. Or findings: classified.
2. Evidence (checked outputs): the agreement.
3. Promoted (at the bar): one in ten. Or demoted: all checked.
4. Holdouts (kept honest): checked in full.
5. The grade (unchanged): on the offer card.

Each move is an Event gated by evidence, and a lighter check never drops below the grade the Offer sells.

## What work costs, and who is paid
The plan prints each Verb's expected cost beside its price: the model, the [Sources](/patterns/dataset-api.md#how-a-field-is-filled) and the people, from how long the same steps took before.

| Family | What it does |
| --- | --- |
| Rates | What an hour or a piece of each [Role](/reference/platform.md#role)'s work costs you: `rate` on the Role, or on one human step |
| Time capture | A task's time runs from its claim to its completion under its [lease](/work.md#families), and a worker corrects it before it is approved |
| Retained capacity | A roster member paid for the hours it holds each week, busy or idle, counted in every step's cost |
| Step cost | Each step's expected cost from its history: duration times rate for people, tokens and minutes for agents, and the price of each Source |
| The margin print | The plan prints price, expected cost and margin per Verb, and a price below the expected cost is refused with `below_cost` |
| Earnings | Each worker's time, pieces and earnings by period, rebuilt from tasks, approved, then paid out on Stripe through the [supplier](/patterns/marketplace.md#suppliers) account kind |
| Cost per outcome | Revenue, cost and margin per accepted outcome, by step and by worker, in your sales record |

## How a step earns a lighter check
A quality plan per step names who checks, how many outputs, and the agreement the step must keep.

The plan's evidence is the checked outputs themselves. A promotion or a demotion is an Event, so a [Watch](/reference/platform.md#watch) or your operator sees each one.

| Part | What it does |
| --- | --- |
| The check | `by` names the Role that checks; `sample: 1` checks every output, `sample: 10` one in ten, chosen at random |
| The bar | `at` is the agreement the step must keep: the share of checked outputs the checker passes, as a lower bound over the last outputs, never a lucky run |
| Promotion | After `earn.after` checked outputs at the bar, the step moves to `earn.sample`, or from a person to an agent behind the same Verb and price |
| Demotion | A lower bound that falls under the bar moves the step back at once, and the outputs since the last pass are checked again |
| The grade holds | The compiler refuses a promotion that would drop below the [assurance grade](/work.md#families) the Offer sells, with `grade_unearned` |
| Holdouts | A share of a promoted step's outputs is still checked in full, so the evidence for the lighter check stays current |
| Calibration | Gold tasks with known answers enter each checker's queue; a checker below its own bar leaves the queue until it is trained again |
| Findings | Each failed check is classified (`wrong`, `incomplete`, `late`, `format`, `policy`), and a corrective action is a task with an owner and a due date |

### Example
An agent drafts each report and a paralegal checks every one.

After 200 checked drafts at 98 percent, the step earns a check of one in ten.

```ts title="definition.ts"
import { define, generative } from 'apis.dev'

/** Annual reports for each client, drafted by an agent and checked by a paralegal. */
export default define({
  name: 'filings', domain: 'filings.apis.dev',
  roles: {
    paralegal: { supervisedBy: 'attorney', rate: { hour: 45 } },       // what an hour costs you
    attorney:  { credential: 'bar', supervises: { paralegal: 5 }, rate: { hour: 180 } },
  },
  Filing: {
    company: 'string', year: 'number', form: 'file?',
    status: {
      order: [],
      draft: { in: 'ordered', run: generative('Draft the annual report for {company}', {
        returns: { form: 'string' },
        quality: { by: 'paralegal', sample: 1, at: 0.98, earn: { after: 200, sample: 10 } },
      }) },
      sign: { in: 'drafted', floor: 'signature' },
      accept: 'signed', reject: 'signed',
    },
  },
  on: { 'Filing.ordered': 'Filing.draft' },
  offer: {
    'Filing.order': { price: 25, when: 'accepted', accept: 'customer',
                      acceptWithin: '7d', remedy: 'redo', grade: 'sampled' },
  },
})
```

The plan prints what one accepted filing costs and how the check stands.

```json title="Plan · Filing.order"
{
  "price": 25,
  "cost": { "model": 0.42, "people": 4.5, "expected": 4.92 },
  "margin": 0.8,
  "check": { "by": "paralegal", "sample": "1/1", "earns": "1/10 after 200 at 0.98" },
  "grade": { "sells": "sampled", "earned": "graded" }
}
```

## Steps, workers and checks, state by state
Each state is kept on the record, and every move writes its Event.

| Thing | States | What moves it |
| --- | --- | --- |
| A step's check | `full`, `sampled`, `light`; then `promoted` or `demoted` between them | The evidence its quality plan names; a promotion never passes the Offer's grade |
| A time entry | `running`, `logged`, `approved`, then `billed` or `written_off` | A claim and its completion, the worker's correction, a reviewer's approval |
| A worker's earnings | `open`, `closed`, `paid` | The period's end, then a Stripe payout to the worker's account |
| A gold task | `seeded`, `answered`, `scored` | Its place in a checker's queue, the checker's answer, its known answer |
| A checker | `calibrated`, `drifting`, `retraining` | Its agreement on gold tasks against its bar |
| A finding | `raised`, `classified`, `actioned`, `closed` | A failed check, a reviewer, the corrective task and its owner |

## What buyers, workers and your team meet
- **A buyer.** The grade on the offer card, the share of outputs checked, and the same grade whether a person or an agent did the work.
- **A worker.** Its tasks, its time, its earnings each period, and a payout on Stripe.
- **A checker.** Gold tasks mixed into its queue, its own agreement, and findings it classifies with one list.
- **Your team.** The cost of every step, the margin of every outcome, and each promotion as an Event with its evidence.

---

A step earns a lighter check only on evidence, and never below the grade the Offer sells, so autonomy grows without the promise changing.