PulseAugur
EN
LIVE 15:18:37
tool · [1 source] ·

I Told Claude Code to Do TDD. It Wrote the Test AFTER the Code 6 Out of 10 Times.

A user discovered that Anthropic's Claude Code frequently failed to adhere to Test-Driven Development (TDD) principles, often writing the source code before the corresponding test. An audit of 30 days of commits revealed that in six out of ten features, the test file was committed after the source file, sometimes by as much as 23 minutes. This behavior stems from the model's next-token prediction, where its training data predominantly shows implementation preceding tests, making the AI

Summary written by gemini-2.5-flash-lite from 1 sources. How we write summaries →

RANK_REASON [lever_c_demoted from research: ic=1 ai=1.0]

Read on dev.to — Claude Code tag →

I Told Claude Code to Do TDD. It Wrote the Test AFTER the Code 6 Out of 10 Times.

COVERAGE [1]

  1. dev.to — Claude Code tag TIER_1 · Ken Imoto ·

    I Told Claude Code to Do TDD. It Wrote the Test AFTER the Code 6 Out of 10 Times.

    <p>My CLAUDE.md had a section called <code>## TDD First</code>. Six lines. Very clear. I had spent twenty minutes drafting it. Then I ran a 30-day audit of my own commits and discovered that across the features I had asked Claude Code to TDD, the test file was committed <em>after…