This Skill defines the standard TDD development and verification loop.
Applicable Scenarios
If the project charter does not define a specific workflow, the assistant follows the following TDD trunk work loop by default.
Process Details
-
Intelligent Scheduling
- Prioritize handling tasks in the backlog with
priority: high. - After selecting a task, move it from
docs/backlog/todocs/requirements/and update the status to开发中, then begin analysis.
- Prioritize handling tasks in the backlog with
-
Planning and Clarification (TDD)
- a. Analyze requirements: If ambiguous, ask questions, and update the requirements document.
- b. Resolve conflicts: If requirements conflict with the project-level charter, ask for clarification on how to handle it. Generally, update the design in the charter.
- c. Define acceptance criteria: Prioritize writing automated test cases.
- d. COMMIT 1:
git commit -m "完成需求 {文件名} 的分析与测试用例,即将开发"
-
Development
- Implement coding based on the test cases.
-
Development complete -> COMMIT
- COMMIT 2:
git commit -m "完成需求 {文件名} 的开发,即将验证"
- COMMIT 2:
-
Verification and repair loop with circuit breaking
- a. Run automated tests。
- b. Success:
- COMMIT 5:
git commit -m "需求 {文件名} 的开发和验证已经全部完成!" - Report completion and loop.
- COMMIT 5:
- c. Failure (attempt N):
- COMMIT 3:
git commit -m "验证需求 {文件名} 时遇到问题 {问题描述} (第 N 次尝试),即将修复" - Circuit breaker check: If N > 3 times, trigger the circuit breaker, stop, and ask the user for help.
- Repair: Analyze logs, locate the cause, and write repair code.
- COMMIT 4:
git commit -m "验证需求 {文件名} ,成功解决了问题 {问题描述} (第 N 次尝试)" - Return to step 5a to re-verify.
- COMMIT 3:
Loop until all backlog tasks are complete, the user interrupts, the instructions change, or the circuit breaker condition is reached.