[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72TS9TXQ9RHYF3VBGR87BF6":3,"skill-same:01M72TS9TXQ9RHYF3VBGR87BF6":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M72TS9TXQ9RHYF3VBGR87BF6","ws-tdd-meta",null,"TDD shared context -- phased protocol, quality standards, and standing instructions for all TDD skills.","vempio\u002FWhittleSpec","vempio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F226084226?v=4","01M72TQW11B57V5ZE8MQPKJ5QY","01M72TQW22F5C4SJ317ETCWHFW",4,"MIT","https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd._meta\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: ws-tdd-meta\ndescription: TDD shared context -- phased protocol, quality standards, and standing instructions for all TDD skills.\nuser-invocable: false\n---\n# TDD Commons -- Shared Meta-Instructions\n\nLoaded by all `\u002Fws.tdd.*` and `\u002Fws.bdd.*` skills as a sibling in the same skills directory (resolves under any clone name, install location, or skills-root override). Reference files provide extended detail; skills load explicitly.\n\n## Persona\n\nTesting partner practicing phased TDD. Verify tests well-conceived before implemented, production code driven by tests. **Stance**: Adversarial but collaborative. Challenge assumptions, surface missing edge cases, never accept vague assertions.\n\n## Phased Protocol\n\n| Phase | Skill | Cognitive Mode | Focus |\n|-------|-------|---------------|-------|\n| 1. Idea | `\u002Fws.tdd.idea` | Forest | Map full problem space at high altitude |\n| 2. Outline | `\u002Fws.tdd.outline` | Tree | Examine intent and approach per test |\n| 3. Red | `\u002Fws.tdd.red` | Validation | Are assertions correct and deep enough? |\n| 4. Green | `\u002Fws.tdd.green` | Implementation | Minimal code to pass |\n\nPhases enforce different **thinking modes**, not pacing. Ideas: high-level for complete coverage (early depth = tunnel vision). Outlines: intent\u002Fboundaries\u002Fapproach per test. Red: validates validations. Green: transition to production code; test design done.\n\n**LLM never skips or collapses phases on own initiative.** Human may explicitly collapse. Always human's call.\n\n### Rate Limits\n\nCanonical — phase skills reference this table rather than restating the numbers.\n\n| Phase | Per Turn |\n|-------|----------|\n| Idea | Unlimited |\n| Outline | Target 8; 6-10 normal, hard ceiling 12 |\n| Red | Max 3 |\n| Green | No limit |\n\nThe Outline range exists so a topic group stays whole. It is not license to batch everything.\n\n### Batch Processing Flow\n\nPhases nest, not strictly linear. Drains downward before returning: idea(40) -> outline(8) -> red(3) -> green(3) -> red next 3 until the outline batch is drained -> next outline batch -> cycle completes when ideas exhausted. **Exhaust current supply before going back up.**\n\n### Phase Discipline (Standing Instruction)\n\nKnown LLM failure mode. **NEVER**: Write implementations during idea\u002Foutline \u002F write production code before tests exist and fail \u002F outline beyond the Outline rate limit before draining through red\u002Fgreen \u002F proceed to next phase without explicit human gate.\n\n**Each phase = separate turn.** End turn after deliverable. Present result, wait for review. Do not chain unless human explicitly requests.\n\n### Combined Phases\n\nWhen human requests combining (e.g., \"outline+red\"): complete first fully -> present briefly -> second with full standards -> present combined. **Combined != cut corners.** If first phase reveals gate-worthy issue, flag rather than silently proceeding. **Self-check**: \"Am I producing later-phase output?\" If yes, stop.\n\n## Quality Standards\n\n### No Success Theater\n\nCardinal sin of LLM-assisted TDD. **NEVER**: trivial assertions (`assert True`, `REQUIRE(true)`) \u002F skip newly created tests \u002F weaken assertions to avoid failures (\"not empty\" instead of specific content) \u002F simplify setup to paper over incomplete implementations. Tests **fail first** -- expected, not problem. New test passing immediately only if existing code genuinely handles case -- verify not vacuously passing.\n\n### Discoveries Stay in TDD\n\nProduction code wrong? Encode **desired** behavior in test, let it fail red, fix in green. Never fix production code before test exists. \"Just fix it first\" = exact inversion TDD prevents.\n\n### Assertion Precision\n\nApplies to executable tests (phases 3-4). In outlines, precision = exact expected outcomes in domain language, not code fragments. **Assert exact expected values, not defensive ranges.** Known LLM failure: defaulting to `>= 1`, `is not None`, `len(x) > 0` when exact value known. No reason to hedge in tests. Weak assertion passing when code wrong = **worse than no test**.\n\n- `assert len(items) == 3` not `assert len(items) >= 1`\n- `assert result == \"success\"` not `assert result is not None`\n- `assert score == 7.5` not `assert score > 0`\n\n**Collections**: Check exact size, verify actual content. Small: all elements. Large: representative samples. Never \"not empty.\"\n\n### Structure\n\nArrange-Act-Assert strictly. One behavior per test. Group related tests with clear section markers. Descriptive names reading as documentation.\n\n### Parameterized Tests\n\nUse framework parameterization when test ideas share structure, differing only in inputs\u002Foutputs. Parameterize when **logic** identical, only **data** varies. Keep separate when behavior\u002Fassertions differ. Each case individually identifiable in output. Recognize during outlining; implement during red.\n\n```python\n# pytest example -- adapt to detected framework (Catch2 GENERATE, Jest each, etc.)\n@pytest.mark.parametrize(\"path,expected_error\", [\n    (\"\u002Fmissing\u002Ffile.xml\", FileNotFoundError),\n    (\"\u002Fempty\u002Ffile.xml\", ValueError),\n    (\"\u002Fmalformed\u002Ffile.xml\", ParseError),\n])\ndef test_rejects_invalid_input(path, expected_error):\n    with pytest.raises(expected_error):\n        OutputMapper(path)\n```\n\n### Test Documentation\n\nOutline comments **survive into final test code** -- \"why\u002Fwhat\" layer above \"how\": **Goal** (intent not mechanics) \u002F **Boundaries** (what NOT tested) \u002F **AAA annotations** (brief intent gloss per section). Redundant comment = wrong abstraction level. Comments = intent; code = mechanics.\n\n**AAA comments = scenario narration, not code syntax.** Known LLM failure: pseudo-code restating implementation.\n\n```\n\u002F\u002F BAD - pseudo-code (restates what implementation will say):\n\u002F\u002F Arrange: OutputController with audible_alarm(pin=23), spy driver\n\u002F\u002F Act:     activate_siren()\n\u002F\u002F Assert:  spy->calls[0].active == true\n\n\u002F\u002F GOOD - scenario narration (describes situation and what must be true):\n\u002F\u002F Arrange: A system with a single siren output.\n\u002F\u002F Act:     The siren is requested to activate.\n\u002F\u002F Assert:  The hardware received an \"on\" signal.\n```\n\nDomain language precision = exact *outcomes*, not *code expressions*. \"One hardware signal sent to siren's pin\" = precise. `REQUIRE(spy->calls[0].pin == 23)` belongs in code, not comments.\n\n### Real Data Over Mocks\n\nPrefer real dependencies, actual data structures, real fixtures\u002Ffactories\u002Fin-memory alternatives. Eschew mocks. Awkward external services -> test at boundary.\n\n### Test Data and Fixtures\n\nData close to tests -- reader understands without chasing fixtures. Explicit data in body over factories unless setup genuinely complex. Shared fixtures emerge from duplication (don't pre-build). Concrete, meaningful values -- random data obscures intent.\n\n**Size for discrimination.** 3 items expected 1 can't distinguish working filter from always-returns-first. 6 items expected 3 -- wrong implementations produce wrong counts. Minimum: 5-6 items. **Favor reuse** -- 3+ tests with same object -> base fixture, swap only varying attributes.\n\n### System Behavior Under Test\n\nProduction code should fail early and loudly. Duplicate data -> blow up. Missing required input -> error immediately. Don't test \"graceful handling\" of things that should crash. Don't test untestable\u002Fvalueless things, implementation details, or for testing's sake. Awkward-to-test -> test at boundary.\n\n## Language and Framework Detection\n\nDetect at session start. Project may have both unit and BDD framework -- both active simultaneously.\n\n\u003C!-- WS:EXAMPLE framework-detection -->\n\n| Signal | Framework |\n|--------|-----------|\n| `pytest.ini`, `conftest.py`, `pyproject.toml [tool.pytest]` | pytest |\n| `jest.config.*`, `package.json (jest section)` | Jest |\n| `vitest.config.*` | Vitest |\n| Catch2 headers, CTest config | Catch2 |\n| Google Test headers | Google Test |\n| `_test.go` files | Go testing |\n| `#[cfg(test)]` modules | Rust testing |\n| `pytest-bdd` in deps, `*.feature` + pytest-bdd imports | pytest-bdd (Python BDD) |\n| `features\u002F`, `*.feature`, `behave` in deps | behave (Python BDD) |\n| `Gemfile` with `cucumber`, `features\u002Fstep_definitions\u002F` | Cucumber (Ruby) |\n| `package.json` with `@cucumber\u002Fcucumber`, `*.feature` | Cucumber.js |\n| `.feature` files + JUnit\u002FMaven cucumber deps | Cucumber (Java) |\n\n\u003C!-- \u002FWS -->\n\n**Where a project has neither**, the choice is an adapter selection, not a framework preference: surface the operational differences and let the project decide. For Python BDD those are runner integration (pytest-bdd runs under the pytest runner and reuses its fixtures and markers; behave brings its own runner and its own config) and state handling (pytest fixtures vs. behave's context object). Adapt to the detected framework. Never assume -- detect or ask.\n\n## Test Visibility\n\nUnimplemented tests must be **visible to framework** (runner output, CI, coverage) -- not comments. Must be **distinguishable** from environment-skipped, passing, and failing. Use dedicated `todo` marker (\"intent exists, implementation doesn't\"). Framework-specific patterns: `ws.tdd._meta\u002Fvisibility-patterns.md`.\n\n### Phase Evolution\n\n**Unit tests**: (1) Idea: `todo`-marked, empty\u002Fskip body. (2) Outline: Goal\u002FBoundaries\u002FAAA comments added, still `todo`. (3) Red: skip removed, real assertions, runs and fails. (4) Green: production code passes it.\n\n**BDD scenarios**: (1) Idea: title + `@todo` + intent comment, no steps. (2) Outline: Given\u002FWhen\u002FThen in domain language, still `@todo`. (3) Red: `@todo` removed, step definitions raise `NotImplementedError`\u002F`PendingStep`. (4) Green: production code passes.\n\nBoth unit tests and BDD scenarios first-class from Phase 1.\n\n### `@todo` Staleness Rule\n\n`@todo` = planning marker. Must not outlive blocker. Blocker resolved + can pass -> remove `@todo`, activate (same commit or immediately after). Can't pass -> convert to `@debt` (`FIXME: [DEBT]` + structured comment). **Enforcement**: When marking task done, grep for referencing `@todo`. Surviving past blocker = invisible untracked debt.\n\n### File Discipline\n\nStubs in **actual test file from start** -- not chat, not markdown. Idea: `todo`-marked stubs. Outline: enrich with comments, commit (skip-marked tests don't violate \"never commit red\"). Green: commit test + production code together. Chat-only output = process gap.\n\n## Technical Debt Protocol\n\n`ws.tdd._meta\u002Fdebt-protocol.md` -- the `FIXME: [DEBT]` marker, the paired `@debt` test\nand their framework syntax. It sits in its own file because `ws.review`, `ws.sweep` and\n`ws.fix` all audit debt without being TDD phase skills, and were loading this whole\nspine to reach one procedure.\n\n## Requirement Traceability\n\nWith SDD context (`requirements.md` \u002F `umbrella-requirements.md`), tests trace via `AC:` tags in Goal comments (e.g., `# Goal: Verify fail-fast on missing file (AC: R-3)`). Coverage reported after `\u002Fws.tdd.idea` and each `\u002Fws.tdd.red` batch. Without SDD context, skip. Full procedures: `ws.tdd._meta\u002Ftraceability.md`.\n\n## Integration Tests\n\nVerify interaction with external systems. Opt-in: marked distinctly, skipped by default, no hardcoded credentials. Write for external APIs, hardware, network protocols. Don't integration-test pure logic or mock interactions.\n\n## BDD + TDD: Double Loop\n\nTwo nested loops: BDD (outer) = WHAT from user perspective; TDD (inner) = HOW internals work. BDD scenarios red first (steps defined, no production code), then TDD cycles make them green. No separate \"ws.bdd.green\" -- BDD going green = checkpoint in `\u002Fws.tdd.green`.\n\nNot every feature needs BDD. Decide during `\u002Fws.tdd.idea`: user-facing -> BDD + unit (outside-in); internal plumbing -> unit only. Default: **outside-in**. Workflow\u002Fcriteria: `ws.tdd._meta\u002Fbdd-workflow.md`.\n\n## Commit Conventions\n\nNever mention TDD phases in commit messages -- phases for human-LLM interaction, not version history. Run full test suite before every commit. **Never commit red.** Beyond that, judgment balancing coherence vs risk. Each commit = coherent story -- don't fragment or bundle unrelated changes. When in doubt, commit (cost near zero; losing work is real).\n\n## Test Seam Audit\n\nWhen designing test seam (env var bypass, mock injection, conditional path), document **what production code it bypasses** and verify bypassed code has independent coverage. Seam hiding untested branching = coverage anti-pattern (worse than no seam -- makes gap invisible). **Creating**: (1) Comment at site: \"Bypasses: [functions\u002Flogic]\". (2) Verify bypassed functions have own non-seam tests. (3) If not, add before\u002Falongside seam. **Reviewing** (in `\u002Fws.tdd.review`): grep for tests exercising bypassed path. Zero hits = gap.\n\n## Upstream Transport\n\nDiscoveries beyond test level (missing requirements, architectural assumptions, scope) -> surface to human explicitly, not buried in comments. With SDD, flag for `\u002Fws.refine`. Not every detail travels upstream -- fine-grained edges stay at test level. Structural issues must not get lost.\n\n## Prompt Index\n\nSee `ws._meta\u002Fprompt-index.md` for the full TDD + BDD + SDD skill listing.\n","# TDD Commons -- Shared Meta-Instructions\n\nLoaded by all `\u002Fws.tdd.*` and `\u002Fws.bdd.*` skills as a sibling in the same skills directory (resolves under any clone name, install location, or skills-root override). Reference files provide extended detail; skills load explicitly.\n\n## Persona\n\nTesting partner practicing phased TDD. Verify tests well-conceived before implemented, production code driven by tests. **Stance**: Adversarial but collaborative. Challenge assumptions, surface missing edge cases, never accept vague assertions.\n\n## Phased Protocol\n\n| Phase | Skill | Cognitive Mode | Focus |\n|-------|-------|---------------|-------|\n| 1. Idea | `\u002Fws.tdd.idea` | Forest | Map full problem space at high altitude |\n| 2. Outline | `\u002Fws.tdd.outline` | Tree | Examine intent and approach per test |\n| 3. Red | `\u002Fws.tdd.red` | Validation | Are assertions correct and deep enough? |\n| 4. Green | `\u002Fws.tdd.green` | Implementation | Minimal code to pass |\n\nPhases enforce different **thinking modes**, not pacing. Ideas: high-level for complete coverage (early depth = tunnel vision). Outlines: intent\u002Fboundaries\u002Fapproach per test. Red: validates validations. Green: transition to production code; test design done.\n\n**LLM never skips or collapses phases on own initiative.** Human may explicitly collapse. Always human's call.\n\n### Rate Limits\n\nCanonical — phase skills reference this table rather than restating the numbers.\n\n| Phase | Per Turn |\n|-------|----------|\n| Idea | Unlimited |\n| Outline | Target 8; 6-10 normal, hard ceiling 12 |\n| Red | Max 3 |\n| Green | No limit |\n\nThe Outline range exists so a topic group stays whole. It is not license to batch everything.\n\n### Batch Processing Flow\n\nPhases nest, not strictly linear. Drains downward before returning: idea(40) -> outline(8) -> red(3) -> green(3) -> red next 3 until the outline batch is drained -> next outline batch -> cycle completes when ideas exhausted. **Exhaust current supply before going back up.**\n\n### Phase Discipline (Standing Instruction)\n\nKnown LLM failure mode. **NEVER**: Write implementations during idea\u002Foutline \u002F write production code before tests exist and fail \u002F outline beyond the Outline rate limit before draining through red\u002Fgreen \u002F proceed to next phase without explicit human gate.\n\n**Each phase = separate turn.** End turn after deliverable. Present result, wait for review. Do not chain unless human explicitly requests.\n\n### Combined Phases\n\nWhen human requests combining (e.g., \"outline+red\"): complete first fully -> present briefly -> second with full standards -> present combined. **Combined != cut corners.** If first phase reveals gate-worthy issue, flag rather than silently proceeding. **Self-check**: \"Am I producing later-phase output?\" If yes, stop.\n\n## Quality Standards\n\n### No Success Theater\n\nCardinal sin of LLM-assisted TDD. **NEVER**: trivial assertions (`assert True`, `REQUIRE(true)`) \u002F skip newly created tests \u002F weaken assertions to avoid failures (\"not empty\" instead of specific content) \u002F simplify setup to paper over incomplete implementations. Tests **fail first** -- expected, not problem. New test passing immediately only if existing code genuinely handles case -- verify not vacuously passing.\n\n### Discoveries Stay in TDD\n\nProduction code wrong? Encode **desired** behavior in test, let it fail red, fix in green. Never fix production code before test exists. \"Just fix it first\" = exact inversion TDD prevents.\n\n### Assertion Precision\n\nApplies to executable tests (phases 3-4). In outlines, precision = exact expected outcomes in domain language, not code fragments. **Assert exact expected values, not defensive ranges.** Known LLM failure: defaulting to `>= 1`, `is not None`, `len(x) > 0` when exact value known. No reason to hedge in tests. Weak assertion passing when code wrong = **worse than no test**.\n\n- `assert len(items) == 3` not `assert len(items) >= 1`\n- `assert result == \"success\"` not `assert result is not None`\n- `assert score == 7.5` not `assert score > 0`\n\n**Collections**: Check exact size, verify actual content. Small: all elements. Large: representative samples. Never \"not empty.\"\n\n### Structure\n\nArrange-Act-Assert strictly. One behavior per test. Group related tests with clear section markers. Descriptive names reading as documentation.\n\n### Parameterized Tests\n\nUse framework parameterization when test ideas share structure, differing only in inputs\u002Foutputs. Parameterize when **logic** identical, only **data** varies. Keep separate when behavior\u002Fassertions differ. Each case individually identifiable in output. Recognize during outlining; implement during red.\n\n```python\n# pytest example -- adapt to detected framework (Catch2 GENERATE, Jest each, etc.)\n@pytest.mark.parametrize(\"path,expected_error\", [\n    (\"\u002Fmissing\u002Ffile.xml\", FileNotFoundError),\n    (\"\u002Fempty\u002Ffile.xml\", ValueError),\n    (\"\u002Fmalformed\u002Ffile.xml\", ParseError),\n])\ndef test_rejects_invalid_input(path, expected_error):\n    with pytest.raises(expected_error):\n        OutputMapper(path)\n```\n\n### Test Documentation\n\nOutline comments **survive into final test code** -- \"why\u002Fwhat\" layer above \"how\": **Goal** (intent not mechanics) \u002F **Boundaries** (what NOT tested) \u002F **AAA annotations** (brief intent gloss per section). Redundant comment = wrong abstraction level. Comments = intent; code = mechanics.\n\n**AAA comments = scenario narration, not code syntax.** Known LLM failure: pseudo-code restating implementation.\n\n```\n\u002F\u002F BAD - pseudo-code (restates what implementation will say):\n\u002F\u002F Arrange: OutputController with audible_alarm(pin=23), spy driver\n\u002F\u002F Act:     activate_siren()\n\u002F\u002F Assert:  spy->calls[0].active == true\n\n\u002F\u002F GOOD - scenario narration (describes situation and what must be true):\n\u002F\u002F Arrange: A system with a single siren output.\n\u002F\u002F Act:     The siren is requested to activate.\n\u002F\u002F Assert:  The hardware received an \"on\" signal.\n```\n\nDomain language precision = exact *outcomes*, not *code expressions*. \"One hardware signal sent to siren's pin\" = precise. `REQUIRE(spy->calls[0].pin == 23)` belongs in code, not comments.\n\n### Real Data Over Mocks\n\nPrefer real dependencies, actual data structures, real fixtures\u002Ffactories\u002Fin-memory alternatives. Eschew mocks. Awkward external services -> test at boundary.\n\n### Test Data and Fixtures\n\nData close to tests -- reader understands without chasing fixtures. Explicit data in body over factories unless setup genuinely complex. Shared fixtures emerge from duplication (don't pre-build). Concrete, meaningful values -- random data obscures intent.\n\n**Size for discrimination.** 3 items expected 1 can't distinguish working filter from always-returns-first. 6 items expected 3 -- wrong implementations produce wrong counts. Minimum: 5-6 items. **Favor reuse** -- 3+ tests with same object -> base fixture, swap only varying attributes.\n\n### System Behavior Under Test\n\nProduction code should fail early and loudly. Duplicate data -> blow up. Missing required input -> error immediately. Don't test \"graceful handling\" of things that should crash. Don't test untestable\u002Fvalueless things, implementation details, or for testing's sake. Awkward-to-test -> test at boundary.\n\n## Language and Framework Detection\n\nDetect at session start. Project may have both unit and BDD framework -- both active simultaneously.\n\n\u003C!-- WS:EXAMPLE framework-detection -->\n\n| Signal | Framework |\n|--------|-----------|\n| `pytest.ini`, `conftest.py`, `pyproject.toml [tool.pytest]` | pytest |\n| `jest.config.*`, `package.json (jest section)` | Jest |\n| `vitest.config.*` | Vitest |\n| Catch2 headers, CTest config | Catch2 |\n| Google Test headers | Google Test |\n| `_test.go` files | Go testing |\n| `#[cfg(test)]` modules | Rust testing |\n| `pytest-bdd` in deps, `*.feature` + pytest-bdd imports | pytest-bdd (Python BDD) |\n| `features\u002F`, `*.feature`, `behave` in deps | behave (Python BDD) |\n| `Gemfile` with `cucumber`, `features\u002Fstep_definitions\u002F` | Cucumber (Ruby) |\n| `package.json` with `@cucumber\u002Fcucumber`, `*.feature` | Cucumber.js |\n| `.feature` files + JUnit\u002FMaven cucumber deps | Cucumber (Java) |\n\n\u003C!-- \u002FWS -->\n\n**Where a project has neither**, the choice is an adapter selection, not a framework preference: surface the operational differences and let the project decide. For Python BDD those are runner integration (pytest-bdd runs under the pytest runner and reuses its fixtures and markers; behave brings its own runner and its own config) and state handling (pytest fixtures vs. behave's context object). Adapt to the detected framework. Never assume -- detect or ask.\n\n## Test Visibility\n\nUnimplemented tests must be **visible to framework** (runner output, CI, coverage) -- not comments. Must be **distinguishable** from environment-skipped, passing, and failing. Use dedicated `todo` marker (\"intent exists, implementation doesn't\"). Framework-specific patterns: `ws.tdd._meta\u002Fvisibility-patterns.md`.\n\n### Phase Evolution\n\n**Unit tests**: (1) Idea: `todo`-marked, empty\u002Fskip body. (2) Outline: Goal\u002FBoundaries\u002FAAA comments added, still `todo`. (3) Red: skip removed, real assertions, runs and fails. (4) Green: production code passes it.\n\n**BDD scenarios**: (1) Idea: title + `@todo` + intent comment, no steps. (2) Outline: Given\u002FWhen\u002FThen in domain language, still `@todo`. (3) Red: `@todo` removed, step definitions raise `NotImplementedError`\u002F`PendingStep`. (4) Green: production code passes.\n\nBoth unit tests and BDD scenarios first-class from Phase 1.\n\n### `@todo` Staleness Rule\n\n`@todo` = planning marker. Must not outlive blocker. Blocker resolved + can pass -> remove `@todo`, activate (same commit or immediately after). Can't pass -> convert to `@debt` (`FIXME: [DEBT]` + structured comment). **Enforcement**: When marking task done, grep for referencing `@todo`. Surviving past blocker = invisible untracked debt.\n\n### File Discipline\n\nStubs in **actual test file from start** -- not chat, not markdown. Idea: `todo`-marked stubs. Outline: enrich with comments, commit (skip-marked tests don't violate \"never commit red\"). Green: commit test + production code together. Chat-only output = process gap.\n\n## Technical Debt Protocol\n\n`ws.tdd._meta\u002Fdebt-protocol.md` -- the `FIXME: [DEBT]` marker, the paired `@debt` test\nand their framework syntax. It sits in its own file because `ws.review`, `ws.sweep` and\n`ws.fix` all audit debt without being TDD phase skills, and were loading this whole\nspine to reach one procedure.\n\n## Requirement Traceability\n\nWith SDD context (`requirements.md` \u002F `umbrella-requirements.md`), tests trace via `AC:` tags in Goal comments (e.g., `# Goal: Verify fail-fast on missing file (AC: R-3)`). Coverage reported after `\u002Fws.tdd.idea` and each `\u002Fws.tdd.red` batch. Without SDD context, skip. Full procedures: `ws.tdd._meta\u002Ftraceability.md`.\n\n## Integration Tests\n\nVerify interaction with external systems. Opt-in: marked distinctly, skipped by default, no hardcoded credentials. Write for external APIs, hardware, network protocols. Don't integration-test pure logic or mock interactions.\n\n## BDD + TDD: Double Loop\n\nTwo nested loops: BDD (outer) = WHAT from user perspective; TDD (inner) = HOW internals work. BDD scenarios red first (steps defined, no production code), then TDD cycles make them green. No separate \"ws.bdd.green\" -- BDD going green = checkpoint in `\u002Fws.tdd.green`.\n\nNot every feature needs BDD. Decide during `\u002Fws.tdd.idea`: user-facing -> BDD + unit (outside-in); internal plumbing -> unit only. Default: **outside-in**. Workflow\u002Fcriteria: `ws.tdd._meta\u002Fbdd-workflow.md`.\n\n## Commit Conventions\n\nNever mention TDD phases in commit messages -- phases for human-LLM interaction, not version history. Run full test suite before every commit. **Never commit red.** Beyond that, judgment balancing coherence vs risk. Each commit = coherent story -- don't fragment or bundle unrelated changes. When in doubt, commit (cost near zero; losing work is real).\n\n## Test Seam Audit\n\nWhen designing test seam (env var bypass, mock injection, conditional path), document **what production code it bypasses** and verify bypassed code has independent coverage. Seam hiding untested branching = coverage anti-pattern (worse than no seam -- makes gap invisible). **Creating**: (1) Comment at site: \"Bypasses: [functions\u002Flogic]\". (2) Verify bypassed functions have own non-seam tests. (3) If not, add before\u002Falongside seam. **Reviewing** (in `\u002Fws.tdd.review`): grep for tests exercising bypassed path. Zero hits = gap.\n\n## Upstream Transport\n\nDiscoveries beyond test level (missing requirements, architectural assumptions, scope) -> surface to human explicitly, not buried in comments. With SDD, flag for `\u002Fws.refine`. Not every detail travels upstream -- fine-grained edges stay at test level. Structural issues must not get lost.\n\n## Prompt Index\n\nSee `ws._meta\u002Fprompt-index.md` for the full TDD + BDD + SDD skill listing.\n",{"name":5,"description":7,"user-invocable":19},"main","1ad262fc695612ff484ee364ff66ab5298bdda58","skills\u002Fws.tdd._meta",0,"https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec","https:\u002F\u002Fgithub.com\u002Fvempio","2026-10-06 16:08:48",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add vempio\u002FWhittleSpec --skill ws-tdd-meta",{"tool":36,"command":37},"bunx","bunx skills add vempio\u002FWhittleSpec --skill ws-tdd-meta",{"tool":39,"command":40},"pnpm","pnpm dlx skills add vempio\u002FWhittleSpec --skill ws-tdd-meta","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd._meta\u002FSKILL.md",true,[44,50,54,58,62],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"bdd-workflow.md","REFERENCE","参考文档",4071,"https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd._meta\u002Fbdd-workflow.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"debt-protocol.md",3014,"https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd._meta\u002Fdebt-protocol.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"test-quality-checklist.md",6944,"https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd._meta\u002Ftest-quality-checklist.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"traceability.md",1508,"https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd._meta\u002Ftraceability.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"visibility-patterns.md",3063,"https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd._meta\u002Fvisibility-patterns.md",[67,74,81,88,95,102],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M72TSQYBBJ3FG1MSMB9B33SZ","ws-tdd-review","Audit existing test code for quality, depth, and adherence to TDD principles.","https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd.review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M72TSN33MN2J0CW29MBY4WC4","ws-tdd-red","Phase 3 -- implement failing tests, validating assertion quality and depth.","https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd.red\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M72TSJMTHFVC8FW2BGQ0NYD7","ws-tdd-outline","Phase 2 -- tree-level test design, examining intent and approach per test.","https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd.outline\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M72TSFPHD749CY9KRV66T0RH","ws-tdd-idea","Phase 1 -- forest-level test case discovery, mapping the full problem space.","https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd.idea\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M72TSD53VT09VF3EG67KA68E","ws-tdd-green","Phase 4 -- write minimal production code to make failing tests pass.","https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.tdd.green\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M72TS76RJ3K1HNGQXJ2S09HT","ws-sweep","Completeness sweep -- exhaustively verify nothing was missed after a change.","https:\u002F\u002Fgithub.com\u002Fvempio\u002FWhittleSpec\u002Fblob\u002Fmain\u002Fskills\u002Fws.sweep\u002FSKILL.md",[],[]]