Files
Holocron/plugins/delivery/.apm/skills/delivery-repo-doc/references/format.md
T
Defame1297andClaude Opus 5.5 5081206c45 feat(delivery): add the verify stage: delivery-operator and delivery-verify
delivery-operator (opus; no Edit, Write, NotebookEdit or Agent) is the
verify-stage lead. After a human approves and merges, it reads the
delivery doc at the merge commit's first parent, proves its kubeconfig
cannot write (four auth can-i probes), loads the routed tool skills and
runs delivery-verify. It posts the operator report as its own comment,
then the final Handoff (Next command none on pass).

delivery-verify:
- stops first if the change was already reverted;
- waits for Flux through flux-diagnose's Applied check (15-minute cap)
  and reads post-merge CI per workflow through delivery-ci-checks
  (45-minute cap), accepting a later cumulative run as cover;
- checks the PR's post-merge assertions with Read-tier commands only;
- ties a failure to the change only when that is established, and
  otherwise stops. A tied failure opens a revert PR (Ready for Human,
  built in a temporary worktree); it never reverts on its own.
For Flux the guarantee is bounded: the merge commit applied and the
inventory HelmReleases are Ready. The assertions prove a values or chart
change took effect.

The delivery doc format gains a seventh parsed section, Post-merge
checks (glob -> push-event status names, or none when Flux pulls the
change), so delivery-repo-doc goes to 0.2.0. delivery-ci-checks takes a
caller check list and wait cap; delivery-handoff carries the verify
stops.

delivery 0.6.0.

Refs: #194

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
2026-11-24 20:35:04 +00:00

7.5 KiB
Raw Blame History

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, delivery-review and delivery-verify, and the agents delivery-reviewer, delivery-implement-lead, delivery-implementer, delivery-test-author, delivery-qa and delivery-operator. 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.md at the consuming repo's root. One file per repo.
  • First line: # Delivery.
  • Exactly seven ## sections, with these headings verbatim and in this order:
    1. ## Contents → skills
    2. ## CI checks
    3. ## Test paths
    4. ## Human allowlist
    5. ## Credential boundary
    6. ## Conventions
    7. ## Post-merge checks
  • No other ## headings, and no ### headings inside a parsed section.
  • The parsed sections are 1–4 and 7. 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 and 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-run appears on exactly one item unless the section is - none. test-path appears 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. The value is a path only: delivery-operator checks it cannot write, then sets KUBECONFIG=<path> on each cluster command, never an export. 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.

7. Post-merge checks

- `<glob>`: `<exact status name>`, `<exact status name>`
- `<glob>`: none
  • <glob> is a repo-relative path glob as in section 1: one glob per line, no brace globs.
  • <exact status name> is the string the forge shows on a commit of the default branch after a merge, event suffix included (Provision / provision (push)), never a section 2 PR name.
  • Every listed check is cumulative: a green run on a later default-branch commit re-applies everything since that check's last success, so the verify stage may count it for an earlier merge whose own run failed or was cancelled. A workflow that applies only its own commit's diff is not cumulative and is not listed.
  • none marks a path applied by being pulled, not by a CI run (Flux): the verify stage waits for the pull to reach the merge commit instead of reading a check.
  • The checks for a merge are the union over every glob a changed path matches. A path matching no glob has nothing to check after merge, the same rule as section 1.

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 ### Delivery subsection 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/`.

## Post-merge checks

- `clusters/**`: none
- `roles/**`: `ci / provision (push)`

The values in the skeleton are illustrative only; every real value comes from the repo or the human.

Validation checklist

  • First line # Delivery; seven ## headings, verbatim, in order.
  • Sections 1–4 and 7 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-run on exactly one item unless the section is - none; one test-path if 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.
  • Section 7 names post-merge (push) statuses only, each confirmed on a default-branch commit or named as derived in the PR body, and every pulled area is none.
  • Root AGENTS.md carries the pointer line exactly once.
  • On Gitea, the repo's Status/Ready for Agent and Status/Ready for Human labels are not in an exclusive scope (read via gitea-labels-milestones), or the PR body names it as open; otherwise adding Ready for Human silently removes the gate label.