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
| Current | Signal | Next |
|---|---|---|
| SCOPE | scope-complete | BUILD |
| BUILD | build-complete | REVIEW |
| REVIEW | review-approved | TEST |
| REVIEW | review-changes-requested | BUILD |
| TEST | test-passed | DONE |
| TEST | test-failed | REVIEW |
PipelineRunner
The PipelineRunner service:
- Watches for signal files in worktrees
- Detects stage completion signals
- Spawns the next agent
- Updates Linear state
- Handles retries on failure
# Polling interval
POLL_INTERVAL_SECONDS = 5
# Max retries before FAILED
MAX_RETRIES = 3
Linear State Mapping
| Pipeline Stage | Linear State |
|---|---|
| SCOPE | In Progress |
| BUILD | In Progress |
| REVIEW | Code Review |
| TEST | QA |
| DONE | Done |
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
- Pipeline Stages - Detailed stage documentation
- Signal Files - Signal file reference
- Storage - Database schema