W Tdd

blockmatic/basilic-skills/skills/workflow/w-tdd

作者 blockmatic7e05e2abd052dc6b526e8a28e36d102d42bfd635无许可证1 个星标收录于 2026年10月9日更新于 2026年10月9日仓库6天前更新

Implement a requested increment with red-green-refactor.

AI 生成的概览

以红-绿-重构的 TDD 循环指导实现所要求的代码增量,并运行聚焦测试与相关测试套件。

功能
该技能提供一套分步的测试驱动开发流程,用于实现所要求的增量。它引导智能体依次进行红(编写失败测试)、绿(最小可通过的实现)和重构阶段,并按增量重复。它还规定每个循环先运行聚焦的测试文件,再运行受影响的测试套件,并在行为或命令变化时更新文档。
适用场景
当用户明确要求 TDD,或代码仓库要求使用 TDD 时使用。它适用于由测试驱动实现的功能或行为增量开发。
运行要求
不附带脚本,仅为指令。它依赖仓库的测试文档以及 vitest-v5 之类的测试技术栈,并遵循该技术栈的测试技能。它还引用配套的文档技能来更新文档。

Use TDD only when the user asked for it or the repository requires it. Follow the repo testing MDX and vitest-v5 (or the stack's test skill). Do not commit unless asked.

  1. Red: write a failing test for the desired behavior. Use real APIs where the repo tests do; mock only at documented boundaries.
  2. Green: write the smallest implementation that passes that test.
  3. Refactor: improve structure while tests stay green.
  4. Repeat for the next increment. Run the focused test file each cycle, then the affected suite.
  5. Docs: /w-docs if behavior or commands changed.

来源与署名

来源:blockmatic/basilic-skills位于skills/workflow/w-tdd提交7e05e2a

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架