scripts/worktree-feature/ — Full Pipeline
Ghost doc — This is a real production workflow found at
scripts/worktree-feature/ in the Smithers repository. It is the most complex Smithers workflow example, orchestrating multiple CLI agents (Claude Code and OpenAI Codex) through a full software development lifecycle.Overview
This workflow automates a complete feature implementation pipeline:- Discover — An agent reads a PRD and breaks it into ordered, independent tickets
- Implement — For each ticket, an agent writes code end-to-end
- Validate — An agent runs
bun testto verify the implementation - Review — Two agents (Claude + Codex) review the code in parallel
- ReviewFix — An agent addresses review issues
- Report — An agent generates a final report
<Loop> until both reviewers approve or max iterations are reached.
Schema Setup — smithers.ts
Entry Point — workflow.tsx
Agent Configuration — agents.ts
The Validation Loop — ValidationLoop.tsx
Parallel Review — Review.tsx
Ticket Pipeline — TicketPipeline.tsx
Running
What This Demonstrates
createSmithers— Registers 6 output schemas in one call, generating typedtables,outputs, andTaskcomponents.- CLI agent integration —
ClaudeCodeAgentandCodexAgentrun real CLI tools (Claude Code, OpenAI Codex) with full filesystem access. <Loop>review loop — Iterates implement/validate/review/fix until both reviewers approve orMAX_REVIEW_ROUNDS(3) is exhausted.<Parallel>dual review — Two agents review the same code simultaneously; both must approve.ctx.latest(schemaKey, nodeId)— Reads the highest-iteration output for a given task. The first argument is the schema key fromcreateSmithers, the second is theTaskid.- MDX prompts — Each component uses
.mdxfiles for prompt templates with JSX interpolation. skipIfpattern —TicketPipelineskips already-completed tickets on resume.continueOnFail— Reviews continue even if one agent fails, preventing a single failure from blocking the pipeline.- Dynamic ticket mapping —
unfinishedTickets.map()dynamically renders oneTicketPipelineper ticket.