HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nizos
tdd-guard
TypeScript2025–2026
nizos / tdd-guard

tdd-guard

Automated TDD enforcement for Claude Code

3Distinct people
9Mentions
0Explicit recommenders
2.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Automated TDD enforcement for Claude Code

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month9 dated mentions

Observed mentions: 2025-08-03 17:25:09 UTC to 2026-04-27 12:11:02 UTC.

02462025-08-01 00:00:00 UTC to 2025-09-01 00:00:00 UTC (exclusive): 6 mentions; 3 submissions, 3 commentsAug 20252025-09-01 00:00:00 UTC to 2025-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-10-01 00:00:00 UTC to 2025-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-01 00:00:00 UTC to 2025-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-12-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsDec 20252026-01-01 00:00:00 UTC to 2026-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-02-01 00:00:00 UTC to 2026-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-01 00:00:00 UTC to 2026-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-01 00:00:00 UTC to 2026-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 2026

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Aug 20252025-08-01 00:00:00 UTC2025-09-01 00:00:00 UTC633
Sep 20252025-09-01 00:00:00 UTC2025-10-01 00:00:00 UTC000
Oct 20252025-10-01 00:00:00 UTC2025-11-01 00:00:00 UTC000
Nov 20252025-11-01 00:00:00 UTC2025-12-01 00:00:00 UTC000
Dec 20252025-12-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
Jan 20262026-01-01 00:00:00 UTC2026-02-01 00:00:00 UTC000
Feb 20262026-02-01 00:00:00 UTC2026-03-01 00:00:00 UTC000
Mar 20262026-03-01 00:00:00 UTC2026-04-01 00:00:00 UTC000
Apr 20262026-04-01 00:00:00 UTC2026-05-01 00:00:00 UTC101

What Hacker News says

9 sources
If you write your tests the Test-Driven Development way in that they first fail before production changes are introduced, you will be able to trust them a lot more. Especially if they are well-written tests that test behavior or contracts, not implementation details. I find that dependency injection helps a lot with this. I try to avoid mocking and complex dependencies as much as possible. This also allows me to easily refactor the code without having to worry about breaking anything if all the tests still pass. When it comes to agentic coding. I created an open source tool that enforces those practices. The agent gets blocked by a hook if it tries to do anything that violates those principles. I think it helps a lot if I may say so myself. https://github.com/nizos/tdd-guard Edit: I realize now that I misunderstood your comment. I was qui
Read the rest
ck to respond.
In Your job is to deliver code you have proven to work
That sounds amazing! Thanks for the heads up! I deliberately picked a vendor-agnostic name. Adding support for other clients mainly means extending IClient: https://github.com/nizos/tdd-guard/blob/main/src%2Fcontracts... https://github.com/nizos/tdd-guard/tree/main/src%2Fvalidatio... I'll take a closer look into adding this support. I'd also welcome a contribution if that's something you would be interested in! The question is, do other agent platforms support hooks or similar functionality?
In Show HN: TDD-Guard – Test-Driven Development for Claude Code
I've found that keeping my CLAUDE.md minimal (under 100 lines) yields the best results. I focus mainly on these areas: - Essential project context and purpose - A minimal project structure to help locate types, interfaces, and helpers - Common commands to avoid parsing package.json repeatedly. Regarding the specific practices mentioned: Implementation Flow: I've noticed Claude Code often tries to write all tests at once, then implements everything when import fails (not true TDD). To address this, I created a TDD-Guard hook that enforces one test at a time, test fail for the right reason, only implement the minimal code to make the test pass. Code quality: I've had good success automating these with husky, lint-staged, and commitlint. This gives deterministic results and frees up the context for more important information. When Stuck: I a
Read the rest
gree that developer intervention is often the best path. I'm just afraid the specific guidance here might be too generic. For anyone interested in this automated approach: https://github.com/nizos/tdd-guard (includes example configuration) https://github.com/typicode/husky https://github.com/conventional-changelog/commitlint https://github.com/lint-staged/lint-staged
In Getting good results from Claude Code
I have been using Claude Code with TDD through hooks, which significantly improved my workflow for production code. Watching the ChatGPT 5 demo yesterday, I noticed most of the code seemed oriented towards one-off scripts rather than maintainable codebases which limits its value for me. Does anyone know if ChatGPT 5 or Copilot have similar extensibility to enforce practices like TDD? For context on the approach: https://github.com/nizos/tdd-guard I use pre/post operation commands to enforce TDD rules.
In GPT-5 vs. Sonnet: Complex Agentic Coding

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.