docs: add agent-executable v1→v2 migration guide#116
Merged
Conversation
MIGRATION.md walks an AI agent (or a careful human) through every breaking change accumulated in v2.x — currently spread across `v2.0.0-alpha.0` to `v2.0.0-alpha.17` — as a top-to-bottom sequence of self-contained transformations. Structure follows the AI SDK 5 migration-guide conventions: each section labels the breaking change, shows before/after blocks with no intervening prose, and gives explicit find/replace targets. Removals always pair with an alternative. A final checklist gives an agent's planner a concrete TODO sequence. Sections cover compiler-constant → curried factory, `compilers:` array → callback, `createCompileHooks` curry, `afterSerialize`/`beforeSerialize` → `manipulateDOM` transform, lib.dom → linkedom DOM types, removed `host`/`url` options, generic `<M extends MetaData>`, removed `kamado/features` module, the `filter` family of renames, `PrettierOptions.parseError` → pipeline `formatOptions.parseError`, `kamado/files` re-export shape, additive features that need no migration, verification commands, and rollback notes.
… MIGRATION.md Every section that introduces a non-obvious shape change now carries a short "Why" paragraph: an agent following the recipe top-to-bottom no longer has to guess whether `createPageCompiler()(opts)` is a typo, why the v1 DOM hook slots disappeared, or why URL resolution moved into a helper. The intent is to head off "is this really right?" questions mid-migration without inflating the recipe with prose. Sections touched: 2 (curry rationale + future-unwind note), 4 (cross- reference to 2), 5 (composable transform pipeline), 6 (linkedom benchmarks + spec-noncompliance caveat), 7 (URL reflection trade-off and security side effect), 8 (curry-vs-generic linkage), 9 (already- deprecated module finally removed), 10 (filter ambiguity, mutation separated from filtering), 11 (uniform per-transform error policy).
The guide is the document v1 users will read once v2.0.0 ships, so internal sequencing — which alpha number introduced what, "pin because alpha", `npm view dist-tags` discovery — is noise. Simplify section 1 to a `^2.0.0` range and remove the alpha caveat at the top and the "(alpha.16)" tag from section 11.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MIGRATION.mdを新規追加。v1 から v2.x(現状 alpha 系列で累積された breaking change)への移行を、AI エージェントがそのまま実行できる「mechanical recipe」として整理。Structure
AI SDK 5 の migration guide の構造を参考に、エージェント実行に最適化:
Coverage (15 セクション)
pageCompiler→createPageCompiler())Test plan
Notes
🤖 Generated with Claude Code