mcpbeat

Tdd Dev Cycle

cafe3310/tdd-dev-cycle

测试驱动开发 (TDD) 主干工作循环,包含分析、测试编写、开发、验证及带熔断的修复机制。

537 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
249
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/cafe3310/public-agent-skills --skill tdd-dev-cycle

The instruction itself

1 sections, as written by the author

TDD (测试驱动开发) 主干工作循环

本 Skill 定义了标准的 TDD 开发与验证循环。

适用场景

如果项目章程没有定义具体的工作流,助手默认遵循以下 TDD 主干工作循环。

流程详情

  • 智能调度
  • 优先处理 backlog 中 priority: high 的任务。
  • 在选定了任务后,将其从 docs/backlog/ 移动到 docs/requirements/ 并更新状态为 开发中,然后开始分析。
  • 规划与澄清 (TDD)
  • a. 分析需求: 如果模糊则提问,并更新需求文档。
  • b. 解决冲突: 如果需求和项目级别章程冲突,则提问澄清如何处理。一般来说要更新章程中的设计。
  • c. 定义验收标准: 优先编写自动化测试用例。
  • d. COMMIT 1: git commit -m "完成需求 {文件名} 的分析与测试用例,即将开发"
  • 开发
  • 根据测试用例进行编码实现。
  • 开发完成 -> COMMIT
  • COMMIT 2: git commit -m "完成需求 {文件名} 的开发,即将验证"
  • 验证与带熔断的修复循环
  • a. 运行自动化测试
  • b. 成功:
  • COMMIT 5: git commit -m "需求 {文件名} 的开发和验证已经全部完成!"
  • 报告完成并循环。
  • c. 失败 (第 N 次):
  • COMMIT 3: git commit -m "验证需求 {文件名} 时遇到问题 {问题描述} (第 N 次尝试),即将修复"
  • 熔断检查: 若 N > 3 次,则触发熔断,停止,并向用户求助。
  • 修复: 分析日志,定位原因,编写修复代码。
  • COMMIT 4: git commit -m "验证需求 {文件名} ,成功解决了问题 {问题描述} (第 N 次尝试)"
  • 返回步骤 5a 重新验证。

循环直至所有 backlog 任务完成、用户打断、指令变更或达到熔断条件。

How to use it

Copy the folder

Take cafe3310/tdd-dev-cycle from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.