{"id":"05-core-loop","number":5,"slug":"explore-plan-implement-verify","title":"The core loop: explore, plan, implement, verify","short":"Explore, plan, implement, verify","module":"Working with one agent","summary":"The people who build coding agents rarely type a feature request and hit enter. They explore first, agree on a plan, implement in a fresh context, and verify. Here's that loop, why planning has the most leverage, and how to make plans that can actually be checked.","voice":"Eric","scenes":[{"template":"title","chapter":"Intro","narration":"The most common beginner move is to type a feature request and hit enter. The people who build these tools almost never do that. Here's what they do instead.","params":{"kicker":"Lesson 5","module":"Module 2 · Working with one agent","title":"The core loop: *explore, plan, implement, verify*","subtitle":"The workflow every other technique builds on.","bubble":"Plan first? Fine by me.","mood":"happy"},"start":0.5,"dur":10.761,"words":[{"text":"The","s":0.8,"e":0.96},{"text":"most","s":1.08,"e":1.2},{"text":"common","s":1.28,"e":1.6},{"text":"beginner","s":1.68,"e":2},{"text":"move","s":2.08,"e":2.4},{"text":"is","s":2.48,"e":2.56},{"text":"to","s":2.64,"e":2.72},{"text":"type","s":2.8,"e":2.96},{"text":"a","s":3.04,"e":3.12},{"text":"feature","s":3.2,"e":3.44},{"text":"request","s":3.52,"e":4},{"text":"and","s":4.08,"e":4.16},{"text":"hit","s":4.24,"e":4.4},{"text":"enter.","s":4.48,"e":5.2},{"text":"The","s":5.52,"e":5.6},{"text":"people","s":5.68,"e":5.92},{"text":"who","s":6.04,"e":6.16},{"text":"build","s":6.28,"e":6.4},{"text":"these","s":6.52,"e":6.64},{"text":"tools","s":6.88,"e":7.12},{"text":"almost","s":7.36,"e":7.6},{"text":"never","s":7.76,"e":8},{"text":"do","s":8.08,"e":8.24},{"text":"that.","s":8.4,"e":8.76},{"text":"Here's","s":8.96,"e":9.2},{"text":"what","s":9.28,"e":9.36},{"text":"they","s":9.4,"e":9.44},{"text":"do","s":9.52,"e":9.6},{"text":"instead.","s":9.84,"e":10.4}]},{"template":"stat","chapter":"Why plan","narration":"Boris Cherny says landing on a plan first can easily double or triple your success rate. And once there's a good plan, he says, the model will one-shot the implementation almost every time. Most of his tasks start in plan mode.","params":{"items":[{"value":"2–3×","label":"success rate when you land on the plan first","tone":"agent","at":"double"},{"value":"~1 shot","label":"to implement a good plan, almost every time","tone":"good","at":"one-shot"}],"src":"Boris Cherny, creator of Claude Code (Every, The Pragmatic Engineer)"},"start":11.261,"dur":15.552,"words":[{"text":"Boris","s":11.561,"e":11.881},{"text":"Cherny","s":11.961,"e":12.441},{"text":"says","s":12.561,"e":12.681},{"text":"landing","s":12.761,"e":13.081},{"text":"on","s":13.121,"e":13.161},{"text":"a","s":13.241,"e":13.281},{"text":"plan","s":13.321,"e":13.641},{"text":"first","s":13.801,"e":14.201},{"text":"can","s":14.281,"e":14.521},{"text":"easily","s":14.601,"e":15.001},{"text":"double","s":15.081,"e":15.481},{"text":"or","s":15.521,"e":15.561},{"text":"triple","s":15.801,"e":16.201},{"text":"your","s":16.281,"e":16.361},{"text":"success","s":16.561,"e":16.761},{"text":"rate.","s":16.841,"e":17.561},{"text":"And","s":17.641,"e":17.721},{"text":"once","s":17.801,"e":17.881},{"text":"there's","s":17.961,"e":18.121},{"text":"a","s":18.161,"e":18.201},{"text":"good","s":18.281,"e":18.361},{"text":"plan,","s":18.441,"e":18.841},{"text":"he","s":18.921,"e":19.001},{"text":"says,","s":19.161,"e":19.641},{"text":"the","s":19.721,"e":19.801},{"text":"model","s":19.921,"e":20.041},{"text":"will","s":20.121,"e":20.361},{"text":"one-shot","s":20.441,"e":20.921},{"text":"the","s":20.961,"e":21.001},{"text":"implementation","s":21.081,"e":21.801},{"text":"almost","s":21.881,"e":22.361},{"text":"every","s":22.521,"e":22.681},{"text":"time.","s":22.841,"e":23.561},{"text":"Most","s":23.641,"e":23.801},{"text":"of","s":23.841,"e":23.881},{"text":"his","s":24.001,"e":24.121},{"text":"tasks","s":24.401,"e":24.681},{"text":"start","s":24.881,"e":25.081},{"text":"in","s":25.161,"e":25.321},{"text":"plan","s":25.481,"e":25.641},{"text":"mode.","s":25.721,"e":26.201}]},{"template":"loop","chapter":"The loop","narration":"Here's the loop. Explore: let the agent read the relevant code and explain it before touching anything. Plan: agree on the approach and how you'll check it. Implement: let it write the code, in small steps. Verify: run the checks, read the result. Then around again for the next slice.","params":{"title":"The core loop","sub":"Every non-trivial task.","steps":[{"label":"Explore","sub":"read before writing","icon":"search","at":"Explore"},{"label":"Plan","sub":"agree on the approach","icon":"plan","at":"Plan"},{"label":"Implement","sub":"small steps","icon":"code","at":"Implement"},{"label":"Verify","sub":"run checks, read results","icon":"check","at":"Verify"}],"center":{"label":"you + agent","agent":true,"at":"Here's the loop"}},"start":26.813,"dur":20.829,"words":[{"text":"Here's","s":27.113,"e":27.353},{"text":"the","s":27.393,"e":27.433},{"text":"loop.","s":27.513,"e":27.913},{"text":"Explore:","s":28.313,"e":29.353},{"text":"let","s":29.433,"e":29.593},{"text":"the","s":29.633,"e":29.673},{"text":"agent","s":29.753,"e":30.073},{"text":"read","s":30.233,"e":30.393},{"text":"the","s":30.473,"e":30.513},{"text":"relevant","s":30.553,"e":30.873},{"text":"code","s":31.033,"e":31.353},{"text":"and","s":31.433,"e":31.513},{"text":"explain","s":31.753,"e":31.993},{"text":"it","s":32.073,"e":32.153},{"text":"before","s":32.233,"e":32.553},{"text":"touching","s":32.633,"e":32.953},{"text":"anything.","s":33.113,"e":33.873},{"text":"Plan:","s":34.153,"e":34.953},{"text":"agree","s":35.153,"e":35.353},{"text":"on","s":35.393,"e":35.433},{"text":"the","s":35.473,"e":35.513},{"text":"approach","s":35.593,"e":36.073},{"text":"and","s":36.153,"e":36.313},{"text":"how","s":36.393,"e":36.553},{"text":"you'll","s":36.593,"e":36.713},{"text":"check","s":36.793,"e":36.953},{"text":"it.","s":37.033,"e":37.273},{"text":"Implement:","s":37.753,"e":38.713},{"text":"let","s":38.793,"e":38.873},{"text":"it","s":38.953,"e":39.033},{"text":"write","s":39.113,"e":39.273},{"text":"the","s":39.353,"e":39.393},{"text":"code,","s":39.433,"e":39.993},{"text":"in","s":40.073,"e":40.153},{"text":"small","s":40.233,"e":40.393},{"text":"steps.","s":40.473,"e":40.953},{"text":"Verify:","s":41.513,"e":42.233},{"text":"run","s":42.633,"e":42.793},{"text":"the","s":42.833,"e":42.873},{"text":"checks,","s":42.953,"e":43.593},{"text":"read","s":43.673,"e":43.753},{"text":"the","s":43.833,"e":43.873},{"text":"result.","s":43.913,"e":44.393},{"text":"Then","s":44.793,"e":45.033},{"text":"around","s":45.193,"e":45.513},{"text":"again","s":45.673,"e":45.833},{"text":"for","s":45.913,"e":45.993},{"text":"the","s":46.033,"e":46.073},{"text":"next","s":46.153,"e":46.313},{"text":"slice.","s":46.513,"e":47.033}]},{"template":"chart","chapter":"Leverage","narration":"Why put so much effort up front? Dex Horthy explains. A bad line of code is just a bad line of code. A bad line of a plan can become hundreds of bad lines of code. And a bad line of research, a misunderstanding of how the system works, can become thousands. So your attention has the most leverage early.","params":{"title":"Lines of bad code one mistake can cause","kind":"bar","log":true,"data":[{"x":"in the code","y":1,"label":"1","at":"bad line of code"},{"x":"in the plan","y":100,"label":"hundreds","at":"plan"},{"x":"in the research","y":1000,"label":"thousands","hl":true,"at":"research"}],"src":"Dex Horthy, Advanced Context Engineering for Coding Agents"},"start":47.642,"dur":21.378,"words":[{"text":"Why","s":47.942,"e":48.182},{"text":"put","s":48.262,"e":48.422},{"text":"so","s":48.502,"e":48.582},{"text":"much","s":48.662,"e":48.822},{"text":"effort","s":48.902,"e":49.142},{"text":"up","s":49.222,"e":49.382},{"text":"front?","s":49.582,"e":49.862},{"text":"Dex","s":50.422,"e":50.662},{"text":"Horthy","s":50.702,"e":51.062},{"text":"explains.","s":51.222,"e":51.982},{"text":"A","s":52.262,"e":52.342},{"text":"bad","s":52.422,"e":52.582},{"text":"line","s":52.662,"e":52.822},{"text":"of","s":52.862,"e":52.902},{"text":"code","s":52.982,"e":53.382},{"text":"is","s":53.622,"e":53.782},{"text":"just","s":53.862,"e":54.022},{"text":"a","s":54.102,"e":54.182},{"text":"bad","s":54.262,"e":54.422},{"text":"line","s":54.502,"e":54.582},{"text":"of","s":54.622,"e":54.662},{"text":"code.","s":54.742,"e":55.382},{"text":"A","s":55.622,"e":55.782},{"text":"bad","s":55.902,"e":56.022},{"text":"line","s":56.102,"e":56.262},{"text":"of","s":56.302,"e":56.342},{"text":"a","s":56.382,"e":56.422},{"text":"plan","s":56.502,"e":56.982},{"text":"can","s":57.142,"e":57.222},{"text":"become","s":57.302,"e":57.622},{"text":"hundreds","s":57.782,"e":58.262},{"text":"of","s":58.302,"e":58.342},{"text":"bad","s":58.422,"e":58.582},{"text":"lines","s":58.662,"e":58.822},{"text":"of","s":58.902,"e":58.982},{"text":"code.","s":59.062,"e":59.622},{"text":"And","s":59.862,"e":59.942},{"text":"a","s":59.982,"e":60.022},{"text":"bad","s":60.102,"e":60.262},{"text":"line","s":60.342,"e":60.422},{"text":"of","s":60.502,"e":60.582},{"text":"research,","s":60.662,"e":61.462},{"text":"a","s":61.502,"e":61.542},{"text":"misunderstanding","s":61.622,"e":62.342},{"text":"of","s":62.382,"e":62.422},{"text":"how","s":62.502,"e":62.582},{"text":"the","s":62.622,"e":62.662},{"text":"system","s":62.742,"e":63.062},{"text":"works,","s":63.142,"e":63.702},{"text":"can","s":63.782,"e":63.862},{"text":"become","s":63.942,"e":64.182},{"text":"thousands.","s":64.342,"e":65.262},{"text":"So","s":65.542,"e":65.702},{"text":"your","s":65.782,"e":65.862},{"text":"attention","s":66.142,"e":66.422},{"text":"has","s":66.502,"e":66.662},{"text":"the","s":66.702,"e":66.742},{"text":"most","s":66.902,"e":67.142},{"text":"leverage","s":67.302,"e":67.702},{"text":"early.","s":67.782,"e":68.422}]},{"template":"terminal","chapter":"Explore","narration":"Exploring is just asking. Cal from the Claude Code team suggests a prompt like this: search around, figure out how we'd do it, report back with two or three options, and don't start working. You get the agent's understanding on the table before any code exists.","params":{"title":"~/app · explore first","lines":[{"k":"you","text":"we need CSV export on the reports page. search around, figure out how"},{"k":"you","text":"we'd do it, and report back with 2-3 options. don't start working."},{"k":"tool","text":"Grep(\"export\", src/)","at":"search around"},{"k":"tool","text":"Read(src/reports/ReportTable.tsx)"},{"k":"tool","text":"Read(src/api/reports.ts)"},{"k":"agent","text":"Option A: client-side CSV from the loaded rows (fast, max 500 rows)","at":"two or three options"},{"k":"agent","text":"Option B: streaming endpoint /reports/:id.csv (handles any size)"},{"k":"agent","text":"Option C: background job + email link (overkill for now)"}]},"start":69.02,"dur":17.616,"words":[{"text":"Exploring","s":69.32,"e":70.04},{"text":"is","s":70.12,"e":70.28},{"text":"just","s":70.36,"e":70.52},{"text":"asking.","s":70.6,"e":71.16},{"text":"Cal","s":71.72,"e":72.04},{"text":"from","s":72.12,"e":72.2},{"text":"the","s":72.24,"e":72.28},{"text":"Claude","s":72.36,"e":72.6},{"text":"Code","s":72.68,"e":72.92},{"text":"team","s":73,"e":73.24},{"text":"suggests","s":73.32,"e":73.72},{"text":"a","s":73.76,"e":73.8},{"text":"prompt","s":73.88,"e":74.12},{"text":"like","s":74.2,"e":74.36},{"text":"this:","s":74.52,"e":74.76},{"text":"search","s":75.4,"e":75.56},{"text":"around,","s":75.64,"e":76.36},{"text":"figure","s":76.44,"e":76.68},{"text":"out","s":76.76,"e":76.84},{"text":"how","s":76.92,"e":77.08},{"text":"we'd","s":77.16,"e":77.32},{"text":"do","s":77.4,"e":77.48},{"text":"it,","s":77.56,"e":78.04},{"text":"report","s":78.12,"e":78.44},{"text":"back","s":78.52,"e":78.76},{"text":"with","s":78.84,"e":78.92},{"text":"two","s":79,"e":79.08},{"text":"or","s":79.16,"e":79.24},{"text":"three","s":79.32,"e":79.4},{"text":"options,","s":79.48,"e":80.12},{"text":"and","s":80.2,"e":80.28},{"text":"don't","s":80.44,"e":80.68},{"text":"start","s":80.76,"e":81},{"text":"working.","s":81.08,"e":81.56},{"text":"You","s":82.04,"e":82.12},{"text":"get","s":82.2,"e":82.28},{"text":"the","s":82.32,"e":82.36},{"text":"agent's","s":82.44,"e":82.76},{"text":"understanding","s":82.92,"e":83.4},{"text":"on","s":83.44,"e":83.48},{"text":"the","s":83.56,"e":83.64},{"text":"table","s":83.72,"e":84.04},{"text":"before","s":84.12,"e":84.52},{"text":"any","s":84.68,"e":84.84},{"text":"code","s":84.92,"e":85.16},{"text":"exists.","s":85.44,"e":86.04}]},{"template":"chat","chapter":"Plan","narration":"Then plan. Plan mode is surprisingly simple; Boris says it's one sentence telling the model not to write code yet. Matt Pocock goes further with a prompt he calls grill me: interview me relentlessly about this plan until we reach a shared understanding, one question at a time, each with your recommended answer.","params":{"messages":[{"from":"you","text":"Interview me relentlessly about this plan until we reach a shared understanding. One question at a time, with your recommended answer.","at":"grill me"},{"from":"agent","text":"Q1: Should the export include filtered rows only, or everything? **Recommended:** filtered only, since it matches what users see.","at":"one question"},{"from":"you","text":"Filtered only. Next."}]},"start":86.636,"dur":21.064,"words":[{"text":"Then","s":86.936,"e":87.256},{"text":"plan.","s":87.576,"e":88.056},{"text":"Plan","s":88.616,"e":88.856},{"text":"mode","s":88.936,"e":89.176},{"text":"is","s":89.256,"e":89.336},{"text":"surprisingly","s":89.456,"e":90.056},{"text":"simple;","s":90.216,"e":91.016},{"text":"Boris","s":91.096,"e":91.416},{"text":"says","s":91.576,"e":91.736},{"text":"it's","s":91.816,"e":92.056},{"text":"one","s":92.136,"e":92.296},{"text":"sentence","s":92.376,"e":92.776},{"text":"telling","s":92.856,"e":93.096},{"text":"the","s":93.176,"e":93.216},{"text":"model","s":93.256,"e":93.576},{"text":"not","s":93.736,"e":93.976},{"text":"to","s":94.056,"e":94.136},{"text":"write","s":94.256,"e":94.376},{"text":"code","s":94.496,"e":94.616},{"text":"yet.","s":94.696,"e":94.936},{"text":"Matt","s":95.496,"e":95.656},{"text":"Pocock","s":95.736,"e":96.216},{"text":"goes","s":96.256,"e":96.456},{"text":"further","s":96.536,"e":96.856},{"text":"with","s":96.936,"e":97.016},{"text":"a","s":97.056,"e":97.096},{"text":"prompt","s":97.176,"e":97.416},{"text":"he","s":97.496,"e":97.576},{"text":"calls","s":97.736,"e":97.896},{"text":"grill","s":98.136,"e":98.456},{"text":"me:","s":98.576,"e":99.176},{"text":"interview","s":99.256,"e":99.656},{"text":"me","s":99.736,"e":99.816},{"text":"relentlessly","s":99.896,"e":100.616},{"text":"about","s":100.736,"e":100.856},{"text":"this","s":100.936,"e":101.016},{"text":"plan","s":101.096,"e":101.416},{"text":"until","s":101.496,"e":101.736},{"text":"we","s":101.776,"e":101.816},{"text":"reach","s":101.896,"e":102.136},{"text":"a","s":102.176,"e":102.216},{"text":"shared","s":102.376,"e":102.616},{"text":"understanding,","s":102.696,"e":103.656},{"text":"one","s":103.736,"e":103.896},{"text":"question","s":103.976,"e":104.296},{"text":"at","s":104.336,"e":104.376},{"text":"a","s":104.456,"e":104.496},{"text":"time,","s":104.536,"e":105.256},{"text":"each","s":105.376,"e":105.496},{"text":"with","s":105.576,"e":105.656},{"text":"your","s":105.736,"e":105.896},{"text":"recommended","s":105.976,"e":106.376},{"text":"answer.","s":106.456,"e":107.096}]},{"template":"quote","chapter":"Plan","narration":"Pocock's insight is that the goal of planning isn't the document. It's alignment. As he puts it: I didn't need a plan, I needed to be on the same wavelength as my agent.","params":{"text":"I didn't need a plan, I needed to be on the *same wavelength* as my agent.","who":"Matt Pocock","role":"TypeScript educator","src":"Full Walkthrough: Workflow for AI Coding · AI Engineer","t":1055},"start":107.7,"dur":12.026,"words":[{"text":"Pocock's","s":108,"e":108.56},{"text":"insight","s":108.64,"e":109.12},{"text":"is","s":109.2,"e":109.28},{"text":"that","s":109.36,"e":109.44},{"text":"the","s":109.52,"e":109.6},{"text":"goal","s":109.68,"e":109.84},{"text":"of","s":109.92,"e":110},{"text":"planning","s":110.08,"e":110.64},{"text":"isn't","s":110.72,"e":110.96},{"text":"the","s":111,"e":111.04},{"text":"document.","s":111.2,"e":111.76},{"text":"It's","s":112.16,"e":112.28},{"text":"alignment.","s":112.32,"e":113.24},{"text":"As","s":113.52,"e":113.6},{"text":"he","s":113.68,"e":113.76},{"text":"puts","s":113.84,"e":114},{"text":"it:","s":114.08,"e":114.24},{"text":"I","s":114.72,"e":114.8},{"text":"didn't","s":114.88,"e":115.04},{"text":"need","s":115.12,"e":115.28},{"text":"a","s":115.32,"e":115.36},{"text":"plan,","s":115.44,"e":116.24},{"text":"I","s":116.32,"e":116.4},{"text":"needed","s":116.48,"e":116.64},{"text":"to","s":116.72,"e":116.8},{"text":"be","s":116.84,"e":116.88},{"text":"on","s":116.96,"e":117.04},{"text":"the","s":117.12,"e":117.2},{"text":"same","s":117.32,"e":117.44},{"text":"wavelength","s":117.6,"e":118.08},{"text":"as","s":118.16,"e":118.24},{"text":"my","s":118.32,"e":118.4},{"text":"agent.","s":118.64,"e":119.12}]},{"template":"compare","chapter":"Vertical slices","narration":"One more planning trap. Ask a model for a plan, and it loves going layer by layer: the whole database, then all the services, then the API, then the front end. Nothing can be tested until the very end. Instead, ask for thin vertical slices, each one cutting through every layer and testable on its own.","params":{"left":{"title":"Horizontal plan","items":["1. All the database tables","2. All the services","3. All the API endpoints","4. The whole UI · first test here"],"at":"layer by layer"},"right":{"title":"Vertical slices","items":["1. Export button → stub CSV · test","2. Real data for one report · test","3. Filters respected · test","4. Large reports stream · test"],"at":"vertical slices"}},"start":119.726,"dur":21.717,"words":[{"text":"One","s":120.026,"e":120.266},{"text":"more","s":120.346,"e":120.506},{"text":"planning","s":120.586,"e":120.906},{"text":"trap.","s":120.986,"e":121.586},{"text":"Ask","s":121.866,"e":122.106},{"text":"a","s":122.186,"e":122.226},{"text":"model","s":122.266,"e":122.506},{"text":"for","s":122.586,"e":122.666},{"text":"a","s":122.706,"e":122.746},{"text":"plan,","s":122.826,"e":123.386},{"text":"and","s":123.426,"e":123.466},{"text":"it","s":123.546,"e":123.706},{"text":"loves","s":123.866,"e":124.186},{"text":"going","s":124.266,"e":124.506},{"text":"layer","s":124.666,"e":124.906},{"text":"by","s":124.986,"e":125.146},{"text":"layer:","s":125.226,"e":126.026},{"text":"the","s":126.106,"e":126.186},{"text":"whole","s":126.266,"e":126.346},{"text":"database,","s":126.426,"e":127.226},{"text":"then","s":127.306,"e":127.386},{"text":"all","s":127.426,"e":127.466},{"text":"the","s":127.546,"e":127.626},{"text":"services,","s":127.706,"e":128.666},{"text":"then","s":128.746,"e":128.826},{"text":"the","s":128.866,"e":128.906},{"text":"API,","s":128.986,"e":129.866},{"text":"then","s":129.946,"e":130.026},{"text":"the","s":130.066,"e":130.106},{"text":"front","s":130.186,"e":130.346},{"text":"end.","s":130.426,"e":131.146},{"text":"Nothing","s":131.226,"e":131.546},{"text":"can","s":131.626,"e":131.706},{"text":"be","s":131.786,"e":131.866},{"text":"tested","s":132.106,"e":132.346},{"text":"until","s":132.506,"e":132.666},{"text":"the","s":132.786,"e":132.906},{"text":"very","s":133.066,"e":133.226},{"text":"end.","s":133.306,"e":134.106},{"text":"Instead,","s":134.386,"e":134.986},{"text":"ask","s":135.066,"e":135.306},{"text":"for","s":135.426,"e":135.546},{"text":"thin","s":135.626,"e":135.866},{"text":"vertical","s":136.026,"e":136.346},{"text":"slices,","s":136.426,"e":137.386},{"text":"each","s":137.506,"e":137.626},{"text":"one","s":137.706,"e":137.946},{"text":"cutting","s":138.026,"e":138.266},{"text":"through","s":138.386,"e":138.506},{"text":"every","s":138.586,"e":138.826},{"text":"layer","s":138.906,"e":139.306},{"text":"and","s":139.386,"e":139.466},{"text":"testable","s":139.626,"e":140.026},{"text":"on","s":140.106,"e":140.186},{"text":"its","s":140.266,"e":140.346},{"text":"own.","s":140.466,"e":140.826}]},{"template":"flow","chapter":"Implement","narration":"Now implement. Save the plan to a file, start a fresh session, and give it only the plan, so the context is clean. Let it work through the slices, review each change, and commit as you go. Brendan O'Leary treats his local git history as a first pull request review of the agent's work.","params":{"nodes":[{"label":"plan.md","sub":"saved to a file","kind":"doc","at":"plan to a file"},{"label":"Fresh session","sub":"clean context","kind":"agent","at":"fresh session"},{"label":"Slice by slice","sub":"small diffs","kind":"code","at":"slices"},{"label":"Review + commit","sub":"after each slice","kind":"check","at":"commit"}]},"start":141.443,"dur":19.236,"words":[{"text":"Now","s":141.743,"e":142.063},{"text":"implement.","s":142.223,"e":142.863},{"text":"Save","s":143.423,"e":143.663},{"text":"the","s":143.703,"e":143.743},{"text":"plan","s":143.823,"e":143.983},{"text":"to","s":144.063,"e":144.143},{"text":"a","s":144.223,"e":144.303},{"text":"file,","s":144.503,"e":144.943},{"text":"start","s":145.023,"e":145.263},{"text":"a","s":145.29,"e":145.316},{"text":"fresh","s":145.343,"e":145.583},{"text":"session,","s":145.663,"e":146.383},{"text":"and","s":146.423,"e":146.463},{"text":"give","s":146.543,"e":146.623},{"text":"it","s":146.703,"e":146.863},{"text":"only","s":146.943,"e":147.183},{"text":"the","s":147.263,"e":147.343},{"text":"plan,","s":147.423,"e":147.983},{"text":"so","s":148.063,"e":148.143},{"text":"the","s":148.183,"e":148.223},{"text":"context","s":148.303,"e":148.783},{"text":"is","s":148.863,"e":148.943},{"text":"clean.","s":149.023,"e":149.663},{"text":"Let","s":149.983,"e":150.063},{"text":"it","s":150.103,"e":150.143},{"text":"work","s":150.223,"e":150.383},{"text":"through","s":150.463,"e":150.543},{"text":"the","s":150.623,"e":150.663},{"text":"slices,","s":150.703,"e":151.503},{"text":"review","s":151.703,"e":151.903},{"text":"each","s":152.023,"e":152.143},{"text":"change,","s":152.223,"e":152.783},{"text":"and","s":152.823,"e":152.863},{"text":"commit","s":152.943,"e":153.343},{"text":"as","s":153.423,"e":153.503},{"text":"you","s":153.583,"e":153.663},{"text":"go.","s":153.783,"e":153.983},{"text":"Brendan","s":154.623,"e":154.943},{"text":"O'Leary","s":154.983,"e":155.423},{"text":"treats","s":155.463,"e":155.743},{"text":"his","s":155.823,"e":155.903},{"text":"local","s":155.983,"e":156.223},{"text":"git","s":156.383,"e":156.543},{"text":"history","s":156.623,"e":157.023},{"text":"as","s":157.103,"e":157.183},{"text":"a","s":157.263,"e":157.423},{"text":"first","s":157.583,"e":157.743},{"text":"pull","s":157.823,"e":157.983},{"text":"request","s":158.063,"e":158.463},{"text":"review","s":158.543,"e":158.863},{"text":"of","s":158.903,"e":158.943},{"text":"the","s":159.023,"e":159.103},{"text":"agent's","s":159.263,"e":159.503},{"text":"work.","s":159.583,"e":160.063}]},{"template":"statement","chapter":"Verify","narration":"And verify. Every slice in the plan should say how you'll know it works: a test, a command, a screenshot. If the plan can't say how to check it, it isn't finished yet. We'll go deep on verification in lesson eight.","params":{"text":"If the plan can't say how to *check it*, the plan isn't finished.","sub":"Each slice: what changes, which files, and the command that proves it works.","art":"check","tone":"good","sync":false},"start":160.679,"dur":15.056,"words":[{"text":"And","s":160.979,"e":161.219},{"text":"verify.","s":161.299,"e":162.259},{"text":"Every","s":162.579,"e":162.819},{"text":"slice","s":162.899,"e":163.219},{"text":"in","s":163.259,"e":163.299},{"text":"the","s":163.339,"e":163.379},{"text":"plan","s":163.459,"e":163.779},{"text":"should","s":163.899,"e":164.019},{"text":"say","s":164.099,"e":164.179},{"text":"how","s":164.339,"e":164.579},{"text":"you'll","s":164.659,"e":164.819},{"text":"know","s":164.899,"e":164.979},{"text":"it","s":165.059,"e":165.139},{"text":"works:","s":165.219,"e":165.939},{"text":"a","s":166.019,"e":166.099},{"text":"test,","s":166.339,"e":166.739},{"text":"a","s":166.779,"e":166.819},{"text":"command,","s":166.899,"e":167.539},{"text":"a","s":167.579,"e":167.619},{"text":"screenshot.","s":167.699,"e":168.339},{"text":"If","s":168.819,"e":168.899},{"text":"the","s":168.979,"e":169.059},{"text":"plan","s":169.219,"e":169.379},{"text":"can't","s":169.459,"e":169.699},{"text":"say","s":169.779,"e":169.859},{"text":"how","s":169.939,"e":170.019},{"text":"to","s":170.099,"e":170.179},{"text":"check","s":170.259,"e":170.419},{"text":"it,","s":170.499,"e":170.819},{"text":"it","s":170.899,"e":171.059},{"text":"isn't","s":171.139,"e":171.379},{"text":"finished","s":171.539,"e":171.699},{"text":"yet.","s":171.779,"e":172.419},{"text":"We'll","s":172.459,"e":172.579},{"text":"go","s":172.659,"e":172.819},{"text":"deep","s":172.899,"e":173.059},{"text":"on","s":173.139,"e":173.219},{"text":"verification","s":173.299,"e":174.019},{"text":"in","s":174.099,"e":174.179},{"text":"lesson","s":174.259,"e":174.499},{"text":"eight.","s":174.659,"e":175.139}]},{"template":"list","chapter":"When to skip it","narration":"Does every task need the full loop? No. Boris describes three modes. For a quick prototype, just let it build and throw it away. For small tasks it can one-shot, like a typo or a rename, auto-accept and move on. For anything harder, start in plan mode. Dex adds that thirty minutes of planning can save hours of review.","params":{"title":"Match the process to the task","items":[{"text":"Prototype","sub":"let it build, learn, then throw it away","at":"prototype"},{"text":"Tiny, obvious change","sub":"a typo, a rename: just do it","at":"typo"},{"text":"Anything harder","sub":"start in plan mode","at":"harder"}],"hnote":{"text":"30 min of planning saves hours of review","at":"thirty","p":[72,70],"pp":[50,80]}},"start":175.735,"dur":23.232,"words":[{"text":"Does","s":176.035,"e":176.275},{"text":"every","s":176.435,"e":176.675},{"text":"task","s":176.755,"e":177.155},{"text":"need","s":177.235,"e":177.315},{"text":"the","s":177.395,"e":177.475},{"text":"full","s":177.555,"e":177.715},{"text":"loop?","s":177.795,"e":178.515},{"text":"No.","s":178.675,"e":179.195},{"text":"Boris","s":179.475,"e":179.795},{"text":"describes","s":179.875,"e":180.435},{"text":"three","s":180.515,"e":180.755},{"text":"modes.","s":180.835,"e":181.475},{"text":"For","s":181.715,"e":181.795},{"text":"a","s":181.875,"e":181.955},{"text":"quick","s":182.035,"e":182.195},{"text":"prototype,","s":182.515,"e":183.075},{"text":"just","s":183.155,"e":183.315},{"text":"let","s":183.395,"e":183.475},{"text":"it","s":183.555,"e":183.635},{"text":"build","s":183.795,"e":183.955},{"text":"and","s":184.035,"e":184.115},{"text":"throw","s":184.195,"e":184.355},{"text":"it","s":184.435,"e":184.475},{"text":"away.","s":184.515,"e":185.315},{"text":"For","s":185.395,"e":185.475},{"text":"small","s":185.555,"e":185.795},{"text":"tasks","s":185.875,"e":186.355},{"text":"it","s":186.435,"e":186.515},{"text":"can","s":186.595,"e":186.755},{"text":"one-shot,","s":186.835,"e":187.475},{"text":"like","s":187.555,"e":187.635},{"text":"a","s":187.715,"e":187.795},{"text":"typo","s":187.955,"e":188.355},{"text":"or","s":188.435,"e":188.515},{"text":"a","s":188.595,"e":188.635},{"text":"rename,","s":188.675,"e":189.475},{"text":"auto-accept","s":189.595,"e":190.195},{"text":"and","s":190.355,"e":190.435},{"text":"move","s":190.515,"e":190.675},{"text":"on.","s":190.755,"e":191.395},{"text":"For","s":191.475,"e":191.555},{"text":"anything","s":191.755,"e":191.955},{"text":"harder,","s":192.075,"e":192.595},{"text":"start","s":192.675,"e":192.995},{"text":"in","s":193.075,"e":193.235},{"text":"plan","s":193.395,"e":193.555},{"text":"mode.","s":193.635,"e":194.355},{"text":"Dex","s":194.435,"e":194.675},{"text":"adds","s":194.755,"e":195.075},{"text":"that","s":195.195,"e":195.315},{"text":"thirty","s":195.395,"e":195.555},{"text":"minutes","s":195.635,"e":195.875},{"text":"of","s":195.955,"e":196.035},{"text":"planning","s":196.075,"e":196.435},{"text":"can","s":196.515,"e":196.675},{"text":"save","s":196.875,"e":197.075},{"text":"hours","s":197.275,"e":197.475},{"text":"of","s":197.555,"e":197.635},{"text":"review.","s":197.835,"e":198.355}]},{"template":"quiz","chapter":"Quick check","narration":"Quick check. Your agent proposes this plan: first every database table, then all the services, then every endpoint, then the entire UI. What's the problem? Tap your answer.","params":{"q":"Plan: all DB tables → all services → all endpoints → the whole UI. What's the problem?","options":["Nothing, that's how apps are built","Nothing is testable end to end until the very end","It should start with the UI instead","Plans are unnecessary for agents"],"answer":1,"explain":"Horizontal plans hide integration problems until the end. Thin vertical slices give you a checkpoint every step."},"start":198.967,"dur":18.326,"words":[{"text":"Quick","s":199.267,"e":199.507},{"text":"check.","s":199.587,"e":199.907},{"text":"Your","s":200.387,"e":200.547},{"text":"agent","s":200.627,"e":200.867},{"text":"proposes","s":200.947,"e":201.427},{"text":"this","s":201.507,"e":201.667},{"text":"plan:","s":201.747,"e":202.547},{"text":"first","s":202.627,"e":202.947},{"text":"every","s":203.107,"e":203.347},{"text":"database","s":203.427,"e":203.827},{"text":"table,","s":203.907,"e":204.547},{"text":"then","s":204.627,"e":204.867},{"text":"all","s":204.947,"e":205.027},{"text":"the","s":205.107,"e":205.187},{"text":"services,","s":205.267,"e":206.147},{"text":"then","s":206.227,"e":206.467},{"text":"every","s":206.547,"e":206.787},{"text":"endpoint,","s":206.867,"e":207.747},{"text":"then","s":207.827,"e":208.067},{"text":"the","s":208.147,"e":208.227},{"text":"entire","s":208.387,"e":208.787},{"text":"UI.","s":208.867,"e":209.347},{"text":"What's","s":209.907,"e":210.107},{"text":"the","s":210.147,"e":210.187},{"text":"problem?","s":210.227,"e":210.707},{"text":"Tap","s":211.107,"e":211.347},{"text":"your","s":211.427,"e":211.507},{"text":"answer.","s":211.707,"e":212.147}]},{"template":"exercise","chapter":"Try it","narration":"Run the whole loop on one of the tasks from lesson one. Use this prompt to explore, get interviewed, and produce a plan in vertical slices, each with its own check. Then implement it in a fresh session.","params":{"title":"Try it with your agent","intro":"Pick a real task and paste:","prompt":"I want to [describe the feature]. Don't write code yet.\n1. Explore the relevant code and explain how it works today.\n2. Interview me one question at a time, with your recommended answer.\n3. Write a plan as thin vertical slices, each with the exact\n   command or test that verifies it. Save it to plans/[name].md."},"start":217.293,"dur":13.698,"words":[{"text":"Run","s":217.593,"e":217.833},{"text":"the","s":217.913,"e":217.993},{"text":"whole","s":218.073,"e":218.233},{"text":"loop","s":218.313,"e":218.633},{"text":"on","s":218.713,"e":218.793},{"text":"one","s":218.873,"e":218.953},{"text":"of","s":218.993,"e":219.033},{"text":"the","s":219.113,"e":219.153},{"text":"tasks","s":219.193,"e":219.673},{"text":"from","s":219.753,"e":219.833},{"text":"lesson","s":219.913,"e":220.153},{"text":"one.","s":220.313,"e":220.873},{"text":"Use","s":221.193,"e":221.353},{"text":"this","s":221.433,"e":221.513},{"text":"prompt","s":221.673,"e":221.913},{"text":"to","s":221.953,"e":221.993},{"text":"explore,","s":222.073,"e":222.873},{"text":"get","s":222.953,"e":223.033},{"text":"interviewed,","s":223.113,"e":223.833},{"text":"and","s":223.913,"e":223.993},{"text":"produce","s":224.153,"e":224.313},{"text":"a","s":224.393,"e":224.473},{"text":"plan","s":224.553,"e":224.793},{"text":"in","s":224.873,"e":224.953},{"text":"vertical","s":225.113,"e":225.433},{"text":"slices,","s":225.513,"e":226.313},{"text":"each","s":226.393,"e":226.633},{"text":"with","s":226.713,"e":226.793},{"text":"its","s":226.873,"e":226.953},{"text":"own","s":227.033,"e":227.193},{"text":"check.","s":227.273,"e":227.593},{"text":"Then","s":228.073,"e":228.313},{"text":"implement","s":228.553,"e":228.953},{"text":"it","s":229.033,"e":229.113},{"text":"in","s":229.193,"e":229.273},{"text":"a","s":229.313,"e":229.353},{"text":"fresh","s":229.433,"e":229.673},{"text":"session.","s":229.873,"e":230.393}]},{"template":"recap","chapter":"Recap","narration":"Recap. Explore, plan, implement, verify. Spend your attention upstream, where mistakes are cheapest. Plan for alignment, in vertical slices you can test. Then implement from the plan in a fresh session. Next: how to write specs an agent can actually execute.","params":{"items":["Explore → plan → implement → *verify*","Upstream mistakes cost the most","Plans in vertical, testable slices","Implement from the plan in a fresh session"],"next":"Specs agents can execute","next_at":"Next"},"start":230.991,"dur":21.622,"words":[{"text":"Recap.","s":231.291,"e":231.771},{"text":"Explore,","s":231.931,"e":233.211},{"text":"plan,","s":233.291,"e":234.011},{"text":"implement,","s":234.291,"e":234.891},{"text":"verify.","s":234.971,"e":235.611},{"text":"Spend","s":236.171,"e":236.491},{"text":"your","s":236.531,"e":236.571},{"text":"attention","s":236.651,"e":237.131},{"text":"upstream,","s":237.211,"e":238.011},{"text":"where","s":238.091,"e":238.171},{"text":"mistakes","s":238.331,"e":238.651},{"text":"are","s":238.731,"e":238.811},{"text":"cheapest.","s":238.891,"e":239.451},{"text":"Plan","s":239.851,"e":240.171},{"text":"for","s":240.251,"e":240.331},{"text":"alignment,","s":240.611,"e":241.211},{"text":"in","s":241.291,"e":241.371},{"text":"vertical","s":241.451,"e":241.771},{"text":"slices","s":241.851,"e":242.331},{"text":"you","s":242.411,"e":242.491},{"text":"can","s":242.571,"e":242.651},{"text":"test.","s":242.851,"e":243.531},{"text":"Then","s":243.611,"e":243.931},{"text":"implement","s":244.171,"e":244.651},{"text":"from","s":244.731,"e":244.811},{"text":"the","s":244.851,"e":244.891},{"text":"plan","s":244.971,"e":245.371},{"text":"in","s":245.451,"e":245.531},{"text":"a","s":245.571,"e":245.611},{"text":"fresh","s":245.691,"e":245.931},{"text":"session.","s":246.011,"e":247.051},{"text":"Next:","s":247.131,"e":247.931},{"text":"how","s":248.011,"e":248.091},{"text":"to","s":248.131,"e":248.171},{"text":"write","s":248.251,"e":248.411},{"text":"specs","s":248.491,"e":248.891},{"text":"an","s":248.931,"e":248.971},{"text":"agent","s":249.131,"e":249.371},{"text":"can","s":249.451,"e":249.691},{"text":"actually","s":249.931,"e":250.171},{"text":"execute.","s":250.251,"e":251.051}]}],"total":253.013,"audio":"/audio/05-core-loop.mp3"}