backfill-documentation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese補充文件(Backfill Documentation)
Backfill Documentation
概述
Overview
當功能已經實作完成,但沒有經過正式的設計流程時,使用此技能來補充文件。這確保所有功能都有完整的文件記錄,便於未來維護和理解。
開始時宣布: "我正在使用 backfill-documentation 技能來補充文件。"
必要子技能:
- 使用 hi-skills:brainstorming 的設計文件格式
- 使用 hi-skills:executing-plans 的實作計劃格式
Use this skill to supplement documents when a feature has been implemented without going through a formal design process. This ensures that all features have complete documentation records for future maintenance and understanding.
Announce at start: "I am using the backfill-documentation skill to supplement documents."
Required sub-skills:
- Use the design document format of hi-skills:brainstorming
- Use the implementation plan format of hi-skills:executing-plans
流程
Procedure
步驟 1:載入參考格式
Step 1: Load reference formats
先調用技能取得格式規範:
- 調用 - 取得設計文件的格式要求
Skill: brainstorming - 調用 - 取得實作計劃的格式要求
Skill: executing-plans
Call skills first to obtain format specifications:
- Call - Get format requirements for design documents
Skill: brainstorming - Call - Get format requirements for implementation plans
Skill: executing-plans
步驟 2:收集資訊
Step 2: Collect information
-
識別相關 commitsbash
git log --oneline --since="YYYY-MM-DD" --grep="<關鍵字>" -
閱讀變更的檔案
- 從 git diff 或 git show 了解變更內容
- 識別涉及的檔案和變更範圍
-
理解功能
- 這個功能解決什麼問題?
- 使用者體驗流程是什麼?
- 資料如何流動?
- 有哪些關鍵決策?
-
Identify relevant commitsbash
git log --oneline --since="YYYY-MM-DD" --grep="<關鍵字>" -
Read changed files
- Understand changes from git diff or git show
- Identify involved files and scope of changes
-
Understand the feature
- What problem does this feature solve?
- What is the user experience flow?
- How does data flow?
- What are the key decisions?
步驟 3:生成設計文件
Step 3: Generate design document
參照 brainstorming 技能格式,建立 :
docs/plans/YYYY-MM-DD-<topic>-design.md必要元素(來自 brainstorming):
- 概述 - 功能目的和背景
- 需求 - 明確的需求清單
- 使用者體驗流程 - ASCII 流程圖
- 資料流程 - 資料如何在系統中流動
- 資料結構變更 - 新增或修改的型別/欄位
- UI 變更 - ASCII UI 圖(如適用)
- 修改檔案清單 - 表格列出所有變更
- 實作邏輯 - 關鍵程式碼片段
- 驗收標準 - 所有項目標記為 已完成
[x]
Refer to the format of the brainstorming skill, create :
docs/plans/YYYY-MM-DD-<topic>-design.mdRequired elements (from brainstorming):
- Overview - Feature purpose and background
- Requirements - Clear list of requirements
- User experience flow - ASCII flow chart
- Data flow - How data flows in the system
- Data structure changes - New or modified types/fields
- UI changes - ASCII UI diagram (if applicable)
- List of modified files - Table listing all changes
- Implementation logic - Key code snippets
- Acceptance criteria - All items marked as completed
[x]
步驟 4:生成實作計劃
Step 4: Generate implementation plan
參照 executing-plans 技能格式,建立 :
docs/plans/YYYY-MM-DD-<topic>-plan.md必要元素(來自 executing-plans):
- 狀態標記 -
> **狀態:** ✅ 已完成 - 目標和架構 - 簡短描述
- 任務清單 - 每個任務標記 ✅,包含:
- 檔案清單
- 完成內容
- 變更摘要 - 影響檔案和風險等級 🟢
- 相關 Commits - 列出相關的 git commits
Refer to the format of the executing-plans skill, create :
docs/plans/YYYY-MM-DD-<topic>-plan.mdRequired elements (from executing-plans):
- Status tag -
> **狀態:** ✅ 已完成 - Goals and architecture - Short description
- Task list - Each task marked ✅, including:
- List of files
- Completed content
- Change summary - Affected files and risk level 🟢
- Relevant Commits - List relevant git commits
步驟 5:建立索引檔
Step 5: Create index file
建立 :
~/.claude/plans/YYYY-MM-DD-<project>-<topic>.mdmarkdown
undefinedCreate :
~/.claude/plans/YYYY-MM-DD-<project>-<topic>.mdmarkdown
undefined<project>-<topic>
<project>-<topic>
project_path: <專案路徑>
status: done
design_file: docs/plans/YYYY-MM-DD-<topic>-design.md
plan_file: docs/plans/YYYY-MM-DD-<topic>-plan.md
undefinedproject_path: <專案路徑>
status: done
design_file: docs/plans/YYYY-MM-DD-<topic>-design.md
plan_file: docs/plans/YYYY-MM-DD-<topic>-plan.md
undefined步驟 6:更新索引
Step 6: Update index
執行 更新計畫索引。
/hi-update-plans-indexRun to update the plan index.
/hi-update-plans-index步驟 7:提交文件
Step 7: Commit documents
bash
git add docs/plans/
git commit -m "docs: 補充 <功能名稱> 的設計與實作計劃文件
- 新增 <topic>-design.md(設計文件)
- 新增 <topic>-plan.md(實作計劃,已完成)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"bash
git add docs/plans/
git commit -m "docs: 補充 <功能名稱> 的設計與實作計劃文件
- 新增 <topic>-design.md(設計文件)
- 新增 <topic>-plan.md(實作計劃,已完成)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"設計文件範本
Design Document Template
參照 輸出格式:
/hi-brainstormmarkdown
undefinedRefer to the /hi-brainstorm output format:
markdown
undefined<功能名稱>設計
<功能名稱>設計
概述
概述
<簡短描述功能目的和解決的問題>
<簡短描述功能目的和解決的問題>
需求
需求
- <需求 1>
- <需求 2>
- ...
- <需求 1>
- <需求 2>
- ...
使用者體驗流程
使用者體驗流程
┌─────────────────────────────────────────────────────────┐
│ <流程步驟> │
├─────────────────────────────────────────────────────────┤
│ <UI 元素描述> │
└─────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────┐
│ <流程步驟> │
├─────────────────────────────────────────────────────────┤
│ <UI 元素描述> │
└─────────────────────────────────────────────────────────┘資料流程
資料流程
<步驟描述>
↓
┌──────────────────────────────────────────────────────┐
│ <元件/系統名稱> │
│ │
│ 1. <動作 1> │
│ 2. <動作 2> │
└──────────────────────────────────────────────────────┘<步驟描述>
↓
┌──────────────────────────────────────────────────────┐
│ <元件/系統名稱> │
│ │
│ 1. <動作 1> │
│ 2. <動作 2> │
└──────────────────────────────────────────────────────┘資料結構變更
資料結構變更
<collection/type 名稱>
<collection/type 名稱>
typescript
{
existingField: string;
newField: string; // 新增:說明
}typescript
{
existingField: string;
newField: string; // 新增:說明
}UI 變更
UI 變更
<ASCII UI 圖>
<ASCII UI 圖>
修改檔案清單
修改檔案清單
| 檔案 | 變更內容 |
|---|---|
| <變更描述> |
| 檔案 | 變更內容 |
|---|---|
| <變更描述> |
實作邏輯
實作邏輯
typescript
// 關鍵程式碼片段(說明核心邏輯)typescript
// 關鍵程式碼片段(說明核心邏輯)驗收標準
驗收標準
- <標準 1>
- <標準 2>
undefined- <標準 1>
- <標準 2>
undefined實作計劃範本
Implementation Plan Template
參照 輸出格式:
/hi-acemarkdown
undefinedRefer to the /hi-ace output format:
markdown
undefined<功能名稱> 實作計劃
<功能名稱> 實作計劃
狀態: ✅ 已完成
目標: <功能目標>
架構: <技術架構簡述>
技術棧: <使用的技術>
狀態: ✅ 已完成
目標: <功能目標>
架構: <技術架構簡述>
技術棧: <使用的技術>
任務 1:<任務名稱> ✅
任務 1:<任務名稱> ✅
檔案:
- 修改:
path/to/file.ts
完成內容:
- <完成的項目 1>
- <完成的項目 2>
檔案:
- 修改:
path/to/file.ts
完成內容:
- <完成的項目 1>
- <完成的項目 2>
任務 2:<任務名稱> ✅
任務 2:<任務名稱> ✅
...
...
變更摘要
變更摘要
影響檔案:
- - <變更描述>
file1.ts - - <變更描述>
file2.ts
整體風險: 🟢(已完成,無問題)
相關 Commits:
<commit message 1><commit message 2>
undefined影響檔案:
- - <變更描述>
file1.ts - - <變更描述>
file2.ts
整體風險: 🟢(已完成,無問題)
相關 Commits:
<commit message 1><commit message 2>
undefined記住
Remember
- 必須參照子技能 - 先調用 brainstorming 和 executing-plans 確認最新格式
- 從現有程式碼反推設計,不是編造
- 所有驗收標準標記為已完成(因為功能已實作)
- 實作計劃的任務從 git commits 推斷
- 確保文件能幫助未來的開發者理解功能
- 使用一致的格式和命名規則
- Must refer to sub-skills - Call brainstorming and executing-plans first to confirm the latest format
- Infer design from existing code, do not fabricate
- All acceptance criteria are marked as completed (since the feature has been implemented)
- Tasks in the implementation plan are inferred from git commits
- Ensure that documents can help future developers understand the feature
- Use consistent format and naming rules