← All notes

Moving old code to a new stack

If you're getting agents to rewrite old code on a new stack, the first thing to get right is the foundation of that stack. I recommend:

  • TanStack (frontend)
  • Convex (backend and database)
  • Clerk (auth)
  • playwright-cli (so the agent can use a browser)

An agent can work autonomously really well on this stack.

Make sure the agent can run the stack, log in and test it in a browser, and get end-to-end type checking, so changing a database field name breaks everything right up to the frontend. That way it can always solve its own issues without getting stuck.

Then use a loop to iterate bit by bit, re-implementing the old code on the new stack. My Swarm Skill can help with that.