PRD-first 的功能開發技能,先產生並確認 PRD,再開始實作。
這是一個給 Codex/Claude 類 Agent 使用的 skill,適合在新增功能前先把需求、流程與測試寫成可驗證的 PRD,再進入開發。
此 skill 用於「新增功能/修改產品行為/綠地功能設計」等情境,目標是讓需求、流程、測試與實作順序一致,降低直接改碼造成的返工風險。
- 以
references/prd-template.md為唯一模板來源 - 優先使用
scripts/create_prd.py建立 PRD 檔案 - 固定輸出到
docs/plans/{YYYY-MM-DD}-{feature_name}.md - 要求在 PRD 中記錄:
- 官方文件與必要參考來源
- 預計修改/新增檔案
- 需要澄清問題(若無則填「無」)
- 單元測試、Property-based 測試、整合測試規劃
- 未獲使用者確認前,不進入實作
.
├── SKILL.md
├── examples/
│ └── membership-upgrade-flow-prd.md
├── references/
│ ├── prd-template.md
│ ├── testing-unit.md
│ ├── testing-property-based.md
│ ├── testing-integration.md
│ └── testing-e2e.md
└── scripts/
└── create_prd.py
- Python 3.9+
python3 scripts/create_prd.py "會員升級流程優化"預設會建立:
docs/plans/<today>-hui-yuan-sheng-ji-liu-cheng-you-hua.md
檔名 slug 由英數字轉換規則產生;若中文名稱導致 slug 不符合需求,可使用
--slug手動指定。
python3 scripts/create_prd.py "會員升級流程優化" --slug membership-upgrade-flowpython3 scripts/create_prd.py "功能名稱" \
--output-dir docs/plans \
--template references/prd-template.md \
--force--output-dir:輸出資料夾(預設docs/plans)--template:模板路徑(預設references/prd-template.md)--force:若同名檔案存在則覆蓋
可參考完整範例 PRD:examples/membership-upgrade-flow-prd.md
- 查詢本次功能需要的官方文件(只查必要部分)
- 用腳本產生 PRD 檔案
- 探索現有代碼與模組依賴
- 補齊 PRD:核心需求、業務流程、澄清問題、測試規劃
- 取得使用者「可開始實作」確認
- 再進入程式碼修改
- 單元測試:
references/testing-unit.md - Property-based 測試:
references/testing-property-based.md - 整合測試:
references/testing-integration.md - E2E 測試(僅被要求時):
references/testing-e2e.md
本專案採用 MIT 授權,詳見 LICENSE。