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 從公開儲存庫中收錄這些內容。

檢舉或申請下架