Skip to content
Back to skills

Tdd

ASecurity

Test-first at pre-agreed seams — one test, one implementation, tracer-bullet red/green; independent expected values; substitutes only at the seam's declared boundary class.

  • 12 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentstestingrefactoring

Security analysis

A100/100

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

Scanned November 11, 2026

npx -y skills add 1225Sakura/oh-my-deepseekharness --skill tdd --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tdd?

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

Security grade badge for Tdd
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/1225sakura-tdd/badge)](https://www.skillsdirectory.com/skills/1225sakura-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: tdd
description: Test-first at pre-agreed seams — one test, one implementation, tracer-bullet red/green; independent expected values; substitutes only at the seam's declared boundary class.
when-to-use: The user says "tdd" / "TDD 模式" or asks for test-first work with strict red/green discipline — building new behavior or fixing a bug under seam discipline. Not for bulk test backfilling or refactoring-only passes.
---

# TDD

Red-green in small steps, at seams agreed in advance. In a `launch` run the seam list is the approved spec/ticket output; in a `team` run the executor worker inherits it from the stage handoff. Anywhere else, agree the seams with the user before the first test exists — a seam nobody approved gets no tests.

## The loop

One test → one implementation → repeat:

1. Write the next test at a seam. Run it. Watch it fail for the reason you expect — a test that cannot fail is not a test.
2. Implement the smallest change that turns it green.
3. Repeat. Each test is a tracer bullet: a narrow but complete path through the behavior, not a layer finished in isolation.

## Rules

- Expected values come from an independent source of truth — a spec line, a worked example, a documented output. Never from the implementation under test: a test that asserts what the code happens to do is a mirror, not a check.
- Substitute at the seam's declared boundary class only — in-process, locally substitutable, owned-remote port, or true-external, as the seam list records. No substitutes inside the boundary the test is exercising.
- Refactoring is not part of the loop. It belongs to the review stage (`review` / `ai-slop-cleaner`); the fix loop owns it. Do not refactor mid-red-green.
- A bug fix starts with the failing test that reproduces it — reproduction before theory, the debugger's rule.
- When proposing a seam, say in one line what it catches and what it lets through — a seam choice nobody can price is a guess, not a decision.

## When no seam fits

If the behavior cannot be tested at any approved seam, stop and say so: report the missing seam as a finding (it feeds `trace`/`analyze` evidence and the environment-refit review) rather than inventing a seam or testing through internals.

## Output

- The seam list used, with boundary classes and each seam's catch/miss line
- Red/green evidence — the failing run and the passing run (paste fresh command output, never recalled from memory)
- Any seam-absence findings

Files in this skill

  • SKILL.md2.4 KB
  • SKILL.zh.md2.2 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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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