doc-sync

A command for updating project documentation to match the current implementation, including API, architecture, specifications, and agent context files.

In plain words
What is it for?
It helps find relevant documents, review implementation status, update selected documentation areas, synchronize context files, and validate changes.
Why use it?
It reduces the gap between what the code does and what the project's documentation says.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ssbun/csl-agent-kit/doc-sync
Clone the repo
git clone --depth 1 https://github.com/SSBun/csl-agent-kit
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.00626
Opus 5 $0.00011 $0.00313
Sonnet 5 $0.00004 $0.00125
Haiku 4.5 $0.00002 $0.00063

Measured 2d ago against content hash 7ccd928067bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

doc-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/doc-sync.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Documentation Update & Synchronization

Update project documentation to reflect current implementation. Parse optional flags from the user's message: --implementation, --api, --architecture, --sync, --validate, or a doc-type focus area.

Agent Context Files

Check and update the project's primary agent context file (use whichever exists):

File Typical platform
AGENTS.md Codex, cross-platform
CLAUDE.md Claude Code
CONTEXT.md Project-specific convention
.cursor/rules/ Cursor rules

Also review README.md for user-facing status and usage.

Task

1. Discover Documentation

find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" | head -30

Look for common locations:

  • docs/ — guides, architecture, API docs
  • specs/ — specifications and implementation plans
  • docs/plans/ — design documents
  • docs/analysis/ — project analysis reports
  • CHANGELOG.md / HISTORY.md

2. Assess Current State

  • Scan for status markers (✅ ❌ ⚠️) in docs
  • Review recent doc commits: git log --oneline --since="2 weeks ago" -- "*.md" | head -10
  • Cross-check specs against actual code — mark stale sections

3. Update Documentation

Apply updates based on user focus (default: full sync):

  1. Implementation status — Mark completed items, update completion percentages, add lessons learned
  2. API / architecture docs — Reflect current endpoints, modules, and data models
  3. Agent context — Add new conventions, commands, pitfalls, and project map to AGENTS.md / CLAUDE.md / CONTEXT.md
  4. README — Update setup, usage, and project status
  5. Testing docs — Document test commands, coverage approach, and new test files

4. Formatting

  • Consistent headings and status indicators
  • Code examples where helpful
  • Cross-reference related sections
  • Do not create new spec files unless the user explicitly asks

Guidelines

  • UPDATE existing files; prefer editing over creating duplicates
  • Document best practices discovered during recent work
  • Ensure docs match actual implementation — no aspirational features marked done
  • Redact secrets and credentials

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 79 lines · 0 tokens per session scan A 7ccd928067bc

Subscribe to this mod's changes

doc-sync is a command published in the GitHub repository SSBun/csl-agent-kit (10 stars, last pushed 3d ago), licensed MIT. It adds 22 tokens to every session and 626 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.