[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JVRKJ4261PR09GBXM2EGFX":3,"skill-same:01M6JVRKJ4261PR09GBXM2EGFX":75},{"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":23,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6JVRKJ4261PR09GBXM2EGFX","test-driven-development",null,"Use when the user explicitly requests strict or test-first TDD, or when the current conversation already contains an explicit `TDD Route: strict` decision from another Aegis workflow.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FGanyuanRan\u002FAegis\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"test driven development","development","test","driven","conversation","aegis","decision","workflow","route","use","first","requests","tdd","user","test-first","when","2026-11-10 10:12:30",false,"---\nname: test-driven-development\ndescription: \"Use when the user explicitly requests strict or test-first TDD, or when the current conversation already contains an explicit `TDD Route: strict` decision from another Aegis workflow.\"\n---\n\n# Execute\n\n- **False-positive entry on a native-direct-skill host?** Exit immediately unless\n  the user explicitly requested TDD or the conversation records `TDD Route: strict`.\n  Return to the selecting workflow or fast path with proportional verification.\n- Under `strict`, validate preflight and Change Necessity before production\n  edits. No production code without an observed failing behavior test first.\n- RED (test and observe failure) -> GREEN (minimum owner repair and observe pass)\n  -> REFACTOR (clean up while green). Apply Regression Scope before closeout.\n- GREEN proves only the expressed behavior slice, not parent-task acceptance,\n  business-value completion or final completion. Use `verification-before-completion`.\n\n## Entry Boundary\n\nEnter only for an explicit strict TDD\u002Ftest-first\u002FRED \u002F GREEN \u002F REFACTOR request\nor a recorded `TDD Route: strict`. Native-direct-skill hosts must not infer\nentry from generic risky-code wording. Consume the selected route; a missing\nor invalid automatic decision returns to its selecting workflow.\n\nOnce strict entry is justified, it may cover features, bug fixes, refactoring,\nbehavior\u002Flogic, interface\u002Fdata contracts, shared modules and core logic.\nExceptions (ask your human partner): throwaway prototypes, generated code,\nconfig files, pure docs cleanup, read-only diagnosis and comment-only changes.\n\n## TDD Mode and Route\n\nTDD Mode defaults to `off`, disabling automatic TDD, not completion verification.\nIn `auto`, the selecting workflow chooses strict\u002Flight\u002Fskipped by task risk.\n\nBefore source edits, decide:\n\n```text\nAegis Visibility:\n- Why this TDD route is strict, light, or skipped:\n- What RED\u002FGREEN proves:\n- What still needs verification:\n\nTDD Route:\n- Mode: auto | off\n- Decision: strict | light | skipped\n- Strict authority: explicit user\u002Fproject request | recorded auto decision | not applicable\n- Test posture: diagnostic reproduction | post-change regression | strict RED test\n- Reason:\n- Verification:\n```\n\nIn `auto`, use `strict` for behavior, bugfix, contract, shared\u002Fcore, producer \u002F\nconsumer, persistence, permission, migration, or meaningful regression risk.\nUse `light` for tiny low-risk edits with an obvious readback or command check.\nUse `skipped` for read-only, docs-only, generated, throwaway, comment-only, or\nenvironment-bound work where TDD does not fit.\n\nIn `off`, do not automatically require TDD, create a strict route, or infer one\nfrom risk alone. Explicit user\u002Fproject TDD requests still apply; risky work may\nstill need regression coverage and `verification-before-completion` before any\ncompletion claim.\nFor plan or execution review, `Mode: off \u002F Decision: skipped` is the normal\nrecord unless an explicit user\u002Fproject strict request overrides it. That record\ndoes not load this skill or turn a diagnostic reproduction into RED. An\napproved plan does not supply strict authority by itself.\nIf this skill was loaded anyway without an explicit TDD request or a visible\n`TDD Route: strict` marker, exit instead of improvising an automatic strict\nroute from risk words alone.\n\nKeep `Aegis Visibility` task-specific: explain the route decision and the\nregression boundary, not a generic claim that TDD was used.\n\n## Preflight Gate\n\nTDD is the implementation discipline for an approved behavior or atomic task.\nIt is not a substitute for task routing, product clarification, or planning.\n\nBefore writing tests or production code, stop and route to brainstorming or\nwriting-plans if the current request has any medium- or high-complexity signal:\n\n- multiple files, modules, pages, screens, services, or owners\n- user-visible flows such as navigation, onboarding, checkout, lifecycle, or\n  recovery paths\n- state transitions, routing rules, API or data contracts, compatibility\n  boundaries, migrations, permissions, or persistence\n- more than one acceptance path or manual\u002Fvisual verification requirement\n- unclear product behavior, competing constraints, or long-running execution\n\nFor these tasks, require a baseline read-set, plan, and atomic tasks before TDD.\nHigh-complexity or ambiguous tasks also need a spec\u002Fdesign review before\nplanning. Only proceed directly with TDD for low-complexity work whose intent,\nowner, compatibility boundary, verification path, and slice goal \u002F success\nevidence are already clear.\n\n## Change Necessity\n\nBefore strict RED\u002FGREEN enters production edits, expose why code needs to\nchange: user-visible need, no-change\u002Fnon-code alternative, why it is insufficient,\nand the minimum owner\u002Ffile boundary. This is behavior-triggered, not prompt-triggered:\nany new source-code path, including a tiny helper, guard, branch, fallback,\nadapter or owner, needs the decision before RED\u002FGREEN normalizes it as work.\nKeep this natural; it creates no new artifact or hot-path entry requirement.\n\n- `no-change`: do not write tests or production code for a non-change.\n- `docs\u002Fconfig-only`: route to that narrower surface and verify it.\n- `needs-clarification`: pause before RED\u002FGREEN.\n- `code-change`: carry the minimum boundary into TDD Route, RED and regression.\n\n## Complexity Budget\n\nBefore strict TDD on non-trivial work, record the planned complexity budget so\nRED\u002FGREEN does not silently normalize a wrong or overloaded owner.\n\nFor the Complexity Budget, state artifact class, current pressure, projected\npost-change pressure and planned governance in the existing task record.\n\nUse `using-aegis\u002Freferences\u002Fcomplexity-governance.md` for shared artifact\nclasses, pressure signals, and the meaning of planned governance.\n\n## Pre-Edit Complexity Check\n\nBefore production code edits, check whether the intended source edit would add\nlogic to an overloaded or wrong owner. Tiny edits can keep this to one line.\n\nUse `using-aegis\u002Freferences\u002Fcomplexity-governance.md` for shared pressure\nsignals and the meaning of `over-budget`.\n\nKeep the Pre-Edit Complexity Check proportional: target file, pressure signal,\nowner fit, safer boundary and decision. For a pressured owner, include the\nPre-Edit Owner-Fit Decision and classify intent as `wiring-only`,\n`move-out \u002F extract-first`, `local-fix-without-new-responsibility`,\n`new-responsibility`, or `emergency \u002F compatibility patch`.\nThe decision is `edit-in-place | extract helper | add owner file | split task |\npause for plan update`.\n\nIf the decision is `pause for plan update`, stop TDD and return to\n`writing-plans` or `brainstorming` with the evidence.\n\nIf the predicted result is that this slice would push a maintained artifact\nover budget and the slice does not also govern that overrun, do not continue\nwith RED\u002FGREEN as if the task were safely scoped. Pause and update the plan.\n\nWhen the target edit file is over-budget or mixed-purpose, classify edit intent\nbefore production source edits. `new-responsibility` must not be added in place\nby default. `wiring-only`, `move-out \u002F extract-first`, and\n`local-fix-without-new-responsibility` may proceed only when they do not add a\nnew responsibility and the verification boundary is clear. `emergency \u002F\ncompatibility patch` requires residual risk and a retirement trigger.\n\n## Conditional Reference Reads\n\nThe main skill is sufficient for an ordinary strict cycle. Do not load all\nreferences by default. Select only the named section when its evidence trigger\napplies; leave unrelated examples and workspace instructions unread.\n\n| Trigger | Reference and exact section |\n| --- | --- |\n| Choosing observable assertions is unclear, or callback\u002Fmock counts can hide an incorrect result | `examples.md` — `## Behavior Assertions` |\n| The minimum GREEN implementation is unclear or proposed options exceed tested behavior | `examples.md` — `## Minimal GREEN` |\n| A concrete worked RED\u002FGREEN\u002Frefactor sequence is requested or needed to understand the cycle | `examples.md` — `## Worked Bug Fix` |\n| A medium\u002Fhigh task needs authorized project records and workspace initialization | `long-task-continuation\u002Fdurable-work-guidance.md` — `## Create A Durable Work Record`; use its initialization command only when initializing, and its new-work command only for a needed work record |\n| That task needs the work-record file layout | `long-task-continuation\u002Fdurable-work-guidance.md` — `## Required Artifact Layout` |\n\nResolve the shared reference beside the host-discovered `long-task-continuation`\nSKILL.md, preserving any installed directory prefix; do not assume an unprefixed\nsibling directory. If that reference is unavailable, report the workspace-support\ngap rather than inventing helper commands.\n\nUse configured Aegis workspace support lazily through the installed\n`\u003Caegis-workspace-helper>`. Do not create records merely because TDD is active.\nDo not promote reusable project facts, decisions, specs or plans into workspace\ndirectories unless the workflow needs them and no existing project authority\nalready owns them. Helper commands and layout have one owner in long-task\ncontinuation; TDD retains its preflight and production-edit boundaries.\n\n## Red-Green-Refactor\n\n### RED - Write Failing Test\n\nState: input | output | boundary | acceptance criteria. Check existing test coverage first. Write one minimal test showing what should happen.\nA minimal test anchors the next behavior slice; it does not by itself define\nwhole-task completeness unless the parent acceptance is already fully pinned.\n\n**Requirements:**\n- One behavior\n- Clear name\n- Real code (no mocks unless unavoidable)\n- If a new feature changes user-observable behavior, prefer one minimal\n  end-to-end or integration test for the main path before narrower unit tests\n- For user-visible work, cover the main journey and the highest-risk experience\n  or operational floor before treating unit tests as sufficient\n- Add unit tests for core rules, boundary conditions, and error branches\n\n### Verify RED - Watch It Fail\n\n**MANDATORY. Never skip.**\n\n```bash\nnpm test path\u002Fto\u002Ftest.test.ts\n```\n\nConfirm:\n- Test fails (not errors)\n- Failure message is expected\n- Fails because feature missing (not typos)\n\n**Test passes before production edits?** Inspect the reproduction and assertions.\nIf they miss the requested behavior, correct the test. If the behavior already\nexists, reassess Change Necessity; keep useful regression evidence without\nclaiming a RED\u002FGREEN cycle. Do not break or delete existing code to force RED.\n\n**Test errors?** Fix error, re-run until it fails correctly.\n\n### GREEN - Minimal Code\n\nWrite simplest code to pass the test.\n\nDon't add features, refactor other code, or \"improve\" beyond the test.\n\nFix the real owner of the behavior. Do not add a new fallback, adapter, or\nbranch unless the debugging or design workflow identifies why it is necessary\nand what old path retires.\n\n### Verify GREEN - Watch It Pass\n\n**MANDATORY.**\n\n```bash\nnpm test path\u002Fto\u002Ftest.test.ts\n```\n\nConfirm:\n- Test passes\n- Other tests still pass\n- Output pristine (no errors, warnings)\n\n**Test fails?** Fix code, not test.\n\n**Other tests fail?** Fix now.\n\n### REFACTOR - Clean Up\n\nAfter green only:\n- Remove duplication\n- Improve names\n- Extract helpers\n\nKeep tests green. Don't add behavior.\n\n### Repeat\n\nNext failing test for next feature.\n\n## Regression Scope\n\nAt minimum, run the target test you just changed or added. Broaden regression\nbased on impact:\n\n- Shared module change -> related module tests\n- Interface or data contract change -> producer and consumer tests\n- Cross-module behavior change -> integration or end-to-end path\n- Core logic refactor -> old behavior regression tests plus new behavior tests\n- Ripple Signal Triage fired -> producer+consumer or real user path that proves\n  the downstream effect remains bounded\n\nIf the current environment cannot run automated tests, state the blocker and provide reproducible manual verification steps.\n\n## Strict-Route Red Flags - STOP and Diagnose\n\nThese red flags apply only after this skill has validly entered under\n`TDD Route: strict`. Do not project them onto debugging or regression work\nwhose route is `light` or `skipped`.\n\n- Code before test\n- Test after implementation\n- Test passes immediately without an explanation of existing behavior\n- Can't explain why test failed\n- Tests added \"later\"\n- Rationalizing \"just this once\"\n- \"I already manually tested it\"\n- \"Tests after achieve the same purpose\"\n- \"It's about spirit not ritual\"\n- \"Keep as reference\" or \"adapt existing code\"\n- \"Already spent X hours, deleting is wasteful\"\n- \"TDD is dogmatic, I'm being pragmatic\"\n- \"This is different because...\"\n\nStop and establish which case applies. If you wrote task-owned production code\nbefore the required failing test, remove only that premature implementation\nand restart from the behavior test. Preserve pre-existing code and user edits;\nif changes are interleaved, isolate ownership before recovery. A test that\npasses before any production edit needs the test\u002FChange Necessity diagnosis\nabove, not code deletion. Missing evidence alone does not authorize a reset.\n\n## Strict-Route Verification Checklist\n\n- [ ] Defined input, output, boundaries, compatibility, acceptance criteria\n- [ ] Each new behavior has a test observed failing before implementation;\n      helpers extracted during GREEN refactoring may use that existing test\n- [ ] All tests pass, output pristine\n- [ ] Regression: shared\u002Fcontract\u002Fcore changes ran related tests\n- [ ] Ripple signal hit: downstream or real user path covered\n- [ ] If automation blocked → blocker + manual steps documented\n- [ ] GREEN treated as local behavior proof only, not final completion\n- [ ] If `TaskIntentDraft`, parent plan\u002Fspec, or `Slice Card` exists, covered and uncovered scope are explicit before any done claim\n\nCan't check all applicable boxes? Diagnose the gap before claiming strict-route completion.\n\n## Exploration and Emergency Exceptions\n\nExploratory spikes are allowed only as throwaway learning. When the spike ends,\nconvert confirmed behavior into tests before formal implementation.\n\nEmergency hotfixes may prioritize the smallest safe repair when delay is more\ndangerous than incomplete TDD. Record the reason, keep the change narrow, and\nadd the missing regression test in the same slice or the next nearest slice.\n\n## When Stuck\n\nDon't know how to test → write wished-for API first. Test too complicated → simplify design. Must mock everything → reduce coupling.\n\n## Debugging Integration\n\nBug found? Start with `systematic-debugging`: reproduce, trace the owner, and\nchoose the smallest proof that supports the diagnosis. Under recorded\n`TDD Route: strict`, the reproduction becomes the required failing test before\nproduction edits. With `TDD Mode: off` and no strict route, use diagnostic\nreproduction and targeted post-change regression as fit the repair; do not\nstart RED \u002F GREEN by inference.\n","# Execute\n\n- **False-positive entry on a native-direct-skill host?** Exit immediately unless\n  the user explicitly requested TDD or the conversation records `TDD Route: strict`.\n  Return to the selecting workflow or fast path with proportional verification.\n- Under `strict`, validate preflight and Change Necessity before production\n  edits. No production code without an observed failing behavior test first.\n- RED (test and observe failure) -> GREEN (minimum owner repair and observe pass)\n  -> REFACTOR (clean up while green). Apply Regression Scope before closeout.\n- GREEN proves only the expressed behavior slice, not parent-task acceptance,\n  business-value completion or final completion. Use `verification-before-completion`.\n\n## Entry Boundary\n\nEnter only for an explicit strict TDD\u002Ftest-first\u002FRED \u002F GREEN \u002F REFACTOR request\nor a recorded `TDD Route: strict`. Native-direct-skill hosts must not infer\nentry from generic risky-code wording. Consume the selected route; a missing\nor invalid automatic decision returns to its selecting workflow.\n\nOnce strict entry is justified, it may cover features, bug fixes, refactoring,\nbehavior\u002Flogic, interface\u002Fdata contracts, shared modules and core logic.\nExceptions (ask your human partner): throwaway prototypes, generated code,\nconfig files, pure docs cleanup, read-only diagnosis and comment-only changes.\n\n## TDD Mode and Route\n\nTDD Mode defaults to `off`, disabling automatic TDD, not completion verification.\nIn `auto`, the selecting workflow chooses strict\u002Flight\u002Fskipped by task risk.\n\nBefore source edits, decide:\n\n```text\nAegis Visibility:\n- Why this TDD route is strict, light, or skipped:\n- What RED\u002FGREEN proves:\n- What still needs verification:\n\nTDD Route:\n- Mode: auto | off\n- Decision: strict | light | skipped\n- Strict authority: explicit user\u002Fproject request | recorded auto decision | not applicable\n- Test posture: diagnostic reproduction | post-change regression | strict RED test\n- Reason:\n- Verification:\n```\n\nIn `auto`, use `strict` for behavior, bugfix, contract, shared\u002Fcore, producer \u002F\nconsumer, persistence, permission, migration, or meaningful regression risk.\nUse `light` for tiny low-risk edits with an obvious readback or command check.\nUse `skipped` for read-only, docs-only, generated, throwaway, comment-only, or\nenvironment-bound work where TDD does not fit.\n\nIn `off`, do not automatically require TDD, create a strict route, or infer one\nfrom risk alone. Explicit user\u002Fproject TDD requests still apply; risky work may\nstill need regression coverage and `verification-before-completion` before any\ncompletion claim.\nFor plan or execution review, `Mode: off \u002F Decision: skipped` is the normal\nrecord unless an explicit user\u002Fproject strict request overrides it. That record\ndoes not load this skill or turn a diagnostic reproduction into RED. An\napproved plan does not supply strict authority by itself.\nIf this skill was loaded anyway without an explicit TDD request or a visible\n`TDD Route: strict` marker, exit instead of improvising an automatic strict\nroute from risk words alone.\n\nKeep `Aegis Visibility` task-specific: explain the route decision and the\nregression boundary, not a generic claim that TDD was used.\n\n## Preflight Gate\n\nTDD is the implementation discipline for an approved behavior or atomic task.\nIt is not a substitute for task routing, product clarification, or planning.\n\nBefore writing tests or production code, stop and route to brainstorming or\nwriting-plans if the current request has any medium- or high-complexity signal:\n\n- multiple files, modules, pages, screens, services, or owners\n- user-visible flows such as navigation, onboarding, checkout, lifecycle, or\n  recovery paths\n- state transitions, routing rules, API or data contracts, compatibility\n  boundaries, migrations, permissions, or persistence\n- more than one acceptance path or manual\u002Fvisual verification requirement\n- unclear product behavior, competing constraints, or long-running execution\n\nFor these tasks, require a baseline read-set, plan, and atomic tasks before TDD.\nHigh-complexity or ambiguous tasks also need a spec\u002Fdesign review before\nplanning. Only proceed directly with TDD for low-complexity work whose intent,\nowner, compatibility boundary, verification path, and slice goal \u002F success\nevidence are already clear.\n\n## Change Necessity\n\nBefore strict RED\u002FGREEN enters production edits, expose why code needs to\nchange: user-visible need, no-change\u002Fnon-code alternative, why it is insufficient,\nand the minimum owner\u002Ffile boundary. This is behavior-triggered, not prompt-triggered:\nany new source-code path, including a tiny helper, guard, branch, fallback,\nadapter or owner, needs the decision before RED\u002FGREEN normalizes it as work.\nKeep this natural; it creates no new artifact or hot-path entry requirement.\n\n- `no-change`: do not write tests or production code for a non-change.\n- `docs\u002Fconfig-only`: route to that narrower surface and verify it.\n- `needs-clarification`: pause before RED\u002FGREEN.\n- `code-change`: carry the minimum boundary into TDD Route, RED and regression.\n\n## Complexity Budget\n\nBefore strict TDD on non-trivial work, record the planned complexity budget so\nRED\u002FGREEN does not silently normalize a wrong or overloaded owner.\n\nFor the Complexity Budget, state artifact class, current pressure, projected\npost-change pressure and planned governance in the existing task record.\n\nUse `using-aegis\u002Freferences\u002Fcomplexity-governance.md` for shared artifact\nclasses, pressure signals, and the meaning of planned governance.\n\n## Pre-Edit Complexity Check\n\nBefore production code edits, check whether the intended source edit would add\nlogic to an overloaded or wrong owner. Tiny edits can keep this to one line.\n\nUse `using-aegis\u002Freferences\u002Fcomplexity-governance.md` for shared pressure\nsignals and the meaning of `over-budget`.\n\nKeep the Pre-Edit Complexity Check proportional: target file, pressure signal,\nowner fit, safer boundary and decision. For a pressured owner, include the\nPre-Edit Owner-Fit Decision and classify intent as `wiring-only`,\n`move-out \u002F extract-first`, `local-fix-without-new-responsibility`,\n`new-responsibility`, or `emergency \u002F compatibility patch`.\nThe decision is `edit-in-place | extract helper | add owner file | split task |\npause for plan update`.\n\nIf the decision is `pause for plan update`, stop TDD and return to\n`writing-plans` or `brainstorming` with the evidence.\n\nIf the predicted result is that this slice would push a maintained artifact\nover budget and the slice does not also govern that overrun, do not continue\nwith RED\u002FGREEN as if the task were safely scoped. Pause and update the plan.\n\nWhen the target edit file is over-budget or mixed-purpose, classify edit intent\nbefore production source edits. `new-responsibility` must not be added in place\nby default. `wiring-only`, `move-out \u002F extract-first`, and\n`local-fix-without-new-responsibility` may proceed only when they do not add a\nnew responsibility and the verification boundary is clear. `emergency \u002F\ncompatibility patch` requires residual risk and a retirement trigger.\n\n## Conditional Reference Reads\n\nThe main skill is sufficient for an ordinary strict cycle. Do not load all\nreferences by default. Select only the named section when its evidence trigger\napplies; leave unrelated examples and workspace instructions unread.\n\n| Trigger | Reference and exact section |\n| --- | --- |\n| Choosing observable assertions is unclear, or callback\u002Fmock counts can hide an incorrect result | `examples.md` — `## Behavior Assertions` |\n| The minimum GREEN implementation is unclear or proposed options exceed tested behavior | `examples.md` — `## Minimal GREEN` |\n| A concrete worked RED\u002FGREEN\u002Frefactor sequence is requested or needed to understand the cycle | `examples.md` — `## Worked Bug Fix` |\n| A medium\u002Fhigh task needs authorized project records and workspace initialization | `long-task-continuation\u002Fdurable-work-guidance.md` — `## Create A Durable Work Record`; use its initialization command only when initializing, and its new-work command only for a needed work record |\n| That task needs the work-record file layout | `long-task-continuation\u002Fdurable-work-guidance.md` — `## Required Artifact Layout` |\n\nResolve the shared reference beside the host-discovered `long-task-continuation`\nSKILL.md, preserving any installed directory prefix; do not assume an unprefixed\nsibling directory. If that reference is unavailable, report the workspace-support\ngap rather than inventing helper commands.\n\nUse configured Aegis workspace support lazily through the installed\n`\u003Caegis-workspace-helper>`. Do not create records merely because TDD is active.\nDo not promote reusable project facts, decisions, specs or plans into workspace\ndirectories unless the workflow needs them and no existing project authority\nalready owns them. Helper commands and layout have one owner in long-task\ncontinuation; TDD retains its preflight and production-edit boundaries.\n\n## Red-Green-Refactor\n\n### RED - Write Failing Test\n\nState: input | output | boundary | acceptance criteria. Check existing test coverage first. Write one minimal test showing what should happen.\nA minimal test anchors the next behavior slice; it does not by itself define\nwhole-task completeness unless the parent acceptance is already fully pinned.\n\n**Requirements:**\n- One behavior\n- Clear name\n- Real code (no mocks unless unavoidable)\n- If a new feature changes user-observable behavior, prefer one minimal\n  end-to-end or integration test for the main path before narrower unit tests\n- For user-visible work, cover the main journey and the highest-risk experience\n  or operational floor before treating unit tests as sufficient\n- Add unit tests for core rules, boundary conditions, and error branches\n\n### Verify RED - Watch It Fail\n\n**MANDATORY. Never skip.**\n\n```bash\nnpm test path\u002Fto\u002Ftest.test.ts\n```\n\nConfirm:\n- Test fails (not errors)\n- Failure message is expected\n- Fails because feature missing (not typos)\n\n**Test passes before production edits?** Inspect the reproduction and assertions.\nIf they miss the requested behavior, correct the test. If the behavior already\nexists, reassess Change Necessity; keep useful regression evidence without\nclaiming a RED\u002FGREEN cycle. Do not break or delete existing code to force RED.\n\n**Test errors?** Fix error, re-run until it fails correctly.\n\n### GREEN - Minimal Code\n\nWrite simplest code to pass the test.\n\nDon't add features, refactor other code, or \"improve\" beyond the test.\n\nFix the real owner of the behavior. Do not add a new fallback, adapter, or\nbranch unless the debugging or design workflow identifies why it is necessary\nand what old path retires.\n\n### Verify GREEN - Watch It Pass\n\n**MANDATORY.**\n\n```bash\nnpm test path\u002Fto\u002Ftest.test.ts\n```\n\nConfirm:\n- Test passes\n- Other tests still pass\n- Output pristine (no errors, warnings)\n\n**Test fails?** Fix code, not test.\n\n**Other tests fail?** Fix now.\n\n### REFACTOR - Clean Up\n\nAfter green only:\n- Remove duplication\n- Improve names\n- Extract helpers\n\nKeep tests green. Don't add behavior.\n\n### Repeat\n\nNext failing test for next feature.\n\n## Regression Scope\n\nAt minimum, run the target test you just changed or added. Broaden regression\nbased on impact:\n\n- Shared module change -> related module tests\n- Interface or data contract change -> producer and consumer tests\n- Cross-module behavior change -> integration or end-to-end path\n- Core logic refactor -> old behavior regression tests plus new behavior tests\n- Ripple Signal Triage fired -> producer+consumer or real user path that proves\n  the downstream effect remains bounded\n\nIf the current environment cannot run automated tests, state the blocker and provide reproducible manual verification steps.\n\n## Strict-Route Red Flags - STOP and Diagnose\n\nThese red flags apply only after this skill has validly entered under\n`TDD Route: strict`. Do not project them onto debugging or regression work\nwhose route is `light` or `skipped`.\n\n- Code before test\n- Test after implementation\n- Test passes immediately without an explanation of existing behavior\n- Can't explain why test failed\n- Tests added \"later\"\n- Rationalizing \"just this once\"\n- \"I already manually tested it\"\n- \"Tests after achieve the same purpose\"\n- \"It's about spirit not ritual\"\n- \"Keep as reference\" or \"adapt existing code\"\n- \"Already spent X hours, deleting is wasteful\"\n- \"TDD is dogmatic, I'm being pragmatic\"\n- \"This is different because...\"\n\nStop and establish which case applies. If you wrote task-owned production code\nbefore the required failing test, remove only that premature implementation\nand restart from the behavior test. Preserve pre-existing code and user edits;\nif changes are interleaved, isolate ownership before recovery. A test that\npasses before any production edit needs the test\u002FChange Necessity diagnosis\nabove, not code deletion. Missing evidence alone does not authorize a reset.\n\n## Strict-Route Verification Checklist\n\n- [ ] Defined input, output, boundaries, compatibility, acceptance criteria\n- [ ] Each new behavior has a test observed failing before implementation;\n      helpers extracted during GREEN refactoring may use that existing test\n- [ ] All tests pass, output pristine\n- [ ] Regression: shared\u002Fcontract\u002Fcore changes ran related tests\n- [ ] Ripple signal hit: downstream or real user path covered\n- [ ] If automation blocked → blocker + manual steps documented\n- [ ] GREEN treated as local behavior proof only, not final completion\n- [ ] If `TaskIntentDraft`, parent plan\u002Fspec, or `Slice Card` exists, covered and uncovered scope are explicit before any done claim\n\nCan't check all applicable boxes? Diagnose the gap before claiming strict-route completion.\n\n## Exploration and Emergency Exceptions\n\nExploratory spikes are allowed only as throwaway learning. When the spike ends,\nconvert confirmed behavior into tests before formal implementation.\n\nEmergency hotfixes may prioritize the smallest safe repair when delay is more\ndangerous than incomplete TDD. Record the reason, keep the change narrow, and\nadd the missing regression test in the same slice or the next nearest slice.\n\n## When Stuck\n\nDon't know how to test → write wished-for API first. Test too complicated → simplify design. Must mock everything → reduce coupling.\n\n## Debugging Integration\n\nBug found? Start with `systematic-debugging`: reproduce, trace the owner, and\nchoose the smallest proof that supports the diagnosis. Under recorded\n`TDD Route: strict`, the reproduction becomes the required failing test before\nproduction edits. With `TDD Mode: off` and no strict route, use diagnostic\nreproduction and targeted post-change regression as fit the repair; do not\nstart RED \u002F GREEN by inference.\n",{"name":5,"description":7},"main","cebc3dce495d7eb80d3b1d5841f877a4a92e162d","plugins\u002FGanyuanRan\u002FAegis\u002Fskills\u002Ftest-driven-development",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill test-driven-development",{"tool":61,"command":62},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill test-driven-development",{"tool":64,"command":65},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill test-driven-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FGanyuanRan\u002FAegis\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",true,[69],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"examples.md","REFERENCE","参考文档",2902,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FGanyuanRan\u002FAegis\u002Fskills\u002Ftest-driven-development\u002Fexamples.md",[76,86,94,102,110,118],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":85},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":85},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":85},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":85},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":85},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":85},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]