Diff
Also called code diff or patch
A view of what changed in a file, with removed lines marked in red with a minus sign and added lines in green with a plus sign.
After each change, list the files you edited with the lines added and removed in each, and one sentence on why. Ask before editing anything outside src/components, and keep unrelated formatting changes out of the diff.
Paste into Layerwise or any AI coding tool.
What is Diff?
A diff compares two versions of a file and shows only the differences. Removed lines start with - and usually appear in red; added lines start with + and appear in green. An edited line shows up as one removal followed by one addition, and a header like +3 −1 sums up the change.
AI coding tools show a diff after each change, and many show one when they ask to edit a file. Skimming it is the fastest way to catch the AI touching files it should leave alone, deleting code you wanted, or making a much bigger change than you asked for.
Diffs come in two layouts. A unified diff lists old and new lines in one column; a split diff puts the old version on the left and the new one on the right. Git, pull requests on GitHub, and code editors all use the same idea.
Related terms
All termsGit commit
A saved snapshot of a project in Git with a short message describing the change. Commits form a history you can compare, review, and restore.
Checkpoint
A snapshot of your project that an AI coding tool saves as it works, so you can rewind the code to an earlier point when a change goes wrong.
AI agent
An AI model that works toward a goal on its own by planning, using tools, checking the results, and repeating until the task is done.
Vibe coding
A way of building software by describing what you want to an AI model and steering the result in conversation, without writing the code yourself.
Build it with Layerwise
Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.