agentleFS
cloverinkcloverink/shipwright/skills/update-docs/SKILL.md

update-docs

Skill0 starsChanged 49 days agoMITView on GitHub

Sync documentation with code changes. Auto-detects scope from git diff, updates tier 1-4 docs (core, architecture, journey, config), verifies stats. Phase D of /ship pipeline.

87 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use get-pr-reviews, push-everything and 10 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.
  • saffron-healthSkill

    get-pr-reviews

    Get nicely formatted output of the last review comments on a PR. Used internally by other skills.

    Also in 3 projects that use this

  • saffron-healthSkill

    push-everything

    Stage ALL changes in the repository (not just session changes), commit, and push. Use when you need to commit all pending changes.

    Also in 3 projects that use this

  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 3 projects that use this

  • TheKREATORSSkill

    instinct-import

    Import instincts from file or URL into project/global scope

    Also in 3 projects that use this

  • NVIDIASkill

    generate-spec

    Produce a feature specification covering API changes, backward compatibility, cross-language impact, performance, and a file-level change plan. Use when designing a new feature, planning a significant change, or the user asks to spec something out.

    Also in 3 projects that use this

  • belokonmSkill

    fullstack-developer

    End-to-end feature expert specializing in frontend-backend integration, system architecture, and complete application development

    Also in 4 projects that use this

  • +1 more from saffron-health
  • +1 more from TheKREATORS

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 81 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep documentation in sync with code.

    line 9
  2. Very specific:

    When called from /ship (Phase D):

    line 23
  3. Very specific:

    Do NOT commit; /ship commits as docs(<scope>): sync documentation

    line 26
  4. Very specific:

    If your project has a stats sync tool, run it first: it's the single source of truth for counts in README/CLAUDE.md.

    line 58
  5. Distinctive:

    If no automated tool, verify common counts manually:

    line 68
  6. Distinctive:

    Match code reality: every code example, path, count must match the current code

    line 113
  7. Very specific:

    Stage everything, commit nothing: when called from /ship

    line 114
  8. Distinctive:

    All affected tiers updated, OR

    line 118

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

/update-docs

Keep documentation in sync with code. Detects what changed, updates the right tiers, leaves changes staged for review.

How it works

1. Detect changes  → git diff vs the merge base with origin/main
2. Classify        → categorize files into doc tiers
3. Update          → edit relevant docs per tier
4. Verify stats    → run stats tools, refresh counts
5. Stage           → git add (no commit, the parent commits per phase)

Bundling behavior

When called from /ship (Phase D):

  • Apply doc updates
  • Stage changes (git add)
  • Do NOT commit; /ship commits as docs(<scope>): sync documentation
  • Cover everything that ships: the original work and every A/R fix round
  • Return summary of what was updated

When called standalone:

  • Apply doc updates
  • Commit as docs: update documentation

Phase 1: Detect Changes

BRANCH=$(git branch --show-current)
BASE=$(git merge-base origin/main HEAD) || { echo "cannot resolve origin/main, git fetch first"; exit 1; }   # never guess a base
git diff --name-only $BASE..HEAD
git diff --name-only HEAD  # also include unstaged
<!-- CONFIGURE: Adjust exclude patterns for your project (e.g., lockfiles, generated files) -->

Phase 2: Documentation Tiers

TierFilesTrigger
1 CoreREADME.md, CLAUDE.md, top-level package READMEsAny significant change
2 Architecturedocs/architecture.md, docs/database-schema.mdStructural changes
3 Journeydocs/journey/*.md (user flows)Business logic changes
4 Claude Config.claude/rules/*.md, .claude/skills/**/references/*.mdTool/workflow changes
<!-- CONFIGURE: Replace tier paths to match your project's doc layout. Remove tiers you don't use. -->

Phase 3: Stats Verification

If your project has a stats sync tool, run it first: it's the single source of truth for counts in README/CLAUDE.md.

# Example: replace with your project's tool
bun run tools/stats-sync.ts --update    # writes diffs into core docs
bun run tools/stats-sync.ts             # check-only mode for CI
<!-- CONFIGURE: Replace with your stats sync command, or remove if you don't track counts in docs -->

If no automated tool, verify common counts manually:

# Components, endpoints, tests: adjust globs to your structure
find src/components -name "*.tsx" | wc -l
grep -rcE "@(Get|Post|Patch|Delete|Put)\(" --include="*.ts" src/api/

Phase 4: Per-Change Update Checklist

Change typeUpdate
New featureREADME features list, relevant journey doc, CLAUDE.md if it affects how AI agents work
New API endpointAPI doc / journey doc with endpoint table, CLAUDE.md endpoint count
New componentComponent README, design system doc if it introduces a pattern
Database changedocs/database-schema.md, migration notes, related journey docs
Config changeDoc that explains the config option, rule files that reference it
RefactorUpdate file paths in any doc that linked to moved/renamed files
Dependency upgradeCHANGELOG, README if version is documented
<!-- CONFIGURE: Add change types specific to your project -->

Phase 5: Stage & Report

git add README.md CLAUDE.md docs/ .claude/

Report format:

Documentation Update Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scope: <auto-detected files>
Updated:   path/to/doc.md: what changed
Verified:  Components: X | Tests: X | Endpoints: X
Skipped:   path/to/doc.md: already up to date
Manual:    path/to/doc.md: needs human review (reason)

Guidelines

  • Concise: lead with the answer, not the context
  • Scannable: tables, bullet lists, headers
  • Cross-reference, don't duplicate: link to related docs
  • Match code reality: every code example, path, count must match the current code
  • Stage everything, commit nothing when called from /ship

Exit conditions

  • All affected tiers updated, OR
  • Reported as "no doc-worthy changes" if diff is purely internal (formatting, comments, test-only)
  • Manual-review items flagged with reason

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.