Migrate every package at once
One brief moves a whole codebase off a deprecated API, one worker per package, all at the same time.
A migration is the same small change in many places. Do the places at once.
- io/ioutil to os and io
- one logging library to another
- unittest to pytest
- one module each
Migrations stall because they are boring and wide: the same change in every package, each one easy, all of them together a week. In this playbook one /task brief names the packages, the run splits into one part per package, and every part makes its own change and runs its own tests at the same time. One sentence at the end lands the branch.
Steps
Our repository, toolbox, has eight small Go packages that all still use the deprecated io/ioutil package.
- In the repository, run
codeafand send any first message, for example "List the packages in this module, one line each." - Hand over the migration in one brief:
/task Move every package off the deprecated io/ioutil package, one part per package: config, cache, scratch, listing, body, discard, tempfile and closer, all at once. Each part replaces the ioutil calls in its own package (code and tests) with their os and io equivalents and runs go test on that package. At the end run gofmt -l ., go vet ./... and go test ./..., confirm that no file imports io/ioutil, and list each package as done or not.- The chat prints the crew,
task 1 crew · open-ended · worker glm-5.3 (openrouter) · checker claude-opus-5.5 · est $0.201, and the Tasks column fills withDrop io/ioutil in config,Drop io/ioutil in cacheand the other six, all running. - When the run ends, land it:
if go vet and go test pass on that branch, merge it into mainWhat you see
The run ended with one line, done · 1m13s · 10 files · branch kept, and its branch name, and the summary said all eight packages were moved and verified: no file imports io/ioutil, gofmt -l . is empty, and go vet and go test pass. The landing sentence checked the branch and merged it into main with a merge commit.
In our run
Eight packages in 1 minute and 13 seconds of wall time, for $0.77 against an estimate of $0.20. The landing turn cost $0.09. The branch changed 10 files, 17 lines in and 20 out.
Make it yours
- Name the parts. Listing the packages in the brief, with "one part per package, all at once", is what splits the work. Leave it out and one worker does them in order.
- Any repeated change. Swap a logging library, rename a config key across services, convert test files one module each. Keep the check at the end so the whole tree is verified once.
- Steer one part. Say "note for the cache part only: …" while it runs and only that part picks it up. See Close twenty issues at once.
Go further
Fire and steer: Hand work off in one line, let it split into parallel parts, and step in only to steer.
Coming soon: describe the org you want and CodeAF builds it: teams, managers, budgets, standing orders.