Code migration file by file
The agent converts files one at a time to a new language version or framework, compiles and tests each and fixes errors. It opens staged pull requests, with tests in place first to catch behaviour changes. You review each batch.
What the agent does
- 1
List the files.
- 2
Convert them one by one.
- 3
Compile and test.
- 4
Fix errors.
- 5
Open staged pull requests. → developer reviews each batch
Enough to decide?
Similar setup documented- Required input
- No example input written yet
- Example output
- No example output written yet
- Stop condition
- silent behaviour change; tests first
- Reviewer
- Reviewer to be named · About this entry
- Last run
- Not run by us yet
What it costs to run
A rough range per run, from the cheapest to the dearest of the paid models we checked. Your real cost depends on how much text you send.
Checked 2026-11-25 source
$0.001 to $0.30 per run · $0.015 per run with a mid-priced model
- Small, cheap model
- $0.001 per runPer 100 runs: $0.11
- Typical
- $0.015 per runPer 100 runs: $1.50
- Large model
- $0.30 per runPer 100 runs: $30.40
Free tiers and local models can bring this to zero while you test.
How we worked this out
- 5 model calls, one per step (at least 2)
- 2,000 input tokens per call
- 800 output tokens per call
- each call re-reads the earlier outputs
- no retries, no loops, no cached-input discount
- Longer inputs cost more; agents that retry or loop use more calls.
- Free tiers may cover small volumes: see free AI tokens.
- Local models have no per-token price but need your own hardware.
Works with
Tags
Before you start
- Access the agent needs
- code-repo
- Who approves
- developer reviews each batch
- What to log
- every action it proposes and the decision taken
- When to stop
- silent behaviour change; tests first
Why it is worth it
Migrations stall because they are big and boring. File by file, with tests first, they become a steady background job.
Start this week
- Add tests around the module before touching it.
- Let the agent convert a few files at a time and open staged pull requests.
- Review each batch before the next.
Watch out for
Silent behaviour changes are the danger. Tests first, small batches.
Measure this
Files migrated per week, and regressions.
About this entry
Similar setup documented Checked 2026-11-27 Next check 2026-12-25 v2026-11-27.1
What we checked
| Item | Result | Date | By | Source and note |
|---|---|---|---|---|
| Text and steps | Checked | 2026-11-25 | — | — |
| Human checkpoint and risks | Checked | 2026-11-25 | Reviewer to be named | — |
| Workflow run | Not checked yet | — | — | — |
| Cost estimate | Checked | 2026-11-25 | — | source · mid-priced model assumed |
| Tool links | Not checked yet | — | — | — |
| Outside evidence | Checked, with limits | 2026-11-27 | — | — |
Limitations
- An organisation has published a related setup, not this exact workflow. What differs is shown with the evidence.
- Results reported by a vendor or customer are their claims, not our measurements.
- Not checked yet: workflow run, tool links.
Change history
- Evidence label changed: Proposed pattern to Similar setup documented spec v2026-11-27.1
- Long text added: why it is worth it, how to start, what to watch out for, how to measure it spec v2026-11-26.1
- Added to the catalogue spec v2026-11-25.1
Evidence
- Google · Adjacent pattern Close: a fine-tuned model edits code, builds and unit tests validate each change, failures are repaired, and engineers review before it lands. Differs: related files are migrated in groups, not strictly one by one. Files are clustered and migrated in groups, not one file at a time; Google-internal toolchain; the paper describes some migrations as still ongoing. Company's own estimates. · source · 2026-11-27
Spec versions
- v2026-11-27.1 · Evidence label changed: Proposed pattern to Similar setup documented
- v2026-11-26.1 · Long text added: why it is worth it, how to start, what to watch out for, how to measure it
- v2026-11-25.1 · Added to the catalogue
Run it with AI
Pick the AI you already use.
You are helping developer. Goal: Code migration file by file. The agent converts files one at a time to a new language version or framework, compiles and tests each and fixes errors. It opens staged pull requests, with tests in place first to catch behaviour changes. You review each batch. Work through these steps and show your result for each: 1. List the files. 2. Convert them one by one. 3. Compile and test. 4. Fix errors. 5. Open staged pull requests. Tools or data I can give you: code-repo. Ask me for anything missing before you start. Do not take any action yourself; stop for my decision where: developer reviews each batch. Watch for: silent behaviour change; tests first.
Opens the tool with your prompt already filled in. Review it there before you send.
Copies the prompt, then opens the tool. Paste it in to start.
Nothing happened? The Claude Desktop app (Mac, Windows, or Linux, where it is still in beta) may not be installed. Use the copy button instead.
ROLE: Assistant for developer. TASK: Code migration file by file. SUMMARY: The agent converts files one at a time to a new language version or framework, compiles and tests each and fixes errors. It opens staged pull requests, with tests in place first to catch behaviour changes. You review each batch. PROCEDURE: 1. List the files. 2. Convert them one by one. 3. Compile and test. 4. Fix errors. 5. Open staged pull requests. HUMAN CHECKPOINT: developer reviews each batch GUARDRAILS: silent behaviour change; tests first RULES: ask when inputs are missing; never invent facts; cite where each fact came from.
Copies the prompt, then opens the tool. Paste it in to start.
{
"name": "code-migration-assistant-0079",
"goal": "Code migration file by file",
"persona": [
"developer"
],
"autonomy": "supervised",
"tools": [
"code-repo"
],
"plan": [
"List the files.",
"Convert them one by one.",
"Compile and test.",
"Fix errors.",
"Open staged pull requests."
],
"human_in_the_loop": "developer reviews each batch",
"guardrails": "silent behaviour change; tests first",
"output": "a draft for human review"
}Copies the prompt, then opens the tool. Paste it in to start.
{
"trigger": "On demand (manual start)",
"steps": [
{
"n": 1,
"do": "List the files."
},
{
"n": 2,
"do": "Convert them one by one."
},
{
"n": 3,
"do": "Compile and test."
},
{
"n": 4,
"do": "Fix errors."
},
{
"n": 5,
"do": "Open staged pull requests."
}
],
"connects": [
"code-repo"
],
"approval": "developer reviews each batch",
"stop_on": "silent behaviour change; tests first"
}Copies the prompt, then opens the tool. Paste it in to start.
{
"name": "code-migration-assistant-0079",
"goal": "Code migration file by file",
"persona": [
"developer"
],
"autonomy": "supervised",
"tools": [
"code-repo"
],
"plan": [
"List the files.",
"Convert them one by one.",
"Compile and test.",
"Fix errors.",
"Open staged pull requests."
],
"human_in_the_loop": "developer reviews each batch",
"guardrails": "silent behaviour change; tests first",
"output": "a draft for human review"
}Opens the tool with your prompt already filled in. Review it there before you send.
Copies the prompt, then opens the tool. Paste it in to start.
You are helping developer. Goal: Code migration file by file. The agent converts files one at a time to a new language version or framework, compiles and tests each and fixes errors. It opens staged pull requests, with tests in place first to catch behaviour changes. You review each batch. Work through these steps and show your result for each: 1. List the files. 2. Convert them one by one. 3. Compile and test. 4. Fix errors. 5. Open staged pull requests. Tools or data I can give you: code-repo. Ask me for anything missing before you start. Do not take any action yourself; stop for my decision where: developer reviews each batch. Watch for: silent behaviour change; tests first.
Copies the prompt, then opens the tool. Paste it in to start.
You are helping developer. Goal: Code migration file by file. The agent converts files one at a time to a new language version or framework, compiles and tests each and fixes errors. It opens staged pull requests, with tests in place first to catch behaviour changes. You review each batch. Work through these steps and show your result for each: 1. List the files. 2. Convert them one by one. 3. Compile and test. 4. Fix errors. 5. Open staged pull requests. Tools or data I can give you: code-repo. Ask me for anything missing before you start. Do not take any action yourself; stop for my decision where: developer reviews each batch. Watch for: silent behaviour change; tests first.
Copies the prompt, then opens the tool. Paste it in to start.
{
"name": "code-migration-assistant-0079",
"goal": "Code migration file by file",
"persona": [
"developer"
],
"autonomy": "supervised",
"tools": [
"code-repo"
],
"plan": [
"List the files.",
"Convert them one by one.",
"Compile and test.",
"Fix errors.",
"Open staged pull requests."
],
"human_in_the_loop": "developer reviews each batch",
"guardrails": "silent behaviour change; tests first",
"output": "a draft for human review"
}Copies the prompt, then opens the tool. Paste it in to start.
{
"name": "code-migration-assistant-0079",
"goal": "Code migration file by file",
"persona": [
"developer"
],
"autonomy": "supervised",
"tools": [
"code-repo"
],
"plan": [
"List the files.",
"Convert them one by one.",
"Compile and test.",
"Fix errors.",
"Open staged pull requests."
],
"human_in_the_loop": "developer reviews each batch",
"guardrails": "silent behaviour change; tests first",
"output": "a draft for human review"
}Copies the prompt, then opens the tool. Paste it in to start.
At a glance
- For
- developer
- Industry
- software
- Autonomy
- supervised
- Difficulty
- Works with
- Steps
- 5 · 1 human checkpoint
- Runs as
- on demand
- Needs approval
- developer reviews each batch
- What it costs to run
- $0.015 per run with a mid-priced model
- Evidence
- ID
UC-0079
Compare routes for this job
Share this comparison| For this job | Claude | ChatGPT | Claude Code | CrewAI |
|---|---|---|---|---|
| What you do by hand | Paste or attach the input each time, check the answer, and carry the result to where it goes yourself. | Set up the assistant once with your instructions and files. Then paste or attach each new input, check the answer and carry the result on. | Describe the task, then review every change it proposes before you accept it. | Build and test the agent once. Then do the human checkpoint this use case names (approve, edit or decide) and check its work regularly. |
| Human checkpoint | developer reviews each batch | |||
| Typical API cost (same for every route) | $0.015 per run with a mid-priced model checked 2026-11-25 · pricing source | |||
| Learning curve | Point and click | Point and click | Terminal | Code |
| Price model | free tier | free tier | paid | free |
| Where your data goes | What you type and upload goes to Anthropic's servers and is handled under its terms. Check its data settings before you use real work data. | What you type and upload goes to OpenAI's servers and is handled under its terms. Check its data settings before you use real work data. | Your code and prompts go to Anthropic, or to the cloud provider you set it up with, under that provider's terms. | Your code decides: your data goes to the models and services you connect, so a local model keeps it on your machine. It may also send anonymous usage data to its makers by default; check its docs to turn that off. |
| Before you start | An account on the website. The free plan is enough to try it. | An account on the website. The free plan is enough to try it. | A paid Claude plan or API credit, then install it and open a terminal in your project. | Python on your computer, basic coding, and access to a model (an API key or a local model). |
| Evidence for this route | Proposed pattern | Proposed pattern | Proposed pattern | Proposed pattern |
| Open | Open in run panel Tool page | Open in run panel Tool page | Open in run panel Tool page | Open in run panel Tool page |
Where to go from here
All developer use casesSimilar work
These use cases do the same kinds of work as this one. Each card shows what they have in common.
Clear issue into a first implementation
The agent explores the repository, plans the change, implements it with tests and opens a draft pull request. Keeping it a small draft limits the cost of a wrong approach. You review.
Small internal tool from a plain description
The agent designs screens from a plain request, generates the code, connects test data and deploys to staging. The requester tests it there.
Failing test reproduced and patched
The agent reads the CI failure, checks out the branch, reproduces the failure, edits the code and runs the tests before opening a pull request. It never edits a test without flagging it, so a real bug is not hidden. You review the patch.
Same kinds of tools, a different job
These use cases connect to the same kinds of tools as this one, so part of your setup carries over.
First-pass pull request reviewer
The agent reads the diff and the code around it, runs linters, lists issues by severity and posts review comments. You can mark false positives so it learns. You decide what to act on.
Confirmed customer bug into a proposed fix
The agent reproduces a confirmed bug from the support ticket, locates the code, patches it and adds a test that reproduces the bug. It links the fix to the ticket, and you review.
Client code updated for a breaking API change
The agent reads the API changelog, finds every usage in your code, patches it and runs tests before opening a pull request. You review.