agent-contract-handofflisted
Install: claude install-skill metraton/gaia
# Agent Contract Handoff Reference
This skill owns schema, not workflow. Use `agent-protocol` to produce a turn and
`agent-response` to consume it. The envelope body is JSON, never YAML.
**Two senses of "contract" -- do not collapse them.** This skill's "contract"
is the *handoff* envelope: one row per turn, born at dispatch under the
injected `# Your Contract` block, mutated by `gaia contract set/add/fill`,
closed by `gaia contract finalize`. A *project context contract* is a
different thing -- a slice of project knowledge stored per workspace
(`project_context_contracts`, seeded by `seed_contract_permissions.py`). It
is NOT injected: the kernel's `can_read` / `can_write` lists (from
`agent_contract_permissions`) name which of those slices the turn may pull
on demand (the verb that reaches them, and the same-named sibling that reads a
different table entirely, are in `agent-protocol/read-map.md`) and which it may
propose updates to via `update_contracts`. When a message says "contract" without
qualifying it, ask which one it means before assuming.
## Draft creation is implicit
A turn born at dispatch already has a row in `agent_contract_handoffs` AND a
pre-created on-disk draft (`dispatch_binding._precreate_draft` writes
`gaia.contract.drafts.initial_envelope` at birth) before it runs anything --
no prior `gaia contract init` call is required. Should the draft file be
missing anyway, the first `gaia contract set/add/fill/view --draft-id
<draft_id>` against that same, alr