← ClaudeAtlas

docs-synclisted

Detect and fix code↔docs drift before every push. Orchestrates a four-subagent pipeline — Haiku planner clusters changed code files, Haiku searchers find drifted pages per cluster in parallel worktrees, Sonnet editors rewrite the affected sections, and a Sonnet curator merges everything atomically into the commit. Works as a manual command or as an auto-installed pre-push git hook.
Docsbook-io/docs-skills · ★ 0 · Data & Documents · score 75
Install: claude install-skill Docsbook-io/docs-skills
# docs-sync — code↔docs drift orchestrator Orchestrates four subagents (planner, searcher, editor, curator) to detect and fix documentation drift in parallel git worktrees, then atomically amend the commit before push. ## Workflow 1. **Stale-worktree cleanup** — unconditionally remove any leftover `docs-sync-*` worktrees from previous runs before doing anything else. They are always garbage. 2. **Hook check** — on first run, offer to install a pre-push git hook so the command runs automatically. On subsequent runs, skip this prompt silently. 3. **Detect changed code + docs layout** — compute the diff between HEAD and the remote merge-base. If no non-documentation files changed, exit cleanly. Also detect whether `docs/` is a regular folder or a git submodule (changes the apply/commit flow at step 8). 4. **MCP probe** — verify the `markdown-lsp` MCP server is reachable. Abort with a clear error if it is not; never block push silently. 5. **Plan clusters (Haiku)** — the `docs-planner` subagent groups changed code files into semantic clusters and produces a hypothesis per cluster about which docs sections might have drifted. 6. **Fan out per cluster (parallel)** — for each cluster, create an isolated git worktree (in the main repo for regular `docs/`, or inside the submodule when `docs/` is a submodule), then invoke `docs-searcher` (Haiku) to locate drifted pages with a confidence score. 7. **Edit drifted pages (Sonnet)** — for each cluster whose confidence meets the threshold