Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions benchmarks/runbook_selection/cases/19-from-transcripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -479,3 +479,107 @@ cases:
expect:
required: [daintree.orchestration.watch-outcome]
optional: [daintree.foundation, daintree.orchestration.supervise-fleet]

- id: tx-batch-rounds-agent-query
category: routing-trap
note: >-
Help-assistant session ee668b08, 2026-10-16: the agent's query for a batch run
that merged each round's pull requests before picking the next. A deployment
gap at the time: the served build predated work-in-waves and returned
fan-out-work alone (1.0000), which has no merge between batches. Decided by
work-in-waves' "WAVES (or rounds, or ordered batches) … where the next wave
starts only once the previous wave's pull requests are merged" and its fence
"one batch, or a rolling queue under a cap, with no merge between waves
(daintree.orchestration.fan-out-work)".
messages:
- role: user
content: >-
Work batches of issues in parallel worktrees, merge their pull requests, then
start the next batch
expect:
required: [daintree.orchestration.work-in-waves]
optional: [daintree.foundation]

- id: tx-batch-drain-user-words
category: routing-trap
note: >-
Same session, the user's words with the skill name removed, after one round had
landed: rounds until the backlog is empty, each round's worktrees deleted. The
history carries the merge between rounds that "the batch workflow" names.
Verbatim, bench search put workspace-cleanup first (0.9946) on "delete
worktrees"; here the teardown is a step of the round cycle. Decided by
work-in-waves' "merge them, delete the worktrees and start the next wave" and
"keep going until all the waves are done".
messages:
- role: user
content: >-
Run one batch: pick the ready issues, a worktree and agent for each, merge
their pull requests once they're all done, then clean up
- role: assistant
content: >-
The batch is done: all eight pull requests are merged and the worktrees are
gone.
- role: user
content: >-
Now do the full batch workflow again, but this time drain all available
issues. So keep on going until there are none left. Make sure to delete
worktrees between each batch.
expect:
required: [daintree.orchestration.work-in-waves]
optional: [daintree.foundation]

- id: tx-issues-left-mid-run
category: continuation
note: >-
Same session, mid-run: the user asked which open issues would still be left once
the round in progress landed, and the assistant answered from its own pick
report. The question continues the run. Read alone, the same words selected
check-usage-limits at 0.9975 on "remaining", whose procedure launches an agent
pane to read its plan allowance. Decided by work-in-waves' "keep going until all
the waves are done" (a drain's remaining work is the run's) and check-usage-limits'
fence "which issues or tasks are still left to do
(daintree.workflow.find-issue-work)".
active: [daintree.orchestration.work-in-waves]
messages:
- role: user
content: >-
Drain the ready issues in batches: worktree and agent per issue, merge each
batch's pull requests, delete the worktrees, then pick the next batch
- role: assistant
content: >-
Round 3 is under way: four issues, each with its own worktree and agent, all
working.
- role: user
content: which 2 issues will be remaining by the time you're done with this batch?
expect:
required: [daintree.orchestration.work-in-waves]
optional: [daintree.foundation, daintree.workflow.find-issue-work]

- id: tx-issues-left-after-batch-not-usage
category: routing-trap
note: >-
Same words read alone, as a search query would arrive with no run in context: a
tracker read of open issues, less those in flight. check-usage-limits took it at
0.9975 on "remaining". Decided by find-issue-work's "check whether an issue is
already being worked" and check-usage-limits' fence "which issues or tasks are
still left to do (daintree.workflow.find-issue-work)"; status-and-resume's "what
is still open" is allowed beside it.
messages:
- role: user
content: which 2 issues will be remaining by the time you're done with this batch?
expect:
required: [daintree.workflow.find-issue-work]
optional: [daintree.foundation, daintree.orchestration.status-and-resume]

- id: tx-own-chat-history-file
category: no-task
note: >-
Same session: the user asked for the assistant's own session transcript, which
it found on disk. No catalog workflow covers locating an existing transcript;
curate-copytree-bundle ranked first unselected (0.8946), but it curates project
context into a bundle.
messages:
- role: user
content: And can you please give me your chat history file?
expect:
required: []
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: daintree.agents.check-usage-limits
title: Check how much usage an agent has left
summary: Read an agent CLI's own account-usage view — remaining session, five-hour and weekly allowance, premium requests or credits, and when each resets — with the command that only reads, and report what is left and where each figure came from.
whenToUse: 'Use when the user wants to know how much of an AI agent CLI''s plan allowance is LEFT — usage limits, rate limits, quota, premium requests, credits, how close they are to a weekly or five-hour cap, when an agent''s usage resets, or how to check usage in a given agent CLI — for Claude Code, Codex, Grok, Antigravity, Gemini, Copilot, Kimi or any other configured agent, one agent or several, and for a follow-up asking the same about another agent. The deliverable is the account figures read off the agent''s own usage screen, never an answer the agent composes, so the work is running a read-only command inside the agent rather than giving it a task. Do not use for the allowance on other machines a hub reaches through their assistants (daintree.hosts.check-usage-limits), to put a question about code or the project to an agent (daintree.agents.ask-and-relay), to start agents on work in parallel (daintree.orchestration.fan-out-work), to be told later when something finishes (daintree.orchestration.watch-outcome), for Daintree''s own sign-in or health (daintree.diagnostics), to move a task off an agent that has hit its limit (daintree.agents.hand-off-task), to choose which model or reasoning effort an agent launches with, even to save budget (daintree.edits.spawn-visible-agent), or to run any other of the agent''s own slash commands (daintree.agents.run-agent-command).'
whenToUse: 'Use when the user wants to know how much of an AI agent CLI''s plan allowance is LEFT — usage limits, rate limits, quota, premium requests, credits, how close they are to a weekly or five-hour cap, when an agent''s usage resets, or how to check usage in a given agent CLI — for Claude Code, Codex, Grok, Antigravity, Gemini, Copilot, Kimi or any other configured agent, one agent or several, and for a follow-up asking the same about another agent. The deliverable is the account figures read off the agent''s own usage screen, never an answer the agent composes, so the work is running a read-only command inside the agent rather than giving it a task. Do not use for the allowance on other machines a hub reaches through their assistants (daintree.hosts.check-usage-limits), to put a question about code or the project to an agent (daintree.agents.ask-and-relay), to start agents on work in parallel (daintree.orchestration.fan-out-work), to be told later when something finishes (daintree.orchestration.watch-outcome), for Daintree''s own sign-in or health (daintree.diagnostics), to move a task off an agent that has hit its limit (daintree.agents.hand-off-task), to say which issues or tasks are still left to do (daintree.workflow.find-issue-work), to choose which model or reasoning effort an agent launches with, even to save budget (daintree.edits.spawn-visible-agent), or to run any other of the agent''s own slash commands (daintree.agents.run-agent-command).'
risk: terminal
requiredTools:
- agent.listAvailable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ requiredTools:
optionalTools:
- terminal.list
- terminal.getStatus
- terminal.notifyWhenIdle
- workflow.startWorkOnIssue
- forge.listIssues
- forge.getIssue
Expand All @@ -21,7 +22,7 @@ optionalTools:
- terminal.closeMany
- worktree.deleteOwned
---
The queue advances only on notices; an API-key client has none, so refilling needs the user: say so first. A pane holds at most 32 pending notices, so never run a cohort beyond that. There is no watchdog for stalled units.
The queue advances only on notices (an API-key client has none: say refilling needs the user). A pane holds at most 32 pending notices, so never run a cohort beyond that. There is no watchdog for stalled units.

Procedure:
1. The set. Skip work already in flight (`worktree.list` `issueNumber`, `prNumber`). Read the issues, or split the goal into units with a checkable acceptance each. A set you derived or extended needs the user's yes.
Expand All @@ -30,20 +31,20 @@ Procedure:
4. Resolve every unit's first prompt before any mutation: a named command or skill is looked up for that agent in the unit's worktree and sent unchanged. No match, several, or missing arguments blocks that unit with zero submissions.
5. Checkpoint (this run is long). Per unit: label, owned files, brief, acceptance, command chain, worktree, `requestedId`, terminal id, step, status (`pending`, `setting-up`, `dispatching`, `running`, `blocked`, `done`, `failed`, `uncertain`) and whether it holds a slot. Save `dispatching` before each launch or send.
6. Setup gate per unit: create, wait until ready, then launch. `worktree.createWithRecipe` with a new branch, no `recipeId` (one the user named: daintree.recipe.run-or-create), `collisionPolicy:"error"`; one agent per worktree. Only `setupState:"ready"` admits a launch. A setup failure stops before launch and fails that unit; `needs-approval` waits for the user. `timedOut` leaves it `setting-up`: setup sends no notice, so with nothing running say the queue needs the user. Reconcile a lost create with `worktree.list`. `workflow.startWorkOnIssue` only when asked and the unit has no named commands: it skips this gate and may submit its own task, so read its terminal before sending.
7. Launch every admitted unit this turn with `notify:true, handback:true` and a fresh `requestedId`, then end it. The brief adds owned files, "change nothing outside this scope", what to commit or open, and a report of at most about 30 lines.
7. Launch every admitted unit this turn with `notify:true` and a fresh `requestedId`, then end it; `handback:true` only on your own brief (on a command it joins the arguments). The brief adds owned files, "change nothing outside this scope", what to commit or open, and a report of at most about 30 lines.

On notice or resume:
1. Map each terminal to its unit by the checkpoint; one not there is not this queue's.
2. Verify the step in that unit's worktree path (diff, commits, tests), then advance that unit only: its next command is one send with `notify:true, handback:true`, never several at once.
2. Verify the step in that unit's worktree path (diff, commits, tests), then advance that unit only: its next command is one send with `notify:true`, never several at once. Stopped short of its finish: recheck paced to the work; re-arm `terminal.notifyWhenIdle` once it works.

```json tool=terminal.sendCommandOwned
{"terminalId":"<unit terminal id>","command":"<next resolved command>","notify":true,"handback":true}
{"terminalId":"<unit terminal id>","command":"<next resolved command>","notify":true}
```

Idle, a question, a failed command or an unconfirmed submission never unlocks the next command. A failed unit stops only its own chain.
3. Release and refill. A slot frees when the unit's last step is verified, or it is failed or blocked and no longer working. A detected PR is not a finished agent: a working agent keeps its slot. A blocked unit re-reserves a slot before it is answered. An uncertain launch keeps its slot until reconciled by `requestedId`. Refill through the gate only on these transitions. Save after each.
4. Teardown the user asked for per unit ("then delete its worktree") waits for their condition, not a merge unless they said so. Once verified (branch pushed, tree clean), close the unit's panel in its own call (`terminal.closeMany`, confirmed by `closedIds`), never through `closeTerminals`, then `worktree.deleteOwned`, which keeps the branch. Each delete waits on the user's confirmation in Daintree. On `CONFIRMATION_TIMEOUT` mark it `delete pending`, say so once, and retry one at a time only when the user says they are there; it holds no slot unless the user made deletion the condition for the next launch. `USER_REJECTED` keeps it. Count deleted, pending and kept from the checkpoint, checked against a fresh `worktree.list`.
4. Teardown the user asked for per unit ("then delete its worktree") waits for their condition, not a merge unless they said so. Once verified (branch pushed, tree clean), close the unit's panel in its own call (`terminal.closeMany`, confirmed by `closedIds`), never through `closeTerminals`, then `worktree.deleteOwned`, which keeps the branch. Each delete waits on the user's confirmation in Daintree. On `CONFIRMATION_TIMEOUT` mark it `delete pending`, say so once, and retry one at a time only when the user says they are there; it holds no slot unless the user made deletion the condition for the next launch. `USER_REJECTED` keeps it. Count deleted, pending and kept by a fresh `worktree.list`.

Stop and recovery: one corrective prompt per unit unless the user set another bound. A `working` unit with an old `lastOutputChangeAt` is reported possibly stalled and keeps its slot; recovering it (daintree.agents.recover-agent) needs the user. A late lockfile collision holds the later unit. Never relaunch to repair tracking. Integrating branches is a separate serialized step verified on the combined tree (daintree.git.integrate-agent-branches). On cancellation launch nothing more; closing is daintree.orchestration.workspace-cleanup.
Stop and recovery: one corrective prompt per unit unless the user set another bound. A `working` unit with an old `lastOutputChangeAt` is reported possibly stalled and keeps its slot; recovering it (daintree.agents.recover-agent) needs the user. A late lockfile collision holds the later unit. Never relaunch to repair tracking. Integrating branches is daintree.git.integrate-agent-branches. On cancellation launch nothing more; closing is daintree.orchestration.workspace-cleanup.

Report back: the gate's verdict; per unit its label, worktree and branch, terminal id, step, status and evidence; N of M done; what is running or pending and what will wake the queue.
Loading
Loading