GenAI PM
concept3 mentions· Updated Feb 23, 2026

red/green TDD

A test-driven development pattern adapted for coding agents. It emphasizes an iterative failure/success loop that can make agentic coding more reliable.

Key Highlights

  • red/green TDD adapts classic test-driven development into a structured workflow for coding agents.
  • The pattern prompts agents to write tests first, confirm failure, implement code, and then verify success.
  • AI Product Managers can use it to create measurable checkpoints and improve reliability in agent-assisted development.
  • Simon Willison’s agentic engineering patterns helped formalize red/green TDD as a reusable approach for autonomous coding.
  • The concept gained visibility during the broader AI coding inflection discussed by Simon Willison and Lenny Rachitsky.

red/green TDD

Overview

red/green TDD is a test-driven development pattern adapted for coding agents. In this workflow, an agent writes tests first, runs them to confirm failure (the “red” phase), implements the code needed to satisfy those tests, and then reruns the tests to confirm success (the “green” phase). In the AI coding context, this pattern acts as a structured prompt and operating loop that helps agents produce more reliable code with clearer validation at each step.

For AI Product Managers, red/green TDD matters because it translates a classic engineering discipline into a practical control mechanism for agentic software development. Instead of asking coding agents to generate large blocks of code in one shot, teams can constrain work into measurable iterations with explicit success criteria. That can improve reliability, reduce regressions, and make autonomous or semi-autonomous coding workflows easier to evaluate, govern, and scale.

Key Developments

  • 2026-02-23: Simon Willison’s Agentic Engineering Patterns was highlighted as a guide for building and operating agentic systems, serving as a hub for patterns including red/green TDD for coding agents.
  • 2026-04-03: A detailed mention explained the operational prompt for red/green TDD: direct an agent to write tests first, run them to confirm failure, implement the code, and rerun tests to confirm success. The concept was discussed alongside coding agents such as Claude Code and GPT-5.4 as part of broader agentic engineering patterns.
  • 2026-04-04: Lenny Rachitsky shared Simon Willison’s view that November 2025 marked an inflection point for AI coding, with autonomous coding agents and benchmarks helping drive practices like red/green TDD, often paired with “thin templates.”

Relevance to AI PMs

  • Define agent workflows with measurable checkpoints: AI PMs can use red/green TDD to turn vague coding requests into a controlled loop with explicit validation gates, making agent outputs easier to assess and approve.
  • Improve reliability in agent-assisted development: By requiring failing tests before implementation and passing tests after, teams can reduce the risk of silent errors, regressions, and overconfident but incorrect code generation.
  • Operationalize coding agents in product teams: This pattern gives PMs a concrete process to standardize across tools, helping teams compare agent performance, design better prompts, and integrate agents into existing engineering quality practices.

Related

  • Simon Willison: A key advocate for agentic engineering patterns, including red/green TDD as a practical workflow for coding agents.
  • Lenny Rachitsky: Amplified the idea in newsletter coverage, helping frame it as part of the broader AI coding inflection point.
  • Claude Code: Cited as an example of a coding agent that can be used within red/green TDD workflows.
  • GPT-5.4: Mentioned alongside Claude Code as part of the new generation of coding agents enabling these patterns.
  • agentic-engineering-patterns: The broader category and guide under which red/green TDD is organized as a reusable pattern.
  • test-driven development / red-green test-driven development / red-green TDD: Common aliases and related formulations of the same concept, adapted here specifically for AI coding agents.

Newsletter Mentions (3)

2026-04-04
#8 𝕏 Lenny Rachitsky shares Simon Willison’s insight that November 2025 was the inflection point for AI coding, unleashing autonomous coding agents benchmarked by Pelican Benchmark and driving red/green TDD with “thin templates.

GenAI PM Daily April 04, 2026 GenAI PM Daily 🎧 Listen to this brief 3 min listen Today's top 17 insights for PM Builders, ranked by relevance from X, Blogs, and LinkedIn. Claude subscriptions will no longer cover usage on third-party tools like OpenClaw. #8 𝕏 Lenny Rachitsky shares Simon Willison’s insight that November 2025 was the inflection point for AI coding, unleashing autonomous coding agents benchmarked by Pelican Benchmark and driving red/green TDD with “thin templates.

2026-04-03
Invoking the prompt “red/green TDD” directs agents to write tests first, run them to confirm failure, implement the code, then rerun tests to confirm success.

▶️ Why AI came for coders first, automation timelines, and how we’re inside the AI inflection Lennys Podcast Simon Willison details agentic engineering patterns—using coding agents like Claude Code and GPT-5.4 for red/green TDD, thin project templates, and public GitHub hoarding—to boost software productivity and reliability. GPT-5.1 and Claude Opus 4.5 released in November 2025 advanced coding agents from “mostly working” to “almost always following instructions,” enabling engineers to churn out up to 10,000 lines of code per day. Invoking the prompt “red/green TDD” directs agents to write tests first, run them to confirm failure, implement the code, then rerun tests to confirm success. Willison’s GitHub repositories include simonw/tools with 193 HTML/JavaScript client-side utilities and simonw/ressearch with 75 AI-driven research projects to hoard reusable code experiments.

2026-02-23
#3 📝 Simon Willison Agentic Engineering Patterns - A guide collecting patterns for building and operating agentic systems. It serves as a hub for specific patterns such as red/green TDD for coding agents.

#3 📝 Simon Willison Agentic Engineering Patterns - A guide collecting patterns for building and operating agentic systems. It serves as a hub for specific patterns such as red/green TDD for coding agents. #5 📝 Simon Willison Research WebMCP + Chrome DevTools Protocol Demo - Demo of WebMCP, a proposed browser API for exposing structured, callable tools to AI agents, showing how to register and interact with WebMCP tools from a Python client over the Chrome DevTools Protocol.

Stay updated on red/green TDD

Get curated AI PM insights delivered daily — covering this and 1,000+ other sources.

Subscribe Free