Skip to content
Back to skills

Implement Tdd

ASecurity

Use to implement a .NET/DDD batch or a whole plan under strict TDD: launches the run-lot workflow (run-plan for a plan) and answers its questions.

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 19, 2026
code-qualitybash

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned October 19, 2026

npx -y skills add pierrebelin/claude-code-toolkit --skill implement-tdd --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Implement Tdd?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Implement Tdd
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pierrebelin-implement-tdd/badge)](https://www.skillsdirectory.com/skills/pierrebelin-implement-tdd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: implement-tdd
description: "Use to implement a .NET/DDD batch or a whole plan under strict TDD: launches the run-lot workflow (run-plan for a plan) and answers its questions."
argument-hint: "[batch FX <global plan path> | <global plan path> | batch FX — correction: manual finding]"
---

# Strict TDD — launch the chain

The TDD chain is the `run-lot` workflow (`workflows/run-lot.js`, shipped by the plugin): cycles read from the sheet's `## Cycles` block (design only when absent), RED (`tdd-test-author`), GREEN + REFACTOR + COST + handler `CLAUDE.md` (`tdd-implementer`), global green beside the pre-audit gate, audit (`ddd-tdd-auditor`), next-sheet review (`adversarial-reviewer`) beside the audit. The script holds the sequence; agent definitions, `.claude/rules/*.md` and `references/` hold the method. Never run the chain by hand, never commit by hand: the workflow commits each `DONE` batch itself (`cctoolkit batch-baseline commit`).

$ARGUMENTS

## When

- Validated plan from `/plan-implementation`, batch sheet `todo/<code>/<CODE>-PLAN-FX.md` present → this skill.
- No plan → no code: route to `/plan-implementation`.
- `/effort medium` before launching (`hooks/implement-tdd-guard.sh` refuses `high`).

## Launch

- **`batch FX <global plan path>`** → sheet = `<plan without .md>-FX.md`; Skill `cctoolkit:run-lot`, argument = that sheet path as text (never an `@` mention).
- **`<global plan path>`** alone, or "the whole plan" → Skill `cctoolkit:run-plan`, argument = the plan path, optionally `--until FX` / `--only FX`.
- No path → `ls todo/*/*-PLAN.md`; several → ask.
- **`batch FX — correction: manual finding`** → one `Edit` of the sheet: a new cycle in its `## Cycles` block (`behaviour` = `Correction Cn — [finding]`, wave after the last, contract fields per `references/design.md`), then `cctoolkit sheet-cycles <sheet> --index` exit 0. Sheet without the block → sub-step `Correction Cn — [finding]` under the affected step, the run's design writes the block. Finding changing scope, an RM/CU or a design decision → stop, `/business-spec` or `/plan-implementation`. Then launch `run-lot` on the sheet.

Before launching: `cctoolkit plan-next-batch <plan> --outside FX` exit 0, `cctoolkit doctor` without FAIL, test containers reachable when the batch touches Infrastructure.

## Questions during the run

The run decides by itself and asks only when no decision is defensible; it waits for the answer and is never resumed (`resumeFromRunId`).

1. At launch, arm `cctoolkit run-question watch <plan folder>/run` with Bash `run_in_background`.
2. On `QUESTION <work> <id> since=<epoch> next=<epoch>`: read the question JSON on the next line, ask through AskUserQuestion (empty `options` → propose 2-3 from `context` and `evidence`, plus `STOP`), then `cctoolkit run-question answer <work> <id> '[{"id":"q1","text":"…"}]'`, re-arm with `--since <next>`.
3. Workflow completed → TaskStop the watcher.

## End

Relay the workflow result: status, reason, verdict, report path (`run/batches/FX.md`; for a plan, `run/<stamp>.md`, its `## To validate` first: the decisions taken without the user, to read after the plan). A plan result carrying `merge` → say its `state` and lines, then Skill `cctoolkit:knowledge-merge` with the plan path: it shows the diff and writes the base on the user's confirmation only. `BLOCKED` → fix the cause, record `Hn` marked `user decision` in the sheet, launch a new run.

Batch run `DONE` → end with `→ Batch FX complete — manual validation required. Run /clear before any other batch.`

Files in this skill

  • SKILL.md3.5 KB
  • references/claude-md-handler.md3.7 KB
  • references/closing.md3 KB
  • references/common-rules.md9 KB
  • references/conventions.md1.9 KB
  • references/design.md6 KB
  • references/parallelism.md2.5 KB
  • references/test-scope.md7.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.