← ClaudeAtlas

tdd-enforcelisted

Test discipline enforcement. Holds the 8 antipattern catalogue (text-matching theater, tautology, mock-only, call-count, empty body, silent skip, trivial assertion, name-lies), the patterns that produce useful tests, the severity application table, and the migration policy. Invoked by code-reviewer when test files are touched in a diff and by tdd-guide when authoring new tests.
nikolanovoselec/codeflare · ★ 24 · Code & Development · score 69
Install: claude install-skill nikolanovoselec/codeflare
# Test Discipline Enforcement The core rule `tdd-discipline.md` states what a real test is. This skill carries the antipattern catalogue, the positive patterns, the severity table, and the migration policy. Invoked by code-reviewer on diffs that touch any test file and by tdd-guide before authoring new tests. ## Inputs - `diff`: git diff against base (test files only) - `scope`: `all` | `diff` - `enforce_tdd`: from `sdd/config.yml` ## Output Returns findings array with severity HIGH or MEDIUM per the table below. No auto-fix proposals (tests are rewritten by tdd-guide, not auto-fixed by the reviewer). ## Antipatterns (drawn from this codebase) ### 1. Text-matching theater A test reads a file (markdown, source, config, prompt) and regex-matches against its contents. The "system under test" is the file's prose, not behavior. Found across `host/__tests__/sdd-workflow-upgrade.test.js` (removed in 2026-05), `host/__tests__/memory-capture-hook.test.js`, `host/__tests__/container-memory.test.js`, `host/__tests__/entrypoint-sync.test.js`, `web-ui/src/__tests__/page-transparency.test.ts`. ```js // BAD: reads a file, asserts a substring is present const content = readFileSync(path, 'utf-8'); assert.match(content, /forbidden|banned/i, 'should define forbidden list'); // BAD: same shape with includes() assert.ok(hookScript.includes('jq'), 'hook should reference jq'); // BAD: same shape on CSS const cssContent = readFileSync(cssPath, 'utf-8'); expect(parseFloat(cssContent.match