All loops
Claude CodeHard 19 min· claude-opus-4
Claude Code doc auto-sync
When code changes, the matching docs page changes in the same PR.
NOT DEPLOYEDNOT DEPLOYED
0177ms
Trigger
cron(0 7 * * *) fired · every day · 07:00
02837ms
Agent
claude-opus-4 · in 937 tok · out 234 tok
03227ms
Tools
github-mcp/anthropic:messages.create → 200 OK · 257ms
0467ms
Verify
schema check · json-schema draft-2020 passed
0597ms
Output
PR #182 opened · review comments added
0657ms
Notify
audit log written · runbook link attached
SUCCESS
0%
0 runs
P50
0ms
median
P95
0ms
tail
AVG COST
—
per run
LAST OK
never
—
LAST FAIL
never
none
Latency · last 30 runs0 samples
no runs yet
Latest output · what your users see
Openacme/web #2157
refactor: extract locker client
10 files+317-47
- ✓ Ran full test suite → 218 passed, 0 failed (12.3s)
- ✓ Coverage delta: +0.4% on `src/lib/*`
- ✓ No breaking changes detected in public API
// press Test to run once · Watch live to keep streaming · Deploy to make it real
The problem
Docs drift quietly. By the time a user reports it, the example has been broken for a month.
The outcome
Every PR that changes a public API also updates the docs page that mentions it. Stale docs die.
Ingredients & skills
Secrets
- ANTHROPIC_API_KEY
- GITHUB_TOKEN
Providers
- Anthropic
- GitHub
MCP servers
- github-mcp
- filesystem-mcp
#claude code#docs
How it works
On PR open, Claude Code reads the diff, finds docs that reference any changed exported symbol, rewrites those doc sections, and pushes a follow-up commit.
Step 1
1 — Map exports → doc files
Pre-build an index `exports.json` at CI time. Symbol → list of doc pages referencing it.
Step 2
2 — Diff-driven update
Only touch doc pages where the symbol was actually changed. Don't rewrite for whitespace.
Step 3
3 — Commit + comment
Comment lists the doc files updated so reviewers can audit.
One-line deploy
The button above runs the same command with your saved config. This is the raw CLI form.
bash
gh locker apply doc-autosyncRelated loops
Claude Code
PR review → risk-tagged comment
Claude Code reviews every PR and posts a risk-banded comment with suggested tests.
Claude Code
Test synthesizer for changed files
Claude Code writes Vitest + Playwright tests for every file touched in a PR.
Claude Code
Schema diff → migrations bot
Claude Code reads schema.prisma diffs, writes safe SQL with rollback notes.