# Drafts and slots

A draft is a version of the site that the owner can look at before it goes
live.

A draft is unlisted, it is `noindex`, and its forms send no mail.

## Slots

A site has a small number of preview slots. Each slot is one draft address
at a time.

A slot can own a branch: `refs/heads/slot-1` and up. No slot owns a branch
by default. The first **write** with that slot starts one. A **read** with
a slot reads the site, because looking is not starting.

## Approval

A draft reaches the public only when the owner approves it in the browser.
Approval moves the slot's branch into `main`.

- If the live site has not moved, the move is a fast-forward. The owner
  gets exactly the bytes they looked at.
- If the live site has moved, Clave refuses, and the agent answers with
  one of two calls:
  - **merge** combines the two and builds a page nobody has seen yet;
  - **catch-up** brings the site into the slot, so the owner looks again.

`main` never takes a conflict marker. A slot's branch can, because there
is no working copy here to hold a half-done merge.

## Posts have no branch

A slot is a line of the site's source, and the posts have one line. So:

- a call that names a slot against the posts is refused;
- a `posts` draft records no branch, because approving one would move
  `main` back to the live commit the draft was built on.

## A branch outlives its address

Discarding a slot removes the draft's address. It does not touch git. So a
slot that holds work needs a confirmation before it is discarded. That is
the one destructive act here.

## What the owner does on a draft

The owner leaves [comments](/concepts/comments) on the draft. That is what
drafts are for.

---

## Where this page sits

This is one page of the Clave documentation.
Read it as a web page at https://docs.heyclave.party/concepts/drafts.
Every page has a `.md` address, and https://docs.heyclave.party/llms.txt lists them all.

- Previous: [Publishing](https://docs.heyclave.party/concepts/publishing.md)
- Next: [Comments](https://docs.heyclave.party/concepts/comments.md)
- Index: [Overview](https://docs.heyclave.party/index.md)
