agentleFS
shurutechshurutech/goated-skills-pack/skills/doc-sync/SKILL.md

doc-sync

Skill3 starsChanged 6 days agoMITView on GitHub

Keep docs true after a code change. Finds every product doc, agent-context note (AGENTS.md, CLAUDE.md, docs/) and agent memory that cites the changed files, has one agent update them, has a second independent agent check the result against the code, and loops until the checker finds nothing (at most 2 rounds). Use whenever a branch changes behaviour, labels, access, routes or side effects, or moves, renames or deletes files - before review, so the docs ride in the same PR. Runs inside plan-contract (verify), the feature builders, bugfix-loop and ship-pr. Also use for "update the docs", "docs are stale", "sync the docs".

37 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use perf-budget, api-endpoint and 9 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.
  • vindreshsinghSkill

    perf-budget

    Optimizes performance by measuring first and fixing the real bottleneck. Use when something is slow, before optimizing, when setting latency or bundle targets, or reviewing changes for performance traps — not for speculative micro-tuning.

    Also in 3 projects that use this

  • tadoEngSkill

    api-endpoint

    Add or change a backend API endpoint on this product, keeping Pydantic as the single contract authority and regenerating the TypeScript client. Use when asked to add an endpoint, expose data to the frontend, change a request or response shape, or wire a new backend capability into a page.

    Also in 3 projects that use this

  • renatorozasSkill

    grill

    Adversarial code review. Don't let me ship until the changes pass your scrutiny.

    Also in 4 projects that use this

  • AnasX7Skill

    improve

    Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.

    Also in 3 projects that use this

  • builtbygeoSkill

    design-review

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    If <docs check> exists it must pass, and it is the check for path existence: checkers need not re-verify that a cited path exists, only …

    line 72
  2. Distinctive:

    Commit the doc edits as their own commit on the branch ("Update docs for <change>"), before review and local CI.

    line 77

“Common” is measured: kept by at least 6 in 10 of the 29 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

Doc sync

Docs that describe what the product does, and agent-context notes that hold build rules and engineering notes, go stale the moment code moves. Stale context misleads agents worse than none. This skill runs on branches that change behaviour or move, rename or delete files, before review, so the docs ride in the same PR. Pure refactors that touch no cited file need nothing.

Docs work best for this when they cite code with stable receipts like path/to/file.ts#SymbolName (no line numbers). If yours do not yet, start doing it in the docs you touch; the find step below gets more precise as they do.

Configure for your project

PlaceholderMeaning
<doc dirs>Product and agent docs, e.g. docs/ AGENTS.md CLAUDE.md
<memory dir>Your agent's memory folder, if it keeps one
<docs check>A script that fails on dead paths in docs, if you have one

1. Find the targets

From the branch's worktree:

git diff --name-only origin/<default branch>...HEAD > /tmp/changed.txt
# docs that cite each changed file (by path or by basename)
while read f; do
  echo "== $f"; grep -rlF -e "$f" -e "$(basename "$f")" <doc dirs> <memory dir> 2>/dev/null
done < /tmp/changed.txt

Output: docs that cite each changed file, changed files no doc cites (a new surface: decide which doc owns it, if any), and memories naming them. No changed code files: stop, nothing to do.

Multi-repo products: if the product docs live in another repo, update them in the paired PR there, or open a small docs branch and ship it beside the code PR (the docs PR merges after the PR it describes).

2. Update (one updater per repo)

Brief, verbatim apart from the lists:

Docs-only. Update these docs so they match the code on this branch: <docs with their cited files>. Read each file's diff (git diff origin/<default branch>...HEAD -- <path>); many hunks change nothing a doc says, skip those. For a relevant change, rewrite the row or sentence from the new source: label, behaviour, condition, who sees it, route, what it writes, side effects. Add new elements fully; delete rows for elements that are gone. Keep each doc's conventions: receipts as path#Symbol, no line numbers, plain words. Agent-context notes: fix only statements the change makes false, keep engineering notes, never paste product behaviour (link the product doc instead). Return the rows changed per doc.

3. Check (a different agent, never the updater)

You check docs another agent just edited. Assume mistakes. For every changed row, open the receipt and the code around it: the code must clearly prove the whole claim. Then read the branch diff yourself and list any user-facing change no doc reflects yet. Fix nothing. Return wrong rows and missing items, each with path#Symbol proof.

4. Loop

Findings go back to the updater (the same per-repo updater, or a fresh one with the findings), then a fresh checker. Stop when a checker returns nothing. At most 2 rounds; still dirty after 2: list what is left in the PR body and tell the owner.

5. Memories

For each memory the finder listed, read it. A memory that states something the change made false: update it (or delete it if the whole point is gone) and fix its index line. Never carry a memory's claim into a doc without checking the code.

6. Gate

If <docs check> exists it must pass, and it is the check for path existence: checkers need not re-verify that a cited path exists, only that the code proves the claim. Receipts for unmerged code in another repo can use a PR prefix (e.g. api#123:) and be skipped by that check.

Commit the doc edits as their own commit on the branch ("Update docs for <change>"), before review and local CI.

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.