Documentation Synchronizer
Treat documentation as a distributed contract with users, developers, operators, and integrators.
Trigger boundary
Use this skill for:
- identifying docs affected by an implementation or migration diff;
- synchronizing user guides, API references, configuration, examples, architecture, runbooks, and release notes;
- auditing stale commands, options, screenshots, generated docs, or cross-links;
- verifying a documentation-only change against current code and public contracts.
Do not trigger for:
- deciding what the product should do;
- visual brand/campaign copy unrelated to repository behavior;
- a code change with no externally or operationally meaningful documentation surface;
- generating API docs by editing generated output instead of its source.
Required inputs
Obtain:
- changed files/diff and final intended behavior;
- repository documentation map and audience/release context;
- authoritative sources for APIs, schemas, config, CLI, environment, and defaults;
- supported versions and migration/deprecation policy;
- documentation tooling, generators, link/check commands, and localization policy;
- known generated, translated, versioned, or externally hosted documentation boundaries.
If behavior is ambiguous, stop and return the exact implementation question. Do not resolve ambiguity through prose.
Safety baseline
- Inspect worktree state and preserve unrelated edits.
- Do not rewrite all docs to normalize style; update only impacted surfaces and necessary consistency links.
- Do not edit generated docs directly unless the repository explicitly treats them as source.
- Never copy secrets, production identifiers, private URLs, or personal data into examples.
- Mark destructive examples clearly and provide safe prerequisites; do not invent executable commands.
- Keep version-specific instructions scoped and dated where they can become stale.
Workflow
1. Extract the contract delta
Summarize changes under applicable categories:
- behavior and user flow;
- public/internal API, event, schema, serialization;
- CLI command, flag, output, exit code;
- configuration, environment variable, secret reference, default;
- installation, dependency, compatibility, migration, deprecation;
- architecture, ownership, build/deploy/runtime operation;
- UI state, accessibility behavior, screenshot, or terminology;
- troubleshooting, observability, failure recovery, and rollback.
Distinguish newly introduced behavior, changed behavior, removed behavior, and correction of previously inaccurate docs.
2. Map documentation surfaces
Use references/doc-surface-map.md. Search beyond docs/:
- root/package READMEs and install guides;
- inline API comments and generated-doc sources;
- OpenAPI/GraphQL/protobuf/schema descriptions;
- CLI help,
--help snapshots, sample config, .env.example;
- examples, tutorials, fixtures, templates, code snippets;
- architecture decisions, diagrams, ownership, contributor docs;
- runbooks, dashboards/alert links, deployment/rollback guides;
- changelog, release notes, deprecation and migration guides;
- UI labels, empty/error/help states, screenshots, alt text;
- localization source and translation workflows.
Use the read-only heuristic scanner as a starting point:
python skills/documentation-synchronizer/scripts/doc_drift_scan.py . --base HEAD~1 --format markdown
Or provide an explicit changed-file list when history is unavailable:
python skills/documentation-synchronizer/scripts/doc_drift_scan.py . \
--files src/config.ts api/openapi.yaml deploy/service.yml --format markdown
The scanner suggests surfaces; it cannot determine semantic drift.
3. Establish authority and audience
For each fact identify the authoritative artifact and audiences. Examples:
- runtime default → code/config schema, not an old README;
- API field → source schema and compatibility policy;
- install command → current package manager/installer and supported runtime;
- operational procedure → deployed topology and approved runbook;
- UX label/state → shipped component and product terminology.
Do not propagate a possibly stale sentence into more files. Correct the source and references.
4. Build the impact plan
Create:
changed contract | audience | authoritative source | doc surfaces | update type | validation
Classify update type as add, change, remove, deprecate, migrate, regenerate, link, or no change—reason.
Prioritize release-blocking surfaces: unsafe migration steps, incompatible API/config instructions, missing security/privacy behavior, and invalid operational recovery.
5. Update coherently
Apply the smallest coherent set of changes:
- align terminology, names, defaults, supported versions, and examples;
- show prerequisites, expected result, failure behavior, and rollback where needed;
- document old/new behavior through the compatibility window;
- keep snippets executable and scoped to the repository's actual tools;
- use relative links when repository portability matters;
- add accessible alt text and update screenshots only when the visual change affects comprehension;
- update changelog/release notes according to repository policy, not automatically for every edit;
- route generated content through its generator and review the resulting diff.
Do not conceal limitations or unsupported cases in vague prose.
6. Cross-surface consistency review
Compare all affected surfaces for:
- exact command/flag/environment names and case;
- defaults, ranges, required/optional status, and version support;
- API request/response/error examples;
- schema and generated-client descriptions;
- user-facing labels versus screenshots and help text;
- migration ordering, mixed-version behavior, rollback, and data implications;
- architecture diagrams versus actual components and ownership;
- release notes versus the final integrated behavior.
Search for removed terms and old examples, including aliases and previous names.
7. Validate
Use references/update-checklist.md. Run repository-provided checks where available:
- Markdown/MDX parser, formatter, style or spelling policy;
- internal and external link checker;
- documentation build and generated-doc diff;
- snippet/type/compile/test harness;
- CLI help or API schema comparison;
- screenshot/visual check when changed;
- localization key and untranslated-content checks.
If a command cannot be run, state why and inspect the closest deterministic source. A rendered page is not enough if its snippet is invalid.
8. Report the synchronized set
Return:
- contract delta;
- surfaces reviewed and changed;
- authoritative evidence for each material fact;
- validation commands/results;
- generated or localization follow-ups;
- intentionally unchanged surfaces with reason;
- residual drift risk and owner.
Interaction boundaries
- Builders and
codebase-evolution-controller own behavior; this skill documents the verified result.
repository-intelligence can map documentation ownership and component links.
verification-and-release decides whether missing or invalid documentation blocks release.
product-design-director owns voice/direction for experience design; this skill maintains factual consistency.
Failure handling
- If docs conflict with code, verify intended behavior with implementation evidence before choosing a side.
- If generated docs differ unexpectedly, inspect generator version/input and stop before manual patching.
- If external docs cannot be edited, prepare an exact handoff and mark repository references that would otherwise mislead.
- If localization cannot be completed, follow repository fallback/release policy and state untranslated risk.
- If an example requires credentials or destructive actions, replace with safe placeholders and explicit setup rather than publishing real values.
Stop conditions
Stop when all affected audiences and surfaces are accounted for, material facts trace to authoritative artifacts, validation is recorded, and remaining external/generated/localized work has an owner. Do not mark synchronized while known contradictory instructions remain.
1---2name: documentation-synchronizer3description: Detect documentation drift caused by code, API, schema, configuration, migration, UI, deployment, or operational changes and update all affected user and maintainer surfaces consistently. Use when behavior or contracts changed and documentation must be mapped, edited, and validated. Do not use to invent product behavior, write unrelated marketing copy, or replace implementation verification.4---56# Documentation Synchronizer78Treat documentation as a distributed contract with users, developers, operators, and integrators.910## Trigger boundary1112Use this skill for:1314- identifying docs affected by an implementation or migration diff;15- synchronizing user guides, API references, configuration, examples, architecture, runbooks, and release notes;16- auditing stale commands, options, screenshots, generated docs, or cross-links;17- verifying a documentation-only change against current code and public contracts.1819Do not trigger for:2021- deciding what the product should do;22- visual brand/campaign copy unrelated to repository behavior;23- a code change with no externally or operationally meaningful documentation surface;24- generating API docs by editing generated output instead of its source.2526## Required inputs2728Obtain:29301. changed files/diff and final intended behavior;312. repository documentation map and audience/release context;323. authoritative sources for APIs, schemas, config, CLI, environment, and defaults;334. supported versions and migration/deprecation policy;345. documentation tooling, generators, link/check commands, and localization policy;356. known generated, translated, versioned, or externally hosted documentation boundaries.3637If behavior is ambiguous, stop and return the exact implementation question. Do not resolve ambiguity through prose.3839## Safety baseline4041- Inspect worktree state and preserve unrelated edits.42- Do not rewrite all docs to normalize style; update only impacted surfaces and necessary consistency links.43- Do not edit generated docs directly unless the repository explicitly treats them as source.44- Never copy secrets, production identifiers, private URLs, or personal data into examples.45- Mark destructive examples clearly and provide safe prerequisites; do not invent executable commands.46- Keep version-specific instructions scoped and dated where they can become stale.4748## Workflow4950### 1. Extract the contract delta5152Summarize changes under applicable categories:5354- behavior and user flow;55- public/internal API, event, schema, serialization;56- CLI command, flag, output, exit code;57- configuration, environment variable, secret reference, default;58- installation, dependency, compatibility, migration, deprecation;59- architecture, ownership, build/deploy/runtime operation;60- UI state, accessibility behavior, screenshot, or terminology;61- troubleshooting, observability, failure recovery, and rollback.6263Distinguish newly introduced behavior, changed behavior, removed behavior, and correction of previously inaccurate docs.6465### 2. Map documentation surfaces6667Use [`references/doc-surface-map.md`](references/doc-surface-map.md). Search beyond `docs/`:6869- root/package READMEs and install guides;70- inline API comments and generated-doc sources;71- OpenAPI/GraphQL/protobuf/schema descriptions;72- CLI help, `--help` snapshots, sample config, `.env.example`;73- examples, tutorials, fixtures, templates, code snippets;74- architecture decisions, diagrams, ownership, contributor docs;75- runbooks, dashboards/alert links, deployment/rollback guides;76- changelog, release notes, deprecation and migration guides;77- UI labels, empty/error/help states, screenshots, alt text;78- localization source and translation workflows.7980Use the read-only heuristic scanner as a starting point:8182```sh83python skills/documentation-synchronizer/scripts/doc_drift_scan.py . --base HEAD~1 --format markdown84```8586Or provide an explicit changed-file list when history is unavailable:8788```sh89python skills/documentation-synchronizer/scripts/doc_drift_scan.py . \90 --files src/config.ts api/openapi.yaml deploy/service.yml --format markdown91```9293The scanner suggests surfaces; it cannot determine semantic drift.9495### 3. Establish authority and audience9697For each fact identify the authoritative artifact and audiences. Examples:9899- runtime default → code/config schema, not an old README;100- API field → source schema and compatibility policy;101- install command → current package manager/installer and supported runtime;102- operational procedure → deployed topology and approved runbook;103- UX label/state → shipped component and product terminology.104105Do not propagate a possibly stale sentence into more files. Correct the source and references.106107### 4. Build the impact plan108109Create:110111```text112changed contract | audience | authoritative source | doc surfaces | update type | validation113```114115Classify update type as `add`, `change`, `remove`, `deprecate`, `migrate`, `regenerate`, `link`, or `no change—reason`.116117Prioritize release-blocking surfaces: unsafe migration steps, incompatible API/config instructions, missing security/privacy behavior, and invalid operational recovery.118119### 5. Update coherently120121Apply the smallest coherent set of changes:122123- align terminology, names, defaults, supported versions, and examples;124- show prerequisites, expected result, failure behavior, and rollback where needed;125- document old/new behavior through the compatibility window;126- keep snippets executable and scoped to the repository's actual tools;127- use relative links when repository portability matters;128- add accessible alt text and update screenshots only when the visual change affects comprehension;129- update changelog/release notes according to repository policy, not automatically for every edit;130- route generated content through its generator and review the resulting diff.131132Do not conceal limitations or unsupported cases in vague prose.133134### 6. Cross-surface consistency review135136Compare all affected surfaces for:137138- exact command/flag/environment names and case;139- defaults, ranges, required/optional status, and version support;140- API request/response/error examples;141- schema and generated-client descriptions;142- user-facing labels versus screenshots and help text;143- migration ordering, mixed-version behavior, rollback, and data implications;144- architecture diagrams versus actual components and ownership;145- release notes versus the final integrated behavior.146147Search for removed terms and old examples, including aliases and previous names.148149### 7. Validate150151Use [`references/update-checklist.md`](references/update-checklist.md). Run repository-provided checks where available:152153- Markdown/MDX parser, formatter, style or spelling policy;154- internal and external link checker;155- documentation build and generated-doc diff;156- snippet/type/compile/test harness;157- CLI help or API schema comparison;158- screenshot/visual check when changed;159- localization key and untranslated-content checks.160161If a command cannot be run, state why and inspect the closest deterministic source. A rendered page is not enough if its snippet is invalid.162163### 8. Report the synchronized set164165Return:166167- contract delta;168- surfaces reviewed and changed;169- authoritative evidence for each material fact;170- validation commands/results;171- generated or localization follow-ups;172- intentionally unchanged surfaces with reason;173- residual drift risk and owner.174175## Interaction boundaries176177- Builders and `codebase-evolution-controller` own behavior; this skill documents the verified result.178- `repository-intelligence` can map documentation ownership and component links.179- `verification-and-release` decides whether missing or invalid documentation blocks release.180- `product-design-director` owns voice/direction for experience design; this skill maintains factual consistency.181182## Failure handling183184- If docs conflict with code, verify intended behavior with implementation evidence before choosing a side.185- If generated docs differ unexpectedly, inspect generator version/input and stop before manual patching.186- If external docs cannot be edited, prepare an exact handoff and mark repository references that would otherwise mislead.187- If localization cannot be completed, follow repository fallback/release policy and state untranslated risk.188- If an example requires credentials or destructive actions, replace with safe placeholders and explicit setup rather than publishing real values.189190## Stop conditions191192Stop when all affected audiences and surfaces are accounted for, material facts trace to authoritative artifacts, validation is recorded, and remaining external/generated/localized work has an owner. Do not mark synchronized while known contradictory instructions remain.