tdd

Solid

Strict test-driven development for behavior changes. Requires verified RED before production code, minimal GREEN, and refactor only after passing tests.

Testing & QA 22 stars 5 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
45
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# /supergraph:tdd Requires healthy `index_status` for `CBM_PROJECT` (see `references/codebase-memory-contract.md` with `codebase-memory-mcp`); if stale/degraded → `index_repository` before graph calls. Strict TDD for features, bug fixes, refactors. **Iron Law:** `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST` **Delete means delete:** Production code written before verified failing test → delete and restart from RED. ## When **Full TDD:** new features, behavior changes, refactoring. **Fast TDD:** bug fixes (add regression test → RED verify → minimal fix). **Ask to skip:** config-only, generated code, throwaway prototype, docs-only. ## State Machine (in order, never skip) `needs_test` → `red_verified` → `green_verified` → `refactor_allowed` → `complete` ## Steps ### 0. Announce "🔴 /supergraph:tdd — TDD: [full|fast] for [behavior]..." ### 1. Identify One Behavior ``` Behavior: [single externally visible behavior] Test file: [path] | Test name: [name] Command: [focused test command] Expected RED: [why it should fail before implementation] ``` **One behavior per test. Public behavior, not internals. Real code over mocks.** ### 2. 🔴 RED — Write + Verify in One Round Write one failing test, then run immediately: ```bash <write test> && $TEST_CMD <focused command> ``` Valid 🔴 RED: fails **for the expected missing behavior**, not syntax/import/typo. Record evidence: ```markdown ## TDD Evidence — 🔴 RED - 🔴 RED: `[command]` → FAIL ([expected missing behavior]) ``...

Details

Author
datit309
Repository
datit309/supergraph
Created
4 months ago
Last Updated
6 days ago
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category