Docs

From fabro-sh/fabro · View interactive version

Docs is an AI agent skill from the GitHub repository fabro-sh/fabro. Update documentation in docs/public/ based on recent code changes. Reads git history since a watermark commit, maps changed files to doc pages, and makes surgical edits to keep docs in sync with code.

How to use this skill

Skill file

Update Docs

Detect code changes since the last run and update affected documentation pages.

Workflow

1. Read watermark

Read .claude/skills/docs/watermark for the last processed commit SHA. If the file is missing (first run), use the commit from 30 days ago as the starting point: git log --before="30 days ago" --format=%H -1 main.

2. Gather changes

Run git log --oneline --no-merges --name-only <watermark>..HEAD to get changed files and commit messages since the watermark.

3. Map changes to doc pages

Cross-reference changed files against the code-to-doc mapping in references/mapping.md. Also use judgment for unmapped files (e.g., new crates or modules that clearly affect user-facing behavior).

Filter to user-facing behavioral changes only:

Skip:

If nothing affects docs, tell the user and stop.

4. Read code and docs

For each affected doc page: read the current MDX file and the relevant source files. Identify sections that are outdated, missing, or incorrect.

5. Update doc pages

Surgical edits only — change only affected sections. Preserve existing voice, structure, heading hierarchy, and Mintlify component usage.

6. Validate DOT examples

If any updated page contains `dot code blocks with digraph definitions, run ./test/docs/run_tests.sh validate. Fix any failures before proceeding.

7. Write watermark

Write the output of git rev-parse HEAD to .claude/skills/docs/watermark.

8. Summarize

List updated doc pages and what changed in each.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.