Chapter 7: Context

Do that on purpose at every stage, and you have a workflow.

Research, plan, implement

Also called RPI, Frequent intentional compaction

Splitting work into three phases. Research how the code works now and write it down. Turn that into a plan file. Implement from the plan. Each phase starts from the last one's file with a small window, and you review the files.

A research note and a plan are short enough to read properly, which a 2,000-line diff isn't. So you catch a wrong idea when it is one sentence and not a hundred files. For a small change it is overhead, so skip it. Nobody has measured this properly that we could find.

Say it to your agent

“Phase 1 only: research how checkout applies discounts today. Read code and change nothing. Write docs/research/discounts.md, under 60 lines, with file:line for every claim, then stop so that I can read it. We plan in a new session, from that file.”

The workshop

Name a word, or describe what you mean in everyday language.