feat(delivery): add the implement stage agents and skills

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
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-11-23 19:35:12 +00:00
1 parent 29b5bfea5a
commit 3ef0a3c8a9
13 files changed
+676 -2

No files matched your search

@@ -0,0 +1,77 @@
# First run — acceptance criteria to acceptance checks
Input: the ticket (issue) and the work branch, from your caller. No implementation exists yet.
Return to `SKILL.md` Step 3 when the last step here is done.
## Step 1 — List the criteria
Read the issue's acceptance criteria and number them in their written order. Quote each one
verbatim; the report pairs checks with the quoted text.
No acceptance criteria on the issue → stop: "issue has no acceptance criteria".
## Step 2 — Classify each criterion
Every criterion gets at least one check. Decide per criterion, in this order:
1. **Test** — the behaviour it names can be exercised before merge: code, a template render, a
lint or schema rule the repo's tests can run, a script's output.
2. **Post-merge assertion** — the criterion is only observable in the applied state and nothing
before reconcile or apply carries logic to test, e.g. a chart version bump.
3. **Neither** — the criterion names no observable outcome ("is clean", "works well", "is
faster" with no measure). That is a spec problem → stop with the criterion quoted:
"criterion not checkable: \"<criterion>\"".
A criterion may need both a test and a post-merge assertion; write both.
## Step 3 — Load the tool skills
Match the paths the change will touch (from the issue, or the files its criteria name) against the
`## Contents → skills` globs. Load the union of the listed skills over every matching glob; they
own the test framework, file layout and naming conventions. Follow them, not a framework you would
pick yourself.
A listed skill that is not installed → stop: "missing skill `<name>`". No glob matches, or the
section is `- none` → follow the conventions of the existing tests under the test paths.
## Step 4 — Write the tests
For each test-classified criterion:
- Place the file under a test path glob. The needed test cannot live under one → do not write it;
add the criterion to Open questions in the report, naming the path it would need.
- Assert the outcome the criterion names, through the interface a user or caller sees: a public
function, a CLI's output, a rendered manifest, a role's resulting file. Never assert private
names, call order or internal structure the criterion does not mention.
- Name the test after the behaviour, so the report line reads as the criterion.
- One test per behaviour; a criterion with several outcomes gets several tests.
## Step 5 — Confirm each test is red for the right reason
Run only the new tests, once, with the runner the tool skill names. For Ansible, use a placeholder
vault password (a temporary file holding the literal string `placeholder`), never the real one.
| Result | Action |
|---|---|
| Fails on an assertion about the named behaviour | Correct — record it as red |
| Passes | Vacuous: the behaviour already exists or the assertion is too weak. Strengthen it until it fails; if the behaviour truly already exists, add the criterion to Open questions |
| Fails on syntax, import, collection or fixture errors | Fix the test and rerun |
| Runner not on PATH, or needs credentials you must not hold | Do not fake a result; record "not run: <reason>" for that test |
A test that imports a module the change will create fails on import; that is expected only when the
missing module is the change itself. Make the failure an assertion where the framework allows,
e.g. import inside the test and assert on its absence, or say so in the record.
## Step 6 — Write post-merge assertions
For each assertion-classified criterion, write one line holding:
- one **observable statement** about the applied state, concrete enough for `delivery-operator`
to check with read-only commands — resource kind, name, field and expected value;
- a **reason** no pre-merge test applies, which `delivery-reviewer` judges.
Example: `HelmRelease gotify Ready at chart 1.2.3` — reason: a version bump has no testable logic
before reconcile.
Post-merge assertions are not files; they go only in the report. With no test files written, the
commit in `SKILL.md` Step 3 is empty.