Skip to content

The built-in pipelines

Five pipeline files ship in the pipelines/ folder of the Agents repo, and the forge setup puts them in the team’s pipelines repo. Each entry below gives the agent that does the work, where the run happens, the spend cap, how a run starts, and the stages in order. A stage’s name is the word on the run’s page, with _ shown as a space.

Takes a bug report to a reviewed pull request, or to a plan when the fix is large.

  • Agent. fixer, in a box. Spend cap $5.
  • Starts from. A forge issue labeled bug, the pipeline’s webhook, or a person.

The stages run in this order.

  1. triage reads the report with the repo’s other open issues and decides whether it is new, a duplicate, already_fixed or not_a_bug. The last three go to close, which posts the triage summary on the issue and closes it. The run ends as succeeded with Closed without a code change.
  2. reproduce writes an automated test that fails because of the bug, then judges the fix as easy, hard or cannot_reproduce. The last hands off to a person.
  3. confirm runs the test the agent named. The test must fail. If it passes before any fix, the run hands off.
  4. fix changes the code, with at most 3 tries. A failed verify sends the output back to the agent.
  5. verify runs the repo’s whole suite and the new test. Both must pass.
  6. open_pr opens a pull request titled Fix: <report title>, with Fixes #<issue> when the report came from an issue.
  7. shepherd is a gate. Approve goes to merge, which merges the pull request and ends the run as succeeded with Fixed and merged. Reject ends the run as stopped.

For a hard bug, plan replaces steps 3 to 7. The agent writes plan.md in the task folder with the cause, the change, the risks and how to test it. The review_plan gate then approves the plan, which ends the run as succeeded, or rejects it, which ends the run as stopped. No code changes.

Takes a request through three phases, each reviewed by a person.

  • Agent. builder, in a box. Spend cap $10.
  • Starts from. A person or the pipeline’s webhook.
  1. research writes research.md in the task folder. The agent reads the repo and changes nothing.
  2. research_untouched is a check that the repo has no changes and no unpushed commits. If it fails, the run returns to research.
  3. review_research is a gate with Approve research and Send back. Comment on the document’s lines first. A send-back returns to research with the note and the open comments.
  4. plan writes plan.md, and names in data.test_command the command whose passing proves the change.
  5. plan_untouched and review_plan repeat steps 2 and 3 for the plan, with Approve plan and Send back.
  6. implement changes the code to carry out the plan and runs its tests.
  7. verify runs the plan’s test command. A failure returns to implement.
  8. open_pr opens the pull request.
  9. review_change is a gate with Merge and Send back. A send-back returns to implement with the note.
  10. merge merges the pull request and ends the run as succeeded with Researched, planned, built and merged.

research and plan have no allow list, so a command the agent runs there waits for a person to approve it.

Changes another pipeline’s file once and proves the change on past runs. See How coach and improve prove a change.

  • Agent. improver, on its home machine. Spend cap $10.
  • Starts from. A person. Run it on the team’s pipelines repo, and name the pipeline in the title, such as Improve bug-fix.
  1. study reads the named pipeline’s recent runs with the team record’s pipeline_history tool, makes one change to its file, and reports the quotes the change rests on. If the runs give no reason to change anything, the run ends as succeeded.
  2. record keeps the quotes the runner finds in the cited steps. With none, the run ends as stopped.
  3. score pushes the branch and replays past runs with the change and without it. A change that does not score better, or that breaks a rule for changes, ends the run as stopped.
  4. open_pr opens a pull request on the pipelines repo with both scores and the checked quotes.
  5. shepherd is a gate. Approve merges the pull request, and Reject turns the change down.
  6. settle records the decision on every hunk, so a turned-down change is not proposed again on the same evidence. After a merge the run ends as succeeded with Merged. The change is now the current version.

Turns corrections that people keep making to an agent into changes to that agent.

  • Agent. improver, on its home machine. Spend cap $5.
  • Starts from. A person. Name the agent in the title or body, as a whole word, such as Coach fixer.
  1. pick chooses the agent’s sessions with steps nobody has read. If none, the run ends as succeeded with Nothing new to read.
  2. read has a cheap model read each session once and report findings, each quoting one step.
  3. record keeps the quotes the runner finds. A correction needs 2 sessions before it is ready. Until one is, the run ends as succeeded.
  4. write proposes at most 5 hunks, each citing its findings.
  5. propose turns the hunks into a proposal and refuses any that break the rules for changes.
  6. replay replays the turns behind the proposal, with and without the change.
  7. judge has a cheap model decide whether each replay fixed its correction or made another turn worse.
  8. decide scores both versions. A change that does not win ends the run as stopped.
  9. shepherd is a gate where you keep or turn down each hunk, then approve or reject.
  10. settle applies the kept hunks.

Changes a repo that has a policy, under the coding framework.

  • Agent. builder, in a box, with reviewers named reviewer and a verifier named verifier. Spend cap $20, and the repo’s policy can lower it.
  • Starts from. A person or the pipeline’s webhook.

Run a change through a repo policy lists its stages and gates.