Skip to content
Agent Workflows

/next

Select one eligible item and return its identity and destination.

The agent-planned label or tag marks work whose approved plan is available on its item. Eligible work is waiting to start, or is in review without agent-inspected. /next selects the least recently modified eligible item from the configured provider’s first returned page. Equal timestamps retain provider order. Each adapter maps provider statuses to that shared rule using the selection response.

After human findings, remove agent-inspected to make a review item eligible again. It keeps its plan and request. Updating it gives older eligible work a turn in subsequent selections.

Invoke it as /next or $next, or let the Kestra work workflow call it through the bridge. It needs no item reference.

How /next selects

01 · ConfigureResolve item providerRead the Linear or ClickUp selection from agent-workflows.yaml.
02 · SelectQuery onceMap provider statuses to the shared eligibility rule and choose the oldest eligible update.
03 · ReturnReturn itemReturn the item name, ID, URL, and destination, or report that no item matched.

What /next does

1FilterBoth providers filter for agent-planned work. Status names are matched case-insensitively: Backlog or Todo for Linear, Open for ClickUp. For other names, the agent interprets whether their meaning is open or waiting to start, including localized names such as ouvert, without a fixed synonym list. Review items qualify only without agent-inspected. Work in progress, terminal, missing, and ambiguous states are skipped. Selection uses last-modified timestamps within the first page, even when more pages exist; provider order breaks ties.
2ReturnA found item returns only {"name":"…","id":"…","url":"…","list":"…"}. list is the Linear project name or ClickUp list name. No match returns {"status":"no eligible item"}; a missing destination, provider failure, incomplete candidate labels, or invalid eligible timestamp is an error.
3StopSelection ends without reading another item, creating a plan, changing the ticket, or starting delivery. Use /work to start delivery for the selected item.