OpenClaw Refactor Docs
Overview
Use this skill when the user gives a target OpenClaw docs page and asks to
rewrite, refactor, reorganize, split, shorten, or improve it.
This skill builds on docy's ref/developer-docs and ref/openclaw-docs
references for style, page types, structure, examples, discoverability, and
verification. This skill adds the rewrite workflow needed to avoid losing
accurate behavior during a major docs refactor.
For major rewrites, moved-section audits, migration maps, or line-by-line
preservation requests, invoke $docs-audit-v2 as the audit engine and load its
refactor-integration reference. This skill owns the rewrite and semantic
mapping decisions; $docs-audit-v2 owns the schema, CLI implementation,
hydration, validation, report rendering, and viewer.
Inputs
Required:
- A target docs page path, such as
docs/plugins/codex-harness.md.
Optional:
- Desired page type, such as topic page, guide, reference, or troubleshooting.
- Specific goals, such as shorter main page, move details to reference pages, or
align with current CLI behavior.
- Related source files, schemas, commands, tests, specs, or PRs.
If the target page is missing or ambiguous, ask one concise question before
editing. Otherwise, proceed.
Working Contract
Refactor the target page to be more useful, concise, and comprehensive within
its stated scope.
Do not treat a rewrite as permission to discard behavior facts. Preserve,
verify, move, or explicitly retire existing material. Incorrect docs are worse
than verbose docs.
Before rewriting, lock the page's reader contract in one sentence:
- Who is this page for?
- What should the reader be able to do after reading it?
- Which adjacent audiences or workflows are explicitly out of scope?
Use that contract to reject scope creep. Maintainer-only architecture,
implementation details, rare debugging, and exhaustive references do not belong
in a happy-path guide unless the reader needs them to complete the page's stated
workflow.
Prefer this split:
- Topic or guide pages cover the 80/20 path, decisions readers must make, safe
setup, smallest reliable verification, common failures, and links onward.
- Reference pages cover exhaustive fields, defaults, enums, limits, precedence
rules, API contracts, narrow internals, and rare debugging details.
- Troubleshooting pages start from observable symptoms and map to checks,
causes, and fixes.
End-to-End Refactor Loop
Use this loop for major doc rewrites, moved-section refactors, and any request
that asks for audit-grade preservation:
- Capture the directive.
Record the target docs, source docs, desired page type, rewrite goals,
non-negotiable constraints, related reference/troubleshooting destinations,
whether details may move out of the target page, and the one-sentence reader
contract that defines the page's audience, outcome, and out-of-scope
workflows. Run
pnpm docs:list when available so the target and related
pages are discoverable.
- Start the refactor and audit together.
Load docy's
ref/developer-docs and ref/openclaw-docs, then use
$docs-audit-v2 to scaffold the source and destination set. Record the audit
artifact paths, source base ref, source doc order, destination doc order, and
mapping-patch.json location before rewriting.
- Rewrite while maintaining mappings.
Edit the docs according to the refactor plan and update
mapping-patch.json as material moves, merges, or becomes intentionally
removed. Do not wait until the end to reconstruct preservation from memory.
- Run the initial audit.
Run the audit CLI through
map, hydrate, validate, and render. Inspect
the Markdown report and viewer, not just the command exit status.
- Fix the initial audit issues.
For each issue, decide whether it needs a docs edit, a destination add, a
destination reindex, a mapping fix, an intentional-removal row, or source
evidence proving the old line obsolete. Rerun
map, hydrate, validate,
and render until the mechanical audit is clean.
- Run line-by-line semantic review with subagents.
For each source page, assign one subagent to account for every source line
against the current destination docs and hydrated audit. The subagent must
report whether each source line is preserved, moved, redundant, obsolete, or
still missing, with exact destination evidence or a concrete justification.
- Loop on subagent findings.
Integrate every actionable finding into the docs, mappings, or intentional
removal rationale. Reindex changed destinations, rerun the audit CLI, and
repeat the per-source-page semantic review until no subagent reports
remaining preservation, structure, or clarity issues.
- Finalize with verification and a preservation report.
Run the smallest reliable docs checks, record the final audit artifacts, list
moved or intentionally removed material, and report any behavior-sensitive
claims that could not be verified.
Do not treat the first clean validation result as final semantic signoff. For a
major rewrite, the workflow is complete only after the audit validates and the
per-source-page line review has no actionable findings.
Workflow
1. Load the doc standard
Invoke $docy, then load the general documentation standard followed by the
OpenClaw overlay:
docy inject ref/developer-docs
docy inject ref/openclaw-docs
Apply their page-type, style, examples, navigation, and verification guidance
throughout the refactor.
Run pnpm docs:list when available, then read only the target page and the
likely entry points, references, or related pages needed for the refactor.
2. Classify the page
Before editing, decide the intended page type from the injected docy references.
If the current page mixes page types, choose the main page type and plan where
the other material belongs:
- Move exhaustive contracts to an existing or new reference page.
- Move symptom-driven material to an existing or new troubleshooting page.
- Move narrow setup workflows to a guide when they interrupt the main path.
- Keep concise routing, decision, and safety details in the main page when
readers need them to complete the workflow.
3. Preserve and audit existing facts
Create a working inventory from the old page before rewriting. For major
refactors, materialize this inventory with docs-audit-v2 scaffold so it can
become audit.json and mapping-patch.json, not just informal notes. Include:
- Config fields, flags, commands, slash commands, env vars, defaults, enums,
nullable values, and constraints.
- Precedence rules, fallback behavior, caps, limits, rate limits, timeouts,
lifecycle states, queueing behavior, and compatibility rules.
- Auth, permission, approval, sandbox, safety, privacy, and destructive-action
behavior.
- Setup requirements, supported versions, dependencies, operating systems,
credentials, and account requirements.
- Error messages, troubleshooting symptoms, diagnostics, and recovery steps.
- Examples, expected output, command routing tables, and cross-links.
- Rationale, decision framing, and emphasized modal constraints such as
only, must, and not.
- Structured source blocks such as tabs, card groups, checklists, numbered
operational lists, comparison tables, and next-step sections.
For each fact, choose one outcome:
- Keep it in the refactored target page.
- Move it to a specific existing page.
- Move it to a specific new page.
- Delete it because current source proves it is obsolete or out of scope.
For each structured source block, choose one outcome:
- Preserve the structure and wording because it is already clear.
- Preserve the structure but update only the facts that source-of-truth checks
require.
- Move the whole block to a specific destination page.
- Replace the structure only when the reader contract makes the old shape wrong,
and record why.
Default to preserving useful source structure. Do not collapse numbered
operational lists into prose, split paired tabs, rewrite clear checklists, or
remove guided next-step cards unless there is a concrete reader benefit.
Do not infer defaults, permissions, policy, timeout behavior, or safety posture
from names or intent. Verify them.
4. Find source of truth
Use the nearest authoritative source for each behavior-sensitive claim:
- Public schema, plugin manifest, generated config docs, or exported types for
config fields.
- CLI implementation, slash-command handlers, help text, and command tests for
commands and flags.
- Runtime source and tests for lifecycle, queueing, permission, fallback,
timeout, and provider behavior.
- Protocol docs, SDK facades, and contract tests for APIs and plugin surfaces.
- Existing docs only as secondary evidence unless the target is purely
conceptual.
If a page promises a reference, compare its tables against the schema,
manifest, CLI help, generated docs, or exported types. Missing public fields,
defaults, precedence rules, caps, or side effects are correctness bugs.
5. Plan moved material
When moving detail out of the target page, record the destination before
editing:
- Existing page: name the page and section.
- New page: choose the page type, slug, title, frontmatter summary,
doc-schema-version: 1, and read_when hints.
- Target page: keep a short summary and link from the point where readers need
the deeper detail.
Avoid duplicate truth. If the same contract appears in multiple places, choose
one canonical page and link to it.
6. Preserve with docs-audit-v2 for major refactors
Use docs-audit-v2 when the refactor needs audit-grade preservation proof.
This skill owns the refactor-side work:
- Resolve the pre-refactor source ref.
- Choose explicit source docs and destination docs from the refactor plan.
- Run
scaffold before rewriting when possible.
- Maintain
mapping-patch.json while editing.
- Add one mapping object per source block.
- Add one
mapping[] row per material source line.
- Use exact destination lines whenever possible.
- Record intentional removals as rows, not omissions.
- Run
add-dest when destination pages are created after scaffold.
- Run
reindex-dest when destination pages are edited.
- Run
map to produce audit.mapped.json.
When continuing a mapped audit after rebasing, first verify that the audit base
still points at the pre-refactor source snapshot. Relative refs such as
HEAD~3 can drift when commits are added, dropped, or squashed. If the base has
drifted, rerun scaffold with the corrected base before reindex-dest, keep
the original source and destination doc order so stable IDs still match
mapping-patch.json, then rerun map, hydrate, validate, and render.
Do not map one source line to a broad destination section as
semantic-confirmed. If exact destination lines are not selected yet, use
block-fallback and keep the row non-final until tightened.
A preservation gap does not automatically belong back in the rewritten main
page. First check whether the fact is already preserved in a canonical
reference, troubleshooting, or generated page in the destination set. Prefer a
short retrieval link from the main page over duplicating exhaustive detail,
unless the fact is required for the 80/20 workflow on that page.
After audit.mapped.json exists, hand off to the audit phase:
hydrate produces audit.hydrated.json.
validate --out produces audit.validated.json.
render produces the Markdown report and HTML viewer.
Do not claim the preservation audit is complete while validate reports
errors.
7. Rewrite
Rewrite in this order:
- Make the first screen answer what the reader can do and why this page exists.
- Put the recommended path before alternatives.
- Apply the reader contract before adding or keeping material: keep only the
audience, outcome, decisions, and common operational detail needed for this
page.
- Move maintainer-only architecture, implementation detail, exhaustive tables,
and rare details to the planned reference pages.
- Preserve source tabs, checklists, numbered operational lists, card groups,
and next-step sections when they still serve the reader better than prose.
- Preserve concise routing tables when they help readers choose commands,
config paths, harnesses, plugins, providers, or references.
- Add troubleshooting from observable symptoms, not internal guesses.
- Link related concepts, guides, references, diagnostics, and adjacent tools.
- Move product-limit, detect-only, and diagnostic caveats to troubleshooting or
diagnostics unless they affect the setup step itself.
- Replace dense tables with sections, accordions, or lists when rows need more
than compact lookup text.
- Preserve the source page's reason-for-existence and decision rationale when
they help readers choose the right path.
Add doc-schema-version: 1 to the YAML frontmatter of every docs page that the
refactor migrates, creates, or materially rewrites. Apply it only to docs page
files, not docs.json, glossary JSON, or other non-page metadata. If a
migrated page is generated, update the generator so regeneration preserves the
marker instead of hand-editing generated output.
Do not leave placeholders such as "TODO", "TBD", or "see docs" unless the user
explicitly asks for a draft.
8. Compare old and new
After editing, compare the old and new page:
- Confirm all behavior-sensitive facts were kept, moved, or intentionally
deleted with source-backed reason.
- Check that the main page still covers the 80/20 scenario end to end.
- Check that the page still obeys the locked reader contract and has not pulled
adjacent maintainer, architecture, reference, or rare-debugging workflows back
into the main reader path.
- Check that source tabs, checklists, numbered operational lists, card groups,
and next-step sections were preserved or have an explicit reason for changing.
- Check that reference pages remain exhaustive for the scope they claim.
- Check that links from the target page reach moved details.
- Check that headings are stable, searchable, and action-oriented.
- Check that troubleshooting did not grow beyond the source or common reader
failures without a clear reason.
- Check that dense lookup material still has a readable shape; do not compress
multi-paragraph explanations into table cells.
If the refactor deliberately removes relevant material, say where it went or why
it was removed in the final report.
9. Apply reviewer feedback
When reviewer feedback changes the rewrite, update the docs and audit together:
- Do not treat review edits as prose-only. Reindex, remap, and validate affected
audit mappings.
- If feedback asks for less detail, classify removed source detail as redundant,
intentionally moved, or intentionally removed instead of marking broad coverage.
- Keep troubleshooting item count the same or lower during slimming refactors
unless source material or common reader failures require more.
- Preserve source rationale and important modal emphasis unless source evidence
proves they are obsolete.
- Run an independent semantic audit after multiple feedback rounds on a major
rewrite. A clean schema validation is not semantic signoff.
10. Verify
Run the smallest reliable docs checks for the touched surface:
pnpm docs:list
git diff --check -- <touched-files>
- Targeted
pnpm exec oxfmt --check --threads=1 <touched-files>
pnpm docs:check-mdx
pnpm docs:check-links
pnpm docs:check-i18n-glossary when link text, navigation, labels, or glossary
surfaces changed
- Generated-doc checks when schemas, generated config docs, API docs, or
generated baselines are touched
Run commands and examples from the page whenever feasible. If you cannot verify
a behavior-sensitive claim, either remove the claim, mark the uncertainty in the
work-in-progress report, or ask for the missing source.
Final Report
Report:
- What changed in the target page.
- What details moved and their destination pages.
- For audit-grade refactors, the
mapping-patch.json and audit.mapped.json
artifacts produced by the refactor phase.
- What source-of-truth checks backed behavior-sensitive claims.
- What validation ran and what failed for unrelated reasons.
Do not include a long rewrite diary. Lead with remaining risks only if there are
any.
1---2name: docs-refactor-v23description: Refactor an existing OpenClaw docs page with source-audited preservation, restructuring, and verification.4---56# OpenClaw Refactor Docs78## Overview910Use this skill when the user gives a target OpenClaw docs page and asks to11rewrite, refactor, reorganize, split, shorten, or improve it.1213This skill builds on docy's `ref/developer-docs` and `ref/openclaw-docs`14references for style, page types, structure, examples, discoverability, and15verification. This skill adds the rewrite workflow needed to avoid losing16accurate behavior during a major docs refactor.1718For major rewrites, moved-section audits, migration maps, or line-by-line19preservation requests, invoke `$docs-audit-v2` as the audit engine and load its20`refactor-integration` reference. This skill owns the rewrite and semantic21mapping decisions; `$docs-audit-v2` owns the schema, CLI implementation,22hydration, validation, report rendering, and viewer.2324## Inputs2526Required:2728- A target docs page path, such as `docs/plugins/codex-harness.md`.2930Optional:3132- Desired page type, such as topic page, guide, reference, or troubleshooting.33- Specific goals, such as shorter main page, move details to reference pages, or34 align with current CLI behavior.35- Related source files, schemas, commands, tests, specs, or PRs.3637If the target page is missing or ambiguous, ask one concise question before38editing. Otherwise, proceed.3940## Working Contract4142Refactor the target page to be more useful, concise, and comprehensive within43its stated scope.4445Do not treat a rewrite as permission to discard behavior facts. Preserve,46verify, move, or explicitly retire existing material. Incorrect docs are worse47than verbose docs.4849Before rewriting, lock the page's reader contract in one sentence:5051- Who is this page for?52- What should the reader be able to do after reading it?53- Which adjacent audiences or workflows are explicitly out of scope?5455Use that contract to reject scope creep. Maintainer-only architecture,56implementation details, rare debugging, and exhaustive references do not belong57in a happy-path guide unless the reader needs them to complete the page's stated58workflow.5960Prefer this split:6162- Topic or guide pages cover the 80/20 path, decisions readers must make, safe63 setup, smallest reliable verification, common failures, and links onward.64- Reference pages cover exhaustive fields, defaults, enums, limits, precedence65 rules, API contracts, narrow internals, and rare debugging details.66- Troubleshooting pages start from observable symptoms and map to checks,67 causes, and fixes.6869## End-to-End Refactor Loop7071Use this loop for major doc rewrites, moved-section refactors, and any request72that asks for audit-grade preservation:73741. Capture the directive.75 Record the target docs, source docs, desired page type, rewrite goals,76 non-negotiable constraints, related reference/troubleshooting destinations,77 whether details may move out of the target page, and the one-sentence reader78 contract that defines the page's audience, outcome, and out-of-scope79 workflows. Run `pnpm docs:list` when available so the target and related80 pages are discoverable.812. Start the refactor and audit together.82 Load docy's `ref/developer-docs` and `ref/openclaw-docs`, then use83 `$docs-audit-v2` to scaffold the source and destination set. Record the audit84 artifact paths, source base ref, source doc order, destination doc order, and85 `mapping-patch.json` location before rewriting.863. Rewrite while maintaining mappings.87 Edit the docs according to the refactor plan and update88 `mapping-patch.json` as material moves, merges, or becomes intentionally89 removed. Do not wait until the end to reconstruct preservation from memory.904. Run the initial audit.91 Run the audit CLI through `map`, `hydrate`, `validate`, and `render`. Inspect92 the Markdown report and viewer, not just the command exit status.935. Fix the initial audit issues.94 For each issue, decide whether it needs a docs edit, a destination add, a95 destination reindex, a mapping fix, an intentional-removal row, or source96 evidence proving the old line obsolete. Rerun `map`, `hydrate`, `validate`,97 and `render` until the mechanical audit is clean.986. Run line-by-line semantic review with subagents.99 For each source page, assign one subagent to account for every source line100 against the current destination docs and hydrated audit. The subagent must101 report whether each source line is preserved, moved, redundant, obsolete, or102 still missing, with exact destination evidence or a concrete justification.1037. Loop on subagent findings.104 Integrate every actionable finding into the docs, mappings, or intentional105 removal rationale. Reindex changed destinations, rerun the audit CLI, and106 repeat the per-source-page semantic review until no subagent reports107 remaining preservation, structure, or clarity issues.1088. Finalize with verification and a preservation report.109 Run the smallest reliable docs checks, record the final audit artifacts, list110 moved or intentionally removed material, and report any behavior-sensitive111 claims that could not be verified.112113Do not treat the first clean validation result as final semantic signoff. For a114major rewrite, the workflow is complete only after the audit validates and the115per-source-page line review has no actionable findings.116117## Workflow118119### 1. Load the doc standard120121Invoke `$docy`, then load the general documentation standard followed by the122OpenClaw overlay:123124```bash125docy inject ref/developer-docs126docy inject ref/openclaw-docs127```128129Apply their page-type, style, examples, navigation, and verification guidance130throughout the refactor.131132Run `pnpm docs:list` when available, then read only the target page and the133likely entry points, references, or related pages needed for the refactor.134135### 2. Classify the page136137Before editing, decide the intended page type from the injected docy references.138139If the current page mixes page types, choose the main page type and plan where140the other material belongs:141142- Move exhaustive contracts to an existing or new reference page.143- Move symptom-driven material to an existing or new troubleshooting page.144- Move narrow setup workflows to a guide when they interrupt the main path.145- Keep concise routing, decision, and safety details in the main page when146 readers need them to complete the workflow.147148### 3. Preserve and audit existing facts149150Create a working inventory from the old page before rewriting. For major151refactors, materialize this inventory with `docs-audit-v2 scaffold` so it can152become `audit.json` and `mapping-patch.json`, not just informal notes. Include:153154- Config fields, flags, commands, slash commands, env vars, defaults, enums,155 nullable values, and constraints.156- Precedence rules, fallback behavior, caps, limits, rate limits, timeouts,157 lifecycle states, queueing behavior, and compatibility rules.158- Auth, permission, approval, sandbox, safety, privacy, and destructive-action159 behavior.160- Setup requirements, supported versions, dependencies, operating systems,161 credentials, and account requirements.162- Error messages, troubleshooting symptoms, diagnostics, and recovery steps.163- Examples, expected output, command routing tables, and cross-links.164- Rationale, decision framing, and emphasized modal constraints such as165 **only**, **must**, and **not**.166- Structured source blocks such as tabs, card groups, checklists, numbered167 operational lists, comparison tables, and next-step sections.168169For each fact, choose one outcome:170171- Keep it in the refactored target page.172- Move it to a specific existing page.173- Move it to a specific new page.174- Delete it because current source proves it is obsolete or out of scope.175176For each structured source block, choose one outcome:177178- Preserve the structure and wording because it is already clear.179- Preserve the structure but update only the facts that source-of-truth checks180 require.181- Move the whole block to a specific destination page.182- Replace the structure only when the reader contract makes the old shape wrong,183 and record why.184185Default to preserving useful source structure. Do not collapse numbered186operational lists into prose, split paired tabs, rewrite clear checklists, or187remove guided next-step cards unless there is a concrete reader benefit.188189Do not infer defaults, permissions, policy, timeout behavior, or safety posture190from names or intent. Verify them.191192### 4. Find source of truth193194Use the nearest authoritative source for each behavior-sensitive claim:195196- Public schema, plugin manifest, generated config docs, or exported types for197 config fields.198- CLI implementation, slash-command handlers, help text, and command tests for199 commands and flags.200- Runtime source and tests for lifecycle, queueing, permission, fallback,201 timeout, and provider behavior.202- Protocol docs, SDK facades, and contract tests for APIs and plugin surfaces.203- Existing docs only as secondary evidence unless the target is purely204 conceptual.205206If a page promises a reference, compare its tables against the schema,207manifest, CLI help, generated docs, or exported types. Missing public fields,208defaults, precedence rules, caps, or side effects are correctness bugs.209210### 5. Plan moved material211212When moving detail out of the target page, record the destination before213editing:214215- Existing page: name the page and section.216- New page: choose the page type, slug, title, frontmatter summary,217 `doc-schema-version: 1`, and `read_when` hints.218- Target page: keep a short summary and link from the point where readers need219 the deeper detail.220221Avoid duplicate truth. If the same contract appears in multiple places, choose222one canonical page and link to it.223224### 6. Preserve with docs-audit-v2 for major refactors225226Use `docs-audit-v2` when the refactor needs audit-grade preservation proof.227This skill owns the refactor-side work:2282291. Resolve the pre-refactor source ref.2302. Choose explicit source docs and destination docs from the refactor plan.2313. Run `scaffold` before rewriting when possible.2324. Maintain `mapping-patch.json` while editing.2335. Add one mapping object per source block.2346. Add one `mapping[]` row per material source line.2357. Use exact destination lines whenever possible.2368. Record intentional removals as rows, not omissions.2379. Run `add-dest` when destination pages are created after scaffold.23810. Run `reindex-dest` when destination pages are edited.23911. Run `map` to produce `audit.mapped.json`.240241When continuing a mapped audit after rebasing, first verify that the audit base242still points at the pre-refactor source snapshot. Relative refs such as243`HEAD~3` can drift when commits are added, dropped, or squashed. If the base has244drifted, rerun `scaffold` with the corrected base before `reindex-dest`, keep245the original source and destination doc order so stable IDs still match246`mapping-patch.json`, then rerun `map`, `hydrate`, `validate`, and `render`.247248Do not map one source line to a broad destination section as249`semantic-confirmed`. If exact destination lines are not selected yet, use250`block-fallback` and keep the row non-final until tightened.251252A preservation gap does not automatically belong back in the rewritten main253page. First check whether the fact is already preserved in a canonical254reference, troubleshooting, or generated page in the destination set. Prefer a255short retrieval link from the main page over duplicating exhaustive detail,256unless the fact is required for the 80/20 workflow on that page.257258After `audit.mapped.json` exists, hand off to the audit phase:259260- `hydrate` produces `audit.hydrated.json`.261- `validate --out` produces `audit.validated.json`.262- `render` produces the Markdown report and HTML viewer.263264Do not claim the preservation audit is complete while `validate` reports265errors.266267### 7. Rewrite268269Rewrite in this order:2702711. Make the first screen answer what the reader can do and why this page exists.2722. Put the recommended path before alternatives.2733. Apply the reader contract before adding or keeping material: keep only the274 audience, outcome, decisions, and common operational detail needed for this275 page.2764. Move maintainer-only architecture, implementation detail, exhaustive tables,277 and rare details to the planned reference pages.2785. Preserve source tabs, checklists, numbered operational lists, card groups,279 and next-step sections when they still serve the reader better than prose.2806. Preserve concise routing tables when they help readers choose commands,281 config paths, harnesses, plugins, providers, or references.2827. Add troubleshooting from observable symptoms, not internal guesses.2838. Link related concepts, guides, references, diagnostics, and adjacent tools.2849. Move product-limit, detect-only, and diagnostic caveats to troubleshooting or285 diagnostics unless they affect the setup step itself.28610. Replace dense tables with sections, accordions, or lists when rows need more287 than compact lookup text.28811. Preserve the source page's reason-for-existence and decision rationale when289 they help readers choose the right path.290291Add `doc-schema-version: 1` to the YAML frontmatter of every docs page that the292refactor migrates, creates, or materially rewrites. Apply it only to docs page293files, not `docs.json`, glossary JSON, or other non-page metadata. If a294migrated page is generated, update the generator so regeneration preserves the295marker instead of hand-editing generated output.296297Do not leave placeholders such as "TODO", "TBD", or "see docs" unless the user298explicitly asks for a draft.299300### 8. Compare old and new301302After editing, compare the old and new page:303304- Confirm all behavior-sensitive facts were kept, moved, or intentionally305 deleted with source-backed reason.306- Check that the main page still covers the 80/20 scenario end to end.307- Check that the page still obeys the locked reader contract and has not pulled308 adjacent maintainer, architecture, reference, or rare-debugging workflows back309 into the main reader path.310- Check that source tabs, checklists, numbered operational lists, card groups,311 and next-step sections were preserved or have an explicit reason for changing.312- Check that reference pages remain exhaustive for the scope they claim.313- Check that links from the target page reach moved details.314- Check that headings are stable, searchable, and action-oriented.315- Check that troubleshooting did not grow beyond the source or common reader316 failures without a clear reason.317- Check that dense lookup material still has a readable shape; do not compress318 multi-paragraph explanations into table cells.319320If the refactor deliberately removes relevant material, say where it went or why321it was removed in the final report.322323### 9. Apply reviewer feedback324325When reviewer feedback changes the rewrite, update the docs and audit together:326327- Do not treat review edits as prose-only. Reindex, remap, and validate affected328 audit mappings.329- If feedback asks for less detail, classify removed source detail as redundant,330 intentionally moved, or intentionally removed instead of marking broad coverage.331- Keep troubleshooting item count the same or lower during slimming refactors332 unless source material or common reader failures require more.333- Preserve source rationale and important modal emphasis unless source evidence334 proves they are obsolete.335- Run an independent semantic audit after multiple feedback rounds on a major336 rewrite. A clean schema validation is not semantic signoff.337338### 10. Verify339340Run the smallest reliable docs checks for the touched surface:341342- `pnpm docs:list`343- `git diff --check -- <touched-files>`344- Targeted `pnpm exec oxfmt --check --threads=1 <touched-files>`345- `pnpm docs:check-mdx`346- `pnpm docs:check-links`347- `pnpm docs:check-i18n-glossary` when link text, navigation, labels, or glossary348 surfaces changed349- Generated-doc checks when schemas, generated config docs, API docs, or350 generated baselines are touched351352Run commands and examples from the page whenever feasible. If you cannot verify353a behavior-sensitive claim, either remove the claim, mark the uncertainty in the354work-in-progress report, or ask for the missing source.355356## Final Report357358Report:359360- What changed in the target page.361- What details moved and their destination pages.362- For audit-grade refactors, the `mapping-patch.json` and `audit.mapped.json`363 artifacts produced by the refactor phase.364- What source-of-truth checks backed behavior-sensitive claims.365- What validation ran and what failed for unrelated reasons.366367Do not include a long rewrite diary. Lead with remaining risks only if there are368any.