Modern Creator
Matt Pocock · YouTube

How I use Claude Code for real engineering

A 10-minute real-session walkthrough of Matt Pocock's multi-phase planning workflow — plan mode, concision rules, and GitHub Issues as context bridges.

Posted
6 months ago
Duration
Format
Tutorial
educational
Views
267.5K
5.4K likes
Big Idea

The argument in one line.

Breaking large Claude Code projects into multi-phase plans with concision rules and GitHub Issues as context bridges lets you ship complex features without context window anxiety.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • A TypeScript or JavaScript engineer shipping features through Claude Code who wants to structure multi-phase work within single context windows.
  • Someone already using Claude Code but frustrated with verbose plans, unclear next steps, or losing work across context resets and GitHub Issues.
  • A developer managing complex features that exceed one context window and needs a repeatable system to stay on track without manual overhead.
SKIP IF…
  • You're working in a language or domain Claude Code doesn't handle well — this workflow is tightly coupled to TypeScript and web/CLI tooling.
  • You're looking for how to build the initial prompt or specification — this assumes you already know how to brief an AI tool and focuses only on execution workflow.
TL;DR

The full version, fast.

Claude Code becomes useful for non-trivial features when you front-load planning instead of jumping straight to code. Activate plan mode before the first prompt, force the model to explore the codebase and surface clarifying questions, then demand a multi-phase plan it can execute one chunk at a time. A single CLAUDE.md rule � be extremely concise, sacrifice grammar for concision � makes the plans and questions readable, and a second rule requiring unresolved questions after every plan keeps ambiguity visible. Monitor context usage between phases, stage diffs as you go, and persist the multi-phase plan as a GitHub Issue so you can clear context mid-feature and resume cleanly in a fresh window without losing progress.

Members feature

Chat with this breakdown.

Modern Creator members can chat with any breakdown — ask for the hook, quote a framework, find the exact transcript moment. Unlocks at T2: refer 3 friends + add your own API key.

Create a free account →
Chapters

Where the time goes.

00:0000:53

01 · Cold open + premise

Building a get-diffs CLI command for AI Hero courses. Frame: what I'm doing is less important than how I'm doing it.

00:5302:11

02 · Plan mode explores, surfaces clarifying questions

Claude explores codebase via sub-agents, returns an interactive multi-step form. Matt answers: required option, flexible matching, diff sequence numbering.

02:1103:16

03 · Rules file reveal — the concision rule

Escapes to /memory, shows 43-line CLAUDE.md. Key rule highlighted: be extremely concise and sacrifice grammar for the sake of concision. Called his favourite rule ever.

03:1604:54

04 · Make the plan multi-phase

Rejects single-plan output. 5-phase plan appears. Context check: 83.7% free. Switches to accept-edits, types execute phase one.

04:5407:35

05 · Execution loop: phases 1-3

Phase 1 done in 3k tokens. Opens VS Code, reviews diff, stages. Returns with claude continue. Phases 2 and 3 follow same rhythm. Handles accidental formatter run by telling Claude to re-read files.

07:3508:46

06 · GitHub Issue as context bridge

Creates gh issue with full plan including checked-off phases. Clears context to 16k tokens. Types: Get the GitHub issue 24 and enact phase 4 of that plan.

08:4609:45

07 · Phases 4-5 from fresh context

Claude fetches issue, reads correct file, implements. Issue stays in context so phase 5 needs no second fetch.

09:4510:11

08 · Three top tips

Explicit recap: (1) concision rule in memory, (2) unresolved questions at end of each plan, (3) GitHub CLI for cross-context plan persistence.

Atomic Insights

Lines worth screenshotting.

  • Starting every large task in plan mode forces the agent to explore the codebase and ask clarifying questions before writing a single line of code.
  • A single CLAUDE.md rule — be extremely concise and sacrifice grammar for the sake of concision — produces dramatically more readable and actionable plans.
  • Asking for clarifying questions before execution, then forcing a multi-phase breakdown, is the two-step that prevents context window overruns on large features.
  • Monitoring context usage before starting execution phase gives you the signal to either proceed or reset before the conversation degrades.
  • Saving the plan as a GitHub Issue before resetting the context window is the cleanest way to bridge information across sessions without re-explaining everything.
  • Breaking a build into named phases (Phase 1, Phase 2) and executing them sequentially produces tighter, more reviewable diffs than letting the agent sprawl.
  • Dictating your initial prompt and your answers to clarifying questions is faster and produces better specifications than typing them from scratch.
  • Using Control-C to exit, running a CLI command, and then running claude continue picks the conversation back up seamlessly — no need to re-explain the plan.
  • Unresolved questions at the end of a plan are a feature, not a failure — they surface design decisions that would otherwise silently bake in the wrong assumptions.
  • Auto-accepting edits during the execution phase and reviewing the diff at the end is faster than approving each change individually on large features.
  • The status line showing repo, branch, and staged/unstaged/new file counts gives you a live map of what the agent has touched without opening a file browser.
  • Plan mode plus multi-phase breakdown is a replicable workflow that works for any feature size, not just large ones — the overhead is lower than most developers assume.
Takeaway

Steal the GitHub Issue trick.

Joe's Claude Code workflow

The plan that survives a context reset is a plan stored outside the context window.

  • Add one rule to your CLAUDE.md right now: be extremely concise and sacrifice grammar for the sake of concision. That single line makes plans scannable and questions answerable.
  • Tell Claude to end every plan with a list of unresolved questions. Turns planning into a form you can answer fast.
  • When a feature spans more than one session, type make the plan multi-phase before executing anything.
  • Before your context fills: gh issue create with the full plan, checkboxes intact. Clear context. Resume with get GitHub issue N and enact phase X.
  • Check context between phases with /context — not obsessively, but before each major execution block.
  • If a file changes outside Claude (formatter, linter, manual save): tell it directly to pull the files into context. One line, done.
Glossary

Terms worth knowing.

Claude Code
Anthropic's command-line coding assistant that runs in a terminal, reads and edits files in a project, and executes shell commands on the developer's behalf.
CLI
Command-line interface — a text-based program operated by typing commands in a terminal rather than clicking through a graphical interface.
Plan mode
A Claude Code setting, toggled with shift-tab, where the assistant explores the codebase and proposes a written plan instead of immediately editing files.
Sub-agent
A secondary Claude instance spawned to handle a focused task such as searching a codebase, returning a summary so the main session preserves its context window.
Context window
The fixed amount of text a language model can hold in memory at once, including prior messages, files read, and tool output; once full, older content must be dropped or summarized.
LLM
Large language model — the underlying AI system, such as Claude, that generates text responses based on a prompt and the contents of its context window.
Token
The unit of text a language model processes, roughly three-quarters of a word; context window size and usage are measured in tokens.
Memory file
A persistent rules file Claude Code loads at the start of every session, used to inject standing instructions about style, tools, and workflow preferences.
User memory vs project memory
Two scopes for Claude Code's rules file — user memory applies across every project on the machine, while project memory only loads inside a specific repository.
Positional argument vs required option
Two ways to pass input to a CLI command — a positional argument is supplied by order with no flag, while a required option must be passed with a named flag such as --repo.
Multi-phase plan
A plan deliberately broken into sequential implementation steps so each phase can be executed and reviewed in its own context window without overflowing the model's memory.
Auto accept edits
A Claude Code mode that applies file edits without pausing for human approval on each change, used once the developer trusts the direction of the work.
Status line
A customizable bar at the bottom of the Claude Code terminal that surfaces session info such as current repo, git branch, and counts of staged or unstaged files.
Staged vs unstaged files
Git states for changes — staged files are queued for the next commit via git add, while unstaged files have been modified but not yet marked for commit.
Git diff
A view that shows line-by-line differences between two versions of files, used to review what changed before committing.
GitHub CLI
A command-line tool (gh) that talks to GitHub directly from the terminal to create issues, open pull requests, and read repository data without using the web interface.
GitHub Issue
A trackable note attached to a GitHub repository, used here as durable storage for a multi-phase plan so the work can survive a cleared context window.
Changeset
A tool that records intended version bumps and release notes per pull request, then bundles them into a versioned release when merged.
pnpm
A fast Node.js package manager that installs dependencies using a shared content-addressable store, reducing disk use compared with npm or yarn.
TypeScript
A typed superset of JavaScript that catches type mismatches at compile time; a TypeScript error indicates the compiler flagged a type problem in the code.
Resources Mentioned

Things they pointed at.

02:11toolCLAUDE.md memory system
Quotables

Lines you could clip.

00:13
What I'm doing is less important than how I'm doing it.
Zero setup, clean frame — works as a hook with no context neededTikTok hook↗ Tweet quote
02:52
It's 100% my favorite thing I've added to rules and I'm never taking it out.
Conviction + specificity — drives commentsIG reel cold open↗ Tweet quote
03:37
My spidey senses are tingling here.
Personality moment — developer intuition over AI outputClip mid-point for retention hook↗ Tweet quote
07:20
I'm being very direct with it. Pull the files into your context.
Practical tip delivered in one punchy lineTikTok tip clip↗ Tweet quote
The Script

Word for word.

metaphor
00:00What's up, friends? We're gonna do a little bit of a different kind of video. I've been working a lot with Claude code recently.
00:05I've been getting a lot of questions on how I use it. And so I just sat down to do a little bit of work, and I realized this is actually a really good opportunity to show a complicated multi phase plan with Claude code.
00:16The only thing I've done so far is I've written this prompt here. I'm doing a bit of work to add a CLI command to an internal CLI that I have to do with my AI hero courses. But what I'm doing is less important than how I'm doing it.
00:28All you really need to know is this is a pretty large feature that will go probably beyond a single context window. I have here an initial prompt that I've put in. I haven't really put too much thought into this.
00:39The way I produced this was I just talked into my microphone and used a dictation tool to dictate it in. And I've also activated plan mode here by tabbing or shift tabbing through until I hit plan mode in the bottom left. Whenever I embark out on a big piece of work, I'm always thinking about creating a plan first.
00:57Let's get this running and I can actually talk through while it's going. So this plan is basically it's sort of forcing Claude code to explore the code base first.
01:06We can see it's kicked off an explore sub agent task to explore the current CLI structure in the code base. It's also doing some searching here, just searching different files, searching different patterns. And what I'm waiting for it to do is to figure out anything that's unclear from my specification and give me back some sort of plan.
01:22Again, we can see it's doing a lot of stuff here. It's reading different files. It's doing some other stuff.
01:27Let me check the structure for explainer solution folders. And now this is really cool. It's come back with some clarifying questions.
01:33What is the part of the project repo where you want to get commit diffs from? I'm gonna make it a CLI option. I just press return to choose that one.
01:40It's asking whether I wanted to use a positional argument or required option. I'm gonna choose a required option. And it's now asking me a really specific question about my implementation like should it match exercise numbers strictly or flexibly?
01:50I'll choose flexible. And again, it's asking a clarifying question here. What does the o one represent?
01:55It represents the sequence of the diff. This is basically a multi step form and then I end up with the submit. I'm ready to submit my answers.
02:01Let's go. Alright. It has now come back with a plan.
02:04Now this plan might look a little bit different from the plans that you tend to get from Claude code. The first thing is it's extremely concise here.
02:12We have a fair few sections but the stuff inside those sections is pretty easy to read. This is because I have this configured like that in my rules which we'll look at in a moment. We have a new file, get diffs dot t s, and an updated file that seems fine.
02:24And it's created some implementation steps here too. The crucial thing though, and I have this set up in my rules too, is it's given me some unresolved questions.
02:31And I get to choose whether I want to auto accept the edits, manually approve the edits, keep planning. I'm gonna escape out of this for now just so I can show you what's in my rules file. You can call this command memory and you can basically be taken to your user memory or project memory.
02:44This is what my user memory looks like. It's really not very long, only about 43 lines. I've given it just some very light hints about what I want.
02:53The crucial thing though is to say in all interactions and commit messages be extremely concise and sacrifice grammar for the sake of concision. That's why that plan is so concise and easy to read is because of this top line rule. And it's a 100% my favorite thing I've added to rules and I'm never taking it out.
03:09There's some stuff in here that's specific to my workflow like PR comments, like change sets as well which I use in quite a few repos. I've already said that your primary method for interacting with GitHub should be the GitHub CLI.
03:20When creating branches, prefix them with mat to indicate they came from me. Very, light stuff. But here's the one we're seeing here which is at the end of each plan, give me a list of unresolved questions to answer if any.
03:30And again, make the questions extremely concise. Sacrifice grammar for the sake of concision. This is why then we're getting this list of unresolved questions right to the point where we can see them.
03:38So I'm now going to dictate my answers to these questions into this box. I'll just do the first question just so you get the idea. Yep.
03:44You can overwrite existing diff files. That's absolutely fine. And thanks to my dictation tool, this ends up Okay.
03:48I've now got my full answers to those questions. Let's submit it and it's going to continue creating another plan. Notice how we haven't written any codes yet.
03:55This is all just planning before we dive into code. Okay. It's now given me a plan without any unresolved questions.
04:01Questions. But my spidey senses are tingling here, and I've got a feeling this is a pretty large piece of work. And if this piece of work is too large, it's going to overrun the context window of the LLM.
04:11It's going to be much better going forward if I break this into a multi phase plan that I can split over multiple context windows. So I'm actually gonna say no, keep planning, and then make the plan multi phase. Make the plan multi phase is really, really nice because it's going to tell Claude to break this down into a set of implementation steps.
04:29And now we have our multi phase plan. Beautiful. Now at this point, I'm starting to get a little bit nervous about my context window.
04:36Like, that's a paranoia that I have. And I'm just gonna go and exit out of there and just check my context and see how it's doing. We can see that so far we have 83.7 free space.
04:45That's feeling pretty good. We've only used about 33 k tokens. Lovely.
04:49So I think having had all the exploration and now having this plan in memory, we can then start executing the plan. So I'm gonna swap to auto accept edits and I'm gonna say execute phase one.
05:02Let's go. Okay. We've had our first little paper cut which is it still thinks it's in plan mode.
05:07I just say crack on please with phase one. Lovely stuff.
05:12While it's doing its thing, we should talk about this little status line down the bottom. I have this customized so it shows which repo I'm in relative to my repos folder. It also shows which branch I'm on and how many staged, unstaged, and new files I have inside the current repo.
05:26It's already asking me to build the project. That's a good sign. And I'm gonna say yes and don't ask again for p n p m build commands.
05:32I'm not gonna review it as it's going. I'm just gonna review it when it gets to the end. So what I wanna do now is open it up in Versus Code to have a look at the files and just see if there's anything I need to tweak.
05:41I'm actually going to exit out of Claude here by pressing control c twice. I'm just gonna run code dot. And now I do wanna get Claude back into this terminal.
05:49So I'm just gonna say Claude continue. And Claude will now pick up our conversation where we left off. It's a really nice little flow if you just want to x out of Claude, run a CLI command, and then go back.
05:59So now I can just use the, you know, standard git diff viewer that we're all used to just to see what's going on here. I can see that it's added gitdiffs.js. That's nice.
06:07And it's added this to internal. There is a TypeScript error there, but shocker it was actually there before. And I'm not entirely sure how to fix it and I can't be arsed.
06:14You can also see it's left in here a to do for phase two which is really nice. It means that when we go to phase two, we actually have a hint in the code where it's going to execute it. So this all looks good.
06:23What I like to do is either commit these changes or just stage them so it's really clear between phases what's been added. If we go back to Claude, let's have a quick check on context. Yeah.
06:33Phase one only used like three k tokens, so we can absolutely crack on with phase two. And I'm gonna leave it accept edit on.
06:41Now that we've done the planning, we can be pretty aggressive with accept edit on because we understand the implementation a bit and we kinda get what's going on. Phase two is complete and I'm reviewing it and it looks pretty nice. A quick check on context.
06:52We are in a very healthy place. Let's do phase three, please.
06:56Something I really wish that Claude code would add is to just add the amount of tokens that I've used so that I can put it in my status line. That would mean I wouldn't need to keep running context. I would just have it right there, which is something that cursor does really really well actually.
07:08So phase three is complete and then what I accidentally did was went into the file and press save. And an auto formatter ran and it did a little couple of changes. When that accidentally happens, the Claw code doesn't know anything about it.
07:19So I do like to tell it. I'm being very direct with it as well. Pull the files into your context.
07:24Context. And note how it followed my instructions really well. It didn't do anything.
07:27It just literally read a file again. So our context is in a pretty healthy place and I'm pretty sure we're gonna be able to get to the end of this feature without actually needing to reset the context window.
07:38But I want to show you what it's like when you do reset the context window. The cool thing about having a multi phase plan is that we can preserve it between different context windows. And the LLM should have all the information it needs to carry it on.
07:49But the question is where do we actually store it? Do we put it in a local file or do we do something else with it? What I like to do is actually keep these as GitHub issues.
07:58And I've said to it, make a GitHub issue containing the current plan including all of the items that you've checked off the plan list. This is calling g h issue create with this plan in the description of the issue.
08:08Everything's been checked off for all of these phases except for phase four and five. I'm happy with this, so I'll accept this. And now that I have this asset out outside of my context window, I can feel happy clearing it.
08:19And this means if I run context now, we now have virtually nothing in the context window. No messages whatsoever. We're down to 16 k tokens just from our memory files, the system tools, and the system prompt.
08:30So I'm now going to ask it, get the GitHub issue 24 and enact phase four of that plan. Now I'm deciding in my head, do I want to go for accept edits on or do I want to go for plan mode?
08:43Because plan mode basically forces it to do a little bit of exploration, and the exploration might be necessary because we've completely cleared out the context. I think though I'm gonna go for accept edits on and basically just get it to take the information from the plan and get going.
08:56You can see it's asking to view an issue and I'm happy to say don't ask again. Issues are fine to view. Okay.
09:02It hasn't done so much planning or like code base exploration here, but it has read the correct file and it's now implementing the correct stuff, I think. Yep. That's actually looking really nice.
09:10Let's now do phase five. And, of course, because it's already fetched the GitHub issue, it doesn't need to fetch it again. It's still just in the context window.
09:17So this process then of splitting work into phases is really, really important. You don't have to put each phase into a separate context window. You can do as many phases as you like, check-in the context window as you go.
09:29And I really like keeping these assets in the cloud because then, actually, people can comment on them, add stuff overnight, add stuff async. And I find this flow is a really nice combination of letting the AI go and do its work on accept mode and having a lot of upfront thinking, doing lots of thought via planning.
09:47And this is currently how I'm doing all of my coding, not only for AI Hero stuff, but also for Everlight. And I think my top tips are make sure that in your memory file, have a tip to be extremely concise. Get it to produce unresolved questions at the end of each plan, and get it to use the GitHub CLI to create issues so you can share context across multiple context windows.
10:06Thanks for watching. This ended up being a pretty chunky video, and I will see you in the next one.
The Hook

The bait, then the rug-pull.

Matt Pocock opens mid-task — prompt already typed, plan mode already on. No setup, no definitions. The contract is stated in the second sentence: this is a real session, not a demo.

Frameworks

Named ideas worth stealing.

03:16model

Multi-Phase Plan Loop

  1. Dictate rough prompt (no polish needed)
  2. Plan mode — explore codebase, surface clarifying questions
  3. Answer unresolved questions inline
  4. Force multi-phase if feature spans a context window
  5. Execute phase by phase, check context between each
  6. gh issue create with full plan before context fills
  7. Clear context, resume: get GitHub issue N and enact phase X

Seven-step loop for shipping large features without losing the plan to context resets.

Steal forAny long JoeFlow/MCN session — especially batch-template builds or multi-day feature work
02:11concept

CLAUDE.md Concision Rule

Single rule: In all interactions and commit messages be extremely concise and sacrifice grammar for the sake of concision. Makes plans scannable, questions answerable, diffs reviewable.

Steal forAdd to project CLAUDE.md for any multi-day feature work
03:16concept

Unresolved Questions Pattern

Rule in memory: At the end of each plan, give me a list of unresolved questions to answer if any. Make the questions extremely concise. Turns planning into a form you fill out.

Steal forAdd to project CLAUDE.md for any multi-day feature work
07:35model

GitHub Issue as Context Store

Before clearing context, gh issue create with the full plan including checkboxes. Survives resets, commentable async, shareable with collaborators.

Steal forJoeFlow batch sessions — store the session plan as a GH issue so an afternoon can resume the next morning
CTA Breakdown

How they asked for the click.

09:45next-video
Thanks for watching. This ended up being a pretty chunky video, and I will see you in the next one.

No explicit subscribe ask. No product pitch mid-video. Newsletter mentioned only in description.

Storyboard

Visual structure at a glance.

open — mid-task
hookopen — mid-task00:00
rules file — concision
valuerules file — concision02:11
make it multi-phase
valuemake it multi-phase03:16
execute phase one
valueexecute phase one04:54
GitHub Issue bridge
valueGitHub Issue bridge07:35
fresh context, phase 4
valuefresh context, phase 408:46
three top tips
ctathree top tips09:45
Frame Gallery

Visual moments.