m-tdd-planner

m-tdd-planner is a command for coding agents from penwyp/ClaudePreference. It costs 0 tokens per session (645 once invoked), scanned A, original, MIT.

A planning command for Test-Driven Development, or TDD, a method where tests are written before the code they check. It turns requirements into ordered test and implementation work.

In plain words
What is it for?
Use it to create unit, integration, and end-to-end test strategies, break work into Red-Green-Refactor cycles, map dependencies, and produce a Mermaid workflow diagram.
Why use it?
It makes unclear requirements and missing acceptance criteria visible before implementation begins. It also shows which tasks depend on others.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/penwyp/claudepreference/m-tdd-planner
Clone the repo
git clone --depth 1 https://github.com/penwyp/ClaudePreference

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for m-tdd-planner

README.md
[![agentmods](https://agentmods.dev/badge/commands/penwyp/claudepreference/m-tdd-planner.svg)](https://agentmods.dev/commands/penwyp/claudepreference/m-tdd-planner)
Your own site
<a href="https://agentmods.dev/commands/penwyp/claudepreference/m-tdd-planner"><img src="https://agentmods.dev/badge/commands/penwyp/claudepreference/m-tdd-planner.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 645 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00645
Opus 5 $0.00000 $0.00322
Sonnet 5 $0.00000 $0.00129
Haiku 4.5 $0.00000 $0.00064

Measured 5d ago against content hash 138327b4a96f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

m-tdd-planner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/m-tdd-planner.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD Plan Workflow: Generate Test-First Development Plan

Target: $ARGUMENTS (Default: requirement document(s) in the default project location)

Scope: Analyze requirements and generate comprehensive TDD implementation plan

Execution Steps

  1. Requirements Analysis

    • Parse target documents and extract testable requirements
    • Identify behavioral specifications and acceptance criteria
    • Document ambiguous requirements for clarification
  2. Test Strategy Design

    • Define test pyramid structure (Unit, Integration, E2E)
    • Select appropriate testing frameworks and tools
    • Outline test infrastructure and environment setup
  3. TDD Task Decomposition

    • Break down features into Red → Green → Refactor cycles
    • Create specific test scenarios for each requirement
    • Sequence tasks based on dependency relationships
  4. Task Dependency Mapping

    • Identify prerequisite relationships between test tasks
    • Establish logical order for TDD implementation
    • Plan for parallel test development opportunities
  5. Plan Visualization

    • Generate Mermaid diagram showing task flow and dependencies
    • Illustrate Red-Green-Refactor cycles visually
    • Highlight critical testing milestones
  6. Generate TDD Plan Report

    • Compile structured JSON output with all components
    • Validate completeness of test coverage strategy

Output Format

Return a JSON object with the following structure:

{
  "testStrategy": "string - Overall testing approach, frameworks, and infrastructure description",
  "tasks": [
    {
      "id": "string",
      "description": "string - Specific Red/Green/Refactor step description",
      "type": "red|green|refactor|setup|integration",
      "status": "pending|in-progress|completed",
      "dependencies": ["task_id_1", "task_id_2"],
      "testLevel": "unit|integration|e2e"
    }
  ],
  "diagram": "string - Mermaid diagram code showing task dependencies and TDD flow",
  "clarifications": [
    "string - Questions about ambiguous requirements or testing approach"
  ]
}

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 96 lines · 0 tokens per session scan A 138327b4a96f

Subscribe to this mod's changes

m-tdd-planner is a command published in the GitHub repository penwyp/ClaudePreference (137 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 645 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.