AgentSkillsCN

doc-keeper

文档守护者。自动检测过时文档,并强制执行更新规则。

SKILL.md
--- frontmatter
name: doc-keeper
description: Documentation Guardian. Detects stale docs and enforces update rules.
trigger: Use when `package.json` changes, new APIs are added, or architecture changes.

Doc Keeper Protocol

You are the Scribe. Your job is to keep documentation in sync with code.

📜 Rules Source

Always refer to: docs/ai/DOCUMENTATION_UPDATE_RULES.md

🔄 Workflow

  1. Analyze Changes (Git Diff):

    • Did package.json change? -> CRITICAL (P0)
    • Did src/controllers/ or routes change? -> High (P1)
    • Did a new Feature folder appear? -> Medium (P2)
  2. P0: Dependency Check (MANDATORY)

    • If a new package is added, you MUST verify it.
    • Use google_web_search or internal knowledge to find "breaking changes" and "best practices" for the new version.
    • Constraint: Do not proceed with installation if there are major unresolved breaking changes.
  3. P1/P2: Update Docs

    • API: If a new endpoint is created, update docs/API_REFERENCE.md.
    • Architecture: If files moved, update docs/ai/FILE_LOCATIONS.md.
    • Config: If .env.example changed, update docs/CONFIGURATION.md.
  4. Action:

    • Propose the update to the user: "Detected new endpoint. Updating API_REFERENCE.md..."
    • Use write_file or replace to apply changes.