Implement stage for the delivery team: delivery-implement-lead runs test-author -> implementer -> qa in sequence on a draft WIP: PR and removes WIP: when qa passes, starting review. delivery-test-first turns acceptance criteria into acceptance checks committed under the Delivery-Stage: test-author trailer; delivery-ci-checks reads a PR's or commit's CI by the names in docs/agents/delivery.md. Agents follow ADR-0016 (no tools: lists, disallowedTools fences on the lead and qa) and pin Claude model aliases without model-policy; Copilot limitations are documented in docs/runtimes.md. delivery 0.4.0. Refs: #192 ADR: ADR-0016, ADR-0031, ADR-0032 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
5.8 KiB
The docs/agents/delivery.md format
This file is the single source of truth for the format. delivery-handoff, delivery-ci-checks,
delivery-test-first, delivery-qa and delivery-operator cite it 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.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: exactly one
dry-run; 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); otherwise adding Ready for Human silently removes the gate label. If they are, name it as open in the PR body.