Skip to main content

Worktree Feature: Full Pipeline

The most complex Smithers example: role-specific Codex agents, with sequential Claude fallback, through a full development lifecycle.

Pipeline

  1. Discover: Read PRD, break into ordered independent tickets
  2. Implement: Write code end-to-end per ticket with GPT-5.6 Terra
  3. Validate: Run bun test
  4. Review: GPT-5.6 Sol reviews; Claude only if Codex is unavailable
  5. ReviewFix: Address review issues
  6. Report: Generate final report
Steps 2—5 loop via <Loop> until the Codex-first review seat approves or max iterations are reached. Agent arrays are sequential fallback chains, not parallel reviewers.

Schema Setup: smithers.ts

Schema definitions live in smithers.ts; see Worktree Feature Schemas for the full field list. The file ends with the createSmithers(...) registration call:

Entry Point: workflow.tsx

Agents: agents.ts

The Implement task receives agent={implementAgents}; the review component below receives agent={reviewAgents}.

Validation Loop: ValidationLoop.tsx

Codex-First Review: Review.tsx

Ticket Pipeline: TicketPipeline.tsx

Running

Key Patterns

  • createSmithers registers 6 output schemas; generates typed tables, outputs, and Task components.
  • CodexAgent / ClaudeCodeAgent run real agents with full filesystem access.
  • Role-specific chains route implementation to Terra and review to Sol, falling back to Claude only when Codex is unavailable or fails.
  • <Loop> iterates implement/validate/review/fix until the Codex-first review seat approves or MAX_REVIEW_ROUNDS is exhausted.
  • ctx.latest(schemaKey, nodeId) reads the highest-iteration output for a task.
  • MDX prompts.mdx files serve as JSX-interpolated prompt templates.
  • skipIf skips already-completed tickets on resume.
  • continueOnFail prevents a single review failure from blocking the pipeline.
  • Dynamic ticket mappingunfinishedTickets.map() renders one TicketPipeline per ticket.