,

Matt Pocock’s AI Coding Workflow: How He Shipped a 21,000-Line Feature

Matt Pocock, creator of Total TypeScript and AI Hero, filmed himself shipping a 21,000-line feature with his own open source skills, and the build shows where a human still matters. In Watch me ship a 21,000-line feature with mattpocock/skills, a 70-minute walkthrough on his own channel, he takes a thumbnail editor for his course video manager from a vague dictated idea to merged production code: a grilling session, three prototypes, a spec with nine tickets, an unattended implementation run, a stack of seven reviewable PRs and a retro that turned his review comments into lint rules. This post pairs that build with his two-hour conversation with NetworkChuck, How to Actually Code with AI, where he explains the thinking behind each step. That conversation got its own write-up in Matt Pocock on AI Coding: Why Strategic Programming Is Your Job Now; this one is about watching the method run on real work.

TLDW

Pocock works with AI in three phases. He spends the first half of the video aligning with the agent: a Grill with Docs session that settles the feature’s vocabulary, its data model and its UI through prototypes. Then he steps away while Claude Code, running Opus 5.5 on medium effort, implements a spec through parallel sub agents. At the end he reviews the result, mostly to find patterns he never wants to see again, and runs a retro that converts those findings into lint rules, coding standards, ADRs and issues against his own skills. His own summary: grilling and retro are the two points where he adds value, and the middle runs AFK.

Thoughts

Agents learn from the code in front of them, not from the rules you wrote down, and the retro at the end of this build proves it. Pocock left 12 review comments on the PR stack: stop casting with TypeScript’s as, prefer interface extends to intersections, stop reaching for raw fetch and magic-string search params, and above all, fewer comments. The retro traced all 12 to one root cause. Nothing in his written standards covered those points, his own docs demonstrated the patterns he rejected, and the main branch already held about 2,000 instances of the as cast alone. The agents were not being careless; they were copying the house style. That is the most useful lesson in either video for anyone running agents on an existing codebase. A rule in a markdown file loses to a thousand counterexamples in the repo, so Pocock’s fix is to “ratchet”: add a lint rule, scope it to a folder, and tighten it over time until the counterexamples are gone. His point about comments goes further. Comments in the new feature made up 18% of its lines against a 12% repo average, and he argues they act as a “fig leaf” that lets an agent justify a workaround instead of designing the code properly. When he pushed the agent to be aggressive, it agreed that 22 comments could simply go, 18 marked workarounds that should be redesigned, and three belonged in architectural decision records.

The front-loaded grilling makes sense once you see what Pocock is optimizing for: shrinking the agent’s decision space before it writes code. “The more decisions you give it, the more decision space it has, the more likely it is to choose a bad one,” he says as he hands off to implementation. By that point the agent has an updated glossary, a GitHub issue with about 47 user stories, nine tickets with their dependencies, and a working prototype to copy for the UI. Implementation becomes plumbing. This flips the usual way people use coding agents, where the prompt is short and the agent is trusted to fill in the blanks. Pocock treats every blank as a place the agent can choose wrong, and he fills them while he is still in the loop and the cost of changing his mind is a sentence rather than a refactor. The 21,000 lines he did not watch being written are the reward for the 40 minutes he did.

The long argument over a name looks like ceremony and is really database design. Pocock and the agent go back and forth over “thumbnail drawing”, “thumbnail diagram snapshot”, “thumbnail scene” and “thumbnail diagram”, and he has the agent scenario-test each candidate against sentences he would actually say. “Scene” fails because the glossary already uses it; “drawing” fails because it clashes with “diagram”; he settles on “thumbnail diagram” plus an ADR explaining that it is not a real diagram. He also renames “component” to “diagram component” because it collides with React components. His reasoning is that “the language is going to form the data model that everything else fits on top of”: once the nouns are settled, he has table names, references and module boundaries. In the NetworkChuck interview he gives the cost of skipping this step, a codebase where the front end calls it a reversal, the email calls it a pending chargeback and the database calls it a refund. Agents make that drift worse, because each session will happily invent a new word. A glossary the agent must read is the cheapest fix.

The stacked-diff experiment is a hands-on rehearsal of the software factory he describes to NetworkChuck. In the interview, a factory removes humans from more of the process until only one-way doors, the changes that are hard to undo, need a person. In the build, he asks the agent to split one 21,000-line PR into a stack of two-way doors that ends in a single one-way door, with a feature flag so the new editor can ship dark and be switched on at the end. The result was seven PRs, the first containing only the new glossary terms and ADR 060, which he auto-merged once CI passed. Of the seven, he says only one needed mandatory review: the additive migration in schema.ts that adds thumbnail diagrams to the database. He admits he is “cosplaying” a production system, since he is the app’s only user. That is what makes it useful to watch. It shows the factory idea broken down into a review habit any team can try this week: make the agent sort its own work by reversibility, then spend your attention only where the change cannot be walked back.

The build is also honest about where the tools slipped, and how Pocock improves his skills because of it. Mid-grill, the agent claimed a diagram search did not exist when it did. It wrote an ADR without asking, and it resumed a sub agent that was already at 260,000 tokens, deep in what he calls the dumb zone, when he would have started a fresh one. The retro found that the prototype code had been copied rather than reimplemented, and that the code review skill could not cover a diff this large with one agent working under a 400-word limit. His response each time was to file an issue against his own skills repo. That fits what he tells NetworkChuck about why he does not build formal evals for skills: his evals are his users’ bug reports, plus his own retros. For readers adopting the skills, the lesson is that they are a process that keeps being revised, not a finished product. The retro is how a workflow, his or yours, gets better instead of just getting used.

Key Takeaways

  • Pocock picks a skill by the size of the diff he expects: a small change gets one-shotted, a big one starts with Grill with Docs, and a really big one moves to his Wayfinder skill, which runs the grilling over several sessions.
  • His setup is ordinary on purpose: Claude Code on the Claude Ultra plan, Opus 5.5 on medium effort, Wispr Flow for dictation, and his open source skills plus a few private ones in a personal “home repo”.
  • He prompts with the why, not the what. Describing the problem, and leaving the solution open, gives the agent room to propose something better than he would have specified.
  • The course video manager’s glossary.md is about 560 lines and is, in his words, his “pride and joy”. It lets him say something like “this is more like a diagram snapshot” and be understood exactly.
  • Architectural decision records explain why the code is the way it is. He compares them to Chesterton’s fence: do not remove a fence until you know why it was put up.
  • When a grilling session sprawls, he narrows it with “ask me one question at a time until I say otherwise,” then widens it again once the crux is settled. He drives the conversation, not the agent.
  • Building several prototypes is worth it because seeing a version you dislike tells the agent more than seeing one you like. He kept variant A, dropped the overlay and split-view versions, and added undo for face moves almost for free because tldraw keeps undo history in its data model.
  • Grilling also surfaces unrelated improvements, such as soft delete and cross-search between diagrams and thumbnails, which go on the backlog instead of into scope.
  • He still treats about 150,000 tokens as the edge of the smart zone, but now frames it as cost and quality rather than hallucination risk. Compacting is “almost free” right after a conversation has been turned into a spec.
  • Implement Spec runs the tickets in parallel sub agents, merges them into one PR and runs an automated code review against the spec and the coding standards before a human ever looks.
  • Breaking a huge PR into stacked diffs behind a feature flag turns one risky merge into many reversible ones and a final switch-on.
  • Human review, for Pocock, is less about whether the code works and more about the system that produced it. Each recurring complaint should become a lint rule, a type constraint or a standard.
  • The retro read about 30 agent session transcripts and his 12 review comments and he expects around 20 issues to come out of it. Most are small enough to hand to an agent without another grilling session.
  • In the NetworkChuck interview he describes a cron job that runs Improve Codebase Architecture on each repo daily through GitHub Actions and opens a PR for the top suggestion, which he spot-checks about every five PRs.

Detailed Summary

The Feature: Drawing Diagrams Beside His Face in a YouTube Thumbnail

The course video manager is Pocock’s open source app for making his courses and videos, a video editor, thumbnail editor, AI writer and scheduler that was 2,500 commits deep at the time of the NetworkChuck interview. Its thumbnail creator captured his face and removed the background, but adding a diagram meant switching to a separate diagram view, screenshotting part of it and pasting it in, then repeating the process whenever the position was off. He wanted to draw the diagram directly in the thumbnail, next to his face, and admitted he had no idea how to build it. That uncertainty is why he picked it to demonstrate the full process.

Grill with Docs: Glossary, ADRs and Domain Language

Grill with Docs combines his grilling skill, where the agent questions you before building anything, with a domain modeling skill that reads and updates the project glossary and its architectural decision records. The approach comes from Domain-Driven Design, which he credits to Eric Evans’s book Domain-Driven Design. Over roughly 40 numbered questions the agent asked what hurt most about the current flow, whether a thumbnail’s drawing was a real diagram, whether the face could move, and how deletion should work. It read ADR 003, which defines diagrams as first-class entities with per-clip snapshots, before proposing anything. The session settled the terms “thumbnail”, “cutout” and “thumbnail diagram”, a separate data model with a nullable reference to the snapshot it started from, soft deletes instead of hard deletes, and one shared diagram editor for both the playground and the thumbnail page.

Prototypes Before Implementation

While the grilling continued, a sub agent used his prototype skill to build three editing surfaces: a live editor clipped to the thumbnail frame, a canvas with the face inside it, and a split view. He rejected the second as too large and the third as “garbage” because he could not line up a box with his pointing hand. He kept the first, which had a “ghost face” that fades out when the pointer enters the frame. A second pass moved it into the real thumbnail page, added YouTube previews, a command palette for inserting diagram components, and diagram search. A thin white bar on the export, which the agent tested by reading pixel colours in its own browser, turned out to be Chrome downscaling the preview at 125% Windows display scaling rather than a bug in his code.

Smart Zone, Dumb Zone and Compacting

Pocock credits the smart zone and dumb zone idea to Dex Horthy. As a context window fills, the relationships between tokens grow quadratically and the model’s work slowly degrades. Older models needed clearing at 80,000 to 120,000 tokens; now he sees it mostly as cost and quality, since a 750,000-token context gets billed again whenever the cache runs out. In the interview he says he gets nervous around 150,000 tokens and sizes each ticket to roughly that budget. He has started using compact more, calling it “almost free” right after a conversation has been turned into a document, while still distrusting auto-compact because its timing can drop something important.

From Spec and Tickets to an Unattended Run

The To Spec skill turned the conversation into a GitHub issue with about 47 user stories, implementation decisions, an out-of-scope list and a pointer to the prototype branch. To Tickets broke it into nine sub-issues, each stating what blocks it, starting with a refactor to extract the shared diagram editor. After compacting, he ran Implement Spec, which started the three unblocked tickets in parallel sub agents working in worktrees, merged everything into one PR and ran his code review skill. That review checks both the spec, for under- or over-scoping, and the repo’s coding standards. It found one hard violation and some scope creep, which the agent fixed before he looked. The PR added 21,000 lines.

Stacked Diffs, Feature Flags and Human Review

To review the work on camera, he asked the agent to split the PR into stacked diffs that each stand alone, using the one-way and two-way door definitions from his PR skill, with a feature flag so both implementations could run side by side. He reviewed every line for the audience while noting that most people do not need to. The comments he left were about patterns rather than bugs: an as cast that needed a helper, Pick and intersection types, a fetch whose result was ignored, magic strings in useSearchParams, and long agent-written comments that he called “a note for itself in a future session.” None of them blocked the merge, and a background sub agent merged the stack in order as CI passed.

Retro: Turning Review Comments Into Lint Rules

The retro skill reads the saved session transcripts, about 30 here, and pulls his review comments in through the GitHub CLI. It ranked its suggestions, starting with converting his comments into ratcheted checks: ban as outside shared utilities, a custom parser rule for intersections because Oxlint has none, turn off useEffect in a hooks directory that currently has about 230 of them across 140 files, a typed search params helper, and a typed API client in place of raw fetch. Other findings targeted his skills: the prototype code was copied rather than reimplemented, Implement Spec creates its merger agent too early, the test suite is slow, and the code review skill cannot handle a big diff with one agent. He had each one filed as an issue.

The Comment Audit and the Finished Feature

Inspired by Lauren Tan’s practice of banning comments outright, he asked what would be lost by deleting every comment in the new diagrams feature. Of about 2,000 comment lines, the agent said roughly 940 could go now, about 1,000 explained something not visible in the code, and seven were already out of date. When he pushed it to be more aggressive, it proposed deleting 22, redesigning 18 workarounds, and moving three into ADRs: custom shapes as a persistence contract, face cam centering tuned by eye, and diagram PNGs rendering in the running app. All of it went into an umbrella issue. The merged feature worked in production: capture a face, draw text boxes and icons around a pointing hand, toggle a dark panel, and reopen the thumbnail to edit it later.

Software Factories and Where the Human Fits

In the NetworkChuck conversation, Pocock describes a software factory as removing humans from more points in the process. New issues or alerts trigger work, and only one-way doors wait for human review, with brakes so the factory does not become a “slop cannon.” Parts of his own setup already run that way: the daily architecture cron, and an agent that reproduces reported skill bugs in a dummy repo and opens PRs. He closes the build video by placing himself at the two ends of the pipeline, alignment and prototyping at the start and standards, retro and QA at the end. He follows his own advice to new developers, which is to learn the vocabulary of good design from books like A Philosophy of Software Design and Working Effectively with Legacy Code, then give agents permission to care about it.

Notable Quotes

“So the reason we’re so obsessed with language at this point is because the language is going to form the data model that everything else fits on top of.”

Matt Pocock, on why grilling spends so long on names

“The benefit of having multiple prototypes to look at is, especially if it builds something that you don’t like, that often tells you more than what you might get from something you do like.”

Matt Pocock, on prototyping three editing surfaces

“So, the more decisions you give it, the more decision space it has, the more likely it is to choose a bad one.”

Matt Pocock, before handing the spec to the agent to run AFK

“The thing that concerns me about comments is that they allow workarounds to proliferate and the comments kind of 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.”

Matt Pocock, during the comment audit

“In other words, grilling and retro are really the two main points at which I interact with the system.”

Matt Pocock, on where he adds value

“And because the code is the environment your agent operates in, the environment your agent operates in slowly gets worse.”

Matt Pocock to NetworkChuck, on why pure vibe coding fails

“So, what you’re doing is you’re just giving the agent permission to care about the strategic layer and you’re learning the words in order to do that.”

Matt Pocock to NetworkChuck, on what new developers should learn

Watch the full 21,000-line build here, and the full NetworkChuck conversation here.

Related Reading