Let workflows merge or discard their own tasks

This commit is contained in:
Ian Gulliver
2026-10-22 16:46:57 -07:00
parent b2cb15dd2a
commit efa1513568
13 changed files with 489 additions and 398 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# Workflow definitions
A workflow's definition is an object: an optional `description`, then `steps`, which run in order. The workflow's name is not in it. `save_workflow` takes it as its `definition` argument and `read_workflow` returns it, both as JSON. Unknown fields are refused.
A workflow's definition is an object: an optional `description`, optional `auto_merge` and `auto_discard` booleans, then `steps`, which run in order. With `auto_merge`, when a stage task of a run calls `ready_for_merge`, byre merges it right away as the creator of the run, pressing the button the agent picked (`complete` or `continue`); with `auto_discard`, byre discards a stage task that calls `suggest_discard`. Without them the human decides, as for any task. The workflow's name is not in it. `save_workflow` takes it as its `definition` argument and `read_workflow` returns it, both as JSON. Unknown fields are refused.
Any workflow can run on a brief, each stage as its own task, and any workflow whose stages are single agents can be a project's review workflow (set with `set_review_workflow`), which reviews its tasks' snapshots: each stage is then one reviewer agent on its `model`, given the task's change and its stage's `prompt` (what to look for), and a stage after others also gets their reviews. A project can't review with a workflow that has a team stage (`agents`).