SuperAPI AI Directory

git-doc-updater

Coding & development

View repository

Updated 10-16 08:55

About this skill

Git Documentation Auto-Update Skill

Description

Before executing a Git commit, automatically check and update the project's key documentation to ensure the documentation stays in sync with the code.

Trigger Conditions

Enable this skill when the user requests the following operations:

  • Git commit
  • Git push
  • Commit code
  • Prepare for release

Automatically Updated Documentation

1. README.md

  • Update project description (if changed)
  • Update installation/usage instructions
  • Update feature list
  • Update dependencies

2. CHANGELOG.md

  • Add new entries based on this change
  • Follow the Keep a Changelog format
  • Categorize as: Added, Changed, Deprecated, Removed, Fixed, Security
  • Include date and version number (if applicable)

3. ROADMAP.md

  • Mark completed feature items
  • Update the status of in-progress items
  • Adjust priorities (if needed)

4. ARCHITECTURE.md (ARCH)

  • Update architecture diagrams and descriptions (if there are structural changes)
  • Update component relationships
  • Update technical decision records

5. Memory Bank Documentation

Update the relevant documents under the memory-bank/ directory:

  • activeContext.md - Current work focus
  • progress.md - Progress tracking (Done/Doing/Next)
  • decisionLog.md - Record important decisions
  • productContext.md - Project context (if changed)

Execution Flow

1. 分析本次程式碼變更內容
2. 識別哪些文檔需要更新
3. 依序更新各文檔
4. 顯示更新摘要供用戶確認
5. 將文檔變更加入 Git staging

Update Principles

  • Minimal changes: Only update content related to this commit
  • Maintain consistency: Preserve the existing documentation format and style
  • Automatic summary: Infer the change summary from the commit content
  • Version control: CHANGELOG uses semantic versioning

Example Output

When the user says "準備 commit":

📝 文檔更新檢查:

✅ README.md - 無需更新
✅ CHANGELOG.md - 已添加 v1.2.0 條目
✅ ROADMAP.md - 已標記「用戶認證」為完成
⏭️ ARCHITECTURE.md - 無結構性變更,跳過
✅ memory-bank/progress.md - 已更新進度

準備提交以下文件變更...

Custom Options

The user can specify via the prompt:

  • --skip-readme Skip README updates
  • --skip-changelog Skip CHANGELOG updates
  • --skip-memory Skip Memory Bank updates
  • --dry-run Only show what will be updated, without actually modifying it