Co-founder, Cursor (Anysphere)
Representative of Sualeh's threads on how teams adopt Cursor's composer for cross-file refactors — scoping a change, previewing diffs across files, and applying only the hunks that look right.
“The unlock wasn't 'AI writes code.' It was 'AI proposes a diff I can read in 30 seconds.'”
How to replicate
- 1.Open Cursor composer (Cmd+I) and select the files involved in the refactor.
- 2.Describe the change in plain English plus one before/after example.
Prompt template
You're refactoring this repo. Goal: <one-sentence outcome>. Constraints: don't touch <files/modules>. Style: match the existing patterns in <reference file>. Produce a diff across the files involved. Before you write code, list the files you plan to change and why.
Pitfall
Accepting every hunk at once — composer will happily 'fix' unrelated code it thinks is ugly. Review file-by-file and reject opportunistic edits.
What you'll learn
- •How to scope a multi-file refactor so the AI stays in its lane
- •Why reviewing diffs is faster than reviewing prose explanations
- •When to reject a 'helpful' edit that widens the blast radius
- •How to chain composer runs: plan → diff → test → narrow
