agentic/code/frameworks/sdlc-complete/skills/doc-sync/SKILL.md
Synchronize documentation and code to eliminate drift — detect stale docs, fix documentation drift, reconcile code-to-docs and docs-to-code with parallel audit and Al refinement
npx skillsauth add jmagly/aiwg doc-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a Documentation Synchronization Orchestrator that detects and resolves drift between code and documentation through parallel audit, automated fixes, and iterative refinement.
Users may say:
When invoked with /doc-sync <direction> [options]:
code-to-docs (code is truth), docs-to-code (docs are truth), or full (bidirectional reconciliation)| Switch | Default | Purpose |
|--------|---------|---------|
| <direction> | required | code-to-docs, docs-to-code, full |
| --interactive | false | Prompt for each sync decision |
| --guidance "text" | none | Human guidance for ambiguous cases |
| --scope "path" | . | Limit to specific directory |
| --dry-run | false | Audit only, no modifications |
| --parallel N | 4 | Max concurrent audit agents |
| --incremental | false | Git-diff since last sync instead of full scan |
| --verbose | false | Detailed per-file findings |
| --no-commit | false | Skip auto-commit |
| --max-iterations N | 3 | agent loop refinement iterations |
--scope path exists.aiwg/.last-doc-sync for incremental mode (skip if not found)docs/, *.md in root, CLAUDE.md)src/, agentic/, tools/)Dispatch 8 domain-specific auditor agents via parallel-dispatch:
| Auditor | Docs Scope | Code Scope |
|---------|-----------|------------|
| cli-ref-auditor | docs/cli-reference.md, CLAUDE.md | definitions.ts, .claude/commands/ |
| extension-type-auditor | docs/extensions/ | src/extensions/types.ts, registry.ts |
| provider-auditor | docs/integrations/, CLAUDE.md provider table | providers/*.mjs, platform-paths.ts |
| skill-auditor | docs/development/skill-inventory.md | .claude/skills/, framework skills |
| agent-auditor | Agent catalog docs | agentic/*/agents/ |
| config-auditor | Config guides | src/, agentic/*/config/ |
| readme-auditor | README.md | package.json, src/ |
| changelog-auditor | CHANGELOG.md, docs/releases/ | git tags, package.json |
Each auditor:
DOC-DRIFT-NNN items with severity (critical/high/medium/low)Depends on Wave 1 completion. Run in parallel:
Synthesizer agent produces .aiwg/reports/doc-sync-audit-{date}.md:
Categorize each drift item:
| Category | Criteria | Action | |----------|----------|--------| | Auto-fixable | Numeric claims, table entries, argument hints | Direct edit | | Template-fixable | Missing sections, outdated descriptions | Generate via template + Al | | Human-required | Architectural changes, ambiguous intent | Flag for review |
If --dry-run: Output report and exit.
Apply auto-fixes:
definitions.ts metadataFor template-fixable items:
--max-iterations)Re-run Wave 2 checks on all modified files:
.aiwg/.last-doc-sync with timestamp and scope--no-commit: Stage changes and commit with message docs: sync documentation to match codeCode is source of truth. Documentation is updated to match code reality.
Documentation is source of truth. Generates TODOs and code fix suggestions where code doesn't match documented behavior.
Bidirectional reconciliation:
--interactive mode, prompt for each conflictUses existing skills and commands:
claims-validator — Verify numeric claimsmention-validate — Check @-mention resolutionmention-wire — Fix broken @-mentionscheck-traceability — Verify bidirectional linksparallel-dispatch — Launch audit agents concurrentlyrlm-mode — Context management for large file setsralph — Iterative refinement loopworkspace-health — Pre-flight workspace checks/doc-sync code-to-docs --dry-run
Outputs audit report without modifying any files.
/doc-sync code-to-docs --incremental --verbose
Only audits files changed since last sync.
/doc-sync full --interactive --guidance "Focus on CLI reference accuracy"
/doc-sync code-to-docs --scope docs/extensions/
.aiwg/reports/doc-sync-audit-{date}.md.aiwg/.last-doc-syncdata-ai
Report which research-corpus radar sidecars are overdue for refresh. Computes staleness (days since last refresh vs the cadence window) for every radar, sorted most-overdue-first. Runs via `aiwg corpus radar-status`.
data-ai
Aggregate research-corpus radar sidecars into a corpus or per-cluster freshness report — totals, overdue count, per-cluster / per-GRADE / per-trajectory breakdowns, an overdue table, and per-radar rationale snippets. Runs via `aiwg corpus radar-report`.
testing
Scaffold radar/freshness sidecars for research-corpus REFs. Pulls title/authors from the citation sidecar and GRADE from the analysis doc, defaults the refresh cadence from GRADE and the cluster from a corpus-local map, and stamps documentation/radar/REF-XXX-radar.md. Runs via `aiwg corpus radar-init`.
data-ai
Compute an entity's publication trajectory — per-year paper counts, topic drift, hot-streak detection (≥3 consecutive A-grade years), and career phase. Runs via `aiwg corpus profile-temporal`.