tdd

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Apply TDD with agents:
  1. Ask an agent to write a failing test (RED phase). The agent shall commit this as WIP.
  2. Ask an agent to write the actual code to make the test pass (GREEN phase). The agent shall commit this as WIP.
  3. Ask an agent to judge the previous two commits: The GREEN phase commit must not have changed semantics of tests implemented in the RED phase.
结合Agent运用TDD:
  1. 让Agent编写一个失败的测试(RED阶段)。Agent需将此作为WIP提交。
  2. 让Agent编写实际代码使测试通过(GREEN阶段)。Agent需将此作为WIP提交。
  3. 让Agent评判前两次提交:GREEN阶段的提交不得修改RED阶段实现的测试语义。