Doc sync

From jmagly/aiwg · View interactive version

Doc sync is an AI agent skill from the GitHub repository jmagly/aiwg. Synchronize documentation and code with bounded, scope-first drift checks

How to use this skill

Skill file

Documentation-Code Sync

Detect and resolve drift between code and documentation without front-loading a

full repository audit. Treat standard Sonnet context as the baseline.

Invocation

/doc-sync <direction> [options]

Directions:

Options:

Artifact root resolution

Treat every .aiwg/... path below as a logical artifact path. Before reading

or writing sync state, working evidence, or reports, run aiwg artifacts path

from the active workspace and use the returned absolute directory as

AIWG_ARTIFACT_ROOT. Never write these payloads to a literal project-local

.aiwg/ when AIWG_ARTIFACTS_PATH or .aiwg-location redirects the corpus.

Context Budget Rules

diffs before the changed-file set is known.

from changed files and ask before expanding to full repo.

reading file bodies.

auditors, and prefer 2 for broad or release requests.

detailed evidence to $AIWG_ARTIFACT_ROOT/working/doc-sync/ and return only the path plus a

summary.

invoke it after this skill finishes or in an isolated follow-up.

Workflow

  1. Parse direction and options.
  2. Build a cheap scope inventory:

only when the changed-file set is insufficient.

  1. Choose audit lanes from the scoped files:
  1. Run bounded auditors for only the selected lanes. Each prompt must include:
  1. Merge summaries into $AIWG_ARTIFACT_ROOT/reports/doc-sync-audit-{date}.md with:
  1. If not --dry-run, apply high-confidence fixes only.
  2. Validate modified files with targeted checks:
  1. Record $AIWG_ARTIFACT_ROOT/.last-doc-sync.
  2. Commit only when requested by the surrounding workflow and not blocked by

--no-commit; otherwise leave a concise final summary.

Release or Blog Coverage Requests

For combined requests such as "docSync code2doc, ensure the monthly blog covers

the work, then commit-and-push":

  1. Keep this skill to documentation drift detection and fixes.
  2. Treat blog/release coverage as one selected audit lane with changed files plus

month-bounded git history, not a full repository read.

  1. Return a handoff summary for commit-and-push instead of invoking it inside

this skill.

Output Contract

Return:

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.