update-docs
Update project documentation to reflect code changes. Trigger after implementing features, fixing bugs, or modifying architecture. Scans git diff, maps changes to docs, and updates them.
- License 许可
- MIT
- 最近更新
- 2026-09-08
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- update-docs
- description
- Update project documentation to reflect code changes. Trigger after implementing features, fixing bugs, or modifying architecture. Scans git diff, maps changes to docs, and updates them.
03 SKILL.md 正文
Update Documentation
Keep documentation in sync with code changes. Run this after any significant code modification.
Workflow
Step 1: Identify Changes
Run git diff --name-only HEAD and git diff --stat to find what changed. If there are no uncommitted changes, compare against the last commit: git diff --name-only HEAD~1.
Group changed files by area:
| Changed path | Doc area to check |
|---|---|
src/agent/nodes/*.py |
docs/architecture/, docs/development/, AGENTS.md |
src/agent/routing/*.py |
docs/development/EXTENDING_AGENT.md, docs/architecture/overview.md |
src/tools/*.py |
docs/features/TOOLS.md, AGENTS.md task routing table |
src/api/routes/*.py |
docs/API_REFERENCE.md, docs/development/CHAT_PROTOCOL.md |
src/api/ws/*.py |
docs/development/CHAT_PROTOCOL.md |
src/memory/*.py |
docs/features/MEMORY.md |
src/config/*.py or defaults.yaml |
docs/architecture/overview.md, relevant feature docs |
src/pdf/*.py |
docs/guides/dev-startup.md |
frontend-v2/src/**/*.tsx |
docs/architecture/overview.md, relevant feature docs |
docker-compose.yml |
docs/guides/dev-startup.md, docs/architecture/overview.md |
scripts/*.sh or scripts/*.py |
docs/standards/EVALUATION.md, docs/guides/dev-startup.md |
.agents/skills/*/SKILL.md |
AGENTS.md skills section |
src/agent/hitl/*.py |
docs/HITL.md |
src/memory/semantic_cache.py |
docs/features/SEMANTIC_CACHE.md |
src/agent/core/graph.py |
docs/architecture/POSTGRES_MEMORY_LIFECYCLE.md |
Step 2: Find Referencing Docs
For each changed file, search the docs/ directory and AGENTS.md for references to that file path. Use grep:
grep -rl "path/to/changed/file" docs/ AGENTS.md
Also check if the changed module is mentioned in:
docs/INDEX.md(machine manifest)docs/README.mdordocs/INDEX.md(navigation)- Any
CHANGELOG.mdindocs/changes/
Step 3: Read and Update Each Doc
For each doc that references changed code:
- Read the doc to understand its structure and conventions
- Verify accuracy — does the doc still describe the code correctly?
- Update stale content:
- Function signatures that changed
- File paths that moved
- New parameters or config options
- Removed features or deprecated code
- New tools, nodes, or modules
- Update timestamps — find the
last_updated:field in frontmatter orLast updatedline and set it to today's date (YYYY-MM-DD) - Preserve style — match the existing doc's formatting, heading levels, and conventions
Step 4: Update AGENTS.md Task Routing Table
If the change adds a new module, tool, or feature area:
- Check if a row already exists in the "Task routing" table in
AGENTS.md - If not, add a row following the existing format:
| I want to… | Read | Edit | - If the row exists but the "Edit" column is stale, update it
Step 5: Update docs/INDEX.md
If any doc's last_updated changed:
- Read
docs/INDEX.md - Find the matching entry in the YAML manifest
- Update its
last_updatedfield - Bump the
manifest.versionif entries were added/removed - Update
manifest.generatedtimestamp
Step 6: Create Changelog Entry (if significant)
If the change is a user-facing feature or a breaking change:
- Create
docs/changes/<feature-name>/CHANGELOG.mdfollowing the existing pattern - Use format:
## <date> — <summary>with sections for What, Why, Files
Rules
- Never delete docs — only update or add. If a doc is fully obsolete, mark it with
status: deprecatedin frontmatter. - Never add comments to code files — only update
.mdfiles. - Preserve frontmatter — keep all YAML frontmatter fields, only update
last_updated. - Use today's date for all timestamps, format:
YYYY-MM-DD. - Be surgical — only modify the lines that are stale. Don't rewrite entire sections.
- Check before editing — always read the file first to understand its structure.
Quick Reference: Common Updates
New tool added
docs/features/TOOLS.md— add to appropriate toolbox sectionAGENTS.md— update task routing if it maps to a new "I want to…" rowsrc/agent/nodes/security_proxy.py— check if it needs to be inSENSITIVE_TOOLSorSAFE_TOOLS
New config option in defaults.yaml
- Find the feature doc that covers this config area
- Add the option to the relevant config table or section
- Document the env var override if applicable
New API endpoint
docs/API_REFERENCE.mdor create if neededdocs/development/CHAT_PROTOCOL.mdif it's a WebSocket eventAGENTS.mdif it changes task routing
New node in agent graph
docs/architecture/overview.md— add to module tabledocs/development/EXTENDING_AGENT.mdif it changes routingAGENTS.mdtask routing table
Security-related change
docs/HITL.mdif it affects approval flowdocs/architecture/CLOUD-LLM-ARCHITECTURE.mdif it affects cloud calls- Any feature doc that references the changed security mechanism
04 同仓库更多 Skills
weather_lookup
Procedural skill synthesized from user workflow
reprompt_on_no_tools
Procedural skill synthesized from user workflow
prioritize_official_gov_sources_over_aggregators
Procedural skill synthesized from user workflow
matplotlib_horizontal_bar
Procedural skill synthesized from user workflow
live-data-lookup
Procedural skill synthesized from user workflow
html_comparison_chart
Offline Chart.js HTML bar/line/pie charts for pre-known comparison data