Claude Code and Sandcastle: an AI coding workflow

Learn Matt Pocock's workflow for turning briefs into PRDs and testable tasks, then running Claude Code in loops with Docker sandboxes and human review.

Player not loading? Watch on YouTube

Matt Pocock walks through an AI coding workflow using Claude Code to add gamification to a course platform. He starts with a "Grill Me" skill that asks questions about an ambiguous brief before summarizing the decisions in a product requirements document. The example covers points, streaks and whether existing lesson completions should earn credit retroactively.

Next, he turns the PRD into issues with explicit dependencies. He corrects an initial plan that separates database and service work, asking instead for a vertical slice that awards lesson-completion points and displays them on the dashboard. This gives the AI agent a complete flow to test early.

Implementation uses a Ralph-style loop with issue files, recent commits and a prompt. Pocock demonstrates test-driven development and type checks, then explains why he still reviews tests and performs manual QA. Passing automated checks does not settle everything: the live example encounters a missing SQLite table during manual testing.

For parallel work, he introduces Sandcastle, his TypeScript library for running prompts in Git worktrees inside Docker containers. He also argues for modules with small interfaces and substantial internal functionality. His preference for fresh context and his roughly 100K-token "smart zone" are workflow judgments, not universal model limits. The workshop uses a coding assistant; it does not demonstrate local model inference.