delivery-reviewer (opus; no Bash, Edit, Write or NotebookEdit) is the review-stage lead. It judges the PR through the new delivery-review skill and posts one COMMENT review per round. Gitea refuses REQUEST_CHANGES from a PR's own poster, and the reviewer runs as the bot that opened the PR. The review opens with `Delivery review: round <n> — blocking|clear`, and each blocking finding is tagged with the role that must fix it: [test-author] (with its dispute key), [implementer] or [human]. Routing: a [human] finding, or a 3rd blocking round, stops with Ready for Human. Other blocking rounds post the Handoff and put `WIP:` back, handing the PR to delivery-implement-lead. A clear round hands on to delivery-operator. A relaunch finishes a crashed routing, using whether a later Handoff links the review. delivery-review checks the change against the acceptance criteria and re-judges every test-path change itself, because a dispute round moves the CI freeze boundary. It also judges post-merge assertion reasons, security and the dry run. It reads the delivery doc at the PR's base ref, and a PR that changes the test-path rules is a [human] finding. Hand-back: delivery-handoff lets the implement stage take a PR, with the inbound Handoff required and the gate checked on the issue it closes. The implement lead first sends [test-author] findings through delivery-test-first's dispute flow, which now takes review findings, then gives the implementer the rest. Dispute verdicts are one keyed `- Dispute verdict:` line copied into every Handoff comment, so later sessions never re-judge an item or re-dispute a settled test. delivery-repo-doc, delivery-test-author, delivery-implementer and delivery-qa are aligned with these contracts. Package bumped to 0.5.0, with the marketplace allow key and manifest. Refs: #193 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
6.0 KiB
The docs/agents/delivery.md format
This file is the single source of truth for the format. These files read docs/agents/delivery.md:
the skills delivery-handoff, delivery-ci-checks, delivery-test-first and delivery-review,
and the agents delivery-reviewer, delivery-implement-lead, delivery-implementer,
delivery-test-author and delivery-qa. Those that parse a section cite this file as
"delivery-repo-doc's references/format.md" and restate only the minimum they parse —
delivery-handoff, for example, restates the first line and section 4's syntax. A format change is
an edit here, plus every consumer's restatement.
File rules
- Path:
docs/agents/delivery.mdat the consuming repo's root. One file per repo. - First line:
# Delivery. - Exactly six
##sections, with these headings verbatim and in this order:## Contents → skills## CI checks## Test paths## Human allowlist## Credential boundary## Conventions
- No other
##headings, and no###headings inside sections 1–4. - Sections 1–4 are parsed: they contain only list items in the item syntax below, one per line,
starting
-at column 0. Blank lines are allowed; prose, sub-bullets, tables and comments are not. Every backticked value is taken verbatim, with no escaping. - An empty parsed section holds the single item
- none. Section 4 is never empty. - Sections 5–6 are read by agents, not parsers; their item labels below are a convention.
Item syntax
1. Contents → skills
- `<glob>`: `<skill>`, `<skill>`
<glob>is a repo-relative path glob (**crosses directories).- One or more installed skill names, each backticked, comma-separated.
- A consumer loads exactly the listed skills for a changed path matching the glob, the union across
every matching line. A listed skill that is not installed is a hard stop for the consumer
(
Status/Ready for Human, handoff "missing skill<name>"), so a glob with no installed tool skill is left out entirely.
2. CI checks
- `<status check name>`: <role>
<status check name>is the exact string the forge shows on a PR's head commit.<role>is exactly one of:dry-run,test-path,test,lint,build,other.dry-runappears on exactly one item unless the section is- none.test-pathappears on at most one item, and on exactly one when the repo has a test-path check.- Whatever its role, a consumer treats a check reported as "skipped" (a path-filtered workflow whose paths did not match) as passing.
3. Test paths
Either a pointer, as the only item, when the repo's test-path check reads its own globs file:
- globs file: `<repo-relative path>`
or one item per glob:
- `<glob>`
These are the paths the test author owns; after the commit with trailer
Delivery-Stage: test-author, the implementer may not touch them.
4. Human allowlist
- `<forge username>`
Humans only. Stage leads accept a PR approval only from a user on this list. Who set a gate label is checked by whatever launches the stage: in step mode the human launching it is the approval.
5. Credential boundary
- Bot user: `<forge username>`
- Kubeconfig: `<absolute path>` | none
- Branch protection: in place | pending ([<title>](<url>))
- Accepted risks: [<title>](<url>), … | none
Every link in this section is a markdown link. Delivery sessions export the kubeconfig path as
KUBECONFIG. The value is a path only. Accepted risks are linked, never restated.
6. Conventions
Short prose or bullets pointing at the repo's own docs (AGENTS.md, ADRs, contributing guides) for
anything else a delivery agent needs. Pointers only; no restating.
AGENTS.md pointer line
The consuming repo's root AGENTS.md carries this line verbatim, exactly once:
- Delivery team facts (checks, test paths, human allowlist, credential boundary): `docs/agents/delivery.md`
Placement only decides where the line sits; the line itself never changes:
- The heading that lists agent docs holds a flat bullet list: add the line to that list.
- That heading uses
###subsections with prose: add a### Deliverysubsection under it, holding only the line. - No such heading: add the line at the end of the file.
Full skeleton
# Delivery
## Contents → skills
- `clusters/**`: `flux-diagnose`, `k8s-diagnose`
- `roles/**`: `ansible-lint`
## CI checks
- `ci / render-diff (pull_request)`: dry-run
- `ci / test-paths (pull_request)`: test-path
- `ci / lint (pull_request)`: lint
## Test paths
- globs file: `.gitea/test-paths`
## Human allowlist
- `alice`
## Credential boundary
- Bot user: `delivery-bot`
- Kubeconfig: `/etc/delivery/kubeconfig-readonly`
- Branch protection: pending ([Branch protection setup](https://example.org/issues/12))
- Accepted risks: [ADR-0032](https://example.org/adr/0032)
## Conventions
Repo conventions live in `AGENTS.md`; decisions in `docs/adr/`.
The values in the skeleton are illustrative only; every real value comes from the repo or the human.
Validation checklist
- First line
# Delivery; six##headings, verbatim, in order. - Sections 1–4 hold only items in the syntax above, or
- none. - Every skill in section 1 is installed. A listed skill that is not installed makes every consumer hard-stop on any change matching its glob.
- Section 2:
dry-runon exactly one item unless the section is- none; onetest-pathif the repo has that check. - Section 3 is the
globs file:pointer whenever a test-path check reads a globs file. - Section 4 is non-empty and every name came from the human or a source they named.
- Section 5 holds paths and markdown links, no secret values.
- Root
AGENTS.mdcarries the pointer line exactly once. - On Gitea, the repo's
Status/Ready for AgentandStatus/Ready for Humanlabels are not in an exclusive scope (read viagitea-labels-milestones), or the PR body names it as open; otherwise adding Ready for Human silently removes the gate label.