Edit — a scoped change
Ask mode told you the first concrete step: shared-lib needs a way to express that an order exceeds the approval threshold, and its audit helper needs to record an approval event. You know which files. You know roughly what the change is. This is no longer exploration — it’s a defined, bounded edit. Edit mode is built for precisely this.
What Edit mode is
Section titled “What Edit mode is”In Edit mode, you set the scope. You add a specific set of files to the working set, describe the change you want, and Copilot applies edits across exactly those files and no others, returning them as review-ready diffs. The defining trait is the boundary: you’ve drawn a fence around where Copilot is allowed to work, and it stays inside it.
That’s the difference from the more autonomous mode you’ll meet next. Agent mode decides for itself which files are relevant and may touch a dozen of them. Edit mode does what you scoped, where you scoped it. When you already know where a change belongs — and in shared-lib, where any stray edit could ripple into a dozen consumers, you very much want to know — that constraint is exactly what you want.
Using it on the shared-lib change
Section titled “Using it on the shared-lib change”Open shared-lib. From your Ask-mode tracing you know the two files involved: the validation helper that should gain a threshold check, and the audit helper that should learn a new event type. Add those files to the Edit working set, and describe the change:
Add a function to the validation helper that returns whether an order amount is at or above a configurable approval threshold. In the audit helper, add a new event type for an approval being requested. Match the existing style of each file.
Two things to notice. First, you named the files — Copilot isn’t guessing where this goes, you told it, and it won’t wander into the twelve consumers. Second, “match the existing style of each file” is doing real work on a brownfield library where consistency is everything. It’s also a preview of the Rules chapter: rather than repeating that instruction every time, you’ll soon write the conventions down once so Copilot’s first draft already conforms.
Review is still the job — more so here
Section titled “Review is still the job — more so here”Edit mode returns diffs, file by file, and the discipline from your first change applies with extra weight, because this is shared-lib. A change here doesn’t just have to be correct — it has to be compatible. The questions sharpen:
- Did it stay in scope? Only the two files you added should have changed. A shared library is the last place you want a surprise edit.
- Did it change a signature the consumers depend on? Adding a new function is safe; altering an existing one that a dozen services call is how you break a release. Read for it.
- Does it actually match each file’s idiom? You asked it to. Confirm it did.
Edit mode gives you the scoped change cleanly. But notice its boundary cuts both ways: it edited the files, and stopped. It didn’t run the tests. It didn’t check whether those dozen consumers still compile against the new version. For a change this small you can do that yourself — but when a task is big enough that you want the agent to build, test, and self-correct across many files without you naming each one, you’ve reached the edge of Edit mode and the start of the next one. Next: Agent — hand off the whole task.