tdd-evidence
Test-driven development + completion evidence discipline: tests first, reproduce bugs first, tests as evidence. Use whenever writer/dev roles implement logic…
от uisee-ai★ 36 звёзд на GitHub
Установить tdd-evidence в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
TDD Evidence
Write a failing test first, then code that makes it pass; reproduce bugs with tests before fixing them. Tests are proof—
"it looks right" does not count as done. In ZaoFu, this is not a style preference but a production line for completion evidence:
your dev.build.done feeds 4 mechanical audits (schema / attempt binding / generation
current / contract scope). Verify reviews evidence under the current wrapper; distinguish reusable current
receipts from commands that must be executed independently, and never substitute the author's claim of success for evidence.
When to Use
- Implementing any new logic or behavior; fixing any bug (Prove-It mode); changing any existing feature; adding any edge-case handling.
- Not applicable: configuration, documentation, or static content with no behavioral impact.
Pairing with the kernel Contract
| What you produce | Who consumes it | Rejection conditions |
|---|---|---|
| New tests + implementation in the same commit | verify reader source-code axis | Implementation without tests → gap finding |
Evidence for dev.build.done (test commands + counts) |
Completion audit + Verify evidence checks | No acceptance without valid results; distinguish execution errors from product failures |
Commit prefixes feat:/fix: |
Archival audit | Use feat: for TDD commits (tests + implementation together); do not split into test: |
| Reproduction tests for bug fixes | verify regression axis | Fix without a corresponding regression test → rework |
TDD Cycle
Before Impl begins and during Verify review, read Cycle Evidence and Exception Handling. It governs evidence for RED/GREEN/REFACTOR within a work slice; it adds no workflow stages or completion authority.
When receiving rework/resumption or reviewing rework results, read Rework Preservation Checklist to identify required fixes, behavior that must be preserved, and the current revalidation scope; do not load it for a normal first implementation.
RED GREEN REFACTOR
Write a failing test ──→ Minimal implementation ──→ Clean up with tests green ──→ (repeat)
Test must fail Make it pass; avoid Rerun tests at every step
overengineering
- RED: Write a behavior test first and confirm it fails because the behavior is missing. If it passes on the first run, check whether the behavior already exists
and record the result honestly; never deliberately break the implementation or fabricate RED.
Keep that failure output: it is the first link in the evidence chain. First read the task contract's
verificationfield: acceptance commands are the source of truth. Align your tests with them; do not invent your own acceptance criteria—the contract is ZaoFu's "pre-agreed seam": write tests at the agreed public boundary, not against internal structure. - GREEN: Write the minimum code needed to pass. Do not casually modify files outside allowed_paths (the scope gate will reject this); do not add abstractions for hypothetical future use.
- REFACTOR: Refactor only while all tests are green, without expanding the changeset—a fix for a 5-line root cause should not touch 10 files.
Prove-It Mode (Bug Fixes)
Auditable Specification-to-Test Mapping
In the existing implementation summary/evidence sidecar, record each key behavior's source acceptance criterion or acceptance_id, test name, rerunnable command, RED baseline and test changes, expected and actual failure, and GREEN implementation version and output references. Preserve test changes or patches so reviewers can reproduce the same test against the pre-implementation version, then verify it against the post-implementation version. Do not add a TDD state machine or separate task schema, or defer tests to another downstream task.
| Behavior | Specification-to-test example | Meaningful RED / GREEN |
|---|---|---|
| Pure rules | AC-RULE → test_conflicting_payload_is_rejected | Invalid request accepted → specified conflict returned |
| Database transactions | AC-TXN → test_failure_rolls_back_all_writes | Partial writes remain after an injected business failure → all writes rolled back |
| UI behavior | AC-PREVIEW → full plan end marker through real API/page | End of body missing → end of body locatable on the real page |
Missing dependencies, unreachable services, mistyped commands, and incorrect test parameters are not sufficient evidence of RED for the target feature.
Fix the environment/test first, then obtain a failure in the target behavior. Final acceptance still requires passing results; expected_red=false
is consistent with writing failing tests first during development and must not be bulk-changed to true. For documentation-only changes or configuration changes
with no behavioral impact, record why TDD does not apply;
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/cycle-evidence.md
- references/rework-preservation.md
FAQ
Что делает скилл tdd-evidence?
Test-driven development + completion evidence discipline: tests first, reproduce bugs first, tests as evidence. Use whenever writer/dev roles implement logic, fix bugs, or change behavior; completion evidence is mechanically paired with the kernel completion audit.
Как установить скилл tdd-evidence?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tdd-evidence запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…