Files
Holocron/plugins/delivery/.apm/skills/delivery-repo-doc/references/format.md
T
Defame1297andClaude Opus 5.5 42301cf38e fix(delivery): close the skipped-gate hole in dry-run-gated
A gated workflow whose job-level label condition is unmet posts
skipped, and a later label event on the same SHA posts a newer skipped
that would mask an earlier gated failure. delivery-ci-checks now
ignores skipped statuses for a dry-run-gated check and takes the latest
of the rest, reading none as awaiting-gate. The format exempts
dry-run-gated from the skipped-passes rule and requires the workflow
to run only on its named gate label; the gatherer confirms that filter
and takes a gated check's name from the forge or lists it as open.

The review's awaiting-gate finding links the PR's files view, the
implement lead and delivery-handoff name the gated dry run's label as
human-only, and qa's and the lead's restatements are trimmed.

Refs: #218

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
2026-11-25 09:22:36 +00:00

8.0 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, dry-run-gated, test-path, test, lint, build, other.
  • dry-run appears on one or more items 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.
  • dry-run-gated (zero or more items) is a dry run that posts its status only after a user on the human allowlist adds a label to the PR. Its workflow runs only on that one named gate label, so no other label event starts it. Until then its status is absent or skipped on the head commit, and consumers read either as awaiting the human gate, not as missing or passing.
  • Whatever its role, except dry-run-gated, 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 / plan (pull_request_target)`: dry-run-gated
- `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 one or more items unless the section is - none; dry-run-gated only on a dry run the human named as label-gated; 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.