Skip to main content
Independent community resource — not affiliated with the official OpenClaw project. Learn more
Part 5 of 5OpenClaw for Developers

Docs & Changelog Automation with OpenClaw

Use cases at a glance

Documentation is the part of the codebase that falls behind fastest. Code moves, APIs change, README files go stale — and no one has the time to keep every doc in sync by hand. These five agents automate the most time-consuming parts: generating changelogs, flagging stale docs, detecting README drift, summarising API changes, and producing weekly engineering digests.

📝 Changelog Generator

Auto-generate a formatted CHANGELOG.md section from merged PRs and commits since the last release tag. Groups by type: features, fixes, maintenance.

⚠️ Stale Docs Detector

Compare last-modified dates of doc files against the code they document. Flag docs where source code changed more recently than the docs.

📋 README Sync Checker

Detect when key files like package.json or requirements.txt change and flag README sections that likely need updating.

🔀 API Docs Diff

Compare your OpenAPI/Swagger spec between releases. Summarise added endpoints, changed parameters, and removed routes for release notes.

📊 Weekly Engineering Digest

Combine commit activity, PRs merged, issues closed, and open doc debt into a single Friday afternoon team digest sent to Telegram or Slack.

What it can and cannot do

✅ Can do

  • Generate changelog entries from commit messages and PR titles
  • Group changelog entries by conventional commit type
  • Flag docs whose source files were modified more recently
  • Detect version number drift between README and package files
  • Compare OpenAPI spec files between two git refs
  • Output a diff summary as a structured Markdown report
  • Send weekly engineering digests via Telegram or Slack
  • Link changelog entries to their PRs and issues

❌ Cannot do

  • Understand the semantic meaning of doc content
  • Rewrite documentation automatically (read-only by default)
  • Detect that a doc is factually wrong — only that it may be stale
  • Understand diagrams, images, or embedded media in docs
  • Push to your repo without a write-enabled token and explicit write step
  • Resolve ambiguous conventional commit messages into clear categories

Changelog generator

This is the most-used agent in the docs series. It reads all merged PRs and commits since your last release tag, categorises them by conventional commit prefix (or PR label, if you don't use conventional commits), and outputs a ready-to-paste CHANGELOG.md section.

Conventional commit type mapping

By default OpenClaw maps commit prefixes to these changelog sections:

Commit prefix Changelog section Example
feat: / feature:✨ Featuresfeat: add dark mode toggle
fix:🐛 Bug Fixesfix: correct pagination offset
perf:⚡ Performanceperf: cache user lookup results
docs:📝 Documentationdocs: update API reference
chore: / build: / ci:🔧 Maintenancechore: bump Node to v22
refactor:♻️ Refactoringrefactor: extract auth middleware
security: / sec:🔒 Securitysecurity: patch XSS in comment field
(no prefix)🔄 Other ChangesGrouped at the bottom

Add this to your AGENTS.md:

agents: changelog-generator: description: "Generate a CHANGELOG.md section from commits and PRs since the last release tag" tools: - github-api config: owner: "${GITHUB_OWNER}" repo: "${GITHUB_REPO}" token: "${GITHUB_TOKEN}" since_tag: "auto" # use the most recent semver tag; or specify e.g. "v1.4.0" include_prs: true # merge PR titles as the primary entry text fallback_to_commits: true # use commit messages if no PR found group_by: "conventional" # "conventional" | "label" | "none" label_map: # used when group_by is "label" enhancement: "✨ Features" bug: "🐛 Bug Fixes" documentation: "📝 Documentation" dependencies: "🔧 Maintenance" exclude_labels: - "skip-changelog" - "internal" link_prs: true # include (#123) links next to each entry output: format: markdown include_date: true include_stats: true # adds a line like "12 PRs merged, 3 contributors"

Trigger it manually or on tag push

You can run the changelog agent on demand before each release, or set it to trigger automatically when a new version tag is pushed. For on-demand runs, add a HEARTBEAT that checks for new tags since the last run:

heartbeats: release-tag-watcher: schedule: "0 9 * * *" # check daily at 9am agent: changelog-generator trigger: condition: "new_tag_since_last_run" tag_pattern: "v*" # only trigger on semver tags
⚠️ Not using conventional commits? Set group_by: label and configure your label_map to match your GitHub label names. Entries without a matching label will fall into "Other Changes". You can also set group_by: none to get a flat chronological list.

Stale documentation detector

The stale docs agent compares the git log timestamps of your documentation files against the source files they describe. When a source file is modified more recently than its corresponding doc file, that doc is flagged as potentially stale.

It uses a path_map to link source directories to doc directories. Configure it to match your repo structure:

agents: stale-docs-detector: description: "Flag documentation files that may be out of date with their source code" tools: - github-api - file-system # reads local repo via configured workspace path config: repo_path: "${REPO_PATH}" path_map: - source: "src/api/" docs: "docs/api/" - source: "src/components/" docs: "docs/components/" - source: "src/utils/" docs: "docs/utils/" threshold_days: 14 # flag docs where source changed 14+ days more recently ignore_patterns: - "docs/archive/**" - "**/*.draft.md" output: format: markdown group_by: staleness # sort by how far behind each doc is
💡 Path map tip: If your repo doesn't have a 1-to-1 folder structure between source and docs, you can define file-level mappings: source: "src/auth/session.ts"docs: "docs/authentication.md". Mix folder-level and file-level entries in the same path_map.

README sync checker

READMEs drift in three common ways: a version number gets bumped in package.json but not the README, a new required environment variable appears in .env.example but isn't documented, or the installation commands change. This agent watches for those mismatches.

agents: readme-sync-checker: description: "Detect README sections that may need updating after key file changes" tools: - github-api config: owner: "${GITHUB_OWNER}" repo: "${GITHUB_REPO}" token: "${GITHUB_TOKEN}" watch_files: - path: "package.json" fields: ["version", "engines.node", "scripts"] readme_sections: ["Installation", "Requirements", "Getting Started"] - path: "requirements.txt" readme_sections: ["Installation", "Requirements"] - path: ".env.example" readme_sections: ["Configuration", "Environment Variables"] - path: "docker-compose.yml" readme_sections: ["Docker", "Running Locally"] lookback_days: 30 # check for changes in the last 30 days output: format: markdown

The agent outputs a report like: "package.json version changed from 2.1.0 → 2.2.0 in the last 30 days. README sections 'Installation' and 'Getting Started' were not modified in the same period and may be out of date." It does not rewrite the README — it gives you the context to update it yourself quickly.

API documentation diff

If your project maintains an OpenAPI or Swagger spec, this agent compares the spec between two git refs (typically the last release tag and HEAD) and summarises what changed: new endpoints, removed routes, changed parameters, updated response schemas. Use it as a pre-release checklist item.

agents: api-docs-diff: description: "Summarise OpenAPI spec changes between the last release tag and HEAD" tools: - github-api config: owner: "${GITHUB_OWNER}" repo: "${GITHUB_REPO}" token: "${GITHUB_TOKEN}" spec_path: "openapi.yaml" # path to your spec file in the repo base_ref: "auto" # use latest semver tag as base; or specify "v1.3.0" head_ref: "HEAD" change_categories: - added_endpoints - removed_endpoints - changed_parameters - changed_response_schemas - changed_auth_requirements breaking_change_detection: true # flag removed endpoints and changed required params output: format: markdown highlight_breaking: true
🚨 Breaking change detection: When breaking_change_detection is true, the agent flags removed endpoints and newly required parameters as breaking changes and surfaces them at the top of the report. This is a heuristic — review the output before publishing release notes.

Non-OpenAPI projects

If you don't use an OpenAPI spec, you can still get a useful diff by pointing the agent at any structured file that tracks your API surface — a GraphQL schema, a TypeScript type file, or even a plain Markdown API reference. Set spec_format: raw and OpenClaw will output a unified diff summary instead of a structured API change report.

Weekly engineering digest

This agent pulls together everything from the developer series into one Friday afternoon report: merged PRs, closed issues, new CVEs from the dependency agent, any stale docs flagged, and CI/CD health from the week. Output it to Telegram, Slack, or email.

agents: weekly-engineering-digest: description: "Weekly rollup of code activity, dependency health, and doc debt" tools: - github-api config: owner: "${GITHUB_OWNER}" repos: - "${GITHUB_REPO}" token: "${GITHUB_TOKEN}" lookback_days: 7 sections: - prs_merged - issues_closed - new_contributors - top_files_changed - open_prs_aging # PRs open longer than 5 days - stale_docs_count # number of docs flagged stale this week - dependency_alerts # new CVEs or major updates flagged - cicd_health # pass/fail ratio for the week output: format: markdown delivery: channel: telegram # or "slack" — configure in secrets.env chat_id: "${TELEGRAM_CHAT_ID}"
✅ Good default schedule: Run this at 0 16 * * 5 — Fridays at 4pm local time. Your team gets the digest before the weekend without it getting buried in Monday's inbox.

HEARTBEAT templates

Copy these into your AGENTS.md under the heartbeats key:

heartbeats: # Run changelog generator when a new version tag is pushed release-changelog: schedule: "0 9 * * *" agent: changelog-generator trigger: condition: new_tag_since_last_run tag_pattern: "v[0-9]*" # Check for stale docs every Monday morning stale-docs-check: schedule: "0 8 * * 1" agent: stale-docs-detector # README drift check — runs on the first of each month readme-sync: schedule: "0 10 1 * *" agent: readme-sync-checker # API diff — run before releases (on-demand, no schedule) api-diff-on-demand: agent: api-docs-diff # Weekly engineering digest — Fridays at 4pm weekly-digest: schedule: "0 16 * * 5" agent: weekly-engineering-digest

Sample changelog output

Here is an example of what the changelog generator produces for a typical two-week sprint:

## [2.3.0] — 2026-03-26 _12 PRs merged · 4 contributors · since v2.2.1_ ### ✨ Features - Add dark mode toggle to user settings (#218) — @jsanchez - Support bulk CSV import for product catalog (#221) — @mlee - Add webhook retry logic with exponential backoff (#224) — @priya ### 🐛 Bug Fixes - Fix pagination offset returning duplicate results on page 3 (#219) — @jsanchez - Correct currency formatting for EUR locale (#222) — @mlee - Prevent double-submit on checkout form (#225) — @kwilson ### ⚡ Performance - Cache user permission lookups for 5 minutes (#223) — @priya ### 📝 Documentation - Update API reference with new webhook payload fields (#220) — @kwilson ### 🔧 Maintenance - Bump Node.js requirement from v20 to v22 (#216) — @priya - Update eslint config to flat config format (#217) — @mlee - Remove deprecated polyfills for IE11 (#226) — @jsanchez

FAQ

Can OpenClaw write changelogs automatically?

Yes — but it outputs the generated content as a report for you to review. It does not push to your repo by default. To automate the commit, you'd need a write-enabled token and a write step in your config. We recommend the review-first workflow to avoid mistakes in public-facing docs.

Does my project need to use conventional commits?

No. Conventional commits produce the cleanest grouped changelogs, but you can use group_by: label with GitHub PR labels, or group_by: none for a flat list. Any commit history works.

How does stale documentation detection work?

It compares git log timestamps for doc files against the source files they document. If source code was modified more recently than its corresponding doc, the doc is flagged. It uses your path_map config to connect source paths to doc paths — it cannot infer links between files with very different names.

Can OpenClaw update README files automatically?

It can generate a proposed diff — for example, flagging that the Node.js version in the README doesn't match package.json. Automatically committing changes requires a write-enabled token and explicit write step. Review the diff manually first.