Spec-Driven Development (SDD): a structured workflow (Requirement -> Analysis -> Implementation) that enforces explicit documentation before coding.
本文件是 SDD 流程的單一事實來源 (single source of truth)。
RULE_007_SDD_WORKFLOW.md與.agent/workflows/sdd-process.md為摘要與入口, 流程細節以本文件為準;三者若有出入,以本文件為準並回頭修正另兩份。
| 層級 | 適用 | 產出 | Review 時機 |
|---|---|---|---|
| T0 直接做 | typo、文案/翻譯、註解、純樣式微調、依賴版本更新、根因明顯的單點小修 | 無 spec;commit body 把背景講清楚 | PR review |
| T1 輕量 SPEC(預設) | 一般 bug fix、小~中型功能、局部重構 — 影響面一份文件講得完,且未觸及 T2 升級條件 | 單檔 SPEC.md(骨架見下) | 隨 PR 一起審;不設事前 gate,spec 與實作可同步進行 |
| T2 完整 SDD | 觸及任一升級條件(見下) | PRD_spec.md + SA_spec.md | 兩道事前 gate:PRD 核准 → SA 核准 → 才動工 |
chrome.storage(local/sync)的 schema,或需要資料 migrationmanifest.json 的 permissions / host_permissionsSPIKE.md(判例:BASE-018 GramJS 可行性驗證)。放在 /docs/specs/{type}/{ID-PREFIX}_{desc}/SPEC.md,1–2 頁為度:
# {標題}
## 背景與問題
(要解什麼?bug 的話寫根因分析,不是只寫症狀)
## 方案
(怎麼解+為什麼選這個做法;有排除的替代方案就一句帶過)
## 影響面
(動到哪些 modules / storage keys / manifest;連動風險)
## Test Impact
(unit / E2E 哪些要新增或改;驗證指令)
## 驗收條件
(可檢驗的完成定義,條列)
spec 可以在實作過程中補完(例如調查完根因才寫得出「背景與問題」), 但 PR 送審時 SPEC.md 必須完整,與程式碼一起被 review。
/docs/specs/{type}/{ID-PREFIX}_{desc}/PRD_spec.mdprd skill(.agent/skills/prd/SKILL.md)SA_spec.mdsa skill(.agent/skills/sa/SKILL.md)目錄:/docs/specs/{type}/{ID_PREFIX}_{desc}/
feature / fix(必要時 refactor / chore)ISSUE-{n}:對應 GitHub Issue(標準)PR-{n}:外部貢獻、無 IssueBASE-{n}:歷史回溯/基礎架構(無對應 Issue)/docs/specs/
├── feature/
│ ├── ISSUE-101_tab-groups/ # T2:PRD_spec.md + SA_spec.md
│ └── BASE-014_quick-toggle/ # T1:SPEC.md
└── fix/
└── ISSUE-88_drag-ghost/ # T1:SPEC.md
既有目錄裡的 PRD_spec.md + SA_spec.md 為歷史文件,不需回頭改制。
mkdir -p 建目錄;調查→實作→補完 SPEC.md(或先寫後做,順序自由);PR 連同 spec 一起送審。| 用途 | 檔案 |
|------|------|
| PRD 撰寫指引 / 完整模板 | prd skill / .agent/skills/prd/references/template_comprehensive.md |
| SA 撰寫指引 / 完整模板 | sa skill / .agent/skills/sa/references/system_design_doc.md |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer