Skip to content

Ticket to reviewed pull request

Implements a ticket in an isolated sandbox until the tests pass, has three reviewer agents inspect the change, opens a pull request, fixes CI failures from the logs, and then waits for a person to merge. What it learned is stored for the next run on the same repository.

Template ticket-to-merge
Works on A git repository, cloned into an isolated Docker sandbox
Where a person acts Merge the pull request — a person merges on GitHub, waiting up to 7d
Waits on systems CI result, up to 4h

Drawn from the template spec at build time. Bookkeeping nodes that only record status are left out; amber nodes are where a person acts.

flowchart TD
  n_gatherTicket["Gather ticket"]
  n_validate["Validate"]
  n_checkActionable{"Check actionable?"}
  n_terminateNotActionable(["Failed<br/><small>not actionable</small>"])
  n_implement["Implement"]
  n_review["Review"]
  n_checkApproval{"Check approval?"}
  n_openPR["Open PR"]
  n_checkReviewLimit{"Check review limit?"}
  n_loadCiWaitConfig["Load CI wait config"]
  n_lessonReviewFailed["Lesson review failed"]
  n_reviewFix["Review fix"]
  n_routeCiWait{"Route CI wait?"}
  n_terminateReviewFailed(["Failed<br/><small>review failed</small>"])
  n_pollForCI["Poll for CI"]
  n_waitForCI[/"Wait for CI<br/><small>waits up to 4h: CI result</small>"/]
  n_checkCI{"Check CI?"}
  n_terminateCITimedOut(["Timed out<br/><small>ci timed out</small>"])
  n_waitForHumanMerge[/"Wait for human merge<br/><small>waits up to 7d: A person merges the pull request</small>"/]
  n_checkCILimit{"Check CI limit?"}
  n_commitLesson["Commit lesson"]
  n_lessonMergeTimedOut["Lesson merge timed out"]
  n_lessonCIFailed["Lesson CI failed"]
  n_fetchLogs["Fetch logs"]
  n_done(["Done"])
  n_terminateMergeTimedOut(["Timed out<br/><small>merge timed out</small>"])
  n_terminateCIFailed(["Failed<br/><small>ci failed</small>"])
  n_ciFix["CI fix"]
  n_gatherTicket --> n_validate
  n_validate --> n_checkActionable
  n_checkActionable -->|"yes"| n_terminateNotActionable
  n_checkActionable -->|"no"| n_implement
  n_implement --> n_review
  n_review --> n_checkApproval
  n_checkApproval -->|"yes"| n_openPR
  n_checkApproval -->|"no"| n_checkReviewLimit
  n_openPR --> n_loadCiWaitConfig
  n_checkReviewLimit -->|"yes"| n_lessonReviewFailed
  n_checkReviewLimit -->|"no"| n_reviewFix
  n_loadCiWaitConfig --> n_routeCiWait
  n_lessonReviewFailed --> n_terminateReviewFailed
  n_reviewFix --> n_review
  n_routeCiWait -->|"yes"| n_pollForCI
  n_routeCiWait -->|"no"| n_waitForCI
  n_pollForCI --> n_checkCI
  n_waitForCI -->|"received"| n_checkCI
  n_waitForCI -->|"timed out"| n_terminateCITimedOut
  n_checkCI -->|"yes"| n_waitForHumanMerge
  n_checkCI -->|"no"| n_checkCILimit
  n_waitForHumanMerge -->|"received"| n_commitLesson
  n_waitForHumanMerge -->|"timed out"| n_lessonMergeTimedOut
  n_checkCILimit -->|"yes"| n_lessonCIFailed
  n_checkCILimit -->|"no"| n_fetchLogs
  n_commitLesson --> n_done
  n_lessonMergeTimedOut --> n_terminateMergeTimedOut
  n_lessonCIFailed --> n_terminateCIFailed
  n_fetchLogs --> n_ciFix
  n_ciFix --> n_review
  class n_waitForHumanMerge gate
  class n_waitForCI wait

This is the default template and the flow the platform is built around: the engineering path is the one with a complete, exercised end-to-end route. See product overview §8.

Every built-in template is seeded into the workflow library and can be cloned, edited on the visual canvas, and versioned — see architecture for the node types. The spec lives in packages/shared/src/workflow/templates/ticketToMerge.ts.

© 2026 Jorge Barnaby

Source-available under FSL-1.1-MIT

Source on GitHub

Built with Astro and Starlight