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 Luna
  3. Validate: Run bun test
  4. Review: Review with GPT-5.6 Sol; use 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 are 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; Codex is ordered first and Claude is fallback-only.
  • Role-specific chains route implementation to Luna and review to Sol, then advance 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 prompt templates with JSX interpolation.
  • 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.