Lesson 5 · Matt Pocock's Skills
Phase Boundaries: Five Moves, One Order
When a phase ends, you decide what happens to the context. Ask five questions in order, and the first yes wins.
Your win for this lesson
When you finish a phase, you can choose continue, /clear, /handoff, a subagent or /compact in a few seconds, and say what each one costs you.
0. Warm-up
Lessons 2–4, applied to a new feature: retrying failed webhooks.
You already know why context matters from your context-engineering course: context rot, and compaction being lossy. This lesson is about when. Pocock's answer is to decide only at phase boundaries, and always in the same order.
1. Idea one: decide only at the boundary
A phase is a chunk of work inside a session, like the grilling, the implementation, or the QA. The definition is fuzzy on purpose: a phase ends when you think "ok, we're done with that." The phase boundary is the gap between two phases, and "it is the only place this decision belongs."[1]
Mid-phase rule
In the middle of a phase there's nothing to decide. Continue, or split the work that's left into subagents. "Compacting mid-phase makes the agent lose the thread."[1]
2. Idea two: the tree, top to bottom
At the boundary, ask these questions in order. The first yes wins.[1]
- 1 · Continue Does the next phase need this one as a primary source, or is there enough smart zone left for it (about 150k tokens)?
The standard yes is grilling → implementation, because the implementation wants the reasoning verbatim. Continuing costs nothing, so rule it out first. - 2 ·
/clearIs everything here disposable for what comes next?
It's the cheapest move: it takes no time and gives you the whole window back. But it only works one way. Clear a relevant context and you lose the why, and reading the diff back won't return it. - 3 ·
/handoffDoes the work have to travel?
There are only four cases: a new harness (Claude → Codex), a new directory or repo, a colleague, or a side task forked mid-phase. What it buys is portability, not better compression. - 4 · Subagent Can the next task run AFK, with no steering from you?
Then send it off and leave this session untouched. Automated review is the standard case. - 5 ·
/compactOtherwise.
The context is relevant, you're in the same harness and directory, and you need to stay in the loop. Tell it what comes next:/compact we're going to QA this area. It's the default, not the first reach.
You've already used three of these. Running /to-spec → /to-tickets in one window is continue (Lesson 3). Running /clear between tickets is clear, and reviewing in a fresh session is the subagent case (Lesson 4).
Why is /compact last? Because each question above it leads to something cheaper or more precise. If you start with /compact, you tend to get "a fresh session that is confidently wrong about a decision the summary flattened."[1]
3. Idea three: every move except continue loses something
Continue keeps the session as a primary source: the conversation as it happened. Every other move turns it into a secondary source, which is a summary, or in the case of /clear, nothing at all.[1]
| Source | Information | Noise | Room to move |
|---|---|---|---|
| Primary (continue) | Full | Lots | Little |
Secondary (/compact, /handoff) | Lossy | Less | Lots |
Each move keeps something different: /compact keeps your intent, /clear keeps nothing, and /handoff keeps the work's ability to move.[2]
/handoff field notes
These come from real reports collected in the handoff guide.[2]
- It writes to the OS temp directory, not your repo. Ask for the path, and copy the file somewhere durable if the next session isn't within the hour or uses another harness. A reboot empties
/private/tmp. - It references, it doesn't copy. Specs, ADRs, issues and diffs go in as paths or URLs. It also redacts secrets and adds a "suggested skills" section.[3]
- Downgrade unverified claims before you pass it on. The next agent trusts the file, so if it says "X isn't built" and nobody checked, that becomes a false premise for everything after it.
- Point the new session at the file. Don't paste the summary into
claude "…", because the shell silently mangles backticks and$(…). - Will it still be true next month? Then it belongs in
CLAUDE.md. If it's about work in progress, it belongs in a handoff.
4. Practice
Drill A: walk the tree
Answer each question in order. The walk stops at the first correct yes.
Drill B: the costs
Drill C: from memory
Write the five questions in order, with the move each one leads to. Then write the four reasons to use /handoff.
- Next phase needs this verbatim, or there's room? → Continue
- Everything here disposable? →
/clear - Does the work have to travel? →
/handoff - Can it run AFK? → Subagent
- Otherwise →
/compact, with an instruction
Handoff cases: a new harness, a new directory, a colleague, or a mid-phase fork.
Optional: use it for real (no setup)
Next time you think "ok, we're done with that" in Claude Code, stop and walk the five questions out loud before you type anything. If you have the plugin, try /ask-matt I'm at a phase boundary and see whether it reaches the same answer as you.
Primary source
Read ask-matt/PHASE-BOUNDARIES.md. It takes three minutes, and this lesson follows it closely. Then read the handoff guide, especially "Branching is the use people skip."
Stuck on something?
Ask me in Claude Code. Good questions: "how is /handoff different from Claude Code's fork-session?", "where does the ~150k smart-zone number come from?", or "walk my last real session's boundaries with me."
The Context Card has the tree on one page. See also the Build Card and the Skill Map.