Commit Graph
13 Commits
Author SHA1 Message Date
Defame1297andClaude Opus 5.5 0258cff316 feat(delivery): add the review stage and the review hand-back loop
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
2026-11-23 22:44:18 +00:00
Defame1297andClaude Opus 5.5 f82076936a chore(delivery): bump delivery-repo-doc for its format consumer list
The format reference now names delivery-test-first among the skills
that parse docs/agents/delivery.md.

Refs: #192

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
2026-11-23 19:44:00 +00:00
Defame1297andClaude Opus 5.5 3ef0a3c8a9 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
2026-11-23 19:35:12 +00:00
Defame1297andClaude Opus 5.5 5a4e4c0674 fix(delivery): stop unknown agents and wrong item kinds at the inbound check
An agent with no gate-table row had no defined stop; it now stops first
in the inbound check with a plain comment. The item kind is checked
before the Handoff lookup, 'latest' means newest by creation time, and an
allowlist of '- none' counts as empty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-23 17:39:10 +00:00
Defame1297andClaude Opus 5.5 d4226e152b fix(delivery): keep inbound-rule stops out of the handoff trail
Why: every Stop posted a Handoff comment whose Next command relaunched the
stopping agent, including stops raised by the inbound rule itself. A second
launch then passed the inbound check, and a wrong-agent stop buried the
correct pointer.

Implementation Notes:
- Stops before the inbound check passed (Steps 1-2) post a plain comment;
  later stops keep the relaunching Handoff comment.
- gates.md defines a Handoff comment strictly and owns the inbound stop
  wordings; the planner stops at the inbound check in v1.
- Heading names and where-to-post live once, in handoff-comment.md.
- Gotcha and delivery-repo-doc checklist item: the two Status labels must
  not share an exclusive scope.
- GLOSSARY gains Step mode and Run mode; ADR-0032 scopes the gate-label
  check to stages that have one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-23 17:21:51 +00:00
Defame1297andClaude Opus 5.5 fc09f77fb3 fix(delivery): let a stopped stage be relaunched
A Stop wrote Next command `none`, and the inbound rule stopped on a
latest `none`, so a stage that stopped once stopped on every relaunch.
A Stop's Next command now relaunches the stage that stopped, `none`
means only the final stage, and the inbound rule stops only when the
latest Handoff comment does not launch this stage's agent. Gate checks
still run on a relaunch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-23 17:05:42 +00:00
Defame1297andClaude Opus 5.5 9774a217d4 fix(delivery): apply review findings to delivery-handoff
Define the inbound Handoff comment as the latest one whose Next command
launches this stage, and stop when the latest has Next command none.
Name the six headings in Step 2, keep the required/optional rule in the
gates table and the posting location in handoff-comment.md only, narrow
the description to one capability clause, and declare the Gitea MCP
tools the skill uses. Let delivery-repo-doc's format consumers restate
the minimum they parse, and add the next stage's command to the
glossary's Handoff comment entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-23 16:57:04 +00:00
Defame1297andClaude Opus 5.5 2c0120cda6 feat(delivery): add the delivery-handoff stage protocol skill
Every delivery Stage lead needs the same entry and exit discipline: read
the repo's delivery doc, read the inbound Handoff comment, check the
stage's gate, and end with one fixed-shape Handoff comment that tells the
human the exact launch line for the next stage.

- delivery-handoff: entry checks, per-stage gate table (implement label,
  review non-WIP PR, verify merged PR with a non-stale, non-dismissed
  allowlisted approval), the Status/Ready for Human stop path, and the
  Handoff template with Claude Code and Copilot CLI Next commands
- ADR-0032 amended: stage leads check gate state only in step mode; the
  who-set-the-label check moves to the run-mode launcher (gitea-mcp has
  no timeline method and the human already launches each stage)
- delivery-repo-doc format.md aligned with the amendment (0.1.2)
- delivery package 0.2.0 -> 0.3.0, with the executables.allow key and
  marketplace entry kept in step

Refs #191

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-23 16:49:36 +00:00
Defame1297andClaude Opus 5.5 d86ae521e7 fix(delivery): harden the guard hook after three review rounds
Two fresh-context adversarial reviews and a spec/standards review of the
guard found bypasses, false denies and fail-open paths. Fixes:

- Substitution bodies are parsed by the tokenizer itself, so an
  apostrophe in a here-doc commit/PR body no longer hides later commands.
- Redirect operands never become words; every redirect target is checked
  for secret paths and .git/hooks.
- Unquoted here-doc substitutions are analysed; stdin shells (bash -,
  ssh host, pwsh) analyse their here-doc as a script.
- Option clusters ending in a value letter (bash -euo pipefail -c,
  sudo -iu root) consume their value.
- PowerShell mode: backtick escapes, iex, cmd /c, -EncodedCommand denied.
- Malformed payloads and unknown runtimes fail closed; runtime comes from
  the deploy path only.
- Linear-time parsing with size, word, command, depth and unwrap caps, so
  Copilot cannot time out (and fail open) on long input.
- Wider secret coverage (.ssh/.kube globs and dirs, id_* suffixes, sops
  age key, k3s/admin kubeconfigs, git-credentials, deploy keys, REV:path)
  and hook-bypass routes (git config alias, .git/hooks writes, find
  -delete, HUSKY=0, LEFTHOOK=0).
- Fewer false denies: commit/PR message values, find -name, search globs,
  jq/yq filters, pytest -k, git -S/--grep, ssh -i naming, non-admin
  kubeconfigs, quoted braces, option names, doc and test files.
- New allowlists: helmfile, terragrunt hcl/render, helm diff.
- delivery 0.2.0: a new hook changes compiled output (configure.md).
- ADR-0032: allowlists described as "no cluster or state change and no
  secret printed"; Write added to the file tools.

Refs #190

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-23 11:51:26 +00:00
Defame1297andClaude Opus 5.5 a6ff1c14d4 feat(delivery): add the guard hook (ADR-0032 layer 2)
Ship one pre-tool-use hook in the delivery package. It denies the Never
tier on every runtime and asks before Odd jobs on Claude Code and Copilot
CLI (denying them on Codex and unknown runtimes):

- guard.py: stdlib-only Python; tokenises the shell line, unwraps
  bash -c / env / sudo / eval / xargs / find -exec / rtk / uv run and
  friends, checks file-tool paths for secret material, and uses read-verb
  allowlists for kubectl, helm, flux and tofu
- hooks.json: no matcher, onFailure: block, 10s timeout
- tests/test-delivery-guard-hook.sh: 281 cases incl. bypass attempts and
  per-runtime output shape
- root apm.yml: executables.allow delivery#0.1.0
- check-executables-allow-sync now covers every plugin shipping hooks/bin
- ADR-0032 amended: Copilot ask kept as an accepted risk, file tools and
  allowlists recorded

Refs #190

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-23 08:15:14 +00:00
Defame1297andClaude Opus 5.5 3f24daa58a fix(delivery): tighten delivery-repo-doc from first dogfood run
Why: the first drafting run against a real Ansible repo surfaced gaps the
skill left to guesswork: pointer placement in a sectioned AGENTS.md,
path-filtered and push-only workflows, link syntax, and caller-supplied
facts.

Implementation Notes: format.md pins the AGENTS.md placement rules
without changing the exact line, notes that "skipped" checks pass, uses
markdown links throughout section 5, and states the hard-stop consequence
of an uninstalled skill. gathering.md covers mixed repos, which workflows
count, the exact status-read tool calls and caller-supplied convention
pointers. SKILL.md adds the fast-forward and dirty-tree rule, caller
overrides, hook-failure handling and the remote-casing gotcha.

Impact: delivery-repo-doc 0.1.0 -> 0.1.1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-22 22:07:31 +00:00
Defame1297andClaude Opus 5.5 873b28ca96 feat(delivery): add delivery-repo-doc skill
Why: the delivery team needs each consuming repo's specific facts (tool
skills per path, CI check names, test paths, human allowlist, credential
boundary) in one place it can read mechanically (ADR-0031, ADR-0032).

Implementation Notes: the skill owns the docs/agents/delivery.md format in
references/format.md, the single source the other delivery skills cite. It
drafts or updates that file plus a one-line AGENTS.md pointer as one PR,
taking repo facts from the repo and human facts only from the human.

Impact: first .apm/ content in the delivery package; Read and Propose
tiers only, never merges.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-22 21:51:43 +00:00
Defame1297andClaude Opus 5.5 cabdc6e500 feat(marketplace): add delivery, ansible, gitops and k8s skeleton packages
Map #166 (Infra and agent-team packages) decided four new packages in
#171 (Package boundaries and names). Later build tickets only add
primitives, so each package must exist and install before they start.

Each package is at 0.1.0, targets claude, copilot and codex, and uses its
decided boundary as its description. delivery depends on git, gitea and
mattpocock. gitops depends on k8s and pins fluxcd/agent-skills
gitops-knowledge and gitops-repo-audit at v0.4.0. Sibling packages are
referenced in the remote git+path form the root apm.yml uses, unpinned
like every first-party dependency (ADR-0018), so a consumer outside this
repo can resolve them.

Root apm.yml does not consume them yet. Its dependencies resolve from the
remote main (ADR-0019), so wiring them in has to wait for this merge. It
is the same two-step plugins/mattpocock took.

The docs drop hard-coded package counts (README, AGENTS.md, GLOSSARY.md,
docs/spec/gates.md), which had gone stale. They also add mattpocock to the
architecture boundary table and give it a README bullet.

Impact: the catalog gains four packages, so the marketplace version goes
from 0.7.0 to 0.8.0 (minor).

Refs: #188

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-11-22 20:05:17 +00:00