tdd-enforcelisted
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