From f32b62d61676e505e78b4acae9b74ecffad073ca Mon Sep 17 00:00:00 2001 From: Marcus Sanatan Date: Thu, 22 Jan 2026 16:23:42 -0400 Subject: [PATCH] docs: add LLM prompt and checklist for documentation updates Add automated documentation update workflow to ensure consistency when tools/resources change: - Add UPDATE_DOCS_PROMPT.md with copy-paste LLM prompt that: - Instructs LLM to scan Server/src/services/tools/ and resources/ for decorators - Updates manifest.json tools array, README.md tools/resources sections, README-zh.md - Enforces alphabetical ordering and formatting rules (backticks, bullets) - References check_docs_sync.py for --- .github/pull_request_template.md | 8 ++++ tools/UPDATE_DOCS_PROMPT.md | 66 ++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 tools/UPDATE_DOCS_PROMPT.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 302258d..f36df5f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -19,6 +19,14 @@ Save your change type +## Documentation Updates + +- [ ] I have added/removed/modified tools or resources +- [ ] If yes, I have updated all documentation files using: + - [ ] The LLM prompt at `tools/UPDATE_DOCS_PROMPT.md` (recommended) + - [ ] Manual updates following the guide at `tools/UPDATE_DOCS.md` + + ## Related Issues diff --git a/tools/UPDATE_DOCS_PROMPT.md b/tools/UPDATE_DOCS_PROMPT.md new file mode 100644 index 0000000..efdbe62 --- /dev/null +++ b/tools/UPDATE_DOCS_PROMPT.md @@ -0,0 +1,66 @@ +# LLM Prompt for Updating Documentation + +Copy and paste this prompt into your LLM when you need to update documentation after adding/removing/modifying MCP tools or resources. + +## Example Usage + +After adding a new tool called "manage_new_feature" and a new resource called "feature_resource", you would: +1. Copy the prompt above +2. Paste it into your LLM +3. The LLM will analyze the codebase and update all documentation files +4. Review the changes and run the check script to verify + +This ensures all documentation stays in sync across the repository. + +--- + +## Prompt + +I've just made changes to MCP tools or resources in this Unity MCP repository. Please update all documentation files to keep them in sync. + +Here's what you need to do: + +1. **Check the current tools and resources** by examining: + - `Server/src/services/tools/` - Python tool implementations (look for @mcp_for_unity_tool decorators) + - `Server/src/services/resources/` - Python resource implementations (look for @mcp_for_unity_resource decorators) + +2. **Update these files**: + + a) **manifest.json** (root directory) + - Update the "tools" array (lines 27-57) + - Each tool needs: {"name": "tool_name", "description": "Brief description"} + - Keep tools in alphabetical order + - Note: Resources are not listed in manifest.json, only tools + + b) **README.md** (root directory) + - Update "Available Tools" section (around line 78-79) + - Format: `tool1` • `tool2` • `tool3` + - Keep the same order as manifest.json + + c) **README.md** - Resources section + - Update "Available Resources" section (around line 81-82) + - Format: `resource1` • `resource2` • `resource3` + - Resources come from Server/src/services/resources/ files + - Keep resources in alphabetical order + + d) **docs/i18n/README-zh.md** + - Find and update the "可用工具" (Available Tools) section + - Find and update the "可用资源" (Available Resources) section + - Keep tool/resource names in English, but you can translate descriptions if helpful + +3. **Important formatting rules**: + - Use backticks around tool/resource names + - Separate items with • (bullet point) + - Keep lists on single lines when possible + - Maintain alphabetical ordering + - Tools and resources are listed separately in documentation + +4. **After updating**, run this check to verify: + ```bash + python3 tools/check_docs_sync.py + ``` + It should show "All documentation is synchronized!" + +Please show me the exact changes you're making to each file, and explain any discrepancies you find. + +---