Prompt Library
Prompt Library
Section titled “Prompt Library”Prompt Library 收錄可重用的提示詞模式,協助 Coding Agent、Design Agent、Content Agent 與 Review Agent 依照 AI Playbook 的規範工作。
第一版重點不是收集大量萬用 prompt,而是建立穩定格式,讓每個 prompt 都能說清楚用途、輸入、限制、輸出與驗證方式。
拆分策略
Prompt Library 首頁只保留原則、索引與新增規則;可直接使用的 prompt 應拆成子頁,方便人類掃讀,也方便 AI Agent 精準引用。
沒有 Prompt Library 時,使用者每次都要重新說明背景、格式與限制;Agent 也容易因上下文不足而跳過 PRD、目錄邊界或七區塊格式。
Prompt Library 的目的,是把高頻任務變成可重用、可驗證、可改寫的操作模板。
Prompt Principles
Section titled “Prompt Principles”每個 prompt 必須符合以下原則:
- 明確指定角色與任務。
- 明確列出輸入資料。
- 明確列出限制與禁止事項。
- 明確要求輸出格式。
- 明確要求驗證方式。
- 不包含私密資料、token、API key 或內部未公開路徑。
- 不依賴「你應該知道」這種隱性上下文。
Prompt Structure
Section titled “Prompt Structure”正式 prompt 文件建議使用以下結構:
- Purpose
- Best For
- Inputs
- Prompt
- Expected Output
- Verification
- Failure Modes
Prompt Pages
Section titled “Prompt Pages”Split Rules
Section titled “Split Rules”新增 Prompt 子頁時,檔案應放在 src/content/docs/prompts/,並遵守以下規則:
| Rule | 說明 |
|---|---|
| 一頁一任務 | 每個 prompt 子頁只服務一種高頻任務。 |
| 明確 Agent | 指定適用的 Agent 類型。 |
| 可複製 | Prompt 區塊必須可直接複製。 |
| 可驗證 | 每頁要有 Expected Output 與 Verification。 |
| 不放私密資料 | 範例使用 placeholder,不放真實 token、API key、私密路徑。 |
Agent Types
Section titled “Agent Types”Coding Agent
Section titled “Coding Agent”用途:
- 建立或修改程式碼。
- 調整 Astro / Starlight 設定。
- 修正 build、routing、content schema 問題。
- 做 code review。
必要限制:
- 先讀
PRD.md與專案駕駛艙。 - 不要跳過既有架構。
- 不要把 Playbook 內容硬寫進程式碼。
- 完成後要跑
npm run check與npm run build。
Design Agent
Section titled “Design Agent”用途:
- 產生版型建議。
- 定義設計系統。
- 檢查頁面是否符合文件優先原則。
必要限制:
- 不建立行銷式 hero 作為預設。
- 不使用過度動畫。
- 不用圖片承載核心文字。
- 優先沿用 Starlight 文件頁。
Content Agent
Section titled “Content Agent”用途:
- 撰寫或改寫文件。
- 補齊七區塊格式。
- 產生章節索引、Prompt、Workflow 或案例。
必要限制:
- 使用繁體中文。
- 保留 Why / Do / Don’t / Checklist / Prompt Example。
- 不寫成行銷文案。
- 不把範例當成正式規則。
Review Agent
Section titled “Review Agent”用途:
- 檢查文件、架構、流程或程式碼是否符合 AI Playbook。
- 找出不一致、缺漏與風險。
必要限制:
- Findings 優先。
- 具體指出檔案與問題。
- 不只給摘要。
- 區分 blocking issue 與 improvement。
Core Prompt Templates
Section titled “Core Prompt Templates”Content Spec Prompt
Section titled “Content Spec Prompt”你是 AI Playbook 的 Content Agent。
請閱讀以下輸入,將它整理成一份符合 AI Playbook 七區塊格式的文件。
輸入資料:{{input}}
要求:- 使用繁體中文- 保留標題、說明、Why、Do、Don't、Checklist、Prompt Example- 不寫成行銷文案- 不加入未提供的事實- 若內容不足,使用「待補」標記,不要自行杜撰
輸出:- Markdown- 可直接放入 `src/content/docs/` 對應章節Coding Task Prompt
Section titled “Coding Task Prompt”你是 AI Playbook 專案的 Coding Agent。
請先閱讀:- PRD.md- src/content/docs/docs/project-dashboard.md- 與任務相關的 Playbook 章節
任務:{{task}}
限制:- 不要改動無關檔案- 內容維持 Markdown / MDX- 不把文件內容硬寫進程式碼- 若修改 Astro / Starlight 設定,需說明原因
驗證:- npm run check- npm run build- 必要時做 HTTP smoke test
輸出:- 修改摘要- 驗證結果- 未完成事項Review Prompt
Section titled “Review Prompt”你是 AI Playbook 的 Review Agent。
請檢查下列變更是否符合 PRD 與專案規範。
輸入:{{diff_or_files}}
檢查重點:- 是否符合文件優先- 是否維持七區塊格式- 是否破壞既有目錄邊界- 是否引入不必要的 UI 或技術複雜度- 是否有缺少驗證的風險
輸出格式:- Findings- Open Questions- Suggested Fixes- Verification Gaps- 每個 Prompt 都要說明用途與輸入資料。
- 提供可直接複製使用的範例。
- 標註適用的 Agent 類型。
- 明確描述輸出格式。
- 明確描述驗證方式。
- 使用 placeholder 表示需要替換的輸入。
- 不要收錄缺乏情境的泛用提示詞。
- 不要讓 Prompt 依賴未記錄的隱性規則。
- 不要把私密資料放入 Prompt 範例。
- 不要把 token、API key、
.env內容放進 prompt。 - 不要用 prompt 要求 Agent 跳過 PRD 或專案駕駛艙。
- 不要要求 Agent 產生無法驗證的輸出。
Checklist
Section titled “Checklist”- 定義 Prompt 原則
- 定義 Prompt 結構
- 定義 Agent 類型
- 建立 Content Spec Prompt
- 建立 Coding Task Prompt
- 建立 Review Prompt
- 建立 Design Brief Prompt
- 建立 content-spec.md
- 建立 coding-task.md
- 建立 review.md
- 建立 design-brief.md
- 建立 prompt 子頁範例測試
Prompt Example
Section titled “Prompt Example”請依 AI Playbook 的 Prompt Library 規範,為下列高頻任務建立一份可重用 prompt。
任務:{{task}}
使用對象:{{agent_type}}
輸入資料:{{inputs}}
限制:- 使用繁體中文- 明確列出 Purpose / Inputs / Prompt / Expected Output / Verification- 不包含私密資料- 不依賴未記錄的隱性上下文