agentleFS
justincordovajustincordova/agents/skills/sync-docs/SKILL.md

sync-docs

Skill1 starsChanged 4 months agoMITView on GitHub

Use on-demand to reconcile documentation with the current state of the codebase. Handles two cases — catching drift from past work and consolidating doc updates after iterating on a feature multiple times. Never runs automatically.

15 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

36 rules. 0 are common, 34 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 34

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Triggered explicitly: When the user says "update docs," "sync the docs," or similar.

    line 19
  2. Distinctive:

    After iterating on a feature multiple times, when the design has stabilized

    line 22
  3. Distinctive:

    When coming back to a project after a break and the docs feel stale

    line 23
  4. Distinctive:

    Before a release or milestone, to make sure docs reflect reality

    line 24
  5. Distinctive:

    When preparing a project for handoff

    line 25
  6. Distinctive:

    After every small commit (that's what batching avoids)

    line 28
  7. Distinctive:

    When the plan skill has just finished — that flow already merges the design doc into SPEC.md

    line 30
  8. Distinctive:

    Check git diff and recent commits to understand what changed

    line 36
  9. Very specific:

    If design docs exist in docs/designs/, merge them into SPEC.md first — they represent in-flight features that are now implemented

    line 59
  10. Distinctive:

    Update architecture if structural decisions changed

    line 60
  11. Distinctive:

    Update goals/non-goals if scope shifted

    line 61
  12. Distinctive:

    Update key decisions table if choices changed

    line 62
  13. Distinctive:

    Do NOT rewrite the whole spec — only update what shifted

    line 63
  14. Distinctive:

    If a design doc has been fully implemented (code exists, feature works), merge its design decisions into SPEC.md and delete the design doc

    line 66
  15. Distinctive:

    If a design doc is still in-flight (feature not yet shipped), leave it alone — it's the active source of truth for that feature

    line 67
  16. Distinctive:

    When merging: integrate the design doc's sections into the appropriate SPEC.md sections.

    line 68
  17. Distinctive:

    Update to match current behavior

    line 71
  18. Distinctive:

    Remove sections describing removed features

    line 72
  19. Distinctive:

    Add sections for new capabilities

    line 73
  20. Very specific:

    ONLY update if one exists — do not create one during sync (use the sync-agents skill for creation)

    line 76
  21. Distinctive:

    Update when: repo layout changed, commands changed, new dependencies added, architectural patterns shifted, new modules created, or gotchas …

    line 77
  22. Distinctive:

    Do NOT rewrite the whole file — update only the sections that drifted

    line 78
  23. Distinctive:

    Keep under 400 lines — cut aggressively, every line competes with agent context

    line 80
  24. Distinctive:

    ONLY update if project conventions, tooling, or workflow changed

    line 83
  25. Distinctive:

    Keep it concise — this file is loaded into memory

    line 84
  26. Distinctive:

    Add new rules or constraints, remove stale ones

    line 85
  27. Distinctive:

    Never pad or bloat — every line should earn its place

    line 86
  28. Distinctive:

    Do NOT use this to document features or behavior — that belongs in other docs

    line 87
  29. Distinctive:

    Write from the user perspective — someone cloning the repo for the first time

    line 90
  30. Distinctive:

    Update: how to install, configure, run, use

    line 91
  31. Distinctive:

    Do NOT turn it into a changelog or developer notebook

    line 92
  32. Distinctive:

    Keep it practical: what does this project do, how do I use it

    line 93
  33. Distinctive:

    Wait for approval before saving.

    line 109
  34. Distinctive:

    Write all approved changes.

    line 113
  35. Distinctive:

    Only update what changed — don't rewrite untouched sections

    line 117
  36. Distinctive:

    Don't commit unless explicitly asked

    line 123

“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

Sync Docs

Overview

Reconcile documentation with the current state of the codebase. This skill is invoked on-demand, never automatically. It handles two main cases:

  1. Drift correction — catching up docs that have fallen behind past work (features shipped without doc updates, refactors that weren't reflected in SPEC.md, etc.)
  2. Iterative reconciliation — after iterating on a feature 3-5 times without touching docs, run sync-docs once to consolidate all the changes into a single coherent update instead of rewriting SPEC.md after every iteration

Announce at start: "Using sync-docs skill to sync documentation."

When to Use

Triggered explicitly: When the user says "update docs," "sync the docs," or similar. Never triggered automatically.

Good times to run it:

  • After iterating on a feature multiple times, when the design has stabilized
  • When coming back to a project after a break and the docs feel stale
  • Before a release or milestone, to make sure docs reflect reality
  • When preparing a project for handoff

Do NOT run it:

  • After every small commit (that's what batching avoids)
  • In the middle of active iteration (wait until the design settles)
  • When the plan skill has just finished — that flow already merges the design doc into SPEC.md

The Process

Step 1: Scan Recent Changes

  1. Check git diff and recent commits to understand what changed
  2. Identify the scope: is this a small fix, a new feature, a refactor, or an architectural shift?

Step 2: Identify Affected Docs

Scan the repo for documentation files and determine which ones are impacted. Common docs:

DocWhen to Update
docs/SPEC.mdArchitecture, scope, goals, or key decisions changed
docs/designs/*.mdIn-flight design docs that have been implemented — merge into SPEC.md and delete
TESTING.mdTest approach, frameworks, or commands changed
MANUAL_TESTING.mdManual test steps or flows changed
LOGGING.mdLogging approach, format, or tooling changed
AGENTS.mdRepo structure, commands, tech stack, or architectural patterns changed
AGENTS.mdProject conventions, tooling, or workflow changed
README.mdAnything a user cloning the repo would need to know

Step 3: Update Each Doc

For each affected doc, make targeted updates:

SPEC.md (docs/SPEC.md):

  • If design docs exist in docs/designs/, merge them into SPEC.md first — they represent in-flight features that are now implemented
  • Update architecture if structural decisions changed
  • Update goals/non-goals if scope shifted
  • Update key decisions table if choices changed
  • Do NOT rewrite the whole spec — only update what shifted

Design docs (docs/designs/*.md):

  • If a design doc has been fully implemented (code exists, feature works), merge its design decisions into SPEC.md and delete the design doc
  • If a design doc is still in-flight (feature not yet shipped), leave it alone — it's the active source of truth for that feature
  • When merging: integrate the design doc's sections into the appropriate SPEC.md sections. Don't just append.

Technical docs (TESTING.md, LOGGING.md, etc.):

  • Update to match current behavior
  • Remove sections describing removed features
  • Add sections for new capabilities

AGENTS.md:

  • ONLY update if one exists — do not create one during sync (use the sync-agents skill for creation)
  • Update when: repo layout changed, commands changed, new dependencies added, architectural patterns shifted, new modules created, or gotchas discovered
  • Do NOT rewrite the whole file — update only the sections that drifted
  • Load the sync-agents skill's template if you need to add new sections that don't exist yet
  • Keep under 400 lines — cut aggressively, every line competes with agent context

AGENTS.md:

  • ONLY update if project conventions, tooling, or workflow changed
  • Keep it concise — this file is loaded into memory
  • Add new rules or constraints, remove stale ones
  • Never pad or bloat — every line should earn its place
  • Do NOT use this to document features or behavior — that belongs in other docs

README.md:

  • Write from the user perspective — someone cloning the repo for the first time
  • Update: how to install, configure, run, use
  • Do NOT turn it into a changelog or developer notebook
  • Keep it practical: what does this project do, how do I use it

Step 4: Present Changes

Show what you're updating and why:

Updating 3 docs:

- docs/SPEC.md: architecture section — switched from REST to tRPC
- TESTING.md: updated test commands to use vitest instead of jest
- README.md: updated install steps to include new env variable

Skipping AGENTS.md — no convention changes.

Wait for approval before saving.

Step 5: Save

Write all approved changes. Do NOT commit unless asked.

Key Principles

  • Only update what changed — don't rewrite untouched sections
  • AGENTS.md updates are section-targeted — don't regenerate the whole file
  • AGENTS.md stays lean — it's loaded into every session
  • README is user-facing — think "first-time cloner"
  • Plans are historical — never update them
  • Present changes before saving — no surprise rewrites
  • Don't commit unless explicitly asked

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.