Skip to content

feat: recipe architecture redesign — UserInput + prepTemplate + runTemplate#87

Merged
aaronbrezel merged 13 commits intodevelopfrom
feature/recipe-architecture-redesign
Apr 15, 2026
Merged

feat: recipe architecture redesign — UserInput + prepTemplate + runTemplate#87
aaronbrezel merged 13 commits intodevelopfrom
feature/recipe-architecture-redesign

Conversation

@aaronbrezel
Copy link
Copy Markdown
Member

Summary

  • Replaces the tri-purpose ColumnDef model with three focused structures: UserInput[] (journalist-facing form), prepTemplate: PrepColSpec[] (spreadsheet prep), and runTemplate: Partial<RunConfig> (AI run config)
  • RecipePanel now renders only inputs[] — no column section cards, no lockable fields per column — and collects inputValues by id before calling prepRecipe
  • Adds interpolateTemplate() utility to utils.ts for {{inputId}} placeholder substitution in the new template ColStrategy variant; server prepRecipe() resolves list-drive-folder via inputId and handles the new template strategy
  • UserInput.id must be camelCase/underscore (no hyphens) — documented in JSDoc; runTemplate is a plain Partial<RunConfig> so recipe authors work with types already familiar from the rest of the system

Test Plan

  • 426 tests passing, all per-file coverage thresholds met (npm run test:coverage)
  • Typecheck clean on both server + client tsconfigs (npm run typecheck)
  • Build clean (npm run build)
  • Manually: open sidebar, navigate to Recipes, open Document Summarization, paste a Drive folder URL, click Prep, verify columns are written to sheet, click Cook, verify ConfigureAIRunPanel is pre-populated with correct columns and row range

Design doc

docs/plans/2026-04-14-recipe-architecture-redesign.md

🤖 Generated with Claude Code

aaronbrezel and others added 13 commits April 15, 2026 09:14
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…trategy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on and PrepRecipeParams shapes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…runTemplate

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consistent naming across all layers: the discriminated union is now
FillStrategy (it describes how a column gets filled at prep time) and
the field on PrepColSpec is fillStrategy. No behaviour change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each PrepColSpec now carries an optional role (file-prompt, text-prompt,
system-prompt, output). RecipePanel builds the column-referencing parts of
RunConfig via buildRunTemplate() instead of reading a manually-written
runTemplate. Non-column AI settings move to RecipeDefinition.settings.

RecipeDefinition.runTemplate removed — column titles now exist in exactly
one place.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ColumnRole had no payload on any variant — the object wrapper was
unnecessary ceremony. Now a plain string union.

RecipeSettings is now Pick<RunConfig, ...> so it tracks RunConfig
automatically instead of duplicating field declarations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PrepColSpec (shared RPC type) no longer carries role — the server never
reads it. RecipeColumn extends PrepColSpec client-side and adds role,
keeping ColumnRole out of the RPC boundary.

UserInput renamed to RecipeInput to make its scope explicit — it's
a recipe-specific concept, not a generic form primitive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aaronbrezel aaronbrezel merged commit 88e2fdf into develop Apr 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant