Implement stage: lead, specialists, test-first and CI checks #192

Closed
opened 2026-11-22 16:09:08 +00:00 by Claude · 5 comments
Owner

Part of #166

Question

Author the implement stage. It may split into two sessions if it outgrows one.

Agents:

  • delivery-implement-lead (stage lead):
    • runs the specialists in sequence
    • opens a draft (WIP:) PR after the first push
    • removes WIP: when qa passes, which starts the review stage
    • exits on a spec/test conflict with Status/Ready for Human
  • delivery-test-author: writes acceptance checks. For code these are failing tests. Where no test applies they are post-merge assertions with a reason.
  • delivery-implementer: works with tests read-only, hands disputed tests back, never uses --no-verify.
  • delivery-qa: judges the draft PR's CI. Its judgement checklist lives in its body.

Skills:

  • delivery-test-first: acceptance criteria → acceptance checks; the test framework comes from the tool skill named in delivery.md.
  • delivery-ci-checks: find and read a PR's or a commit's CI runs by the check names in delivery.md.

Requirements:

  • Pin each agent's model.
  • Strict tools lists, including agent for the lead.
  • Apply the runtime results of Claude Code agent smoke test and Copilot CLI agent behaviour from docs.
  • Close out each item with factory-audit.
Part of #166 ## Question Author the implement stage. It may split into two sessions if it outgrows one. **Agents:** - `delivery-implement-lead` (stage lead): - runs the specialists in sequence - opens a draft (`WIP:`) PR after the first push - removes `WIP:` when qa passes, which starts the review stage - exits on a spec/test conflict with `Status/Ready for Human` - `delivery-test-author`: writes **acceptance checks**. For code these are failing tests. Where no test applies they are post-merge assertions with a reason. - `delivery-implementer`: works with tests read-only, hands disputed tests back, never uses `--no-verify`. - `delivery-qa`: judges the draft PR's CI. Its judgement checklist lives in its body. **Skills:** - `delivery-test-first`: acceptance criteria → acceptance checks; the test framework comes from the tool skill named in `delivery.md`. - `delivery-ci-checks`: find and read a PR's or a commit's CI runs by the check names in `delivery.md`. **Requirements:** - Pin each agent's `model`. - Strict tools lists, including `agent` for the lead. - Apply the runtime results of **Claude Code agent smoke test** and **Copilot CLI agent behaviour from docs**. - Close out each item with `factory-audit`.
Claude added this to the Map: Infra and agent-team packages milestone 2026-11-22 16:09:08 +00:00
Claude added the Wayfinder/Task label 2026-11-22 16:09:08 +00:00
Claude added a new dependency 2026-11-22 16:09:31 +00:00
Claude added a new dependency 2026-11-22 16:09:33 +00:00
Claude added a new dependency 2026-11-22 16:09:34 +00:00
Claude added a new dependency 2026-11-22 16:09:35 +00:00
Claude added a new dependency 2026-11-22 16:09:36 +00:00
Author
Owner

Inputs from Copilot CLI agent behaviour from docs (#187)

  • Every delivery- agent sets model-policy: required next to model. Without it, --model, a user subagents override or an Auto session silently replaces the pin, and an unavailable model silently falls back.
  • Strict tools lists include agent on any agent that delegates. Unknown tool names are ignored silently, so a typo fails without an error.
  • Set include-custom-instructions: true on subagents that need the repo's AGENTS.md (and so the delivery.md pointer). Without it they don't receive it.
  • Name collisions: a same-named .claude/agents file overrides .github/agents (#4437, open), and a user-level agent with the same id replaces the repo one. Another reason for the delivery- prefix.
  • Never name an agent like a built-in (task, explore, code-review). Copilot never delegates to those.
  • Known limitations to document:
    • #5124: the --agent selection is dropped right after interactive startup.
    • #5543: nested subagents run synchronously.

Source: findings note.

## Inputs from Copilot CLI agent behaviour from docs (#187) - **Every `delivery-` agent sets `model-policy: required`** next to `model`. Without it, `--model`, a user `subagents` override or an Auto session silently replaces the pin, and an unavailable model silently falls back. - **Strict tools lists include `agent`** on any agent that delegates. Unknown tool names are ignored silently, so a typo fails without an error. - **Set `include-custom-instructions: true`** on subagents that need the repo's AGENTS.md (and so the `delivery.md` pointer). Without it they don't receive it. - **Name collisions:** a same-named `.claude/agents` file overrides `.github/agents` (#4437, open), and a user-level agent with the same id replaces the repo one. Another reason for the `delivery-` prefix. - **Never name an agent like a built-in** (`task`, `explore`, `code-review`). Copilot never delegates to those. - **Known limitations to document:** - #5124: the `--agent` selection is dropped right after interactive startup. - #5543: nested subagents run synchronously. Source: [findings note](https://git.rkdr.net/Mortis/Holocron/src/branch/research/copilot-cli-agents/docs/research/copilot-cli-agents/copilot-cli-agents.md).
Author
Owner

Inputs from delivery-repo-doc and the ansible-homelab-mono delivery.md

These apply to delivery-ci-checks and delivery-qa. The format lives in delivery-repo-doc's references/format.md (PR 210); cite it by that name, not by path.

  • ## CI checks items: each is - `<exact status name>`: <role>.
    • Roles: dry-run (exactly one), test-path, test, lint, build, other.
    • Treat a skipped status as passing. Path-filtered PR workflows report as skipped. An example is ansible-homelab-mono's Molecule Role Tests / molecule (pull_request), which only runs for roles/pihole.
  • ## Test paths: either - globs file: `<path>` (e.g. .gitea/test-paths) or one - `<glob>` per line.
  • ## Contents → skills: - `<glob>`: `<skill>`, …. Load the union of skills across all matching lines. If a listed skill isn't installed, it's a hard stop.
## Inputs from [delivery-repo-doc and the ansible-homelab-mono delivery.md](https://git.rkdr.net/Mortis/Holocron/issues/189) These apply to `delivery-ci-checks` and `delivery-qa`. The format lives in `delivery-repo-doc`'s `references/format.md` ([PR 210](https://git.rkdr.net/Mortis/Holocron/pulls/210)); cite it by that name, not by path. - **`## CI checks` items:** each is `` - `<exact status name>`: <role> ``. - Roles: `dry-run` (exactly one), `test-path`, `test`, `lint`, `build`, `other`. - **Treat a `skipped` status as passing.** Path-filtered PR workflows report as skipped. An example is `ansible-homelab-mono`'s `Molecule Role Tests / molecule (pull_request)`, which only runs for `roles/pihole`. - **`## Test paths`:** either `` - globs file: `<path>` `` (e.g. `.gitea/test-paths`) or one `` - `<glob>` `` per line. - **`## Contents → skills`:** `` - `<glob>`: `<skill>`, … ``. Load the union of skills across all matching lines. If a listed skill isn't installed, it's a hard stop.
Author
Owner

Inputs from delivery-handoff skill

  • delivery-implement-lead loads delivery-handoff (PR 213): gate is Status/Ready for Agent on the issue (state only, not who set it); inbound Handoff is optional.
  • Duplicate PR on relaunch: the issue keeps its gate label after implement succeeds or stops mid-stage, so relaunching implement on the issue passes again and could open a second PR. The lead's flow should look for an open PR already linked to the issue and continue on it (or stop) rather than opening another.
  • The lead posts its exit Handoff on the PR once it exists; Next command launches delivery-reviewer.
## Inputs from [delivery-handoff skill](https://git.rkdr.net/Mortis/Holocron/issues/191) - `delivery-implement-lead` loads `delivery-handoff` ([PR 213](https://git.rkdr.net/Mortis/Holocron/pulls/213)): gate is `Status/Ready for Agent` on the issue (state only, not who set it); inbound Handoff is optional. - **Duplicate PR on relaunch:** the issue keeps its gate label after implement succeeds or stops mid-stage, so relaunching implement on the issue passes again and could open a second PR. The lead's flow should look for an open PR already linked to the issue and continue on it (or stop) rather than opening another. - The lead posts its exit Handoff on the PR once it exists; Next command launches `delivery-reviewer`.
Defame1297 was assigned by Claude 2026-11-23 19:25:50 +00:00
Author
Owner

Build decisions (owner, before build)

The ticket's "strict tools lists" requirement conflicts with ADR-0016: plugin-scope .apm/agents/*.agent.md carries only name, description, model and disallowedTools, and factory-audit enforces that. A strict list also can't name the Gitea MCP tools portably (Claude uses mcp__gitea__*, Copilot gitea/*, and Copilot silently ignores names it doesn't know).

  • Tools: follow ADR-0016. No tools:. Agents that must not write files (delivery-implement-lead, delivery-qa) carry disallowedTools: Edit, Write, NotebookEdit. The real boundary stays credentials + guard hook + CI test-path check (ADR-0032). The strict-list requirement is dropped.
  • Model pin: Claude alias only. No model-policy. On Copilot the pin may fall back silently; this is documented as a known limitation (Copilot untested in v1). The Copilot-only include-custom-instructions is dropped for the same reason and documented as a limitation.
  • Models: delivery-implement-lead, delivery-test-author and delivery-implementer on sonnet; delivery-qa on opus, so the judge runs on a stronger model than the builder.
## Build decisions (owner, before build) The ticket's "strict tools lists" requirement conflicts with **ADR-0016**: plugin-scope `.apm/agents/*.agent.md` carries only `name`, `description`, `model` and `disallowedTools`, and `factory-audit` enforces that. A strict list also can't name the Gitea MCP tools portably (Claude uses `mcp__gitea__*`, Copilot `gitea/*`, and Copilot silently ignores names it doesn't know). - **Tools: follow ADR-0016.** No `tools:`. Agents that must not write files (`delivery-implement-lead`, `delivery-qa`) carry `disallowedTools: Edit, Write, NotebookEdit`. The real boundary stays credentials + guard hook + CI test-path check (ADR-0032). The strict-list requirement is dropped. - **Model pin: Claude alias only.** No `model-policy`. On Copilot the pin may fall back silently; this is documented as a known limitation (Copilot untested in v1). The Copilot-only `include-custom-instructions` is dropped for the same reason and documented as a limitation. - **Models:** `delivery-implement-lead`, `delivery-test-author` and `delivery-implementer` on `sonnet`; `delivery-qa` on `opus`, so the judge runs on a stronger model than the builder.
Author
Owner

Resolution

Built and merged in PR 215 (delivery 0.4.0). factory-audit passes on every item, and all pre-commit and pre-push hooks pass.

Agents

  • delivery-implement-lead (sonnet, disallowedTools: Edit, Write, NotebookEdit):
    • runs delivery-handoff Steps 1–3;
    • relaunch guard: an open PR linked to the issue is resumed, not duplicated. Several matches, a match without WIP:, or a branch with no PR → Stop;
    • test-author → draft WIP: PR (body Closes #<issue> + the test author's ## Acceptance checks block) → implementer → qa;
    • qa pass removes WIP: and posts a Handoff that launches delivery-reviewer;
    • Stops on: the 3rd qa fail, qa pending/stop, any escalate, a missing skill, or a spec/test conflict.
  • delivery-test-author (sonnet) and delivery-implementer (sonnet): hard constraints are written as rules that hold whatever the lead's prompt says. Test paths are read-only to the implementer, a disputed test goes back as file::test: reason, never --no-verify, no history rewrite over the test author's commit.
  • delivery-qa (opus, no file writes): its judgement checklist is in its body; it posts nothing and returns pass | fail | pending | stop.

Skills

  • delivery-test-first: every criterion becomes a failing test or a post-merge assertion with a reason; a criterion that can't be checked stops the run.
    • One Delivery-Stage: test-author commit per run, empty when there are only assertions, so the CI freeze always starts.
    • Disputes: one round per test, answered amended, upheld or escalate.
    • - none under test paths stops the run.
  • delivery-ci-checks: judges each check listed in delivery.md by its exact name, on the PR's current head SHA.
    • States are pass | fail | missing | pending; skipped counts as a pass.
    • Gitea's overall commit state is ignored, because it reads pending for a commit with no runs and success for a skipped check.
    • Waiting is capped at 20 reads of about 45 s each.

Decisions (owner, see the comment above)

  • No tools: lists (ADR-0016).
  • Claude aliases with no model-policy.
  • Copilot limitations recorded in plugins/delivery/docs/runtimes.md.

Facts for later tickets

  • Reference repo on the forge: defame1297/ansible-homelab-mono.
  • A test-author commit moves the freeze boundary, so implementer commits before it are not checked. Posted to the review-stage ticket.
  • delivery.md lists (pull_request) check names, but post-merge runs report (push). Posted to the verify-stage ticket.
## Resolution Built and merged in [PR 215](https://git.rkdr.net/Mortis/Holocron/pulls/215) (`delivery` 0.4.0). `factory-audit` passes on every item, and all pre-commit and pre-push hooks pass. **Agents** - `delivery-implement-lead` (`sonnet`, `disallowedTools: Edit, Write, NotebookEdit`): - runs `delivery-handoff` Steps 1–3; - **relaunch guard**: an open PR linked to the issue is resumed, not duplicated. Several matches, a match without `WIP:`, or a branch with no PR → Stop; - test-author → draft `WIP:` PR (body `Closes #<issue>` + the test author's `## Acceptance checks` block) → implementer → qa; - qa `pass` removes `WIP:` and posts a Handoff that launches `delivery-reviewer`; - Stops on: the 3rd qa `fail`, qa `pending`/`stop`, any `escalate`, a missing skill, or a spec/test conflict. - `delivery-test-author` (`sonnet`) and `delivery-implementer` (`sonnet`): hard constraints are written as rules that hold whatever the lead's prompt says. Test paths are read-only to the implementer, a disputed test goes back as `file::test: reason`, never `--no-verify`, no history rewrite over the test author's commit. - `delivery-qa` (`opus`, no file writes): its judgement checklist is in its body; it posts nothing and returns `pass | fail | pending | stop`. **Skills** - `delivery-test-first`: every criterion becomes a failing test or a post-merge assertion with a reason; a criterion that can't be checked stops the run. - One `Delivery-Stage: test-author` commit per run, empty when there are only assertions, so the CI freeze always starts. - Disputes: one round per test, answered `amended`, `upheld` or `escalate`. - `- none` under test paths stops the run. - `delivery-ci-checks`: judges each check listed in `delivery.md` by its exact name, on the PR's current head SHA. - States are `pass | fail | missing | pending`; `skipped` counts as a pass. - Gitea's overall commit `state` is ignored, because it reads `pending` for a commit with no runs and `success` for a skipped check. - Waiting is capped at 20 reads of about 45 s each. **Decisions** (owner, see the comment above) - No `tools:` lists (ADR-0016). - Claude aliases with no `model-policy`. - Copilot limitations recorded in `plugins/delivery/docs/runtimes.md`. **Facts for later tickets** - Reference repo on the forge: `defame1297/ansible-homelab-mono`. - A test-author commit moves the freeze boundary, so implementer commits before it are not checked. Posted to the review-stage ticket. - `delivery.md` lists `(pull_request)` check names, but post-merge runs report `(push)`. Posted to the verify-stage ticket.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Holocron#192