Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Refinement  ›  Lesson

Working with AI Coding Assistants

3. Refinement 12 minAI coding assistants range from inline suggestions to chat to agents that edit many files, and the more a mode does on its own, the more carefully its changes must be reviewed.

Working with AI Coding Assistants

Pantry Pal works. To keep improving it, Asha moves the code out of the app builder into a project folder of her own, and meets a new family of tools: assistants that live in a code editor or a terminal and change code on request. They work in different modes, and the right one depends on how much you are handing over.

The rule

The more the assistant does alone, the more carefully you review.

Three modes, from least to most independent:

Mode You do The assistant does You review
Inline suggestions Type code Offers the next line or block as you type Each suggestion before accepting it
Chat beside the code Ask a question or request an edit Explains, or proposes changes to a file or two Each proposed change
Agent Describe a whole task Reads files, edits many of them, runs commands and tests Every change together, as a diff

A diff is the list of exact lines added and removed by a change. It is your main review tool for agents: you do not reread the whole project, only what changed.

Two habits make every mode work better:

  • Give context. Point at the files that matter, and keep a short project notes file — what the app does, the stack, rules such as "the model is called only from the server" — that the assistant reads at the start of each session.
  • Save before you start. A commit before you hand over a task means any result can be undone in seconds.

The shortcut

Size the task, then pick the mode. One line → inline. A question, or a change to one file → chat. A task across several files, with tests → agent, followed by a diff review.

Choosing modes for three Pantry Pal jobsStep 1 of 3
  1. Finish a line that formats cooking time

    Tiny and right in front of her. Inline: accept the suggestion only if it is right.

The trap is using an agent for everything and then skimming a 600-line diff. If a change is too big to review, it was too big to hand over in one go.

Drills

Answer fast — trust the rule.

quick drill

Which mode needs the most careful review afterwards?

quick drill

What is a diff?

quick drill

Why keep a short project notes file for the assistant?

quick drill

An agent's change produced a 600-line diff you cannot follow. What is the lesson?

Remember

  • The more the assistant does alone, the more carefully you review.
  • Size the task, then pick the mode: inline, chat or agent.
  • Trap: handing over huge tasks and skimming the diff. Commit first so any result can be undone.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainPick the mode

For each job, choose inline suggestions, chat or an agent, and explain your choice and how you would review the result: (a) finishing a line that formats a date, (b) understanding an error message in one file, (c) adding a dark theme across every screen.