Guides you through updating OpenClaw documentation based on code changes on the active branch. Designed for maintainers reviewing PRs for documentation completeness.
git diff main...HEAD --stat to see what files changedbash
# See all changed files on this branch
git diff main...HEAD --stat
# See changes in specific areas
git diff main...HEAD -- skills/
git diff main...HEAD -- src/api/
Look for changes in these areas:
Source PathLikely Doc Impactskills/Skill documentationsrc/api/API reference documentationsrc/config/Configuration guidesexamples/Tutorial and example guidessrc/core/Core architecture documentation
Use the code-to-docs mapping in references/CODE-TO-DOCS-MAPPING.md to find corresponding documentation files.
Example mappings:
skills/browser-hosting/ → docs/skills/browser-hosting.mdsrc/api/browser.ts → docs/api/browser.mdexamples/basic-agent/ → docs/guides/basic-agent.mdBefore making changes, read the existing doc to understand:
Common updates include:
For each change:
Check documentation for common issues:
title, description)Use this when adding documentation for entirely new features.
Feature TypeDoc LocationTemplateNew skilldocs/skills/Skill ReferenceNew API functiondocs/api/API ReferenceNew config optiondocs/config/Config ReferenceNew concept/guidedocs/guides/GuideCore architecturedocs/architecture/Architecture Guide
my-new-feature.md05-my-new-feature.mdAPI Reference Template: See assets/api-reference-template.md
Guide Template: See assets/guide-template.md
Update frontmatter with related documentation:
yaml
related:
title: Next Steps
description: Learn more about related features.
links:
- api/browser
- guides/browser-automation
See references/DOC-CONVENTIONS.md for complete formatting rules.
Frontmatter (required):
yaml
---
title: Page Title (2-3 words)
description: One or two sentences describing the page.
---
Code blocks:
python
# Python example
code_here()
javascript
// JavaScript example
code_here();
Notes:
markdown
> **Good to know**: Single line note.
> **Good to know**:
>
> - Multi-line note point 1
> - Multi-line note point 2
Before committing documentation changes:
title and descriptionreferences/DOC-CONVENTIONS.md - Complete frontmatter and formatting rulesreferences/CODE-TO-DOCS-MAPPING.md - Source code to documentation mappingassets/api-reference-template.md - API reference templateassets/guide-template.md - Guide template