scripts/worktree-feature/: Zod Output Schemas
Ghost doc. Real schema files live in
.worktrees/*/scripts/worktree-feature/components/ (per-worktree); the scripts/worktree-feature/ directory does not exist on main.Discover Schema
Implement Schema
Validate Schema
Review Schema
ReviewFix Schema
Report Schema
Registration
All schemas register in onecreateSmithers call:
tables.discover, tables.review, etc. to access the auto-generated SQLite tables for each stage.
Key Patterns
- Dual export — each file exports the Zod schema and its inferred
type, giving runtime validation and compile-time types from one source. .describe()annotations — Smithers passes these to the LLM as field-level instructions in the structured output schema..nullable()— ensures optional fields are always present in output JSON (e.g.,dependencies,failingSummary).z.enum()— constrains agent output to valid values (severity levels, status codes, quality ratings).- Schema composition —
Ticketdefined once, reused inDiscoverOutput.ticketsand as a prop type throughout the pipeline. - Single registration —
createSmithersauto-generates SQLite tables and accepts an optional second argument fordbPathandjournalMode;tablesprovides typed references to each stage’s table.