documentation
為不同讀者寫 README、API 文件、runbook、架構文件和 onboarding 指南
中文翻譯
--- name: documentation description: 撰寫並維護技術文件。用「write docs for」「document this」「create a README」「write a runbook」「onboarding guide」觸發,或使用者需要任何形式的技術寫作(API 文件、架構文件或維運 runbook)協助時使用。 --- # Technical Documentation 針對不同的讀者和目的,寫出清楚、好維護的技術文件。 ## 文件類型 ### README - 這是什麼、為什麼存在 - 快速上手(< 5 分鐘內第一次成功) - 設定與用法 - 貢獻指南 ### API 文件 - Endpoint 參考,附 request/response 範例 - 認證與錯誤碼 - Rate limit 與分頁 - SDK 範例 ### Runbook - 什麼時候該用這份 runbook - 前置條件和需要的存取權限 - 逐步程序 - Rollback 步驟 - Escalation 路徑 ### 架構文件 - 背景與目標 - 附圖表的高階設計 - 關鍵決策與取捨 - 資料流與整合點 ### Onboarding 指南 - 環境設定 - 主要系統,以及它們怎麼連在一起 - 常見任務的逐步示範 - 什麼事該問誰 ## 原則 1. **為讀者而寫**:誰在讀這份文件?他們需要什麼? 2. **最有用的資訊放最前面**:不要把重點埋起來 3. **用示範,不要光用講的**:程式碼範例、指令、截圖 4. **保持最新**:過時的文件比沒有文件更糟 5. **用連結,不要重複**:參照其他文件,不要複製貼上
英文原文
--- name: documentation description: Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks. --- # Technical Documentation Write clear, maintainable technical documentation for different audiences and purposes. ## Document Types ### README - What this is and why it exists - Quick start (< 5 minutes to first success) - Configuration and usage - Contributing guide ### API Documentation - Endpoint reference with request/response examples - Authentication and error codes - Rate limits and pagination - SDK examples ### Runbook - When to use this runbook - Prerequisites and access needed - Step-by-step procedure - Rollback steps - Escalation path ### Architecture Doc - Context and goals - High-level design with diagrams - Key decisions and trade-offs - Data flow and integration points ### Onboarding Guide - Environment setup - Key systems and how they connect - Common tasks with walkthroughs - Who to ask for what ## Principles 1. **Write for the reader** — Who is reading this and what do they need? 2. **Start with the most useful information** — Don't bury the lede 3. **Show, don't tell** — Code examples, commands, screenshots 4. **Keep it current** — Outdated docs are worse than no docs 5. **Link, don't duplicate** — Reference other docs instead of copying