Refactoring is done, all nine lessons
The scope box, the incremental loop, and the ten-minute safety net, now live  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ 

Hi there,

When Refactoring launched, the first three lessons went live. The other five are here now, and the workflow's finished.

A refactor can leave every test green and still break your app. The agent cleans up one file, the diff spreads to three more you never asked about, and nothing red shows up until someone clicks around and finds a button missing.

Lesson 04: Draw the Agent a Box

An instruction with no limits doesn't have any, so the agent treats your whole codebase as fair game. Write a scope block once, then run the same prompt with it and without it and compare the two diffs.

Lesson 05: The Incremental Loop

Three changes in one prompt and a broken suite at the end only tells you something's wrong, not what. Refactor one small change at a time, with a hook that runs the suite whether you remember to or not.

Lesson 06: Five Ways It Goes Wrong

Four of these five leave your test suite green, which is exactly why they're worth knowing by sight. Watch each one happen for real, then find three of them planted in a diff with no hints given.

Lesson 07: The Tidying You Never Asked For

Most unrequested refactoring gets merged inside feature commits with nothing in the message about it. Audit your last twenty commits to find it, then add an AGENTS.md rule and a gate check that keep it out of the next one.

Lesson 08: A Net You Can Build in Ten Minutes

Not everything you want to tidy has tests, and you don't always have an afternoon to write them. Snapshot what the code produces before you touch it, refactor, then diff the two and see exactly how much protection that bought you.

Lesson 09: Give It the Destination First

Ask an agent to restructure your app with no direction, and you get the generic module layout from forty blog posts, because it had to invent the destination itself. Hand it a real one instead, a reference article, your own boundary notes, then split the plan into stages that each leave the project working.

That's the full workflow now.

9 lessons, about 38 minutes total, 11 prompts, 3.0k characters of prompts already written for you.

If you've been holding off until Refactoring wrapped, now's the time. It's already included in your Unlearn membership, no separate purchase, nothing extra to add.

Early bird pricing is still on, $299 $219/yr, with a 30-day refund if it's not for you.

Or browse everything else on Unlearn.

Workflow 08, Getting Up to Speed on Any Codebase, is next. Instead of weeks spent reading before you trust yourself to touch anything, an agent does the exploring, backing up every answer with the exact file and line so you can check it in seconds. Watch this space.

The Unlearn Team

Unlearn is proudly part of BitterBrains – Making Developers’ Lives Easier