Reform Recipes
Reform Recipes are curated transformation playbooks for REFORM. They turn source repos, packages, search results, and Code Genome evidence into repeatable CODE execution plans instead of one-off prompts.
What Recipes Cover
- Starter transformations: extract a reusable SaaS or AI product starter from an existing app.
- White-label kits: apply brand, package, domain, environment, docs, metadata, and asset plans with attribution guardrails.
- Framework migrations: move React/Vite/Pages Router-style apps into modern target stacks with route and validation proof.
- Dependency replacements: rank risky, stale, vulnerable, or overfit dependencies and stage safer replacements.
- Partner templates: package SDK, API, widget, webhook, badge, and onboarding surfaces for marketplace distribution.
- Code Genome alternatives: turn trust evidence into adopt, reform, replace, or avoid decisions.
Ranking Signals
The marketplace ranking is deterministic. selectReformRecipesForContext() evaluates:
- Source kind: repo, package, search result, or trust network.
- Language, framework, dependency, and file signals from the source snapshot.
- Reform objective and explicitly selected recipe.
- ReformCode Score and Code Genome status, benchmark, and recommendations.
- License availability and attached source files.
- Missing inputs and recipe-specific guardrails.
CODE Handoff Files
REFORM-to-CODE handoffs now include recipe proof files:
/REFORMCODE_RECIPE_PLAN.mdis the reviewer-facing ranked recipe plan./.reformcode/reform-recipes.jsonis the machine-readable recipe marketplace contract for agents, workflows, and future governance memory.- Existing handoff and white-label files remain attached:
/REFORMCODE_HANDOFF.md,/.reformcode/handoff.json,/REFORMCODE_WHITE_LABEL_PLAN.md, and/.reformcode/white-label-plan.json.
User Workflow
- Open REFORM > Recipes.
- Review the ranked marketplace recommendations and recipe categories.
- Choose Open in CODE or Use recipe.
- CODE opens with a selected recipe ID, ranked alternatives, missing inputs, guardrails, workflow stages, validation commands, and proof-file targets.
- Apply edits as reviewable CODE changes, run validation, preserve license/attribution decisions, and export proof.
Developer Notes
The recipe catalog and ranking engine live in lib/reform/recipes.ts.
Use:
getReformRecipeCatalog()to render the marketplace.selectReformRecipesForContext()to rank recipes for a source.createReformRecipeMarketplacePlan()to build the CODE handoff plan.renderReformRecipePlanMarkdown()to generate/REFORMCODE_RECIPE_PLAN.md.getReformRecipePaths()for canonical workspace paths.
Focused coverage lives in __tests__/lib/reform/recipes.test.ts, and handoff integration is covered by __tests__/lib/reform/handoff.test.ts.