chore(claude): 修正 branch-and-propose、apply 加入測試對應檢查,新增 verify-and-report 與 finish-and-pr

This commit is contained in:
2026-10-14 23:45:54 +08:00
parent ee1ba1cef3
commit c1698a45b6
5 changed files with 194 additions and 9 deletions
+11
View File
@@ -52,6 +52,15 @@ Implement tasks from an OpenSpec change.
- **spec-driven**: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output
<!-- CFDive 自訂區塊:由 `openspec update` 重新產生時會被覆蓋,更新後需重新加回(見 docs/analysis/2026-10-14-project-prompt-improvements.md S1) -->
4b. **測試對應檢查(實作前必做,CLAUDE.md 規定)**
依 spec 與 tasks 檢查:
- 列出每一個 `#### Scenario`(即 Acceptance Criteria),對應到 tasks.md 中至少一個 `[整合測試]` 或單元測試 task
- 若有 Scenario 沒有對應測試 task:**停止實作**,列出缺漏清單,詢問使用者是否補上 tasks,不可自行略過
- 若涉及權限行為,確認有跨角色(member / provider / admin / 未登入)的測試 task
- 若 design.md 觸及安全觸發條件(外部輸入、資料庫讀寫、身份驗證/授權、檔案上傳、外部 API)但缺「安全確認」段落,同樣停止並回報
5. **Show current progress**
Display:
@@ -143,6 +152,8 @@ What would you like to do?
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- Use contextFiles from CLI output, don't assume specific file names
- (CFDive) Never start implementing while any Scenario lacks a corresponding test task; see step 4b
- (CFDive) When all tasks are done, run the `verify-and-report` skill before suggesting archive
**Fluid Workflow Integration**