Default reference pipeline for the code-migration taskKind — code-import → design-extract → token-map → rewrite-plan → patch-edit ↔ build-test devloop → diff-re
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-od-code-migration-33a3a810bd08 ,按照其中的说明把「od-code-migration」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Spec §1 / §10.1 / §20.3 / §21.3.2 / §23.3.3: the canonical
code-migration flow. The pipeline cannot ship an accept decision
without a passing build — the patch-edit ↔ build-test devloop is
the convergence engine.
{
"stages": [
{ "id": "import", "atoms": ["code-import"] },
{ "id": "tokens", "atoms": ["design-extract", "token-map"] },
{ "id": "plan", "atoms": ["rewrite-plan"] },
{
"id": "verify",
"atoms": ["patch-edit", "build-test"],
"repeat": true,
"until": "(build.passing && tests.passing) || iterations>=8"
},
{ "id": "review", "atoms": ["diff-review"] },
{ "id": "handoff", "atoms": ["handoff"] }
]
}
The scenario uses build.passing && tests.passing as the
convergence signal — promoted into the spec §22.4 vocabulary by
the build-test atom.
A plugin built on this scenario typically declares od.inputs:
repoPath (string, required): pulled from od project import.targetStack (form): collected by rewrite-plan.testCommand / buildCommand (string, optional): overrides
the inferred package.json scripts in the build-test atom.