docs-keeper

Release CI License

Documentation that can’t drift from the code.

Docs are written once and left behind. The code moves on; the docs don’t. By the time someone reads one, it may already be wrong — and no one can tell which line went stale.

docs-keeper makes docs a maintained system.


Why docs-keeper

Install

docs-keeper installs per repository, not per user — so the whole team (and CI) picks it up from one committed config. Run these in the repo you want to steward:

claude plugin marketplace add kostiantyn-matsebora/docs-keeper
claude plugin install docs-keeper@docs-keeper --scope project

--scope project writes the enablement into the repo’s .claude/settings.json — commit that file and every collaborator gets docs-keeper automatically. A plain /plugin install inside a session enables it for you only; use project scope so it travels with the repo.

The repo is publicmarketplace add works for anyone; no access request needed.

Installing registers the agent, the /docs-keeper:* commands, and the commit/session hooks. It doesn’t touch your repo yet.

Set up (once)

Run once in the repo you want to steward:

/docs-keeper:setup            # whole repo
/docs-keeper:setup docs/      # or scope to specific doc roots

setup reaches a green baseline: it creates .docs-keeper/config.json, finds or creates your host prompt (CLAUDE.md), builds the index.md indexes, seeds the “Sources of truth” section, and verifies there’s no drift. It’s idempotent — re-running on a green repo changes nothing.

Everyday use

After setup, maintenance is automatic at commit time:

  1. Edit docs (or code + docs) and run git commit.
  2. In strict mode the drift gate blocks the commit and prints the exact fix queue.
  3. The agent runs the queued maintenance (incremental — only what changed).
  4. Re-stage and re-commit — the gate is clean and the commit lands.

Set warn mode if you’d rather be advised without blocking. The agent never commits for you — you own the commit.

Commands

Command Use it when
/docs-keeper:setup [roots...] First run — bootstrap config + indexes + registry
/docs-keeper:index <dir> A directory’s docs changed, or you want to (re)build / split an index
/docs-keeper:revise [doc] [-- brief] Tighten an existing doc or author a new one
/docs-keeper:registry-sync The “Sources of truth” registry drifted
/docs-keeper:sweep [scope] Consistency check — orphans, broken links, legacy READMEs
/docs-keeper:capture Record a doc-worthy decision for later
/docs-keeper:config View or change settings

Configuration

Settings live in .docs-keeper/config.json — a small, committed, per-repo file:

{
  "enforcement": "warn",
  "paths": ["**/*.md"]
}

Edit it directly, or use the command:

/docs-keeper:config                                 # show current settings
/docs-keeper:config enforcement block               # switch enforcement
/docs-keeper:config paths docs/**/*.md adr/**/*.md  # replace the watch globs

Per-machine runtime state (session / capture files) lives under .docs-keeper/sessions/ and stays gitignored — only config.json is committed.

Use it in CI (no plugin needed)

The engine ships a host-neutral drift gate (stdlib-only Python 3.11+) — no Claude Code, no plugin. Check docs-keeper out alongside your repo and point the gate at your repo root:

# .github/workflows/docs-drift.yml — in YOUR repo
- uses: actions/checkout@v4                        # your repo, into the workspace
- name: Fetch the docs-keeper engine
  run: git clone --depth 1 https://github.com/kostiantyn-matsebora/docs-keeper /tmp/docs-keeper
- name: Drift gate
  run: python3 /tmp/docs-keeper/core/engine/cli.py --drift-only --repo-root . --enforce block

--repo-root is the repo to check (. = your checkout); --enforce warn|block mirrors your .docs-keeper/config.json. Exit 0 (clean) or 2 (drift; message on stderr).

Alternatives & comparison

docs-keeper occupies a niche no single tool covers: agent-native, in-repo, structural documentation stewardship. Adjacent tools each cover one slice; none unify INDEX + REVISE + REGISTER + DRIFT GATE + CAPTURE + SWEEP.

Competitor Overlaps docs-keeper does better
Swimm Drift gate Gates inside coding-agent hooks (not just PR-check time); watches all Markdown + indexes + registry, not only code-coupled snippets; no full-history requirement.
Doc Detective Consistency sweep Static index/registry/link analysis with a fix queue, vs runtime tests against a live product.
lychee / markdown-link-check Broken links Adds orphans, ambiguous resolutions, registry sync, and indexing — not links alone.
Mintlify llms.txt Indexing Recursive per-directory index.md with ancestor walk-up, vs one flat hosted index (100K-char cap).
Docusaurus / MkDocs / Sphinx / Antora Nav + link check Automatic code-to-docs drift detection and walk-up indexing, vs manual nav and release-snapshot versioning.
adr-log / Log4brains / Backstage Registry Whole-repo sources-of-truth sync + drift gating, not ADR-scoped manual nav edits.

Where docs-keeper wins:

Where established tools still lead: hosting, versioning, ecosystem breadth, and non-Markdown/API docs.

Troubleshooting


Questions or issues? See the repository.