From 5a4e4c0674869265c47e4f8b09cc0a46127b792b Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Mon, 23 Nov 2026 17:39:10 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN --- GLOSSARY.md | 3 ++- plugins/delivery/.apm/skills/delivery-handoff/SKILL.md | 8 ++++---- .../.apm/skills/delivery-handoff/references/gates.md | 10 +++++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/GLOSSARY.md b/GLOSSARY.md index 991c128..10b5e6f 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -137,7 +137,8 @@ _Avoid_: specialist agent (implies a tool specialist), worker, persona **Handoff comment**: The fixed-shape tracker comment that ends every **Stage** — decisions, rejected options, evidence, the pointer the next stage starts from, open questions, and the command that launches the next -stage. The next stage reads it first. +session (the next stage, a relaunch of a stopped one, or none after the last). The next stage reads +it first. _Avoid_: summary, status update **Step mode**: diff --git a/plugins/delivery/.apm/skills/delivery-handoff/SKILL.md b/plugins/delivery/.apm/skills/delivery-handoff/SKILL.md index 059fe06..51b0128 100644 --- a/plugins/delivery/.apm/skills/delivery-handoff/SKILL.md +++ b/plugins/delivery/.apm/skills/delivery-handoff/SKILL.md @@ -28,8 +28,8 @@ Before any other work, read `docs/agents/delivery.md` at the consuming repo's ro owned by `delivery-repo-doc`'s `references/format.md`; you need only the Human allowlist: section `## Human allowlist`, one `` - `` `` item per line, never empty. -File missing, first line not `# Delivery`, or the allowlist section missing or empty → go to -**Stop** with the reason, e.g. "`docs/agents/delivery.md` missing". +File missing, first line not `# Delivery`, or the allowlist section missing, empty or `- none` → +go to **Stop** with the reason, e.g. "`docs/agents/delivery.md` missing". ## Step 2 — Read the inbound Handoff comment @@ -59,8 +59,8 @@ Used by every step. Do both, then end the session without further work: 1. Add the `Status/Ready for Human` label to the issue or PR you were pointed at, via `gitea-issues`. 2. Post one comment where `references/handoff-comment.md` §Rules says a stop posts: - **Before the inbound check passed** (Step 1 or Step 2) → a plain comment stating the reason, - not a Handoff comment. The latest real Handoff comment stays the pointer, and nothing - relaunches you: a relaunch must come from that pointer, or the inbound rule is bypassed. + not a Handoff comment, so the inbound rule is never bypassed. A relaunch comes from the latest + real Handoff comment, or from scratch where your row's inbound is Optional. - **After it passed** (Steps 3–4) → a Handoff comment from `references/handoff-comment.md`, filled per its stop row. Open questions states the reason; for a missing skill use the format's wording, "missing skill ``". diff --git a/plugins/delivery/.apm/skills/delivery-handoff/references/gates.md b/plugins/delivery/.apm/skills/delivery-handoff/references/gates.md index d0d3fea..9f89157 100644 --- a/plugins/delivery/.apm/skills/delivery-handoff/references/gates.md +++ b/plugins/delivery/.apm/skills/delivery-handoff/references/gates.md @@ -14,11 +14,16 @@ and PR fields and reviews through `gitea-prs`. Every check reads tracker state o A Handoff comment is a comment whose `##` headings are exactly the six listed in `references/handoff-comment.md` §Rules, in that order. Ignore every other comment: a quote of one, -a plain stop comment, a partial one. Find the latest Handoff comment on the item you were pointed -at: +a plain stop comment, a partial one. Run these in order, stopping at the first that applies: +- Your agent has no row in the table above → stop with "no stage defined for agent ``". - You are `delivery-planner` → stop with "no gate defined for the spec or tickets stage in v1": there is no stage to relaunch into in v1. +- The item you were pointed at is not the kind your row's "Pointed at" column names → stop + with "pointed at an ``, expected an ``". + +Then find the latest Handoff comment, newest by creation time, on that item: + - Its `## Next command` launches your stage's agent → it is your inbound comment. A stop after this check passed posts a Handoff comment relaunching the stopped stage, so its relaunch lands here and runs every gate check in your row again. @@ -49,4 +54,3 @@ comment above. Typical gate-check wordings: - review: "PR title still starts `WIP:`" - verify: "PR not merged"; "no approval from an allowlisted human that is neither stale nor dismissed" -- a stage lead not in the table: "no stage defined for agent ``"