# Cermet Authority

This file is the example `CERMET.md` — the authority corpus a Cermet box runs on,
genericized from a live one. Keep it in your repo. Only the managed block below is
authority input; everything outside it is guidance for humans and agents, never policy.

The flow: edit the block → `cermet doc diff` shows what would change → `cermet doc apply`
makes it live under your presence and re-pins the hash. The pin means the daemon serves
exactly these bytes or refuses: an edited-but-unapplied file changes nothing, and a
drifted live corpus is a loud state, not a silent one. Because the corpus lives in your
repo, a rebuilt box recovers its whole authority with one `doc apply` — keys are the only
thing you re-enter by hand.

Bounds reference: [the WHERE index](/predicates.html). One sentence per line; `allow` is
the only way anything executes; what no sentence admits, denies — with the sentence that
would widen it.

<!-- cermet:authority:v1 -->
Pinned authority: `sha256:<written by cermet doc apply — never by hand>` <!-- cermet:pinned:v1 -->

```cermet
allow github.read_repo where owner = "you" and name = "your-repo"
allow github.read_ref where owner = "you" and name = "your-repo"
allow github.read_commit where owner = "you" and name = "your-repo"
allow github.read_tree where owner = "you" and name = "your-repo"
allow github.read_blob where owner = "you" and name = "your-repo"
allow github.read_pull_request where owner = "you" and name = "your-repo"
allow github.read_thread where owner = "you" and name = "your-repo"
allow github.read_workflow_run where owner = "you" and name = "your-repo"
allow github.fetch where owner = "you" and name = "your-repo"
allow github.push where owner = "you" and name = "your-repo"
allow github.create_branch where owner = "you" and name = "your-repo"
allow github.create_pull_request where owner = "you" and name = "your-repo" and base = "main"
allow github.update_pull_request where owner = "you" and name = "your-repo"
allow github.merge_pull_request where owner = "you" and name = "your-repo"
allow github.comment_thread where owner = "you" and name = "your-repo"
allow github.create_pull_request_review where owner = "you" and name = "your-repo"
allow github.create_issue where owner = "you" and name = "your-repo"
allow vercel.list_projects
allow vercel.deploy where project = "your-site" and target = "preview"
allow vercel.deploy where project = "your-site" and target = "production"
allow stripe.get_charge
allow stripe.list_active_prices
allow stripe.refund where charge = "ch_replace_me" and amount <= 5000
deny stripe.create_standard_payout
```
<!-- /cermet:authority:v1 -->

This is the shape of a corpus that runs a real box — an agent doing full-cycle work
(read the repo, branch, push, PR, review, merge, deploy to both targets) with the money
surface held to two reads and one tightly pinned write. Notes a real corpus accumulates,
outside the block where they belong:

- The read family is granted wholesale — reads are cheap, every use is still a receipt,
  and starving an agent of reads just makes it guess.
- Writes each carry their bound: `push` is rate-metered, `create_pull_request` is pinned
  to `base = "main"`, deploys are pinned per project and target. Production deploy being
  PRESENT is a decision this corpus made out loud — delete that line and production
  denies by default again.
- A sentence constrains only the fields it names: `allow vercel.deploy where
  project = "your-site"` with no `target` would admit EVERY target, production included.
  Fewer bounds is always a wider grant — which is why this corpus names each target it
  means instead of leaving the field open.
- The refund line shows the tightest useful shape: one named charge, capped amount.
  Widen to `where amount <= 5000` when the agent handles refunds routinely — a
  per-request cap the decision enforces on every single refund.
- The `deny` line is different from absence: an absent verb denies but the denial
  suggests the widening sentence; an explicit `deny` says this is settled — nothing will
  suggest enabling payouts.
