Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

改一段代码,用 /test /review /commit 走一遍:一个可复现的收尾链路

Description and use

In the todo‑cli project, a sequential /test → /review → /commit workflow ensures each step has verifiable outputs: a test case list, a five‑dimension review, and a standardized commit message, reducing rework.

Problem

返工往往来自收尾阶段,测试、评审和提交信息缺乏可核对产出,导致代码质量下降。

Outcome

通过按 /test → /review → /commit 顺序执行,todo-cli 项目实现了可核对的测试用例、评审标准和规范提交信息,显著降低返工。

Workflow

  • /test:先生成用例清单,确认后写测试,跑 pytest 全绿,至少 8 个用例;未覆盖的地方需诚实列出。
  • /review:按正确性、安全、可读性、性能、测试五个维度评审,意见分三级,必须改问题必须全部改完。
  • /commit:读取 diff 自动判断类型、拆分不相关改动,生成规范提交信息(祈使句、正文只写为什么)。

Evidence

/test 不直接写测试。它先给出一份用例清单过目,确认后再动手写,写完真实跑一遍。

Source

/review 按正确性、安全、可读性、性能、测试五个维度评审,意见分三级:必须改、建议改、可忽略。

Source

/commit 读 diff 自动判断类型、拆分不相关改动,生成规范提交信息。

Source

  • Record date: 2026-11-02T20:28:53.233Z