[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EAMB2SY3QG2K6NQYE089MH":3,"skill-same:01M7EAMB2SY3QG2K6NQYE089MH":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EAMB2SY3QG2K6NQYE089MH","tdd",null,"Test-driven development, one red-green slice at a time at pre-agreed seams. Use when building a feature or fixing a bug test-first, or when writing tests.","navaniharsh31\u002Fkeel","navaniharsh31","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9514867?v=4","01M7EAKEK1XG862WJ5KK5DW1VW","Harsh Navani","01M7EAKEKP39B1RZWSE3GN9X3K",0,"MIT","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tdd\ndescription: Test-driven development, one red-green slice at a time at pre-agreed seams. Use when building a feature or fixing a bug test-first, or when writing tests.\n---\n\n# Test-Driven Development\n\nThe red → green loop, and the rules, on every cycle, that make it produce tests worth keeping.\n\n## What a good test is\n\nA good test verifies behavior through a public interface, reads like a specification (\"user can checkout with valid cart\"), and survives a refactor. Name tests in the glossary's terms. Never write:\n\n- **Implementation-coupled** tests: mocking internal collaborators, testing private methods, verifying through a side channel. They break on refactors that keep behavior.\n- **Tautological** tests: the expected value recomputed the way the code computes it, so it passes by construction. Take expected values from an independent source: a known-good literal, a worked example, the spec.\n\nRead [tests.md](tests.md) when a test's shape is in doubt or a module's interface is being shaped: examples, the anti-patterns in full, the design vocabulary. Read [mocking.md](mocking.md) before you mock anything.\n\n## Seams: where tests go\n\nA **seam** is the public boundary you test at, where you observe behavior without reaching inside. **Test only at pre-agreed seams.** In a keel flow they are agreed: the spec's Testing Decisions (approved at G2), the seams settled while grilling (inline mode), or, from keel:debug, the seam Phase 5 judged correct. Standalone, confirm the seams with the user before any test, each with a one-line note on what it catches and misses. Agreed seams put testing effort on the critical paths, complex logic and their near-misses, not every edge case.\n\n## Rules of the loop\n\n- **Red before green.** Write the failing test, watch it fail for the reason you expect, then write only enough code to pass it.\n- **One slice at a time.** One seam, one test, one minimal implementation per cycle, each test a tracer bullet shaped by the last cycle. Never all tests first: bulk tests verify imagined behavior.\n- **Refactoring belongs to review.** The cycle ends at green; keel:review finds the refactors.\n- **Mock only at system boundaries** (external APIs, time, randomness), per mocking.md.\n- **Existing tests are probes.** When an existing test starts failing or warning under the new behaviour, first decide whether it caught a real defect; if so, fix the code. Edit an existing test only when its expectation is what the work changes, and give each such edit a reason in your summary. Where the language allows, run the suite once with the new warning or error made fatal, to list every place it fires.\n\n## Done\n\n- [ ] Every acceptance criterion in the ticket (or line of the G1 summary, or the bug's symptom) has a test at an agreed seam that went red, then green.\n- [ ] The full suite is green.\n- [ ] Every edit to an existing test has a reason in the summary.\n","# Test-Driven Development\n\nThe red → green loop, and the rules, on every cycle, that make it produce tests worth keeping.\n\n## What a good test is\n\nA good test verifies behavior through a public interface, reads like a specification (\"user can checkout with valid cart\"), and survives a refactor. Name tests in the glossary's terms. Never write:\n\n- **Implementation-coupled** tests: mocking internal collaborators, testing private methods, verifying through a side channel. They break on refactors that keep behavior.\n- **Tautological** tests: the expected value recomputed the way the code computes it, so it passes by construction. Take expected values from an independent source: a known-good literal, a worked example, the spec.\n\nRead [tests.md](tests.md) when a test's shape is in doubt or a module's interface is being shaped: examples, the anti-patterns in full, the design vocabulary. Read [mocking.md](mocking.md) before you mock anything.\n\n## Seams: where tests go\n\nA **seam** is the public boundary you test at, where you observe behavior without reaching inside. **Test only at pre-agreed seams.** In a keel flow they are agreed: the spec's Testing Decisions (approved at G2), the seams settled while grilling (inline mode), or, from keel:debug, the seam Phase 5 judged correct. Standalone, confirm the seams with the user before any test, each with a one-line note on what it catches and misses. Agreed seams put testing effort on the critical paths, complex logic and their near-misses, not every edge case.\n\n## Rules of the loop\n\n- **Red before green.** Write the failing test, watch it fail for the reason you expect, then write only enough code to pass it.\n- **One slice at a time.** One seam, one test, one minimal implementation per cycle, each test a tracer bullet shaped by the last cycle. Never all tests first: bulk tests verify imagined behavior.\n- **Refactoring belongs to review.** The cycle ends at green; keel:review finds the refactors.\n- **Mock only at system boundaries** (external APIs, time, randomness), per mocking.md.\n- **Existing tests are probes.** When an existing test starts failing or warning under the new behaviour, first decide whether it caught a real defect; if so, fix the code. Edit an existing test only when its expectation is what the work changes, and give each such edit a reason in your summary. Where the language allows, run the suite once with the new warning or error made fatal, to list every place it fires.\n\n## Done\n\n- [ ] Every acceptance criterion in the ticket (or line of the G1 summary, or the bug's symptom) has a test at an agreed seam that went red, then green.\n- [ ] The full suite is green.\n- [ ] Every edit to an existing test has a reason in the summary.\n",{"name":5,"description":7},"main","e698afd7063631a7738541bcbcc479442ca96d93","skills\u002Ftdd","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31","https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fharshnavani\u002F","learning and growing...","2026-10-21 13:57:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add navaniharsh31\u002Fkeel --skill tdd",{"tool":38,"command":39},"bunx","bunx skills add navaniharsh31\u002Fkeel --skill tdd",{"tool":41,"command":42},"pnpm","pnpm dlx skills add navaniharsh31\u002Fkeel --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"mocking.md","REFERENCE","参考文档",1481,"https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002Fmocking.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"tests.md",4681,"https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002Ftests.md",[57,64,71,78,85,92],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7EAMEAMM8G3V5PB2K6CYER7","tickets","Split an approved spec into tracer-bullet vertical-slice tickets with blocking edges. Use right after a spec is approved, or when the user asks to break work into tickets.","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Ftickets\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7EAM8VKHKC9H5RZT7KHR4VN","spec","Turn the aligned conversation into a spec file under docs\u002Fspecs\u002F. Use after grilling reaches alignment (G1) on a multi-slice feature, or when the user asks for a spec\u002FPRD.","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Fspec\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7EAM678V591FBX97XH6JRZ1","review","Two-axis review (Standards and Spec) of a diff against a fixed point, run as parallel sub-agents. Use after building, or when the user asks to review a branch, PR, or changes since X.","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7EAM2DDFMH9NCHDPRMK2BKH","retro","Retrospective that improves the agent's environment (checks, standards, navigation), not the code. Use when a build finishes, a session went sideways, or the user asks for a retro.","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Fretro\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7EAM03EGC84KPJ3AHVXP5HD","prototype","Throwaway prototype that answers one design question: does this logic or state model hold up, or what should this UI look like. Use when a grilling question can't be settled on paper.","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Fprototype\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7EAKWNH7A591R5R1D1SS4QV","pr","The shape of a PR body: smallest visual, before\u002Fafter evidence, merge danger. Use whenever writing or editing a pull request description.","https:\u002F\u002Fgithub.com\u002Fnavaniharsh31\u002Fkeel\u002Fblob\u002Fmain\u002Fskills\u002Fpr\u002FSKILL.md",[],[]]