Skip to main content

Pipeline Architecture

The pipeline manages issues through a structured lifecycle with feedback loops for quality assurance.

Overview

SCOPE ──▶ BUILD ──▶ REVIEW ──▶ TEST ──▶ DONE
▲ │
└─────────┘
(feedback loops)

For detailed stage documentation, see Pipeline Stages.

Pipeline Data Model

@dataclass
class Pipeline:
id: str
project_id: str
linear_issue_id: str
stage: PipelineStage # scope, build, review, test, done, failed
branch_name: str | None
worktree_path: str | None
pr_url: str | None
scope_result: str | None # JSON ScopeResult
review_result: str | None
test_report: str | None
qa_steps: str | None # JSON QA steps

Stage Transitions

CurrentSignalNext
SCOPEscope-completeBUILD
BUILDbuild-completeREVIEW
REVIEWreview-approvedTEST
REVIEWreview-changes-requestedBUILD
TESTtest-passedDONE
TESTtest-failedREVIEW

PipelineRunner

The PipelineRunner service:

  1. Watches for signal files in worktrees
  2. Detects stage completion signals
  3. Spawns the next agent
  4. Updates Linear state
  5. Handles retries on failure
# Polling interval
POLL_INTERVAL_SECONDS = 5

# Max retries before FAILED
MAX_RETRIES = 3

Linear State Mapping

Pipeline StageLinear State
SCOPEIn Progress
BUILDIn Progress
REVIEWCode Review
TESTQA
DONEDone

Commands

goblin pipeline start ENG-123   # Start pipeline
goblin pipeline status ENG-123 # Check status
goblin pipeline retry ENG-123 # Retry failed
goblin pipeline cancel ENG-123 # Cancel

Next Steps