Doc sync

From woditschka/agentic-coding-reference · View interactive version

Doc sync is an AI agent skill from the GitHub repository woditschka/agentic-coding-reference. Synchronize documentation with the current codebase. Fix drift between docs/prd.md, docs/system-design.md, and actual source code.

How to use this skill

Skill file

Doc Sync

Synchronize docs/prd.md and docs/system-design.md with the current codebase. Fix drift, add missing items, remove stale references.

When to Run

Instructions

Phase 1: Explore Current Codebase

Build a complete picture of what is implemented — via a read-only exploration subagent where the tool offers one (Claude Code: Explore), else by reading directly:

  1. Read all production source files (the roots declared in scripts/layout.toml) -- note every type, interface, function, field
  2. Read the project's configuration files where they exist (the config example and config module the project defines)
  3. Read all test files to understand tested behavior
  4. Read all ADR files under docs/adr/

Capture: type names (exact casing), type and interface fields (exact types), public vs internal visibility, module dependencies, pipeline step ordering, CLI arguments, configuration properties.

Phase 2: Diff Against Documentation

Read docs/prd.md and docs/system-design.md.

Compare the codebase snapshot against both documents. Identify:

In PRD:

In System Design:

Phase 3: Update Documents

Apply all fixes. Follow these rules strictly:

Document boundaries (per the harness-project API roster; form rules in the document-writing skill):

Writing standards (from the document-writing skill):

Preservation rules:

Phase 4: Validate

Invoke the doc-reviewer agent with this preamble:

You are a read-only reviewer. Inspect files read-only with your file-viewing and search tools. Only permitted Bash commands: scripts/gate.sh verify. Do not write code, scripts, or temporary files. Never use system /tmp; use .scratch/tmp/ for any temporary output.

The reviewer validates against the document-writing skill's checklist:

  1. Structural checks (cross-references, tables, code blocks)
  2. Cross-document coherence (requirement IDs, config properties, type fields, constants)
  3. Writing standards (prohibited words, sentence length, acronyms)
  4. Document boundaries (PRD has no source code; system-design has no copied source)

Phase 5: Fix Review Issues

Apply fixes for any [AUTOFIX] or [BLOCKED] issues the reviewer found. Re-run the reviewer if changes were substantial. Stop when the reviewer returns APPROVED.

Maintenance Rules, Compaction, Format Migration

The stack-independent half of this skill lives in CODE0 beside this file: the Maintenance Rules table, the Compaction procedure, and the Format Migration procedure. Read it whenever the task is maintenance, compaction, or migration; the phases above stay stack-bound, and the Instructions above name this stack's Contracts-table constructs.

Output

Report a summary of changes made:

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.