Files
byre/internal/agents/kb/workflow-files.md
T

2.3 KiB

The YAML format of a workflow's file, which read_workflow returns and save_workflow takes: stages, after, base, model and teams.

Workflow files

A workflow's file is YAML: an optional description, then stages. The workflow's name is not in the file. Unknown fields are refused.

Field Meaning
name One line, unique in the workflow.
after The names of the stages whose outputs it gets; it starts once all of them have finished. Absent means the previous stage in the list, and for the first stage none, so a file without after is a chain. [] means it starts from the brief.
base parent, the default: branch from the commit its one after stage finished at, or for a stage with none, from where the workflow was started. main: branch from the default branch. Refused on a stage with more than one after stage, which always branches from the default branch and is told the branches it can merge.
model Also picks the vendor: gpt-* models run on Codex, gemini-* models on Antigravity, every other model on Claude Code.
prompt The stage agent's instructions.
agents In place of model: a list of at least two, each with name, model and prompt, that runs the stage as a team. They work in the stage's one task and worktree and talk through a shared board; each gets the stage's prompt and then its own, and the first agent finishes the stage.

Every stage runs as its own task. Exactly one stage is final (no other stage comes after it), and cycles are refused.

description: Build a change, review and test it in parallel, then fix what they found.
stages:
  - name: Build
    model: claude-opus-5-5
    prompt: Implement the brief.
  - name: Review
    after: [Build]
    model: gpt-6.1-sol
    prompt: Review the Build stage's work and list the problems.
  - name: Test
    after: [Build]
    model: gemini-4-argon-high
    prompt: Exercise the change and report what fails.
  - name: Fix
    after: [Review, Test]
    agents:
      - name: fixer
        model: claude-opus-5-5
        prompt: Fix every problem the reports list.
      - name: checker
        model: gpt-6.1-sol
        prompt: Check each fix as the fixer lands it.
    prompt: Merge the branches you are given and address both reports.