Sources: Alex Bit (Codemod CEO) on LinkedIn, resharing Dev Agrawal's announcement; Dev Agrawal, "Your migration workflow is a program, so we made it one", codemod.com blog, 2026-11-18. Vendor content: the product is Codemod's own, and the release is an alpha.
The claim in one paragraph
In large code migrations the rewrite rules are rarely the hard part. The hard part is deciding when to run them: whether a project needs the migration at all, which files each group of rules should touch, and when to stop and ask before rewriting. Codemod's Workflow v2 makes those decisions part of the workflow by making the workflow a TypeScript program (workflow.ts) instead of YAML plus a launcher script. The pitch is aimed at agent-driven migrations: agents can already write transforms, and what they need is a workflow engine that can gate, scope and resume them reliably.
What changed, using their worked example
The example is a Solid 1.9 to Solid 2 migration assistant: 44 read-only analysis rules and 9 rewrites, run against Tasks.md, an open-source Solid task board.
| Concern | Before (v1) | After (v2) |
|---|---|---|
| Where the logic lives | 953 lines across two YAML files, plus a Node launcher that read dependencies | Dependency checks and rule selection in workflow.ts |
| Should this run at all | Launcher reported dependency issues before calling the workflow | Workflow skips projects that don't depend on solid-js and stops on ones already on Solid 2 |
| Which files | Every rule ran on the same file set | Each stage picks its own files; on Tasks.md the store rules ran on 1 of 20 source files and the router rules on 2 |
| When to ask | Outside the workflow | Migrate mode pauses for approval when a dependency has no known Solid 2 release; analyze mode only reports and never edits |
The post is candid that YAML already supported conditions, approvals and file selectors. The change is where the decisions live: next to the steps, in a language that can compute them from earlier results.
Architecture worth noting
Two modes, one gate. Analyze runs the read-only rules and reports findings. Migrate skips analysis and applies rewrites, but only after an approval gate when a dependency blocker exists. Keeping the approval gate inside migrate mode means a dry analysis never asks a human anything.
Deterministic resume. On resume the workflow re-runs its decision logic but reuses saved results from matching, completed steps. A run paused for approval does not repeat the dependency check or file scan. This is durable-execution memoization applied to codemods, with the usual requirement that step identity be stable across runs.
Transforms return data instead of writing shared state. A read-only transform can
return { edit: null, data: findings }; the step exposes{ file, data }entries inresult.data, and the workflow merges or deduplicates without a shared lock. This removes a concurrency hazard of the older shared-store pattern.Backward compatibility by in-memory translation. v2 still runs
workflow.yaml, translating it in memory, including${{ state.* }}references. Acodemod workflow upgrade --dry-runpreviews the TypeScript conversion and--keep-yamlwritesworkflow.tsbeside the original.
Tradeoffs
Programs over config. TypeScript gives conditional logic, data flow between stages and testability, at the cost of a workflow that is now code to review, version and debug. A YAML file is easier for a reviewer to audit at a glance; a program can hide decisions in helper functions.
When not to port. The post's own guidance: a single import rename stays a standalone transform, and a YAML workflow that runs a fixed rule set and works should stay YAML. Port only when results of one step decide what the next step does.
Resume correctness depends on determinism. Re-running decision code on resume is only safe if that code is deterministic given the cached step results. Any decision reading the clock, the network or a mutable registry can diverge between the first run and the resume.
Agent fit. Making the control flow code, and the transforms the units an agent writes, is the same split that "workflows over agents" designs recommend: code owns ordering and gates, the model produces bounded artifacts.
Failure modes to expect
Silent findings drift. The post warns that when you switch an analyzer from the shared store to returned data, a matching source diff does not prove the findings match. Compare reports, not just diffs.
Conversion drift. The YAML-to-TypeScript upgrade is mechanical; transforms that call the old shared-state API need checking against the migration guide on the exact CLI version you will run.
Over-narrow file selection. Per-stage file scoping (1 of 20 files) is a speedup and a risk: a scan heuristic that misses an import pattern silently exempts files from a rule.
Approval fatigue. A gate triggered by any dependency without a known Solid 2 release could fire on most real projects; the useful signal depends on how good the known-release data is.
Alpha status. APIs and resume semantics may change; pin the CLI version in CI.
Review checklist for a v2 migration workflow
Is there a reason this is a program and not a standalone transform or YAML (does a step's result change what runs next)?
Is decision code deterministic given cached step results, so resume reproduces the same plan?
Are analyze and migrate modes separated, with rewrites possible only in migrate mode?
Does every approval gate state what blocked it and what will change after approval?
Is per-stage file selection tested against files that should and should not match?
When porting, were the v1 and v2 runs compared on the same starting revision, both the source diff and the findings report?
Is the CLI version pinned and the shared-state API usage checked against the migration guide?
Related entries
R079: code or the model owns control flow; pipelines are workflows, not agent patterns.
R124: a multi-session agent port gated on recorded behavior, with claimed units and checkpoints.
R035: durable execution for long-horizon agents, the general form of resume-from-completed-steps.