Amp sorts diff files by importance and computes the order in 0.1 s instead of 3.5 s
Amp, Sourcegraph's development assistant, has updated its Changes panel. It now reads the diff on its own, identifies the key files, and moves them to the top of the list. Smart sorting on an eight-file diff used to take 3.5 seconds. It now takes 0.1 seconds, which is 35 times faster. If the diff changes during review, files don't jump around: a blue dot appears on the sort button, and the new order is applied on click. • Automatic sorting of files by importance to the change • 0.1 s versus 3.5 s on an eight-file diff • Alphabetical order is one click away
AI-processed from Amp News (Sourcegraph); edited by Hamidun News
Amp, Sourcegraph's development assistant, has updated its Changes panel. The panel now arranges the files in a diff in a meaningful order automatically: it reads the changes, finds the files without which the edit makes no sense, and puts them first. Previously, this kind of sorting had to be triggered manually and took a noticeable amount of time. In the developers' demo on an eight-file diff, the old method took 3.5 seconds, while the new one takes 0.1 seconds. That is a speedup of roughly 35 times.
What exactly changes in the Changes panel
In most tools, a standard diff lists files alphabetically. That is inconvenient for review: a database migration can end up at the bottom of the list, with tests and configs ahead of it. The reviewer reads the effects before the cause and has to piece the picture together.
Amp takes a different approach. The system analyzes the diff itself, picks out the files that define the substance of the change, and moves them to the top. In the announcement's example, both the old and the new method put the database migration first on an eight-file diff. The result did not change; only the speed of getting it did.
The announcement does not say which model handles the ranking or what criteria make a file "significant." All we know is that the order is built from the contents of the diff, not from file names.
An order that doesn't break the review
The most interesting part is the behavior when the diff updates. When the agent keeps working and the changes in the repository shift, the recalculated order is not applied automatically. The files stay where they are while you read them. Instead, a blue dot lights up on the smart sort button. Clicking it applies the fresh order.
It is a small decision, but a thoughtful one. Automatic re-sorting in the middle of reading would make the reviewer lose their place, and with an active agent that would happen constantly. Amp separates computing from applying: the calculation runs in the background, and the decision to reorder stays with the human.
Speed as a prerequisite for automation
Sorting that takes 3.5 seconds has to be triggered manually, because waiting every time is unpleasant. Sorting that takes 0.1 seconds works without any wait, so it can be the default behavior. Here, speed removes the need for a separate run button.
Key parameters of the update:
- The file order in the Changes panel is built automatically, with no manual trigger.
- Calculation time on an eight-file diff: 0.1 s versus 3.5 s previously.
- Files that define the substance of the change, such as database migrations, get priority.
- When the diff changes, the order is recalculated but not applied without confirmation.
- Update notification: a blue dot on the smart sort button.
- Returning to alphabetical order is available by clicking the same button.
How to use it and what is not yet visible
The technique itself is universal: start a review with the files that set the meaning of the edit, then move on to the consequences. For agent-generated changes, this matters even more. Such diffs are often larger and broader in scope than human edits, and a reviewer's attention remains a limited resource.
A practical tip for teams already working with Amp: leave the automatic order on for a couple of weeks and compare how quickly reviewers reach the problem areas. If the ranking logic doesn't suit a particular repository, for example a monorepo with a large number of generated files, alphabetical order is one click away.
Questions about scale remain open. The demo shows eight files, and the announcement doesn't make clear how the method behaves on diffs with hundreds of files or how stable its choice of "main" files is. That is worth testing on your own data.
Build & Ship Production AI Apps with Vibe Coding
Join Zhemal Khamidun's hands-on Vibe Coding Intensive at hamidun.com/vibecoding — master Claude Code, Cursor, and autonomous agentic workflows.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.