Asana just wiped out half a decade of technical debt in fourteen
What's interesting isn't the raw speed. It's how they constrained the problem space to make the model useful instead of dangerous.
The setup that made it work
They didn't just drop Codex on the monorepo and pray. The team spent three days building a validation harness first: automated tests for every affected service, contract tests for API compatibility, and a staging environment that could spin up isolated tenants for each migration batch. Codex got a strict prompt template — here's the old pattern, here's the new pattern, here are the invariants you must preserve, output only the diff.
# Example prompt structure they used
cat << 'EOF' > migration_prompt.md
## Task: Migrate legacy error handling to unified Result<T> pattern
### Context
- File: {{FILE_PATH}}
- Current pattern: try/catch with custom Error subclasses
- Target pattern: Result<T, AppError> with explicit .unwrapOrThrow()
### Invariants (DO NOT BREAK)
1. All existing error codes must map 1:1 to AppError variants
2. HTTP status codes unchanged
3. Logging context preserved (requestId, userId, traceId)
4. No new dependencies introduced
### Output format
Unified diff only. No explanations.
EOFEach migration batch ran through CI with the full test suite. Failures got fed back as context for the next iteration. They ran about 40 batches in parallel across the two weeks.
Where it still needed humans
Codex handled the mechanical translation cleanly — roughly 87% of the diffs applied cleanly on first pass. The remaining 13% fell into three buckets:
1. Implicit business logic — error messages that downstream consumers parsed for specific strings. The model couldn't know those were contracts.
2. Performance-sensitive paths — a few hot loops where the new Result<T> allocation pattern added measurable latency. Required manual optimization.
3. Cross-service boundaries — where the migration touched shared libraries used by services outside the migration scope. Those needed coordinated rollouts.
The team estimates they'd have needed 6-8 engineers working full-time for 18-24 months to do this manually. Two weeks with three engineers supervising Codex. The math is absurd.
What this means for the rest of us
The takeaway isn't "AI replaces engineers." It's that constrained, well-scoped code generation with strong validation loops can compress certain classes of work by orders of magnitude. The pattern is repeatable: identify a high-volume, low-creativity migration, build the test harness first, then let the model churn through the mechanical bulk while humans handle the edge cases.
I'm currently testing this approach on a GraphQL-to-tRPC migration at my shop. Early results track similarly — about 80% first-pass success on resolver translations. The validation harness took two days to build. Feels like the right ratio.
If you've got a migration backlog that's been haunting your sprint planning for years, this might be the lever you need.