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 promptable workflow for coding agents.
  • The pattern asks agents to write tests first, confirm failure, implement code, and then confirm success.
  • It gives AI PMs a practical way to improve reliability while keeping agent-assisted development fast.
  • Simon Willison’s agentic engineering work helped frame red/green TDD as a repeatable pattern for AI coding.
  • The concept gained visibility in early 2026 alongside broader discussion of autonomous coding agent workflows.

Overview

Red/green TDD is a test-driven development pattern adapted for coding agents. In this workflow, an agent is prompted to write tests first, run them to confirm they fail (the “red” phase), implement the code, and then rerun the tests to confirm they pass (the “green” phase). In the context of agentic software development, this pattern acts as a reliability scaffold: it gives the model an explicit loop for validating intent, reducing the chances of silent errors or partially correct implementations.

For AI Product Managers, red/green TDD matters because it turns coding agents from unpredictable generators into more governable execution systems. Instead of evaluating output only after a large block of code is produced, teams can structure agent work around short validation cycles. This is especially useful when shipping internal tools, prototypes, integrations, and product experiments with agents such as Claude Code or GPT-5.4, where speed is valuable but correctness still needs guardrails.

Key Developments

  • 2026-02-23: Simon Willison’s Agentic Engineering Patterns was highlighted as a hub for patterns used to build and operate agentic systems, including red/green TDD for coding agents.
  • 2026-04-03: A practical description of the pattern was shared: prompting an agent with “red/green TDD” instructs it to write tests first, run them to verify failure, implement the code, and rerun tests to verify success.
  • 2026-04-04: Lenny Rachitsky shared Simon Willison’s view that late 2025 marked an inflection point for AI coding, with autonomous coding agents, benchmark progress, and workflows like red/green TDD plus “thin templates” improving reliability and productivity.

Relevance to AI PMs

1. Improve reliability of agent-built features: AI PMs can require red/green TDD for agent-assisted coding tasks so outputs are validated against explicit tests before being accepted into a codebase.
2. Operationalize faster experimentation: For prototypes, internal tooling, and product spikes, this pattern helps teams move quickly while preserving a lightweight quality bar through automated failure/success checks.
3. Standardize agent workflows across teams: PMs can turn red/green TDD into a delivery norm or prompt template, making outcomes more predictable when multiple engineers or agents contribute to the same product surface.

Related

  • Simon Willison: Closely associated with popularizing agentic engineering patterns, including red/green TDD for coding agents.
  • Lenny Rachitsky: Amplified the idea through newsletter and social distribution, helping bring the pattern to a broader product and tech audience.
  • Claude Code: An example of a coding agent environment where red/green TDD can be used to structure implementation loops.
  • GPT-5.4: Referenced as part of the wave of stronger coding agents that made patterns like red/green TDD more practical and productive.
  • Agentic Engineering Patterns: The broader framework or collection of practices in which red/green TDD appears as a specific implementation pattern.
  • Test-driven development: The foundational software practice that red/green TDD adapts for agentic coding workflows.

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