Deep Dive · Agent Process

21,000 Lines, One Feature: Matt Pocock's Grilling, Spec and Retro Loop

A seventy-minute walkthrough of building a real feature for his own video tooling: forty-odd questions before any code, a glossary that becomes the data model, three prototypes to find one that feels right, nine tickets run AFK, seven stacked PRs with feature flags, and a retro that turns twelve review comments into twenty issues. The interesting part is not the speed — it is where the human refuses to delegate.

Shipping a 21,000-line feature — video thumbnail
Video: Matt Pocock 1:09:30 18 November 2026
grilling domain language stacked diffs retro

🎯 The feature 1:33

His course and video operations app has a thumbnail creator: capture your face, composite a diagram beside it, export. The friction is that the diagram lives in a separate playground, so you screenshot it, paste it, get the position wrong, and go back.

BeforeDesired
Swap to the diagram view, screenshot, paste into the thumbnailDraw directly on the thumbnail surface, next to your own face
Repositioning means re-screenshottingEdit the diagram in place, with the face still visible
No undo for the arrangementOne undo history across face moves and drawing
He says plainly that he has no idea how to build it — "I just know that it's something I want" — which makes it a good honest subject. The feature exists to remove a annoyance from software he uses daily, and the walkthrough's value comes from watching an unclear idea become a data model.

🌳 Choosing a skill 3:08

The decision tree he walks before touching a keyboard is the most reusable thing in the video, because it is about sizing work rather than about a tool.

If the diff will be…Do this
SmallOne-shot it; no ceremony
Medium — known-ishGrill with docs: align on the thing, then build
Huge — needs many sessionsWayfinder: run grilling over multiple sessions to build the concept
The ordering matters and he explains why: start with the lighter ritual, because if the work turns out bigger you can escalate to the heavier one — but if you start heavy on something small, you paid the overhead for nothing. That is the opposite of how most process advice is written, which usually says to pick the most rigorous option to be safe.

⚙️ The setup 4:08

PieceChoice
Working directoryA home repo — his personal wiki, which is where the agent has context about everything
AgentClaude Code, because it is the subscription he has
Model and effortOpus 5.5 at medium effort, on the Ultra plan
SkillsThe public ones from mattpocock/skills, plus custom skills that live inside the home repo
InputDictation, because he thinks out loud faster than he types
Verified: mattpocock/skills is one of the most-starred repositories on GitHub — about 327,000 stars, MIT, described as "Skills for Real Engineers. Straight from my .agents directory." It ships a skills/ directory plus a GLOSSARY.md, a SCOPE.md, an AGENTS.md and a CLAUDE.md, which tells you the repository is itself a worked example of the process in this video.

💬 Prompt the why 5:00

"If I give it the why, then the agent feels a lot more empowered to go away and produce a solution itself, or maybe have a discussion about the solution. Whereas if you come to it with a what — I want to do X, Y, Z — it will often not come up with that creative an answer."
Prompt styleWhat you get back
A specification of the solutionA literal implementation of your guess
A description of the frictionQuestions, alternatives, and a design you did not think of
This is the same instruction at two different moments in the loop, and he uses it deliberately: be vague about the solution when you want options, and be brutally specific about the solution when you want throughput. The mistake is using one mode for both.

🔥 Grilling 4:42

Roughly forty questions between 4:42 and 42:28, and the transcript reads like a design conversation rather than a prompt. The skill asks in batches, and he slows it to one question at a time when he wants to think.

ControlWhat it does
"Ask me one question at a time until I say otherwise"Slows the interrogation when you are at the crux of something
"Widen things out, multiple questions at once"Speeds up once the concept is settled
"We've talked enough, let's create some code"You are driving; the agent is not grilling you
Background sub-agents during the sessionPrototypes and lookups proceed while the conversation continues
The comparison he draws is against plan mode, and the distinction is worth keeping: a plan is a document produced after the thinking; grilling is the thinking, with the agent as a well-informed interlocutor. He describes the good sessions as rubber ducking with a colleague who knows the codebase — and notes that when a decision feels consequential, that is the moment he would want a real teammate.

📖 Domain language 10:23

The repository has a glossary.mmd of about 560 lines — Mermaid-flavoured, human-readable, loaded into context — that defines every concept in the application. The session starts by finding out where the new feature lives in that landscape.

Existing termDefinition in the glossary
DiagramA group of diagram snapshots
Diagram snapshotA copy of the drawing at the moment a clip was filmed
Preserved snapshotA snapshot kept in the diagram's timeline even when no clip uses it
Active diagramThe one the author is drawing on
Restore to headLoading an older snapshot back as the active diagram
Watch what the shared vocabulary buys: he says "the thing in the thumbnail isn't really a diagram, it's a single snapshot" and the model understands immediately, because both words are defined in the file it is reading. The jargon he apologises for to the audience is exactly the compression that makes the conversation cheap.

🏛 ADRs and fences 15:19

The agent reads ADR3 — "diagrams as first-class entities with per-clip snapshots" — before proposing anything, and he explains the split clearly: the glossary and the code describe what the system is now; the ADRs explain why it is that way.

"Do not remove a fence until you know why it was put up in the first place."
DocumentQuestion it answers
GlossaryWhat are the things called, and what do the words mean?
CodeHow is it built today?
ADRWhy was it built this way, and what was the alternative?
The Chesterton's fence reference is quoted at length and it earns its place: an agent with no ADR will happily propose removing a constraint whose purpose it cannot see, and it will sound confident doing it. The record is what converts "why is this here" from an argument into a lookup.
He is also strict about who writes them. The agent created an ADR unprompted and he pushed back: he wants the decision to be made in the grilling session and recorded afterwards, not discovered as a fait accompli. That is a real friction point — a skill that produces artefacts eagerly will produce paperwork nobody agreed to.

✍️ Naming is the data model 22:37

The most interesting fifteen minutes are spent choosing what to call one thing. Four candidates, tested by writing sentences with each.

CandidateVerdict and reason
Thumbnail drawingRejected: "drawing" collides with "diagram" and does not roll off the tongue
Thumbnail diagram snapshotRejected: accurate but too long, and implies snapshots can be edited
Thumbnail sceneRejected: "scene" already exists in the glossary and is coding vocabulary, not his
Thumbnail diagramChosen: it is what he naturally says, with an ADR recording that it is not quite a diagram
The technique — scenario testing — is the transferable part: write the same three sentences with each candidate name and see which one makes the reader expect the right behaviour. "Is the thumbnail in the diagram's timeline?" is a different question depending on what you called it. That is not aesthetic bikeshedding; it is finding out what your names claim.
"Once we understand the language, we then have names for database tables. We understand how they reference other parts of the system — and so we can create tables from that."

Two more naming wins later in the session: prefixing diagram component because bare "component" collides with React components, and deciding that a thumbnail's diagram is its own entity, decoupled from the mature per-clip snapshot model, with a nullable "started from" reference to keep the link if it is ever wanted.

🧪 Three prototypes 33:13

While the grilling continues, a sub-agent builds three variants of the editing surface. He tests all three himself and rejects two on feel.

VariantReaction
A: face inside the canvas, ghost face while the pointer is in frameWins, with notes: face movement too sensitive, a white line in the composite
B: face as an overlay on a larger editing surface"Worse than I thought it was going to be" — face too large, the bar is hated
C: split view, edit on the left, preview on the right"Garbage" — you cannot see your own finger while lining it up
His argument for building options rather than one design is stronger than it sounds: a prototype you dislike tells you more than one you like, because it localises the preference. Three variants cost one sub-agent and produce a decision he could not have specified in advance — which is exactly the kind of question "how should this feel" that no spec can answer.

One idea came from the agent rather than from him: moving the face and drawing should share one undo history, which the drawing library gives for free. He calls it genius and admits his current editor has no undo at all.

🐛 The white bar 38:01

StageWhat happened
SymptomA thin white line at the edge of the exported composite
HypothesisSomething in the composition or export pipeline
InvestigationThe agent built a reproduction in a browser and read pixel colours along the right edge of the export and of each preview
CauseWindows display scaling at 125%: Chrome shrinking a 120-pixel-wide image into the preview left the last pixel column only partly painted
The interesting claim is not the fix, it is the behaviour: the agent reproduced, instrumented and measured rather than guessing — and that bug would have shipped unnoticed. He says this generation of agents is genuinely good at verifying its own work, and admits he is not sure whether that comes from steering files in his home repo or from the model. Either way, the practical effect is a class of bug that never reaches production.
He also critiques the agent in the same breath: the sub-agent was already at ~260,000 tokens, deep into what he calls the dumb zone, when it started debugging. He would have preferred a fresh sub-agent with only this problem in context. A clean-context debugger is cheaper and sharper than a long-session one — the retro later returns to this.

🧠 Smart zone, dumb zone 40:15

He credits the framing to Dex Horthy and is careful to say it is not his own, then updates his position on it — which is more useful than the original slogan.

Earlier claimHis position now
Past ~150k tokens the model starts hallucinatingThat was true of older models, where you had to clear context at 120k or even 80k
It is a cost and quality optimisationFewer tokens means better work, and the results are visibly better in the smart zone
It is also simply expensiveA very large context is re-read on every turn, and cache hits only soften that
The mechanism he gives is quadratic relationships, not token count: the model has to track relationships between tokens, so the work needed to find signal in noise grows much faster than the context does. Whether or not that is the exact cause inside the model, it explains why the advice is stable across generations — and why agent design should minimise what it asks the model to hold.

📋 Spec and tickets 42:28

ArtefactRole
Spec (a GitHub issue)The destination document — around 47 user stories, implementation decisions, explicit out-of-scope, a link to the prototype branch
Tickets (sub-issues)One per session, each stating what blocks it, so several can run in parallel
Glossary entriesAlready updated, so the implementer inherits the vocabulary
He names the mechanic precisely: the spec is where you want to end up, the tickets are what one session is allowed to touch. Every agent gets exactly one ticket, which is what makes an hour-long unattended run predictable rather than an adventure. The first ticket is deliberately a pre-factor — extracting the shared diagram editor — because it makes every later ticket smaller.
One concrete tooling complaint worth knowing: user-invoked skills in Claude Code have to come at the start of the input, so invoking "to spec" mid-message does not work — he has to go back to the beginning of the text box. Small, annoying, and the kind of detail that shapes how people actually use these systems.

🚫 Removing decision space 45:32

"I'm really trying to give the agent no decision space in which to operate. No nuance that it can go, 'Oh yeah, I'll just sort of fiddle around with this.' Because the more nuance you give to an agent, the worse it's going to perform."
PhaseNuance
GrillingMaximum — open questions, exploratory language, prototypes
ImplementationMinimum — one ticket, a spec, a prototype to copy
This is the same conclusion Lauren Tan reached from the other direction. She bans comments and imperative escape hatches because "anything that requires nuance to use well often leads to slop" — this site covered that talk. Pocock arrives at it from workflow design: every decision you leave open is a coin flip, so spend the effort moving the coin flips into the phase where a human is watching.

🏃 AFK and compaction 46:28

StepDetail
Compact firstForty minutes of grilling squashed to a summary — a minute of work, and the session returns to near its starting size
Run implement-specA skill from v1.3 of the skill set; takes the spec plus tickets and works through them
ParallelismStarts the three tickets that are not blocked, hands each a slice of the compacted context
Duration45 minutes to an hour for a feature this size
OutputOne large PR with a review already run against the repo's coding standards
His rule about compaction is more nuanced than "always compact": manual compaction is safe when the conversation has already been turned into a document — the spec — because nothing important is only in the transcript. Automatic compaction is still unreliable: the timing can hit badly and take something essential with it. The test is whether the surviving document could rebuild the session.

🚪 Two-way and one-way doors 48:43

The 21,000-line PR is broken into seven, and the ordering principle is the best idea in the video for anyone who has to merge agent output into something real.

DoorDefinitionExample here
Two-wayMergeable and revertible at any timeGlossary terms, extracting the shared editor, small refactors
One-wayHard to unmerge: touches data, calls an external service, opens a security windowAn additive schema migration
The structure he asks for is "a bunch of two-way doors and a final one-way door", and then he goes further: put the whole feature behind a feature flag so both implementations run side by side, and flick it on when the last PR merges. He is explicit that he is cosplaying a production system — this repo has one user — which is exactly why the exercise is instructive: the discipline is visible when it costs something.
The honest gap: he merges all seven PRs, ticks auto-merge where the diff is small, and only then tests the feature — "because I'm the only user". For anything with users, this is the step that must not be skipped, and he says so. The stacked diffs make review tractable; they do not replace running the thing.

👁 Human review 51:30

"I'm not just interested in what the code does. I'm also interested in the system that produced this code."
What he looks forAction it triggers
A pattern he dislikesA lint rule so it cannot happen again
The as keyword in TypeScriptBan outside shared utilities — 2,000 existing instances will be found
Type intersectionsPrefer interface extends; no existing rule, so a small custom check
Magic strings from the search-params hookA typed helper, and ban the raw hook
fetch called with the result ignoredA typed API client module; ban raw fetch
Large explanatory commentsThe subject of the rest of the video
Review becomes prompt engineering for the codebase, not for the model. Instead of writing "please don't use as" into a prompt and hoping, he converts the preference into a deterministic check — which is both stricter and cheaper at every future turn. And he is candid that he is being harsh on purpose: he is forcing the agent to design APIs that remove nuance, not to behave better.

💬 The comment problem 53:30

His specific complaint is sharper than "I don't like comments": a comment is a place where the agent can justify a workaround, and it is surface area it must keep updating.

MeasurementNumber
Comments in the new feature18% of lines, against a 12% repository average
Total comment lines auditedAbout 2,000
Could go nowAbout 940
Explain a reason not visible in the codeAbout 1,000
Already staleSeven
After a second, more aggressive pass22 deleted outright, 18 workarounds to remove, 3 to become ADRs
"The comments act as a fig leaf that the agent is able to put there and say, look, this is fine because we've got an explanatory comment."
The audit's own verdict is the strongest sentence in the video: a comment next to a workaround usually marks a place where the code should have been designed differently, not explained. Three comments turned out to encode real constraints — a persistence contract, a tuned centring value, a rendering quirk — and those became ADRs, which is exactly the right destination: decisions belong in records, not in the middle of a function.

🔍 The retro 57:45

After merging, he turns the session on the process itself: the retro skill reads roughly thirty agent session transcripts from disk and pulls his twelve review comments through the GitHub CLI.

FindingDetail
One root cause for all twelve commentsNothing in the repo's written standards covers those points
Worse than silenceThe existing docs describe the rejected patterns, so the agent was following the documented convention
And the codebase agrees with the docsThousands of existing instances on the main branch
Prototype code was copied, not reimplementedA defect in the prototype and implement-spec skills, not in the run
The reviewer cannot cover a diff this large with one agentThe code-review skill hit its own limit
That first finding is the most valuable sentence anyone has said about agent standards this year: when every review comment shares a root cause, the fault is in the instructions, not the implementer — and if the documentation teaches the pattern you dislike, "the model ignored our conventions" is not a diagnosis. He expects around twenty issues out of this retro, most small enough to one-shot without grilling.
Note the self-referential loop, because it is the actual mechanism of improvement here: the retro produced issues against his own public skills repository, which he then fixes. The skills improve because their failures are collected systematically, not because he thought harder about the prompt. Copying that loop matters more than copying the individual skills.

⚙️ Ratchets, not rewrites 1:00:10

RuleScale of the existing problem
Ban as outside shared utilitiesAbout 2,000 instances
Ban type intersections in favour of interface extendsNo existing rule; needs a small custom check
Ban useEffect outside the hooks directoryAbout 230 in 140 files
Ban the raw search-params hookReplace with a typed helper
Ban raw fetchReplace with a typed API client module
CommentsNo rule fits; phased folder-by-folder trial
A rule that flags two thousand existing violations cannot be switched on — so it is ratcheted: enforce it on new and changed code, and let the count fall. That is the only way a standard survives contact with a real repository, and it is the same pattern a team would need after an agent floods a codebase with a pattern nobody chose.

🧭 Where the human is worth it 1:08:02

PhaseHuman roleWhy not delegated
AlignmentHighest valueTaste, intent, and the words only the owner knows
Review and standardsHighest valueJudgement about what should never appear again
QAHighest valueFeel — something that looks wrong before you can say why
ImplementationDelegatedMechanical once the decision space is closed
RetroDelegated, then steeredPattern finding across sessions; the human chooses which findings matter
His next steps are the honest part: QA what he just built, file anything wrong as issues, and then one-shot them with an agent — no grilling, because the diffs will be tiny. The heavy ceremony is for features that are unclear, not for work whose shape is already known.

🕳 What this does not prove 1:08:40

CaveatWhy it matters
One user, personal softwareNo multi-tenancy, no migrations under load, no on-call; he says he is cosplaying production
Merged before end-to-end testingAcceptable here, unacceptable anywhere with users
Seventy minutes of human attentionThe grilling is not free; the savings are in the unattended phase
21,000 lines in one featureA large diff is a liability even when it works; stacked diffs mitigate review, not design
Skills are still changingThe retro found defects in three of them, in one session
The most transferable conclusion is uncomfortable for both camps: the process that produced 21,000 working lines spent most of its human time on arguments about words, and the part everyone wants to automate — implementation — was the part with the least human involvement. Neither "agents write the code now" nor "agents need constant supervision" survives contact with this transcript.

✅ Claims checked

ClaimVerdictEvidence
The skills repository is one of the most starred on GitHubCorrectmattpocock/skills, about 327,000 stars, MIT, created February 2026
It is open source and published from his own agents directoryCorrectRepository description, and it ships skills/, GLOSSARY.md, SCOPE.md, AGENTS.md
The PR added 25,000 linesImprecise — 21,000He says 25,000 in the intro and the PR shows 21,000 added
Roughly thirty agent sessions fed the retroHis count, from the transcript"the 30 odd session transcripts"
Twelve review comments, one root causeAs reported by the retroAll twelve traced to standards that do not exist and docs that teach the opposite
18% comments in the new feature vs 12% averageAgent-produced measurementPlausible and checkable in the repository, not independently verified here
About 2,000 as usages, 230 useEffects in 140 filesAgent-produced countsStated in the retro and the ratchet discussion; not verified independently
Smart zone / dumb zone is not his ideaHe credits Dex HorthyAnd he revises his own earlier advice about the 150k threshold
Compaction is safe after the spec existsReasonable and demonstratedManual compaction of a document-backed session; he still distrusts automatic compaction
Two-way and one-way doors are defined in the PR skillReferencedHis own definition, used to order seven PRs
The white bar came from 125% Windows scalingDiagnosed in the runChrome shrinking a 120-pixel image left the last column partly painted
The feature works end to endDemonstratedHe captures a face, draws, inserts icons, exports the thumbnail
This is a validated workflow for teamsNot claimed and not shownOne user, personal software, merged before end-to-end testing

Basis note. Built from the full 1:09:30 recording and checked against the public skills repository. The video is a first-person walkthrough, so most claims are process observations rather than external facts; the numeric ones come from his agent and are labelled as such. The criticisms in the final sections are this article's, not his.

🔑 Key takeaways

  • Size the work before you pick a ritual: one-shot small diffs, grill medium ones, escalate to a multi-session process only when it turns out huge.
  • Prompt the why when you want options, the what when you want throughput. Using one mode for both is the common mistake.
  • Grilling is the thinking, not preparation for it — and you are driving: stop when you have said enough.
  • A glossary is executable context. Terms like diagram, snapshot and preserved snapshot compress a design conversation into a sentence.
  • ADRs answer why; the glossary and code answer what. Without them an agent proposes removing fences whose purpose it cannot see.
  • Name things by testing sentences: the candidate that makes a reader expect the right behaviour wins, and the name becomes the schema.
  • Build three prototypes when the question is about feel. A variant you dislike localises the preference better than one you like.
  • Reduce decision space to zero before going AFK: one ticket, one spec, one prototype to copy. Nuance becomes slop.
  • Compact only when the conversation has become a document, otherwise you lose the only copy of a decision.
  • Order PRs by door type: many two-way doors, a final one-way door behind a flag.
  • Review the system that produced the code, and convert every dislike into a check rather than a comment.
  • Comments are where workarounds hide. 18% versus 12% is a signal; a comment beside a workaround means the code should have been designed differently.
  • When all review comments share a root cause, fix the instructions. If your docs teach the pattern you reject, the model was being obedient.
  • Ratchet standards on new code. A rule that flags 2,000 existing violations cannot be switched on, only tightened over time.
  • Spend human attention at the ends: alignment and taste at the start, standards and QA at the finish, and let the middle run unattended.

🔗 Resources

  • The video — Matt Pocock, 1:09:30
  • mattpocock/skills — grill-with-docs, prototype, to-spec, to-tickets, implement-spec, code-review, retro
  • aihero.dev/skills — the skills site he points to
  • The earlier deep dive on this site about his home-repo pattern, which is the shell this process runs inside
  • The earlier deep dive on Lauren Tan's talk, where the comment ban and the nuance argument are made from the verification side
Basis note. No sponsor segment to exclude. The repository numbers were pulled at publication time; the counts he quotes for existing violations come from his own agent and are marked as such in the table above.

⏱ Timestamp index

0:00Intro, and the two skills this video goes deep on
1:33The thumbnail creator and its friction
3:08Choosing a skill from the decision tree
4:08The setup: home repo, Claude Code, Opus 5.5
4:42Starting the grilling session
5:00Prompting the why, not the what
7:46Noticing how loose the language is
9:25Grilling versus plan mode
10:23The glossary, and what a diagram is
12:05Is it a diagram or a snapshot
14:05How to know when to stop grilling
15:19ADR3 and per-clip snapshots
15:53One question at a time
16:53Chesterton's fence
19:40Making the data model decision
20:54The agent writes an ADR uninvited
22:37Scenario testing the names
25:16Thumbnail diagram wins
25:36Widening out to many questions
28:10Bare "component" collides with React
29:38Should thumbnails be archived, not deleted
30:50Grilling as a ritual for thinking about the code
33:13Reviewing the three prototype variants
35:00Ghost face, and the too-sensitive drag
36:25Shared undo history
37:13The second prototype, with previews
38:01The white bar
38:20Reproducing before fixing
39:18A sub-agent at 260k tokens
40:15Smart zone versus dumb zone
41:51Why the number moved: cost, not hallucination
42:28Writing the spec
43:25Spec as destination, tickets as session scope
44:19Tickets state what blocks them
45:32No decision space, no nuance
46:28Compacting before going AFK
47:1045 minutes to an hour of unattended work
48:09The PR: 21,000 lines added
48:43Stacked diffs, two-way doors
50:10Feature flags and running both versions
51:30Human review begins
52:08Reviewing the system, not just the code
53:30Banning as, and the comment pile
54:40Intersections, magic strings, raw fetch
56:00Ratchet the rules over time
57:20One mandatory review: the migration
57:45Merging, then the retro
59:00Thirty sessions and twelve comments
59:50The single root cause
1:00:10Ratcheted checks instead of comments
1:01:38Docs that teach the rejected patterns
1:02:13Issues raised against his own skills
1:04:16The comment audit
1:04:50Comments as a fig leaf
1:05:4222 deleted, 18 workarounds, 3 ADRs
1:05:58Trying the finished feature
1:08:02Where he adds value
1:09:00Grilling and retro are the two touch points
☰ View all