⨠feat: one comment on the Approvals issue answers a batch
Slice: #99
Builds State #191 of P-40. The owner approved this as athya_mono 0161 S-2 (athya-hq/athya_mono#3357) by labelling Work item athya-hq/athya_mono#3353 approved on 2026-11-08; decisions 1 to 3 of the spec page (version 1). On 2026-11-08 the owner answered 18 asks across 11 Work items one at a time, because neither reader accepted one answer for many issues.
What changes
- Settings (
src/agent.ts): an optional"approvals": Nnames the repository's standing Approvals issue.loadSettingsreturns it asapprovals, and refuses anything but a positive whole number. Onboard keeps the key when it rewrites the settings (it spreads the rest). - New
src/approvals.ts:approvedIn(body)reads the issues a comment approves: every#Non its first line when that line opensDecision: approve, none otherwise.owner/repo#Nand#12adon't count.batchAnswers()keeps the owners' comments approving a number, made after a given time. - Work rules (
src/work.ts): a slice added after approval also passes with a batch answer naming it, made after the slice was last added. A dropped State also passes with one naming the State, made after it was closed. The answers go through the samedecided(), so S-1's edit rule holds. The Approvals issue's comments are read once a check, only when a decision is owed; a 404 answers nothing. Where settings name an Approvals issue, the refusal says how to answer there too. - Needs you (
src/asks.ts): an owner's new comment on the Approvals issue whose first line is a batch takesneeds-owneroff each named issue at once, and says which had none. The hourly sweep counts a batch answer made after an issue's latest agent ask, with the same edit rule. It reads Approvals once a sweep, only for issues their own comments didn't answer. Any otherDecision:behaves as before, on Approvals or elsewhere. - No workflow change: the asks job already starts on an owner comment containing
Decision:, withissues: write. - README (work rules, Needs you, settings) and
docs/decisions.mdrecord it.
Evidence
pnpm check: 1051 tests pass; coverage 99.45% lines, 97.48% branches; approvals.ts 100%. The tests that prove what the slice says you'll see, the spec's 8 Nov example among them:
src/approvals.test.ts, "reads every issue on the first line, and none below it":Decision: approve #2925 ⦠#2814/Not #2748 yetgives the eight, not #2748.src/work.test.ts, "a batch answer on the Approvals issue": passes on the first line; ignores it below the first line, by the agent, before the addition, withoutapprove, or for another repo's number; reads nothing with no Approvals issue set; a missing issue fails nothing; an agent-edited one is refused, an owner-edited one counts.src/work.test.ts, "a dropped state": a batch after the drop passes and one before it doesn't; the Approvals issue is read once for both.src/asks.test.ts, "a batch answer on the Approvals issue": the 8 Nov comment takes the label off all eight at once and leaves #2748; on any other issue it's an ordinary decision. The sweep clears an issue answered after its ask, but not one answered before it, one named below the first line, or one the agent edited; Approvals is read once.
The version isn't bumped here; the release follows in its own PR.
š¤ Generated with Claude Code
Summary by cubic
Lets a single comment on a standing Approvals issue answer many asks at once, instead of the owner answering each ask on its own issue.
A new optional "approvals": N setting names the issue. An owner's comment there whose first line opens Decision: approve approves each #N on that line; lines below it are reasons and approve nothing, and an HTML entity like #12 or #12 is not #12. The work rules count it for an added slice or a dropped State made after the event, reading the Approvals issue only when no request or unedited Decision: on the slice settles the item. The Needs you job takes needs-owner off each named issue at once, and its hourly sweep counts a batch answer only after checking the ask's š, so a failed read of the Approvals issue never blocks a local answer. Batch answers respect the same edit rules and one-read-per-check limits as other decisions; without the setting, behavior is unchanged.