lemon Lesson 7 of 7 · 4 minutes

Review and save

Review the diff, remove surprises, and leave a checkpoint the next session can understand.

Tests answer “does the checked behavior still work?” The diff answers “what actually changed?” You need both.

Review by file

Ask the agent to show the diff and walk through it one file at a time. Compare each change to the brief you approved:

  • Is every changed file part of the task?
  • Did any labels, interfaces, dependencies, or generated files change unexpectedly?
  • Is the implementation larger than the outcome requires?
  • Do the checks cover the behavior that matters?

Passing checks do not make unrelated edits relevant. Remove surprises, then rerun the check affected by that cleanup.

Leave a checkpoint

Once the diff is focused, save it with a short description of the outcome and why it was needed. In a Git project, that usually means a small commit. In another environment, use whatever history or checkpoint mechanism is available.

A good checkpoint gives the next session a clean place to start and makes recovery cheap if a later idea goes wrong.

Leave the next session more capable

Do not save only the code. Save what the work taught you:

  • Put a project-specific correction or command in AGENTS.md, CLAUDE.md, or the instruction file your agent supports.
  • Turn a workflow you use across projects into a skill. Tools such as npx skills can install one managed skill for Codex, Claude Code, and other supported agents.
  • Turn repeated mechanical steps into a small command with explicit inputs, output, and failure behavior. Let the command handle exact execution while the agent handles decisions and orchestration.

This is the compounding part of agentic work. Each useful session should leave behind a better instruction, a reusable workflow, or a more dependable tool.

Merge or save what the artifact says, not what the agent says the artifact contains.

Continue with Make each correction stick, Build lots of small tools, and Review the diff, not the summary.

Try it

Make the call

Pick an option to see how the rest of the session plays out.

agent

The date bug is fixed and all checks pass. The diff touches 14 files: one logic change, plus formatting cleanup my editor applied across the rest.

The checks pass, but the diff contains an unrelated formatting rewrite. What should you do?

you

The date fix turned out to break a different page. Undo it.

agent

The undo takes the formatting changes in 13 other files with it. Everything was saved as one change.

not yet

Tests do not make unrelated edits relevant. Extra change makes review harder and recovery less precise.

agent

Removed the formatting churn and reran the date check: still passing. The saved change is one file, described as “fix release date rollover”.

you

That I can read, and if we ever undo it, we undo exactly one thing.

good call

The checkpoint now tells one coherent story and can be understood or reverted without dragging unrelated work along.

agent

Yes, I’m confident. The formatting matches the current style guide.

you

Confidence wasn’t the question. Fourteen files is still fourteen files to review, and thirteen have nothing to do with the fix.

close, but

The issue is scope, not confidence. Judge the diff against the brief you approved.

Take it to your tool

Try this in your agent

With the project open in your coding agent, paste:

Show me the diff and walk through it by file. Call out anything outside the original brief, any generated files, and any check that was skipped. Then list lessons from this session that belong in project instructions, a reusable skill, or a small deterministic tool. Do not write those or commit until I approve.
Got the idea?

Mark it complete on this device. You can return or reset the course at any time.