Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11), free to diverge. Tree copied sans upstream .git; upstream remote added for future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19. Preserves docs/ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
197 lines
7.5 KiB
Markdown
197 lines
7.5 KiB
Markdown
---
|
|
name: openclaw-refactor-docs
|
|
description: Refactor an existing OpenClaw docs page with source-audited preservation, restructuring, and verification.
|
|
---
|
|
|
|
# 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 `openclaw-docs`: use that skill 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.
|
|
|
|
## 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.
|
|
|
|
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.
|
|
|
|
## Workflow
|
|
|
|
### 1. Load the doc standard
|
|
|
|
Read `../openclaw-docs/SKILL.md` first. Apply its 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 `openclaw-docs`.
|
|
|
|
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. 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.
|
|
|
|
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.
|
|
|
|
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. Rewrite
|
|
|
|
Rewrite in this order:
|
|
|
|
1. Make the first screen answer what the reader can do and why this page exists.
|
|
2. Put the recommended path before alternatives.
|
|
3. Keep only decision-making and common operational detail in the main flow.
|
|
4. Move exhaustive tables and rare details to the planned reference pages.
|
|
5. Preserve concise routing tables when they help readers choose commands,
|
|
config paths, harnesses, plugins, providers, or references.
|
|
6. Add troubleshooting from observable symptoms, not internal guesses.
|
|
7. Link related concepts, guides, references, diagnostics, and adjacent tools.
|
|
|
|
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.
|
|
|
|
### 7. 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 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.
|
|
|
|
If the refactor deliberately removes relevant material, say where it went or why
|
|
it was removed in the final report.
|
|
|
|
### 8. 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.
|
|
- 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.
|