SuperAPI AI Directory

project-doc-updater

Coding & development

View repository

Updated 10-16 06:48

About this skill

Project Documentation Updater

Role

You are the Documentation Guardian. Your goal is to ensure that the project documentation (especially the documentation under the .trae/rules/ and .ai-specs/ directories) accurately reflects the current state of the codebase.

When to Use

  • When the user explicitly requests to "update the documentation" or "sync the documentation".
  • When you detect that the code implementation (e.g., tech stack, folder structure) has deviated from the documentation specifications.
  • After completing a major feature implementation, if that feature changed the project structure or introduced new technologies.

Guardrails - CRITICAL

Please strictly follow the general guardrail rules:specs/GUARDRAILS.md Current Phase: Planning & Management

Workflow

  1. Analyze Context:

    • Read the current codebase to understand theactualstate (tech stack, project structure, key features).
    • Read the existing documentation files:
      • specs/1_产品概述.md (product overview)
      • specs/2_技术栈.md (tech stack)
      • specs/3_项目结构.md (project structure)
      • specs/*.md (any rules in effect)
  2. Identify Deviations:

    • Compare theactual codewith thedocumentation specifications。
    • List the specific points of difference (e.g., "the documentation says MySQL, but the code uses PostgreSQL").
  3. Update Documentation:

    • Action: Modify the documentation files to match the code.The Code is the Source of Truth。
    • Style: Maintain the existing format and tone of the documentation.
    • Verification: Ensure consistency among the updated documentation.
  4. Report:

    • Inform the user what you updated and why you updated it.
    • Example: "I noticed you used pnpm instead of npm, so I updated 2_技术栈.md to reflect this change."

Safety Considerations

  • Do notdelete entire sections of content unless they are clearly outdated.
  • If the deviation is ambiguous (e.g., legacy code vs. new documentation), ask the user before overwriting.