# syncdocs (Agent Skill)

> For any repository: documentation kept in step with the code. Versions, dependencies, commands, project structure and feature claims in README.md, CLAUDE.md, AGENTS.md and docs/ re-read from the code before they are written, the prose left alone, unverifiable claims flagged.

Page: https://timerise.ai/skills/syncdocs

Agent Skill `syncdocs`: https://github.com/timerise-ai/syncdocs. Category: Developer workflow. Runs on Git; backend: No data store, the repository's own manifests and files behind a seam.

Latest release: v0.1.2 (2026-10-25).

Install: npx skills add timerise-ai/syncdocs. A tool for an agent, not a module: nothing for Timerise to build or quote.

Documentation goes stale one fact at a time. A dependency is upgraded and the README still names the old major. A script is renamed and the setup steps still call it. A folder moves and CLAUDE.md still points the next agent at the old path, so the agent works from a map of a project that no longer exists.

Asking an agent to "update the docs" makes it worse. It rewrites prose nobody asked it to touch, fills gaps with plausible guesses and quietly changes the tone of the whole file.

This skill gives the agent the documentation pass we run on our own repositories: every version, command, path and feature claim is re-read from the manifest, lockfile, scripts or files before it is written, one fact gets one value across every doc, the human-written prose and section order stay as they are, and anything the code cannot confirm goes to you in the report instead of into an edit.

Sync a repository's documentation with what its code actually says: versions, dependencies, commands, project structure and feature claims in README.md, CLAUDE.md, AGENTS.md and docs/, each verified against the manifest, lockfile, scripts and files before it is written, with human prose, tone and section order left as they are. Use when: (1) a dependency, framework or runtime version changed and the docs still name the old one, (2) scripts, Makefile targets or the directory layout changed, (3) a feature was added, renamed or removed and the docs may no longer match, (4) an agent instruction file tells agents to run a command that may not exist, (5) the user mentions: sync docs, update the README, docs are stale, docs out of date, outdated version in README, fix CLAUDE.md, AGENTS.md, package.json, lockfile, pyproject.toml, Cargo.toml, go.mod, "npm run lint" missing script, "docs: sync documentation with codebase state". Carries the ground-truth table per ecosystem, the rule for declared range against resolved version, the flag-don't-guess rule for unverifiable feature claims, and a three-part report of changed, verified and flagged. Works on any project type, Node, Rust, Python, Go or a repository with no manifest at all; the repository's own manifests and files are the seam. Not a changelog or version bump tool, not a doc writer for missing files, and not an audit of the code against the docs.

This skill was written by the engineer who maintains it, from the documentation passes they run on their own repositories. What it carries holds by construction: every value written is one read in the same session from a manifest, lockfile, script or file; a doc keeps its own precision, so a major stays a major; one fact has one value across every doc; no doc is created and the changelog is never edited; and the report separates what changed, what was verified and what needs a decision. [`references/provenance.md`](references/provenance.md) has the record.

What it builds:
- Documentation kept in step with the code
- Versions
- Dependencies
- Commands, project structure and feature claims in README.md
- CLAUDE.md, AGENTS.md and docs/ each re-read from the manifest
- Lockfile, scripts and files before it is written
- Human prose
- Tone and section order left alone
- Unverifiable claims flagged rather than guessed
- A report of changed
- Verified and flagged

When to use:
- After a change to versions, dependencies, scripts, structure or features, when the docs may no longer match; before a release; or when asked to check whether the docs are accurate.
- The user's words override the default: "do not commit", "I want to review the diff" or "just tell me" mean no commit, or no edit, exactly as asked. A repository named but not present is cloned from its public URL into a scratch directory; that clone and the package registry are not external services in an eval's sense. Leave a working directory that is not the target as it was, apart from a report file if asked.

Non-negotiables:
- Ground truth comes from the code, never from the docs or from memory. A doc's own value is the claim under test, so it cannot also be the evidence; every value written is one read in the session.
- Only facts change. Prose, tone and section order are the author's judgement, which the code cannot check; a targeted edit keeps the diff reviewable line by line, and no sentence or command is added to fill a gap.
- No doc is created. A missing file is a decision about what the project documents, so it is offered in the report and not written.
- CHANGELOG.md is never touched. `bumpv` writes it from the commits; two writers would contradict each other, and the `docs:` commit is the sync's own record.
- An unverifiable claim is flagged, never silently kept or deleted. The code cannot tell a removed feature from one that was never built, so the report names the claim and where it looked.
- Nothing stale means no edit and no commit. A cosmetic change made to justify a commit is a change nobody asked for.
- Only doc files are committed, only when the user has not asked to review, with no AI attribution. The message is fixed so a sync is recognisable in any history, and `git log -1 --format=%B` verifies it.

Not this:
- Writing the changelog or bumping a version: `bumpv`
- Committing with the house conventions: `commit`
- Checking the code against the docs as the spec: `code-audit`
- Writing a README, CLAUDE.md or guide that does not exist yet: a documentation skill
- Hardening a skill from its agent evals: [skill-eval-loop](https://github.com/timerise-ai/skill-eval-loop)

What to tell your agent:
- Our docs are out of date. Save these three files at their paths first, then bring the docs in line with the code. Leave it uncommitted, I want to review the diff.

README.md:
# Acme

Acme is our booking front end. It is built on Next.js 14 and React 18, and we keep it deliberately small.

## Getting started

```bash
yarn install
yarn dev
```

Run `npm run lint` before you push, and `npm test` for the unit tests.

## Structure

- `src/app/`: the routes
- `src/components/`: shared components

## Features

- A dark mode toggle in the header
- Server-rendered pages

CLAUDE.md:
# CLAUDE.md

Next.js 14 app. Before finishing a task, run `npm run lint` and `npm run typecheck`. Routes live in `src/app/`.

CHANGELOG.md:
# Changelog

## [0.1.0] - 2026-01-10

- First version on Next.js 14.
- Clone https://github.com/timerise-ai/site-pin-gate into a scratch folder and check whether its README.md and CLAUDE.md still agree with its files and its changelog. Do not change that repository; write what you find to docs-check.md here.

Agent eval results (newest per agent and prompt):
- Gemini CLI (gemini-3.8-flash) on v0.1.2, 2026-10-25: pass
- Codex CLI (gpt-6.1-sol) on v0.1.2, 2026-10-25: pass
- Claude Code (claude-opus-5-5) on v0.1.2, 2026-10-25: pass

Recent releases:
- v0.1.2 (2026-10-25): Fix release, from scoring the prompt-1 agent eval runs against 0.1.1.
- v0.1.1 (2026-10-25): Fix release, from scoring the prompt-1 agent eval runs against 0.1.0.
- v0.1.0 (2026-10-25): First release: the documentation sync restructured to the Timerise skill standard, with its ground truth, editing rules and report split into references.
