N8+US ← all work LinkedIn Résumé (PDF)

2025–2026 · BuzzFeed · Staff Software Engineer

Agentic Framework Migration

Designed an agent loop that migrated a decade-old Python UI service to Next.js — it self-verified every change, paused only at real blockers, and logged every decision.

agentic workflowsNext.jsPythonmigration toolingevals

What I built

I designed an agent loop that migrated a decade-old Python/Tornado UI service to Next.js. It self-verified every change, paused only at real blockers, and logged every decision — a repeatable modernization pattern, not a one-off rewrite.

How it works

The loop ports one slice at a time — legacy request handlers become Next.js server-side data-fetching + routes — runs the full test suite on every commit, verifies the new page side-by-side against production, and escalates to a human only when it hits a genuine blocker.

The migration loop: prep coverage first, then port each slice, test every commit, verify against production, and pause only at real blockers. (Illustrative, clean-room.)
The migration loop: prep coverage first, then port each slice, test every commit, verify against production, and pause only at real blockers. (Illustrative, clean-room.)

How I built it

Porting mechanics: Tornado handlers → Next.js `getServerSideProps` / catch-all routes, commit by commit, each landing the full Jest suite green (~2,306 tests). To make that safe I fanned out worker agents to raise coverage first — from 26% to 97% — which surfaced four real latent bugs before the port even started.

The loop was built as a reusable blueprint — designed to apply across ~a dozen candidate services, not just this one.

Porting mechanics: each legacy piece (handlers, build, React/Redux, styling, tests) mapped to its Next.js equivalent, gated by the full test suite every commit. (Illustrative, clean-room.)
Port mechanics — Tornado → Next.js expand

Questions this project answers

How do you use AI in your daily engineering work? On this project AI was the primary way the work got done, not an assistant on the side. I designed an agent loop that ported the codebase one slice at a time, ran the full test suite on every commit, and checked the migrated page against production before moving on. My job shifted to designing the loop, setting the gates, and deciding at the blockers the agent surfaced, which is how one person carried a migration that would normally take a team.

With an agent driving a big refactor, how do you keep it from quietly breaking things? I made the existing test suite trustworthy before touching the framework. Worker agents raised line coverage from 26 to 97 percent first, which surfaced four real latent bugs, and then the thresholds were locked so coverage could not silently regress. During the port the full suite plus lint had to be green after every commit, and behavior-sensitive flows were verified side by side against the live production app, so a change was never called done on the agent's word alone.

What does it take to let an agent operate safely against a live production system? Every consequential decision paused for human approval; the agent executed and the human decided, and each decision was logged with its options, risk, and outcome so the run was auditable. I also held a strict lift-and-shift rule so no behavior changed under cover of the migration, which kept every diff legible as either a faithful port or a real bug. When the port surfaced an already-broken area, the call was to fix forward and document it rather than quietly paper over it.

Was this a real production migration, or a lab exercise? It ran against the real decade-old service that a working team depended on, through timed production test windows and a monitored, staged rollout rather than a single cutover. The point was never just this one app either; the loop was built as a reusable blueprint for the dozen or so similar services behind it.

Results

  • ~70,000 lines migrated in ~8% of the estimated engineering time.
  • Test coverage taken from 26% → 97% first, then held green (~2,306 tests) across the port.
  • A reusable migration blueprint for ~a dozen candidate services.

Post-migration, the team could rapidly iterate on new core features agentically — shipping a redesigned, personalized home page and new planner tools on the modern stack.

Skills

AI / Agentic

Agent-loop designDesigned the migration loop that ports one slice at a time, self-verifies, and escalates to a human only at a genuine blocker.
Self-verifying agentsHad the agent inspect the running UI in a browser and diff it side-by-side against production, closing the gap where an agent claims a change works without ever seeing it run.
Agent fan-outFanned out worker agents across a tiered file-batch plan to raise the legacy suite's coverage before the port began.
Decision logging / auditable runsLogged every gated decision with options, choice, risk, and graded outcome, so the run doubled as a training set for the next migration.
Human approval gatesPaused at every consequential choice for human sign-off; the agent executed, the human decided.

Frontend

Next.js (SSR)Ported legacy request handlers onto Next.js server-side data-fetching in catch-all routes as the target framework.
ReactRebuilt the decade-old React 16 / Redux client surface on the modern Next.js stack while matching legacy behavior.
Behavior-parity portingHeld a strict lift-and-shift, verifying each migrated page against the live production app rather than improving behavior mid-port.
JavaScriptWrote the port in JavaScript, keeping the legacy code in-tree as the agent's living reference throughout.

Backend / Infra

Python / Tornado (legacy)Read and mapped the decade-old Python/Tornado handler layer as the source of truth for the port.
Jest (large suite)Ran the full ~2,306-test Jest suite plus lint green after every commit as a hard verification gate.
Test-coverage engineeringRaised legacy line coverage from 26% to 97% and locked the thresholds so the safety net cannot silently regress.
Root-cause debuggingTraced three networks' broken publishing to two config keys a shared upload-URL fallback depended on, and shipped one forward-fix with before/after proof.
Staged rolloutRamped the migration through monitored soaks and timed production test windows rather than a single cutover.

Leadership

Modernization strategyTurned a single open question about whether an agent loop could carry a full framework migration into an approved modernization program.
Reusable blueprintBuilt the agent persona, decision-log defaults, and a porting-gotchas README so the next migration starts warm, not cold.
Risk-managed deliverySet the coverage-first, per-commit-green, human-gated discipline that kept a decade-old production tool safe during the port.
Self-initiated programRan the first migration as a proof of concept, then earned leadership approval to apply the pattern across a family of candidate services.