All ideasMore in Work

His work pattern: LLMs test and rewrite legacy modules until users feel the speed

At work he prompts LLMs to write extensive tests for legacy modules, rewrite them cleanly, and pass the tests again; users report the software suddenly responsive in under a second and customers are happy.

How it works

  1. He prompts LLMs to write extensive tests for legacy modules
  2. Rewrites them cleanly
  3. Passes the tests again
  4. Users report the software suddenly responsive in under a second

Why it’s worth knowing

Tests first is what makes an agent rewrite of legacy code safe.

Where it’s from

Summarized from a public post on news.ycombinator.com. See the original ↗

Upgraded prompt

A ready-to-use prompt for this idea, built from research on what makes AI agents do the job right: who the AI should be, the exact steps, and a check to make sure it was done the way you wanted.

1Who the AI should be
2The prompt, with the steps
3The check when it’s done
Upgraded prompts are coming soon.

Try next

Every idea is a real post from someone who tried it, summarized in our words, with a link to the original. App names are swapped for plain words.