[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72TF2QKCQNP3S0EQGEHA9B6":3,"skill-same:01M72TF2QKCQNP3S0EQGEHA9B6":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"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":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M72TF2QKCQNP3S0EQGEHA9B6","ywc-tdd-ritual",null,"(ywc) Use when implementing a new feature, bug fix, or behavior change before production code is written; enforce RED → GREEN → REFACTOR and a real failing-test step. Triggers: \"TDD\", \"test first\", \"테스트 먼저\", \"regression test\", \"テスト先行\", \"ywc-tdd-ritual\", \"ywc-code-gen --tdd\". Do not use for opted-out throwaway prototypes, existing test-failure debugging (use ywc-debug-rootcause), generated\u002Fconfig files, or completion verification (use ywc-verify-done).","yongwoon\u002Fywc-agent-toolkit","yongwoon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9317029?v=4","01M72SZSF6VKANKG5QTMV4V95S","01M72SZSG8HHC3W2CV5P7EJ5AH",8,"MIT","https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: ywc-tdd-ritual\ndescription: >-\n  (ywc) Use when implementing a new feature, bug fix, or behavior change\n  before production code is written; enforce RED → GREEN → REFACTOR and a real\n  failing-test step. Triggers: \"TDD\", \"test first\", \"테스트 먼저\",\n  \"regression test\", \"テスト先行\", \"ywc-tdd-ritual\", \"ywc-code-gen --tdd\".\n  Do not use for opted-out throwaway prototypes, existing test-failure\n  debugging (use ywc-debug-rootcause), generated\u002Fconfig files, or completion\n  verification (use ywc-verify-done).\n---\n\n# ywc-tdd-ritual\n\n**Announce at start:** \"I'm using the ywc-tdd-ritual skill to enforce RED → GREEN → REFACTOR with a watch-it-fail gate before any production code.\"\n\nThis skill is the canonical writing-time discipline for ywc. It exists because every implementation skill (`ywc-code-gen`, `ywc-sequential-executor`, `ywc-parallel-executor`) can run with or without TDD, and the cost of running without is borne later by `ywc-debug-rootcause`, `ywc-impl-review`, and CI — typically 3–10× the cost of writing the test first. Adapted from `superpowers:test-driven-development`, tightened to delegate completion claims to `ywc-verify-done` and root-cause work to `ywc-debug-rootcause`.\n\n## The Iron Law\n\n```text\nNO PRODUCTION CODE WITHOUT A FAILING TEST FIRST\n```\n\nIf production code was written before the test, delete it and start over from RED. \"Adapt the existing code while writing the test\" is the same as \"writing the test after\"; it produces a test biased by the implementation that does not actually catch defects.\n\n## Rationalization Defense\n\nWhen tempted to skip the cycle, check this table first:\n\n| Excuse | Reality |\n|---|---|\n| \"I'll write the test right after implementing — same result\" | Tests written after the code pass immediately. A test that passes the first time it runs proves nothing — it might be testing the wrong thing, the wrong path, or the wrong assertion. You never saw it catch the bug, so it cannot be trusted to catch one later. Test-first forces the test to fail for the right reason first. |\n| \"Too simple to need a test\" | \"Simple\" code is where unchecked assumptions land. The test takes 30 seconds; the bug found in production takes hours. There is no size threshold below which the gate stops applying. |\n| \"I already manually tested every edge case\" | Manual testing is ad-hoc and leaves no artifact. The next change will re-introduce the bug because there is no automated guard. Manual coverage is not coverage. |\n| \"Deleting the X hours of implementation I already wrote is wasteful\" | Sunk cost. The time is gone either way. The choice now is (a) delete and rewrite under TDD with high confidence, or (b) keep the unverified code and inherit a debugging debt that will cost more later. Keeping it is the more expensive option. |\n| \"I'll keep the code as reference while I write the test first\" | \"Reference\" becomes \"model to copy\", which becomes \"the test I built around the existing code\" — i.e., a test-after with extra steps. Delete means delete. Implement fresh from the test. |\n| \"I need to explore the design first; TDD blocks exploration\" | Exploration is fine. Treat the exploration as a spike — keep notes, then **throw away the spike code** before starting TDD. The TDD cycle begins from the test, not from the spike. |\n| \"The test setup is so big the cycle slows me down\" | A test that needs a 200-line setup is signal that the design is wrong. Listen to the test: extract a seam, inject the collaborator, or simplify the interface. Hard-to-test code is hard-to-use code. |\n| \"I'll skip the 'watch it fail' step — I know it would fail\" | The watch-it-fail step is not for the test, it is for **you**. It catches: (a) the test passing for an unrelated reason (e.g., the assertion is wrong), (b) typos that turn the test into a no-op, (c) the test exercising code that already exists. Without this step, the cycle silently degrades into test-after. |\n| \"I have 6 features to add — I'll TDD the hard one and skip the easy ones\" | The easy ones are exactly where the bug hides, because attention is elsewhere. The discipline applies per feature, not per session. |\n| \"This is a refactor, no behavior change — tests not needed\" | Refactor = same behavior, different structure. The existing test suite must pass before and after. If no test covers the surface being refactored, write the test first (RED on the *existing* behavior), then refactor under it. Refactoring without tests is rewriting. |\n\n**Violating the letter of this discipline is violating the spirit.** The cycle is the only mechanism in the ywc workflow that catches design defects before they ship.\n\n## The Red-Green-Refactor Cycle\n\n```text\nRED → Verify RED → GREEN → Verify GREEN → REFACTOR → Verify GREEN → Next\n```\n\nEach transition has a verification step that **must** be executed in the current message — no transition is silent.\n\n### Step 1: RED — Write the failing test\n\nWrite one minimal test that captures **one** behavior the production code is required to exhibit.\n\n### Public seam and feedback\n\nName the existing public boundary (seam) the test observes in one sentence. Prefer an existing seam; a new boundary needs an explicit interface decision. Record a minimal feedback note: `Seam`, `Catches`, `Misses`, and the reproduction or test evidence. A unit seam cannot claim effects beyond its boundary.\n\nIf no existing seam observes the behavior, preserve reproduction evidence and its catches\u002Fmisses, then surface the smallest interface\u002Fdesign decision. Do not expose a private helper only for testing or invent a misleading test. If multiple seams are plausible, resolve the public-interface ambiguity before writing the test.\n\n**Requirements:**\n\n- **One behavior per test.** If the test name contains \"and\", split it.\n- **Clear, intention-revealing name.** \"`rejects offset > total with 400`\" beats \"`pagination test 3`\".\n- **Real code paths.** Mocks are allowed only for boundaries the test cannot cross (network, clock, file system). Mocking the unit under test is forbidden — it tests the mock, not the code.\n- **No production behavior yet.** If a symbol does not exist, first fix the test setup. If the language cannot compile or import the test without the symbol (for example a new Go function), add a minimal behavior-free production stub before RED: signature only, and the test must not pass against it. For a function that returns a value, return a not-implemented error or any placeholder value that makes the test fail at a behavior assertion; a sentinel distinct from every expected value is not required (for example, `IsEven(int) bool` tests that expect both `true` and `false` fail on whichever case the placeholder gets wrong). For a function that returns nothing and mutates state (for example a Go `Clear()`), use an empty no-op body and confirm RED through the failing state assertion; do not `panic`, which would stop the test before that assertion. If the expected value is itself the zero value, keep the expectation unchanged and confirm RED through the failing stub (or add a second case with a non-zero expectation) so a valid test cannot pass on its first run. Run the test through that stub so the failure reaches a behavior assertion, and implement the real behavior only in GREEN. Collection, compile, or import errors do not prove RED.\n\n### Step 2: Verify RED — Watch it fail\n\n```bash\n# Run ONLY the new test, using the project's configured test runner:\n#   npm\u002Fpnpm\u002Fyarn → the \"test\" script in package.json, e.g. `npm test -- \u003Cpath-or-name>`\n#   pytest        → `pytest \u003Cpath>::\u003Ctest>` (from pyproject.toml \u002F pytest.ini)\n#   go            → `go test -run \u003CTestName> .\u002F\u003Cpkg>`\n# If the runner cannot be inferred from the project config, ask the user before running.\n```\n\nConfirm three things from the output:\n\n1. The test ran (not skipped, not errored before reaching assertions).\n2. The failure reason matches what was expected (the assertion fired, not a typo or missing import).\n3. No other test broke — if the test runner shows new failures elsewhere, the test is interacting with shared state and must be fixed before advancing.\n\n**If the test passes the first time it runs**, the test is wrong:\n\n- It is testing existing behavior — the feature is already implemented, or\n- The assertion is trivially satisfied (e.g., `expect(x).toBeDefined()` where `x` is always defined), or\n- The test is reading a cached \u002F stale value.\n\nFix the test. Do not advance to GREEN with a passing-on-first-run test.\n\n### Step 3: GREEN — Write the minimal code\n\nWrite the simplest production code that makes the failing test pass.\n\n**Requirements:**\n\n- **Minimal.** No options the test does not exercise. No abstractions the test does not require. YAGNI applies hard here.\n- **No bundled refactor.** Adjacent code that \"could be cleaner\" is not touched in this step. Save it for REFACTOR.\n- **No additional tests.** This step makes the existing test green; new tests belong to the next cycle.\n\n### Step 4: Verify GREEN — Watch it pass\n\n```bash\n\u003Crun the new test>\n\u003Crun the broader suite to confirm no regression>\n```\n\nConfirm:\n\n1. The new test passes.\n2. The full suite passes (no other test broke).\n3. The output is pristine — no errors, no warnings, no deprecation notices that were not there before.\n\nIf the broader suite breaks, the GREEN code is too aggressive (touched a public surface other tests rely on) or too narrow (mutated shared state). Either revert or extend the suite — never silence a failing test to advance.\n\n### Step 5: REFACTOR — Clean up under green\n\nNow, and only now, improve the implementation:\n\n- Remove duplication.\n- Improve names.\n- Extract helpers if the same logic appears in 2+ places.\n- Tighten types or invariants.\n\n**No new behavior** during refactor. The same tests must pass after each edit. If a refactor breaks a test, the refactor changed behavior — revert and split into a separate cycle.\n\n### Step 6: Verify after REFACTOR\n\nRe-run the suite after the refactor. If it stays green, the cycle is complete. If a test breaks, treat as Step 5 violation.\n\n### Step 7: Loop or hand off\n\nComplete one behavior's RED → GREEN → REFACTOR cycle before starting the next behavior. Do not batch all tests, all implementation, or all refactoring into horizontal phases.\n\nIf there are more behaviors to implement, return to Step 1 with the next test.\nWhen all required behaviors are implemented, hand off to `ywc-verify-done` for the completion claim (build + lint + full test suite + per-claim evidence block).\n\n## Output Format\n\nThe cycle produces three commit shapes per behavior, in this order. (Skip the REFACTOR commit when no cleanup was needed.)\n\n| Stage | Commit message shape | Verification at commit time |\n|---|---|---|\n| RED | `test: \u003Cone-line behavior>` (tests fail at this commit) | Test fails for the expected reason |\n| GREEN | `feat: \u003Cone-line behavior>` or `fix: \u003Cbug>` | New test passes; broader suite passes |\n| REFACTOR | `refactor: \u003Cwhat was tightened>` | All tests still pass |\n\nPer-stage verification blocks follow `ywc-verify-done`'s shape (command → exit code → claim). The RED commit's verification block proves the test failed; the GREEN commit's proves it passes; the REFACTOR commit's proves nothing broke.\n\nWhen delegated from `ywc-code-gen --tdd`, the executor emits these three commits per behavior automatically and threads the verification block into its per-step report.\n\n## Integration\n\n- **Upstream callers**: user invocation; `ywc-code-gen` with `--tdd` flag (Step 7.5 enforces the cycle per generated module); `ywc-debug-rootcause` Phase 4 §1 (regression test for the bug).\n- **Downstream**: `ywc-verify-done` (every Verify step uses its evidence-block format and forbidden-vocabulary rules); `ywc-debug-rootcause` (if the RED step itself uncovers an unexpected pre-existing failure, that is a Phase 1 finding — route there).\n- **Pairs with**: `ywc-confidence-gate` (pre-cycle ≥90 confidence reduces RED rewrite churn); `ywc-impl-review` (downstream code review uses the test as the spec evidence).\n\n## Validation Checklist\n\nBefore declaring a behavior complete, verify:\n\n- [ ] A test for the behavior exists in the repository\n- [ ] The test was **observed failing** in the current session for the expected reason (RED commit's verification block in this session's history)\n- [ ] The production code was written **after** the test failed\n- [ ] No \"kept as reference\" code was retained from a pre-TDD draft\n- [ ] The GREEN code is minimal — every line traces to a test-required behavior\n- [ ] The broader suite passes (per `ywc-verify-done`)\n- [ ] If refactoring was performed, all tests stayed green throughout\n\n## Common Mistakes\n\n(Procedural failure modes specific to TDD. Behavioral rationalizations are in the table above — do not duplicate here.)\n\n- **Treating a compile \u002F import error as \"test failed\".** A test that errors before reaching its assertions has not exercised the production code. Fix the test setup (stub the missing import, then re-run) so the failure is at the assertion, not the import.\n- **Writing the test against the implementation you secretly already drafted in your head.** The test reads the desired *behavior*, not the algorithm you imagine. If the test mentions a private helper name before that helper exists in the codebase, you are testing the implementation, not the contract.\n- **Bundling the GREEN edit with a \"while I'm here\" fix in adjacent code.** Adjacent fixes mean the GREEN commit is no longer minimal, and you cannot bisect cleanly if the next cycle breaks. Save adjacent fixes for their own RED-GREEN-REFACTOR.\n- **Letting a refactor introduce a \"harmless\" behavior tweak.** \"It was already broken anyway\" is not license to fix it in the refactor commit. Either write a RED for the new behavior or revert the tweak.\n- **Skipping `ywc-verify-done` at the end of the cycle because \"the cycle already verified it\".** The cycle verifies one behavior; `ywc-verify-done` verifies the **claim** (build green, lint green, suite green, claim wording free of forbidden vocabulary). Both are required for completion.\n\n## References\n\n| Reference | Use when |\n|---|---|\n| [references\u002Fred-green-checklist.md](references\u002Fred-green-checklist.md) | Walking through the per-step entry \u002F exit conditions during the cycle |\n| [references\u002Ftest-shape-cookbook.md](references\u002Ftest-shape-cookbook.md) | Picking the right shape of test for the behavior (state vs interaction, unit vs integration, snapshot vs assertion) |\n| `ywc-verify-done` | Per-step verification block shape (command + exit code + claim) |\n| `ywc-debug-rootcause` | When an existing test starts failing during a cycle, route the investigation here before another fix attempt |\n","# ywc-tdd-ritual\n\n**Announce at start:** \"I'm using the ywc-tdd-ritual skill to enforce RED → GREEN → REFACTOR with a watch-it-fail gate before any production code.\"\n\nThis skill is the canonical writing-time discipline for ywc. It exists because every implementation skill (`ywc-code-gen`, `ywc-sequential-executor`, `ywc-parallel-executor`) can run with or without TDD, and the cost of running without is borne later by `ywc-debug-rootcause`, `ywc-impl-review`, and CI — typically 3–10× the cost of writing the test first. Adapted from `superpowers:test-driven-development`, tightened to delegate completion claims to `ywc-verify-done` and root-cause work to `ywc-debug-rootcause`.\n\n## The Iron Law\n\n```text\nNO PRODUCTION CODE WITHOUT A FAILING TEST FIRST\n```\n\nIf production code was written before the test, delete it and start over from RED. \"Adapt the existing code while writing the test\" is the same as \"writing the test after\"; it produces a test biased by the implementation that does not actually catch defects.\n\n## Rationalization Defense\n\nWhen tempted to skip the cycle, check this table first:\n\n| Excuse | Reality |\n|---|---|\n| \"I'll write the test right after implementing — same result\" | Tests written after the code pass immediately. A test that passes the first time it runs proves nothing — it might be testing the wrong thing, the wrong path, or the wrong assertion. You never saw it catch the bug, so it cannot be trusted to catch one later. Test-first forces the test to fail for the right reason first. |\n| \"Too simple to need a test\" | \"Simple\" code is where unchecked assumptions land. The test takes 30 seconds; the bug found in production takes hours. There is no size threshold below which the gate stops applying. |\n| \"I already manually tested every edge case\" | Manual testing is ad-hoc and leaves no artifact. The next change will re-introduce the bug because there is no automated guard. Manual coverage is not coverage. |\n| \"Deleting the X hours of implementation I already wrote is wasteful\" | Sunk cost. The time is gone either way. The choice now is (a) delete and rewrite under TDD with high confidence, or (b) keep the unverified code and inherit a debugging debt that will cost more later. Keeping it is the more expensive option. |\n| \"I'll keep the code as reference while I write the test first\" | \"Reference\" becomes \"model to copy\", which becomes \"the test I built around the existing code\" — i.e., a test-after with extra steps. Delete means delete. Implement fresh from the test. |\n| \"I need to explore the design first; TDD blocks exploration\" | Exploration is fine. Treat the exploration as a spike — keep notes, then **throw away the spike code** before starting TDD. The TDD cycle begins from the test, not from the spike. |\n| \"The test setup is so big the cycle slows me down\" | A test that needs a 200-line setup is signal that the design is wrong. Listen to the test: extract a seam, inject the collaborator, or simplify the interface. Hard-to-test code is hard-to-use code. |\n| \"I'll skip the 'watch it fail' step — I know it would fail\" | The watch-it-fail step is not for the test, it is for **you**. It catches: (a) the test passing for an unrelated reason (e.g., the assertion is wrong), (b) typos that turn the test into a no-op, (c) the test exercising code that already exists. Without this step, the cycle silently degrades into test-after. |\n| \"I have 6 features to add — I'll TDD the hard one and skip the easy ones\" | The easy ones are exactly where the bug hides, because attention is elsewhere. The discipline applies per feature, not per session. |\n| \"This is a refactor, no behavior change — tests not needed\" | Refactor = same behavior, different structure. The existing test suite must pass before and after. If no test covers the surface being refactored, write the test first (RED on the *existing* behavior), then refactor under it. Refactoring without tests is rewriting. |\n\n**Violating the letter of this discipline is violating the spirit.** The cycle is the only mechanism in the ywc workflow that catches design defects before they ship.\n\n## The Red-Green-Refactor Cycle\n\n```text\nRED → Verify RED → GREEN → Verify GREEN → REFACTOR → Verify GREEN → Next\n```\n\nEach transition has a verification step that **must** be executed in the current message — no transition is silent.\n\n### Step 1: RED — Write the failing test\n\nWrite one minimal test that captures **one** behavior the production code is required to exhibit.\n\n### Public seam and feedback\n\nName the existing public boundary (seam) the test observes in one sentence. Prefer an existing seam; a new boundary needs an explicit interface decision. Record a minimal feedback note: `Seam`, `Catches`, `Misses`, and the reproduction or test evidence. A unit seam cannot claim effects beyond its boundary.\n\nIf no existing seam observes the behavior, preserve reproduction evidence and its catches\u002Fmisses, then surface the smallest interface\u002Fdesign decision. Do not expose a private helper only for testing or invent a misleading test. If multiple seams are plausible, resolve the public-interface ambiguity before writing the test.\n\n**Requirements:**\n\n- **One behavior per test.** If the test name contains \"and\", split it.\n- **Clear, intention-revealing name.** \"`rejects offset > total with 400`\" beats \"`pagination test 3`\".\n- **Real code paths.** Mocks are allowed only for boundaries the test cannot cross (network, clock, file system). Mocking the unit under test is forbidden — it tests the mock, not the code.\n- **No production behavior yet.** If a symbol does not exist, first fix the test setup. If the language cannot compile or import the test without the symbol (for example a new Go function), add a minimal behavior-free production stub before RED: signature only, and the test must not pass against it. For a function that returns a value, return a not-implemented error or any placeholder value that makes the test fail at a behavior assertion; a sentinel distinct from every expected value is not required (for example, `IsEven(int) bool` tests that expect both `true` and `false` fail on whichever case the placeholder gets wrong). For a function that returns nothing and mutates state (for example a Go `Clear()`), use an empty no-op body and confirm RED through the failing state assertion; do not `panic`, which would stop the test before that assertion. If the expected value is itself the zero value, keep the expectation unchanged and confirm RED through the failing stub (or add a second case with a non-zero expectation) so a valid test cannot pass on its first run. Run the test through that stub so the failure reaches a behavior assertion, and implement the real behavior only in GREEN. Collection, compile, or import errors do not prove RED.\n\n### Step 2: Verify RED — Watch it fail\n\n```bash\n# Run ONLY the new test, using the project's configured test runner:\n#   npm\u002Fpnpm\u002Fyarn → the \"test\" script in package.json, e.g. `npm test -- \u003Cpath-or-name>`\n#   pytest        → `pytest \u003Cpath>::\u003Ctest>` (from pyproject.toml \u002F pytest.ini)\n#   go            → `go test -run \u003CTestName> .\u002F\u003Cpkg>`\n# If the runner cannot be inferred from the project config, ask the user before running.\n```\n\nConfirm three things from the output:\n\n1. The test ran (not skipped, not errored before reaching assertions).\n2. The failure reason matches what was expected (the assertion fired, not a typo or missing import).\n3. No other test broke — if the test runner shows new failures elsewhere, the test is interacting with shared state and must be fixed before advancing.\n\n**If the test passes the first time it runs**, the test is wrong:\n\n- It is testing existing behavior — the feature is already implemented, or\n- The assertion is trivially satisfied (e.g., `expect(x).toBeDefined()` where `x` is always defined), or\n- The test is reading a cached \u002F stale value.\n\nFix the test. Do not advance to GREEN with a passing-on-first-run test.\n\n### Step 3: GREEN — Write the minimal code\n\nWrite the simplest production code that makes the failing test pass.\n\n**Requirements:**\n\n- **Minimal.** No options the test does not exercise. No abstractions the test does not require. YAGNI applies hard here.\n- **No bundled refactor.** Adjacent code that \"could be cleaner\" is not touched in this step. Save it for REFACTOR.\n- **No additional tests.** This step makes the existing test green; new tests belong to the next cycle.\n\n### Step 4: Verify GREEN — Watch it pass\n\n```bash\n\u003Crun the new test>\n\u003Crun the broader suite to confirm no regression>\n```\n\nConfirm:\n\n1. The new test passes.\n2. The full suite passes (no other test broke).\n3. The output is pristine — no errors, no warnings, no deprecation notices that were not there before.\n\nIf the broader suite breaks, the GREEN code is too aggressive (touched a public surface other tests rely on) or too narrow (mutated shared state). Either revert or extend the suite — never silence a failing test to advance.\n\n### Step 5: REFACTOR — Clean up under green\n\nNow, and only now, improve the implementation:\n\n- Remove duplication.\n- Improve names.\n- Extract helpers if the same logic appears in 2+ places.\n- Tighten types or invariants.\n\n**No new behavior** during refactor. The same tests must pass after each edit. If a refactor breaks a test, the refactor changed behavior — revert and split into a separate cycle.\n\n### Step 6: Verify after REFACTOR\n\nRe-run the suite after the refactor. If it stays green, the cycle is complete. If a test breaks, treat as Step 5 violation.\n\n### Step 7: Loop or hand off\n\nComplete one behavior's RED → GREEN → REFACTOR cycle before starting the next behavior. Do not batch all tests, all implementation, or all refactoring into horizontal phases.\n\nIf there are more behaviors to implement, return to Step 1 with the next test.\nWhen all required behaviors are implemented, hand off to `ywc-verify-done` for the completion claim (build + lint + full test suite + per-claim evidence block).\n\n## Output Format\n\nThe cycle produces three commit shapes per behavior, in this order. (Skip the REFACTOR commit when no cleanup was needed.)\n\n| Stage | Commit message shape | Verification at commit time |\n|---|---|---|\n| RED | `test: \u003Cone-line behavior>` (tests fail at this commit) | Test fails for the expected reason |\n| GREEN | `feat: \u003Cone-line behavior>` or `fix: \u003Cbug>` | New test passes; broader suite passes |\n| REFACTOR | `refactor: \u003Cwhat was tightened>` | All tests still pass |\n\nPer-stage verification blocks follow `ywc-verify-done`'s shape (command → exit code → claim). The RED commit's verification block proves the test failed; the GREEN commit's proves it passes; the REFACTOR commit's proves nothing broke.\n\nWhen delegated from `ywc-code-gen --tdd`, the executor emits these three commits per behavior automatically and threads the verification block into its per-step report.\n\n## Integration\n\n- **Upstream callers**: user invocation; `ywc-code-gen` with `--tdd` flag (Step 7.5 enforces the cycle per generated module); `ywc-debug-rootcause` Phase 4 §1 (regression test for the bug).\n- **Downstream**: `ywc-verify-done` (every Verify step uses its evidence-block format and forbidden-vocabulary rules); `ywc-debug-rootcause` (if the RED step itself uncovers an unexpected pre-existing failure, that is a Phase 1 finding — route there).\n- **Pairs with**: `ywc-confidence-gate` (pre-cycle ≥90 confidence reduces RED rewrite churn); `ywc-impl-review` (downstream code review uses the test as the spec evidence).\n\n## Validation Checklist\n\nBefore declaring a behavior complete, verify:\n\n- [ ] A test for the behavior exists in the repository\n- [ ] The test was **observed failing** in the current session for the expected reason (RED commit's verification block in this session's history)\n- [ ] The production code was written **after** the test failed\n- [ ] No \"kept as reference\" code was retained from a pre-TDD draft\n- [ ] The GREEN code is minimal — every line traces to a test-required behavior\n- [ ] The broader suite passes (per `ywc-verify-done`)\n- [ ] If refactoring was performed, all tests stayed green throughout\n\n## Common Mistakes\n\n(Procedural failure modes specific to TDD. Behavioral rationalizations are in the table above — do not duplicate here.)\n\n- **Treating a compile \u002F import error as \"test failed\".** A test that errors before reaching its assertions has not exercised the production code. Fix the test setup (stub the missing import, then re-run) so the failure is at the assertion, not the import.\n- **Writing the test against the implementation you secretly already drafted in your head.** The test reads the desired *behavior*, not the algorithm you imagine. If the test mentions a private helper name before that helper exists in the codebase, you are testing the implementation, not the contract.\n- **Bundling the GREEN edit with a \"while I'm here\" fix in adjacent code.** Adjacent fixes mean the GREEN commit is no longer minimal, and you cannot bisect cleanly if the next cycle breaks. Save adjacent fixes for their own RED-GREEN-REFACTOR.\n- **Letting a refactor introduce a \"harmless\" behavior tweak.** \"It was already broken anyway\" is not license to fix it in the refactor commit. Either write a RED for the new behavior or revert the tweak.\n- **Skipping `ywc-verify-done` at the end of the cycle because \"the cycle already verified it\".** The cycle verifies one behavior; `ywc-verify-done` verifies the **claim** (build green, lint green, suite green, claim wording free of forbidden vocabulary). Both are required for completion.\n\n## References\n\n| Reference | Use when |\n|---|---|\n| [references\u002Fred-green-checklist.md](references\u002Fred-green-checklist.md) | Walking through the per-step entry \u002F exit conditions during the cycle |\n| [references\u002Ftest-shape-cookbook.md](references\u002Ftest-shape-cookbook.md) | Picking the right shape of test for the behavior (state vs interaction, unit vs integration, snapshot vs assertion) |\n| `ywc-verify-done` | Per-step verification block shape (command + exit code + claim) |\n| `ywc-debug-rootcause` | When an existing test starts failing during a cycle, route the investigation here before another fix attempt |\n",{"name":5,"description":7},"main","7e8ac872e53df8c89d75663e031626281a2a2f5c","codex\u002Fskills\u002Fywc-tdd-ritual",1,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit","https:\u002F\u002Fgithub.com\u002Fyongwoon","https:\u002F\u002Fwww.webhani.com","2026-11-08 17:14:59",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add yongwoon\u002Fywc-agent-toolkit --skill ywc-tdd-ritual",{"tool":37,"command":38},"bunx","bunx skills add yongwoon\u002Fywc-agent-toolkit --skill ywc-tdd-ritual",{"tool":40,"command":41},"pnpm","pnpm dlx skills add yongwoon\u002Fywc-agent-toolkit --skill ywc-tdd-ritual","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FSKILL.md",true,[45,51,55,59,63,67,71,75,79,83],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",307,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002Fagents\u002Fopenai.yaml",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"evals\u002Fevals.json",4753,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002Fevals\u002Fevals.json",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"README.en.md",2249,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FREADME.en.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"README.es.md",501,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FREADME.es.md",{"path":64,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":65,"sourceHtmlUrl":66},"README.ja.md",2474,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FREADME.ja.md",{"path":68,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":69,"sourceHtmlUrl":70},"README.ko.md",2265,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FREADME.ko.md",{"path":72,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":73,"sourceHtmlUrl":74},"README.md",2258,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FREADME.md",{"path":76,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":77,"sourceHtmlUrl":78},"README.zh.md",411,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002FREADME.zh.md",{"path":80,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fred-green-checklist.md",6766,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002Freferences\u002Fred-green-checklist.md",{"path":84,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Ftest-shape-cookbook.md",6486,"https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fywc-tdd-ritual\u002Freferences\u002Ftest-shape-cookbook.md",[88,94,100,107,114,121],{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M72TQ84GTCPCV2VJ778V17TW","missing-frontmatter","https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fcodex-description-limit\u002Fmissing-frontmatter\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M72TQ6M4BFWE7P9EPW0GZDCM","malformed-frontmatter","https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fcodex-description-limit\u002Fmalformed-frontmatter\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M72TQ3ESGKXZ4QRWGTX92BKJ","fixture-501-fail","(ywc) Use when aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Do not use for x.","https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fcodex-description-limit\u002F501-fail\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":18},"01M72TQ0HJ8H3R37J9WPWGKJZR","fixture-500-pass","(ywc) Use when aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Do not use for x.","https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fcodex-description-limit\u002F500-pass\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":18},"01M72TPWNCC7NEYD0D9N12KSQS","ywc-worktrees","(ywc) Use when creating, auditing, pruning, or resolving git worktrees for isolated task workspaces, whether delegated from an executor or used standalone. Triggers: \"worktree 생성\", \"worktree audit\", \"worktree 정리\", \"worktree prune\", \"ywc-worktrees\", \"create worktree\". Do not use for branch creation\u002Fdeletion alone, PR creation (use ywc-create-pr), CI or merge delivery (use ywc-finish-branch), task orchestration (use ywc-sequential-executor or ywc-parallel-executor), or non-git isolation.","https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fywc-agent-toolkit\u002Fskills\u002Fywc-worktrees\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":18},"01M72TPRNR3E6QWB91GM98ABBV","ywc-wayfinder","(ywc) Use when a large or uncertain change needs multi-session discovery with a deterministic local map and exactly one active ticket before planning or implementation. Triggers: \"wayfinder\", \"길찾기\", \"discovery map\", \"multi-session discovery\", \"탐색 ticket\", \"経路整理\", \"探索マップ\", \"ywc-wayfinder\". Do not use for ordinary planning (use ywc-plan), idea clarification (use ywc-brainstorm), direct implementation, or tracker\u002Fdatabase writes outside the local Markdown map.","https:\u002F\u002Fgithub.com\u002Fyongwoon\u002Fywc-agent-toolkit\u002Fblob\u002Fmain\u002Fplugins\u002Fywc-agent-toolkit\u002Fskills\u002Fywc-wayfinder\u002FSKILL.md",[],[]]