agentleFS
lifekit-hqlifekit-hq/devclaw/.claude/skills/docs-audit/SKILL.md

docs-audit

Skill1 starsChanged 23 days agoMITView on GitHub

Audit devclaw's documentation for drift against the code and normalize doc structure. Verifies every doc in docs/INDEX.md (plus README.md and CLAUDE.md) against the actual code, fixes or flags stale claims, updates currency tags, and converges all .md files toward one house format. Use whenever Denys asks to audit/check/refresh the docs, asks "are the docs up to date", says a doc looks wrong or stale, wants docs normalized/restructured, or after a tranche of PRs lands and the docs haven't been swept since. Also the tool for triaging anything INDEX.md already marks STALE.

15 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use docs-planner, docs-reviewer and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • strands-agentsSkill

    docs-planner

    Find the gaps in the Box documentation and produce a prioritized backlog for docs/user/ and docs/design/. Use when planning documentation work, after a feature or a binary ships without a page, for a periodic health check of the docs, or when asked "what docs need writing", "plan the docs work", "prioritize the docs backlog", or "what should we document next".

    Also in 3 projects that use this

  • strands-agentsSkill

    docs-reviewer

    Review Box drafts in docs/user/ or docs/design/, and wording-only rewrites in docs/dev/. Use after docs-writer, before a docs pull request, or for a requested doc review. Check style and preservation of meaning, then give a Ship it, Tighten, or Rethink verdict. Read-only.

    Also in 3 projects that use this

  • VercelSkill

    docs-diagrams

    Draw diagrams for the Next.js docs in the style of the ones already published there: the light/dark PNGs an mdx references with `<Image srcLight="/docs/light/<name>.png" srcDark="/docs/dark/<name>.png">`. Use when a guide or API reference needs a new diagram or an existing one needs a change. Hand-written SVG from a primitives library, rendered by headless Chrome at 2x. No AI image generation.

    Also in 3 projects that use this

  • GoogleSkill

    docs-writer

    Also in 3 projects that use this

  • MicrosoftSkill

    writing-for-agents

    Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

    Also in 3 projects that use this

  • GoogleSkill

    domain-modeling

    Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read docs/INDEX.md, then find docs -name '*.md'.

    line 24
  2. Very specific:

    Update every touched row's currency tag in docs/INDEX.md.

    line 69
  3. Very specific:

    Check DOC_MAP in .claude/hooks/docs-reminder.py: every mapped doc still exists, every code area that has a doc is mapped, new subsystems …

    line 84

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

docs-audit — keep docs/ honest, uniform, and navigable

The repo's contract is "a stale doc that looks current is worse than no doc." This audit makes that contract real: verify claims against code, fix or flag, tag currency, normalize format. The code wins — never mark a doc current because it reads well; only because its checkable claims checked out.

Scope

docs/**/*.md + README.md + CLAUDE.md + the path→doc map in .claude/hooks/docs-reminder.py (DOC_MAP). Explicitly out of scope: .agent/skills/ (devclaw's worker layer — product, not harness) and generated views (STATUS.md/log.md/deliveries.md — projections, never hand-edited).

Procedure

1. Inventory against INDEX

Read docs/INDEX.md, then find docs -name '*.md'. Every file needs a row; every row needs a file. An unlisted doc is invisible (nobody trusts a doc that isn't in the manifest); a ghost row is a broken promise. Fix both immediately.

2. Scope the work with git — audit incrementally, not O(everything)

For each doc, find when it last changed and what code moved since:

git log -1 --format="%h %cs" -- docs/<file>.md
git log --oneline <that-hash>..HEAD -- devclaw/ deploy/

A doc whose subject area has no commits since its last edit needs only a spot check. A doc whose area churned (check the layer map in CLAUDE.md for which code belongs to which doc) gets full verification. This is what keeps repeat audits cheap.

3. Verify load-bearing claims

For each doc in scope, extract the claims that break workflows when wrong, and check each against the source of truth:

Claim typeVerify against
MCP tool namesgrep "@mcp.tool" -A2 devclaw/server/tools.py
File paths, module namesls / test -e
Env varsgrep the codebase; cross-check docs/reference/env-vars.md
CLI commands, entry pointspyproject.toml scripts, --help
Flow/sequence statementsread the named functions (tick, dispatch, settle)
Invariants quoted from CLAUDE.mdthe enforcing code + its named regression test

Prose, motivation, and design rationale are not verifiable — leave them alone unless the design itself changed. If many docs are dirty, fan the per-doc verification out to parallel Explore subagents and keep only the verdicts.

4. Fix or flag — never silently rewrite

  • Small drift (renamed tool, moved file, dead link, removed env var): fix inline in the doc, same audit.
  • Structural drift (the architecture moved, a whole flow is gone): do NOT rewrite the narrative yourself — that's a design statement, Denys's call. Mark the INDEX row STALE in the established house style: what's wrong, precisely, and "flagged for triage". A precise STALE flag is a fully acceptable audit outcome; an invented narrative is not.
  • Update every touched row's currency tag in docs/INDEX.md.

5. Normalize format

Converge each audited doc toward the house shape (don't churn prose that already works — diff noise buries the real fixes):

  • # Title — one H1, matching the INDEX row's framing.
  • First paragraph: what this doc covers and who reads it when.
  • ## sections, tables for enumerable facts, fenced blocks for commands.
  • Relative links for anything in-repo; every cross-reference clickable.
  • End with "where to look next" links when the doc hands off elsewhere.

6. Audit the enforcement loop itself

Check DOC_MAP in .claude/hooks/docs-reminder.py: every mapped doc still exists, every code area that has a doc is mapped, new subsystems since the last audit get rows. The hook is only as honest as this map.

7. Report

End with a verdict table — one row per doc: CURRENT (verified, evidence), FIXED (what changed), or STALE-flagged (what's wrong, why it wasn't fixed here). Plus the inventory result and any DOC_MAP changes. Never report a doc CURRENT that you didn't verify — say "not audited" instead.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.