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
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-11-23 17:39:10 +00:00
1 parent d4226e152b
commit 5a4e4c0674
3 files changed
+13 -8

No files matched your search

+2 -1
View File
@@ -137,7 +137,8 @@ _Avoid_: specialist agent (implies a tool specialist), worker, persona
**Handoff comment**: **Handoff comment**:
The fixed-shape tracker comment that ends every **Stage** — decisions, rejected options, evidence, 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 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 _Avoid_: summary, status update
**Step mode**: **Step mode**:
@@ -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 owned by `delivery-repo-doc`'s `references/format.md`; you need only the Human allowlist: section
`## Human allowlist`, one `` - `<user>` `` item per line, never empty. `## Human allowlist`, one `` - `<user>` `` item per line, never empty.
File missing, first line not `# Delivery`, or the allowlist section missing or empty → go to File missing, first line not `# Delivery`, or the allowlist section missing, empty or `- none` →
**Stop** with the reason, e.g. "`docs/agents/delivery.md` missing". go to **Stop** with the reason, e.g. "`docs/agents/delivery.md` missing".
## Step 2 — Read the inbound Handoff comment ## 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`. 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: 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, - **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 not a Handoff comment, so the inbound rule is never bypassed. A relaunch comes from the latest
relaunches you: a relaunch must come from that pointer, or the inbound rule is bypassed. 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`, - **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 filled per its stop row. Open questions states the reason; for a missing skill use the
format's wording, "missing skill `<name>`". format's wording, "missing skill `<name>`".
@@ -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 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, `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 a plain stop comment, a partial one. Run these in order, stopping at the first that applies:
at:
- Your agent has no row in the table above → stop with "no stage defined for agent `<name>`".
- You are `delivery-planner` → stop with "no gate defined for the spec or tickets stage in v1": - 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. 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 `<issue|PR>`, expected an `<issue|PR>`".
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 - 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 check passed posts a Handoff comment relaunching the stopped stage, so its relaunch lands here and
runs every gate check in your row again. runs every gate check in your row again.
@@ -49,4 +54,3 @@ comment above. Typical gate-check wordings:
- review: "PR title still starts `WIP:`" - review: "PR title still starts `WIP:`"
- verify: "PR not merged"; "no approval from an allowlisted human that is neither stale nor - verify: "PR not merged"; "no approval from an allowlisted human that is neither stale nor
dismissed" dismissed"
- a stage lead not in the table: "no stage defined for agent `<name>`"