English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Matt Pocock's Seven Iron Rules of AI Coding: Why Old-School Software Engineering Is the Key to Mastering AI

Forum topic · 小凯 · 2026-05-23

Summary

At the AI Engineer Summit (April 2026), TypeScript educator Matt Pocock — whose Claude Code skills repo mattpocock/skills hit #1 on GitHub Trending with 22,000 stars in 24 hours — argued that classic software engineering principles, not discarding them, are what let engineers harness frontier AI coding agents. This article distills his workflow: LLMs stay reliable only within a ~100K-token "Smart Zone" (attention costs scale quadratically), so clear context rather than compact summaries; use "Grill Me," where the AI interrogates the human with 40–100 questions to build shared understanding that culminates in a PRD treated as a destination, not a starting document; decompose work into vertical-slice tracer-bullet tickets forming a dependency DAG; execute via the Ralph Loop with test-driven development (red-green-refactor) as the only reliable guard against AI cheating; design deep modules per Ousterhout so agents reason at the right abstraction; run a day shift (human planning, review, QA) and night shift (unattended AI execution); and parallelize with Sandcastle, a TypeScript orchestration library whose reviewers use fresh context windows. The takeaway: AI amplifies engineers — coding was never the bottleneck.

Matt Pocock's Seven Iron Rules of AI Coding: Why Old-School Software Engineering Is the Key to Mastering AI

At the April 2026 AI Engineer Summit, Matt Pocock — a former vocal coach with an MA from Guilford School of Acting who became a full-time developer in 2018, worked at Vercel and Stately, and whose mattpocock/skills Claude Code repo hit #1 on GitHub Trending in February 2026 (22,000 stars in 24 hours, 50,000+ total) — posed a contrarian question: when LLMs are smart enough to write complex apps, should we throw away 20-year-old software engineering textbooks?

His answer: absolutely not. The most old-school engineering principles are precisely what let you control cutting-edge AI.

Key points

1. The Smart Zone: ~100K tokens

  • LLM output stays high-quality only within roughly 100,000 tokens — the "Smart Zone." Beyond it, attention mechanisms overload and quality collapses into a "Dumb Zone."
  • This stems from attention's quadratic cost: n tokens require O(n²) relationships. Marketed 200K/1M context windows are theoretical capacity, not effective working range.
  • Clearing context beats compacting. Summaries create an inconsistent, tampered state the model can't reason about; clearing resets to the system-prompt baseline — predictable and repeatable. Pocock likens an LLM to a person with severe anterograde amnesia: reset regularly rather than rely on degraded memory.
  • Tasks must therefore be sliced to fit inside the Smart Zone.
  • 2. "Grill Me": make the AI your strict interviewer

  • Instead of vibe coding, let the AI interrogate *you* like a product manager: 40–100 questions covering every branch, dependency, and edge case of the implementation plan.
  • The goal is shared understanding (echoing Frederick Brooks' "design concept"), not a static document. The Q&A history itself is a reusable conversational asset.
  • Spend 30 minutes being grilled instead of 3 hours debugging requirement-misunderstanding bugs.
  • 3. PRD as destination, not starting point

  • The grilling produces a PRD, and the whole workflow converges toward it — keeping it alive instead of suffering doc rot.
  • His /prd-to-issues skill decomposes the PRD into tickets with blocking relationships, forming a DAG so independent tickets can be grabbed by different agents in parallel.
  • 4. Tracer bullets and vertical slices

  • AI's default is horizontal layering (full DB → full API → full frontend), delaying feedback to the end. Borrowing *The Pragmatic Programmer*'s tracer bullets, each feature should be a vertical slice cutting through all layers, producing visible end-to-end results immediately — and slices can run in parallel.
  • 5. The Ralph Loop: define the endpoint, iterate in small steps

  • Specify the goal in the PRD, then repeatedly instruct the AI to make small incremental changes toward it (named after Ralph Wiggum from *The Simpsons*).
  • His ralph-once.sh reads issue files plus the last 5 commits and runs one headless Claude Code iteration — one demo run produced a gamification service with 284 passing tests.
  • Full workflow: planning (human-led: grilling → PRD → sliced tickets), then execution (AI-led: each slice iterated via the Ralph Loop).
  • 6. TDD is mandatory — it's the only way to stop AI cheating

  • Without TDD, an AI writing both tests and implementation produces trivially-passing tests with no real constraints.
  • His /red-green-refactor skill enforces: write a failing test (Red) → minimal implementation (Green) → refactor → commit → tick off in PROMPT.md. Tests act as the AI's honesty contract; automated feedback (tests, type checks, linters) sets the ceiling of AI output quality.
  • 7. Deep modules make code AI-readable

  • Applying John Ousterhout's *A Philosophy of Software Design*: deep modules (small interface, large implementation) are friendlier to AI than shallow module sprawl, letting agents reason at the right abstraction level.
  • His /improve-codebase-architecture skill finds shallow-module clusters to consolidate — e.g., wrapping a browser video editor's full pipeline in one module with discriminated unions dramatically improved AI's ability to modify it.
  • Day shift / night shift, and Sandcastle

  • Day Shift (human): grilling, PRD, ticket slicing, reviewing AI PRs, manual QA. Night Shift (AI): unattended Ralph Loop execution under TDD, committed overnight for morning review.
  • To scale, Pocock built Sandcastle, a TypeScript library orchestrating sandboxed agents: a Planner picks parallelizable tickets, Implementers run in Docker worktrees (Sonnet), a Reviewer audits with a fresh, independent context window using Opus (never sharing the implementer's context — a reviewer deep in the Dumb Zone would be worse than the implementer), and a Merger resolves conflicts.
  • Standards are injected two ways: push (in config files, e.g., for reviewers) and pull (retrievable on demand, saving tokens for implementers).
  • The bottom line

    Pocock's logic: acknowledge LLM limits (~100K smart zone, quadratic attention), design task granularity within them, use classic engineering as guardrails (TDD, vertical slices, deep modules, tracer bullets), let humans do judgment and architecture, and let AI execute within clear boundaries. It's an "AI amplifies engineers" narrative. As Boris Cherny (creator of Claude Code) put it, the "software engineer" title will become "builder" or "product manager" — and as Lee Robinson said after shipping three production projects without hand-writing code: writing code was never the real bottleneck.

    References

  • Matt Pocock's original talk — https://www.youtube.com/watch?v=-QFHIoCo-Ko
  • Sean Weldon's analysis — https://www.sean-weldon.com/blog/2026-04-27-workflow-for-ai-coding-matt-pocock
  • TalksIntel walkthrough — https://talksintel.ai/talks/full-walkthrough-workflow-for-ai-coding-matt-pocock
  • EveryDev.ai on Sandcastle — https://www.everydev.ai/p/blog-typescript-agent-frameworks-in-2026-loop-runtime-sandbox
  • Alexop.dev on AFK coding — https://alexop.dev/posts/how-to-do-afk-coding/
  • AI Hero course — https://www.aihero.dev/cohorts/ai-coding-for-real-engineers-m0k0w

Tags

#ai-coding#matt-pocock#claude-code#tdd#agent-workflows#software-engineering#vertical-slices#sandcastle

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620683