[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78FQEA5ATPZDYN780F4VGQD":3,"skill-same:01M78FQEA5ATPZDYN780F4VGQD":45},{"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":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M78FQEA5ATPZDYN780F4VGQD","tdd",null,"Use when implementing any feature, bug fix, refactor, or behaviour change — BEFORE writing production code. The kit's own test-driven-development skill (replaces, does not depend on, superpowers test-driven-development). Red-green-refactor framed as the kit's non-vacuity law, plus coverage, testing-pyramid, and AI-eval disciplines.","SeaBrad72\u002Fsparkwright","SeaBrad72","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F189294229?v=4","01M78FP39B4DE6NKHX1AJKSPFX","Bradley James","01M78FP3A2X3TW6T6GHBPB7PT3",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tdd\ndescription: Use when implementing any feature, bug fix, refactor, or behaviour change — BEFORE writing production code. The kit's own test-driven-development skill (replaces, does not depend on, superpowers test-driven-development). Red-green-refactor framed as the kit's non-vacuity law, plus coverage, testing-pyramid, and AI-eval disciplines.\n---\n\n# TDD — red-green-refactor as the kit's non-vacuity law, applied to code\n\nThe kit's own TDD skill: the Engineer's build craft. Write the test first, watch it fail, write minimal code to pass, refactor. Replaces (does not depend on) superpowers `test-driven-development`.\n\n\u003C!-- The frontmatter and discipline headings below are conformance-load-bearing:\n     conformance\u002Forchestrator-loop-wired.sh greps this file for kit-distinctive markers\n     (name: tdd, ## When to use, Red-Green-Refactor, non-vacuity, critical path, evals).\n     Edits that drop or rename them can turn the skill-spine lock RED. -->\n\n## The Iron Law\nNO PRODUCTION CODE WITHOUT A FAILING TEST FIRST. Wrote code before the test? Delete it and start fresh from the test — don't keep it as \"reference\", don't adapt it. If you didn't watch the test fail, you don't know it tests the right thing.\n\n## When to use\nImplementing any feature, bug fix, refactor, or behaviour change. Exceptions (ask the owner): throwaway prototypes, generated code, config files. \"Skip TDD just this once\" is a rationalization — stop.\n\n## Red-Green-Refactor (the proven cycle)\n1. **RED — write one failing test.** One behaviour, a clear name, real code (no mocks unless unavoidable). It demonstrates the desired API.\n2. **Verify RED — watch it fail for the RIGHT reason.** Mandatory, never skipped. The test must FAIL (not error on a typo) and fail because the feature is missing. A test that passes immediately, or that cannot fail, proves nothing.\n3. **GREEN — minimal code to pass.** Just enough; no extra features, no speculative options (YAGNI).\n4. **Verify GREEN — watch it pass, output pristine.** This test passes, all others still pass, no warnings.\n5. **REFACTOR — clean up while green.** Remove duplication, improve names, extract helpers; add no behaviour.\n\n## The kit's testing disciplines (what makes this MORE than generic TDD — apply to EVERY cycle)\n- **\"Watch it fail\" IS non-vacuity.** Verify-RED is the same law the kit applies to every conformance lock: a proof needs a positive liveness anchor AND a load-bearing negative — a dead or always-pass test must fail. TDD is that law at the unit-test level. If a test cannot fail, it is not a test.\n- **One load-bearing negative per control, not per leg.** A *control* is a guarantee the change makes: a row of the design's \"Design-promised controls\" table (carried into the review record), or, for a slice with none, each behaviour the PR claims. Each control needs one test that fails if the control is removed; not every leg needs its own negative, and mutants are not run per test. **Security controls are the exception** (the guard, secret-scan, authN\u002FZ, fail-closed boundaries, credential handling, input validation \u002F injection escaping, PII redaction, AI runtime guards (prompt-injection, output validation)): they keep **one negative per attack shape or input class**, since each bypass shape is its own control. When unsure whether a control is a security control, it is one; the security seat decides, not the builder. RED-first (\"watch it fail\") is unchanged and stays per behaviour; this narrows only the mutant expectation (`conformance\u002Freview-lane.sh` rule 6 already grades one test per design-promised control).\n- **Coverage floor.** 80%+ line coverage is the floor, not the ceiling; **100% on critical paths** (auth, payments, money\u002Fcalculations). Coverage of the right code beats a high number over getters and setters.\n- **Test at the right layer.** The testing pyramid — unit → integration → api\u002Froute → contract → e2e. Pick the layer that matches the behaviour under test. Mock at boundaries, never internals; test behaviour, not implementation, so tests survive refactors.\n- **AI features → evals.** For AI behaviour, the eval IS the failing-test-first: write the eval, watch it fail, make it pass. Evals gate like tests and must not regress. (Deep eval methodology is the kit's eval-driven-dev guidance.)\n- **Self-verify to the done-bar.** Before returning a slice, run its tests green with pristine output — the Engineer seat's done-bar (tests green + zero out-of-slice edits + a self-verify report). This skill is the craft; the seat def owns the done-bar.\n- **Whole-output oracles pin CLASSES; per-site legs pin instances.** When a review closes a class of defect, add the oracle over the whole output surface — one more assertion at the fixed site protects only that site.\n- **Anchor regression legs on text the production path actually emits.** A leg asserting the absence of a string nothing ever produces is tautologically green — verify-RED alone cannot catch it; pin the positive counterpart in the sibling leg.\n\n## When stuck\nHard to test = hard to use — listen to the test and simplify the interface. Must mock everything = too coupled; use dependency injection. Don't know how to test = write the wished-for API or the assertion first, or ask the owner.\n\n## Rationalizations & red flags — STOP and start over\nThese thoughts mean you are about to skip TDD. Each is a STOP, not a judgement call:\n\n| Excuse | Reality |\n|--------|---------|\n| \"I'll write the tests after\" | Tests-after pass immediately and prove nothing — you never watched them catch the bug. |\n| \"Too simple to test\" | Simple code breaks; the test costs 30 seconds. |\n| \"I already manually tested it\" | Ad-hoc ≠ systematic — no record, can't re-run on the next change. |\n| \"Deleting working code is wasteful\" | Sunk cost. The unverified code IS the debt — delete it and rebuild from the test. |\n| \"Keep it as reference while I write the test\" | You will adapt it — that is testing after. Delete means delete. |\n| \"TDD is dogmatic; I'm being pragmatic\" | TDD is the pragmatic path: faster than debugging in production. |\n\nRed flags — any of these means delete the code and restart from a failing test: code written before its test · a test that passed on its first run · you cannot say why the test failed · \"tests added later\" · \"it's the spirit, not the ritual.\"\n\n## Terminal state\nProduction code that exists only because a test required it, all green with pristine output, handed back to the Engineer's done-bar and on to code review. Never fix a bug without a failing test that reproduces it first.\n","# TDD — red-green-refactor as the kit's non-vacuity law, applied to code\n\nThe kit's own TDD skill: the Engineer's build craft. Write the test first, watch it fail, write minimal code to pass, refactor. Replaces (does not depend on) superpowers `test-driven-development`.\n\n\u003C!-- The frontmatter and discipline headings below are conformance-load-bearing:\n     conformance\u002Forchestrator-loop-wired.sh greps this file for kit-distinctive markers\n     (name: tdd, ## When to use, Red-Green-Refactor, non-vacuity, critical path, evals).\n     Edits that drop or rename them can turn the skill-spine lock RED. -->\n\n## The Iron Law\nNO PRODUCTION CODE WITHOUT A FAILING TEST FIRST. Wrote code before the test? Delete it and start fresh from the test — don't keep it as \"reference\", don't adapt it. If you didn't watch the test fail, you don't know it tests the right thing.\n\n## When to use\nImplementing any feature, bug fix, refactor, or behaviour change. Exceptions (ask the owner): throwaway prototypes, generated code, config files. \"Skip TDD just this once\" is a rationalization — stop.\n\n## Red-Green-Refactor (the proven cycle)\n1. **RED — write one failing test.** One behaviour, a clear name, real code (no mocks unless unavoidable). It demonstrates the desired API.\n2. **Verify RED — watch it fail for the RIGHT reason.** Mandatory, never skipped. The test must FAIL (not error on a typo) and fail because the feature is missing. A test that passes immediately, or that cannot fail, proves nothing.\n3. **GREEN — minimal code to pass.** Just enough; no extra features, no speculative options (YAGNI).\n4. **Verify GREEN — watch it pass, output pristine.** This test passes, all others still pass, no warnings.\n5. **REFACTOR — clean up while green.** Remove duplication, improve names, extract helpers; add no behaviour.\n\n## The kit's testing disciplines (what makes this MORE than generic TDD — apply to EVERY cycle)\n- **\"Watch it fail\" IS non-vacuity.** Verify-RED is the same law the kit applies to every conformance lock: a proof needs a positive liveness anchor AND a load-bearing negative — a dead or always-pass test must fail. TDD is that law at the unit-test level. If a test cannot fail, it is not a test.\n- **One load-bearing negative per control, not per leg.** A *control* is a guarantee the change makes: a row of the design's \"Design-promised controls\" table (carried into the review record), or, for a slice with none, each behaviour the PR claims. Each control needs one test that fails if the control is removed; not every leg needs its own negative, and mutants are not run per test. **Security controls are the exception** (the guard, secret-scan, authN\u002FZ, fail-closed boundaries, credential handling, input validation \u002F injection escaping, PII redaction, AI runtime guards (prompt-injection, output validation)): they keep **one negative per attack shape or input class**, since each bypass shape is its own control. When unsure whether a control is a security control, it is one; the security seat decides, not the builder. RED-first (\"watch it fail\") is unchanged and stays per behaviour; this narrows only the mutant expectation (`conformance\u002Freview-lane.sh` rule 6 already grades one test per design-promised control).\n- **Coverage floor.** 80%+ line coverage is the floor, not the ceiling; **100% on critical paths** (auth, payments, money\u002Fcalculations). Coverage of the right code beats a high number over getters and setters.\n- **Test at the right layer.** The testing pyramid — unit → integration → api\u002Froute → contract → e2e. Pick the layer that matches the behaviour under test. Mock at boundaries, never internals; test behaviour, not implementation, so tests survive refactors.\n- **AI features → evals.** For AI behaviour, the eval IS the failing-test-first: write the eval, watch it fail, make it pass. Evals gate like tests and must not regress. (Deep eval methodology is the kit's eval-driven-dev guidance.)\n- **Self-verify to the done-bar.** Before returning a slice, run its tests green with pristine output — the Engineer seat's done-bar (tests green + zero out-of-slice edits + a self-verify report). This skill is the craft; the seat def owns the done-bar.\n- **Whole-output oracles pin CLASSES; per-site legs pin instances.** When a review closes a class of defect, add the oracle over the whole output surface — one more assertion at the fixed site protects only that site.\n- **Anchor regression legs on text the production path actually emits.** A leg asserting the absence of a string nothing ever produces is tautologically green — verify-RED alone cannot catch it; pin the positive counterpart in the sibling leg.\n\n## When stuck\nHard to test = hard to use — listen to the test and simplify the interface. Must mock everything = too coupled; use dependency injection. Don't know how to test = write the wished-for API or the assertion first, or ask the owner.\n\n## Rationalizations & red flags — STOP and start over\nThese thoughts mean you are about to skip TDD. Each is a STOP, not a judgement call:\n\n| Excuse | Reality |\n|--------|---------|\n| \"I'll write the tests after\" | Tests-after pass immediately and prove nothing — you never watched them catch the bug. |\n| \"Too simple to test\" | Simple code breaks; the test costs 30 seconds. |\n| \"I already manually tested it\" | Ad-hoc ≠ systematic — no record, can't re-run on the next change. |\n| \"Deleting working code is wasteful\" | Sunk cost. The unverified code IS the debt — delete it and rebuild from the test. |\n| \"Keep it as reference while I write the test\" | You will adapt it — that is testing after. Delete means delete. |\n| \"TDD is dogmatic; I'm being pragmatic\" | TDD is the pragmatic path: faster than debugging in production. |\n\nRed flags — any of these means delete the code and restart from a failing test: code written before its test · a test that passed on its first run · you cannot say why the test failed · \"tests added later\" · \"it's the spirit, not the ritual.\"\n\n## Terminal state\nProduction code that exists only because a test required it, all green with pristine output, handed back to the Engineer's done-bar and on to code review. Never fix a bug without a failing test that reproduces it first.\n",{"name":5,"description":7},"main","46ed464a0bfe79d18251e771dd0fc9e1e89fe43f","skills\u002Ftdd",0,"https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright","https:\u002F\u002Fgithub.com\u002FSeaBrad72","2026-11-15 04:00:12",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add SeaBrad72\u002Fsparkwright --skill tdd",{"tool":37,"command":38},"bunx","bunx skills add SeaBrad72\u002Fsparkwright --skill tdd",{"tool":40,"command":41},"pnpm","pnpm dlx skills add SeaBrad72\u002Fsparkwright --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",true,[],[46,53,60,66,73,79],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7DZCWVTK18C484JQPMN4NAZ","inception-from-code","Use when adopting the kit into an EXISTING repository (brownfield), to draft the Inception artifacts from the code instead of from blank templates. The agent reads the repository and writes five drafts, only under docs\u002Finception-draft\u002F, each tagged by how each fact is known; a person reviews them and moves what is right into place. Agents propose, humans ratify.","https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Finception-from-code\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M78FQSZRGQH2D4RCKCH9594N","worktrees","Use BEFORE fanning out parallel Engineers or starting isolated feature work — the kit's own isolation skill (replaces, does not depend on, superpowers using-git-worktrees). The isolation craft, wired to the Orchestrator seat — detect-existing-first, native tools first, the kit's disjoint-set parallel-safety rule, and conflict-safe integration.","https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Fworktrees\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M78FQQXX2CYGF8V0GVG35TTB","verification","https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Fverification\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M78FQK7Y0JVS2V77S8SEBD29","using-skills","Use at the START of any task, before any response or action — the kit's own discovery keystone (replaces, does not depend on, superpowers using-superpowers). How the kit's skills are found and invoked (invoke by reading), the discipline of checking for a relevant skill before acting, instruction priority, and the index of the kit's own spine skills.","https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Fusing-skills\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M78FQADNX9RZQ63C7WG7HPZH","review","https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M78FQ66S25MGCZ31SS4GNS2Q","plan","Use AFTER a design is owner-approved and BEFORE any build — turning an approved design\u002Fspec into an INVEST-sliced, TDD, build-ready implementation plan. The kit's own planning skill (replaces, does not depend on, superpowers writing-plans). Produces bite-sized tasks an engineer with zero codebase context can execute.","https:\u002F\u002Fgithub.com\u002FSeaBrad72\u002Fsparkwright\u002Fblob\u002Fmain\u002Fskills\u002Fplan\u002FSKILL.md",[],[]]