Repository navigation
docs(tools): split the Sub-agents page into an index plus seven child pages - #142999
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
… pages docs/tools/subagents.md was 54,144 characters mixing reference, how-to, and explanation. Move each H2 block verbatim into docs/tools/subagents/ and keep the parent as an orientation index. Every pre-split anchor id (75 of them, including component ids minted by Accordion, Step, and ParamField titles) is preserved as an authored stub on the index, because redirect sources cannot carry a fragment. Closes r3-0797.
|
@clawsweeper re-review Rebased onto current Re-validated at the new head: |
aa71692 to
dd67f3e
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 5:33 AM ET / 09:33 UTC. ClawSweeper reviewWhat this changesSplits the Sub-agents documentation into an index and seven topic pages, retaining old section anchors and adding navigation and translation glossary entries. Merge readiness✅ Ready for maintainer review Keep open: this is a useful, distinct documentation improvement that current main has not incorporated. The reviewed split preserves the original content and link destinations, with no blocking introduced defect found. Priority: P3 Review scores
Verification
How this fits togetherThe Sub-agents documentation explains how operators and agents delegate work, inspect child runs, and handle completion or recovery. The documentation index and navigation direct readers to the relevant operating guidance. flowchart LR
A[Documentation navigation] --> C[Sub-agents index]
B[Existing section bookmarks] --> C
C --> D[Seven topic pages]
D --> E[Commands and operating guidance]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceDocs +193. Total +193 across 10 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the task-oriented documentation split with stable legacy anchors and one canonical home for each moved section. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a documentation reorganization, and the original dense page and introduced split are directly inspectable. Is this the best way to solve the issue? Yes: moving contiguous sections while preserving anchors follows the existing documentation pattern and avoids duplicating operating guidance. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 96006252820e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
… pages (openclaw#142999) docs/tools/subagents.md was 54,144 characters mixing reference, how-to, and explanation. Move each H2 block verbatim into docs/tools/subagents/ and keep the parent as an orientation index. Every pre-split anchor id (75 of them, including component ids minted by Accordion, Step, and ParamField titles) is preserved as an authored stub on the index, because redirect sources cannot carry a fragment. Closes r3-0797. Co-authored-by: Vincent Koc <[email protected]>
What
docs/tools/subagents.mdwas 54,144 characters (7,142 words, 37 headings) mixing tool reference, how-to, and explanation. It is now an orientation index plus seven child pages underdocs/tools/subagents/.Content-preserving: no rewriting, no reordering. Every H2 block moved verbatim, in original order, at its original heading level.
Closes ledger finding
r3-0797(rubric 3, blocking/split).docs/tools/subagents.md(index)docs/tools/subagents/slash-command.mddocs/tools/subagents/tool-reference.mddocs/tools/subagents/thread-bound-sessions.mddocs/tools/subagents/nesting.mddocs/tools/subagents/announce.mddocs/tools/subagents/tool-policy.mddocs/tools/subagents/operations.mdShape matches
docs/tools/code-mode/+docs/tools/code-mode.md, which is onmain(verified withtest -d, not from an open PR).Anchors
Per-anchor redirects are impossible here:
redirectSource()inscripts/lib/docs-redirects.mjsthrows on any source containing[?#]. So every pre-split id is preserved as an authored<a id="…" />stub on the index, under Where each section moved.Ids were enumerated with the repo's own
parseDocsDocument(scripts/lib/docs-markdown.mjs), not a slug approximation — that matters, because the three punctuated headings (## Tool: \sessions_spawn`and friends) each mint **two** ids (tool%3A-sessions_spawnandtool-sessions_spawn), andAccordion,Step, andParamFieldtitles mint ids of their own (26param-*`, 5 step ids, 4 accordion ids).74 ids are stubbed;
relatedis not, because the index still publishes## Relateditself and a stub would raise a duplicate authored/canonical id. The parent's 76th id is the newwhere-each-section-moved.The six anchors that other pages actually deep-link (
#slash-command,#tool-parameters,#thread-bound-sessions,#tool-sessions_yield,#liveness-and-recovery,#stopping, fromconcepts/session-tool.md,concepts/session.md,concepts/subagent-yield-handoff.md,releases/2026.9.2.md,tools/swarm.md,web/control-ui/chat.md) all resolve unchanged. A passing link audit is not evidence of this — the assertion above is.Losslessness, proven
With the three declared link edits below reverted, the seven children concatenate to a byte-identical copy of the original body:
The index keeps the original intro (L11-40) and
## Related(L825-831) verbatim (asserted by substring match).markdownlintMD001 accepts (same as the code-mode children).The entire prose diff
Three cross-child references, each declared. Nothing else in the moved text changed.
slash-command.md— wasSee [Thread supporting channels](#thread-supporting-channels) below.The target moved to a sibling page, so the relative anchor no longer resolved and "below" was no longer true. Now links to/tools/subagents/thread-bound-sessions#thread-supporting-channels, and "below" is dropped.tool-reference.md— was…direct thread replies use the completion paths above.Those paths are now onslash-command.md. Now…use the [completion paths](/tools/subagents/slash-command#spawn-behavior).nesting.md—See [Stopping](/tools/subagents#stopping)retargeted to/tools/subagents/operations#stopping(it resolved either way through the index stub; this removes the hop).Plus two frontmatter lines on the index, since the page is now an index (the same change
docs/tools/code-mode.mdmade):summarybecomes "Index of the OpenClaw sub-agent documentation, one page per reader job", and a fourthread_whenentry, "You are looking for the sub-agent page that matches your task", is appended.titleandsidebarTitleare unchanged, and the three originalread_whenentries are kept verbatim. Child frontmatter is new by definition. No other line of prose differs anywhere.python3 .audit/check-orphan-refs.pyover the index and all seven children returns one candidate,tool-reference.md:35 "one of the profiles above", whose target (coding/messaging/minimal/full) is three lines up on the same page. A wider manual scan (above|below|earlier|preceding|following section) adds onlynesting.md:70andtool-policy.md:29("below depth5", comparative, not a cross-reference) andthread-bound-sessions.md:59(target on the same page).Test pins
python3 .audit/docs-test-pins.py docs/tools/subagents.mdreports "15 test(s) pin this page". Classified by reading each:qa/scenarios/**/*.yaml— listdocs/tools/subagents.mdin adocs:reference array. Path reference only, no content assertion. The parent file still exists, so all still resolve.test/e2e/qa-lab/runtime/subagent-lineage-inspection.ts:990—docsRefs: [… "docs/tools/subagents.md" …]. Same: a path, not an assertion on content.taxonomy.yaml(L1580, L1752, L1930, L7835) —docs/tools/subagents.mdin coverage lists. Not a test. No#anchoron any of the four, so nothing to re-resolve.CHANGELOG.md— matches only the word "subagents" in release notes. Not a test, not a pin.Independent
git grep -nonorigin/mainwith no path filter, for/tools/subagents,tools/subagentsand the baresubagents.md, found the same set plus documentation links andsrc/agents/tools/subagents-tool.ts(unrelated source file). No contract test reads this file and asserts literal strings, so thesdk-subpaths.mdrefusal precedent does not apply.Ownership
.github/CODEOWNERShas no catch-all rule and no/docs/tools/rule. Simulating last-match-wins over the actual paths:docs/tools/subagents.mdand every new child are unowned, as are theirdocs/tools/siblings — so this is not an ownership gap, just how the file is written. Controls asserted first:docs/gateway/sandboxing.md→@openclaw/openclaw-secops(L55),docs/security/x.md→@openclaw/openclaw-secops(L52),docs/reference/RELEASING.md→@openclaw/openclaw-release-managers(L68). The page has an## Authenticationsection, but subject does not imply ownership and no rule matches it..github/labeler.ymluses file-exact globs and does not matchdocs/tools/subagents*, before or after. No new directory needs labelling; nothing changed there.Validators
Run on the staged tree, after
git add, after the rebase onto2cb7337e207. Every step of the CIDocsjob (pnpm check:docs) enumerated and run:Beyond the CI job:
Both failures are pre-existing, reproduced in a detached worktree at the base sha
2cb7337e207with no changes applied:--anchorsreports the same 42 broken links at base and on the branch —diffof the two lists is empty. None mentionsubagents. 39 are/clawhub/*routes (the CI job checks outopenclaw/clawhubintoOPENCLAW_DOCS_SYNC_CLAWHUB_REPO; that source is not present locally) and 3 are the knownmaturity/#windows-app-node.docs-link-audit > preserves Mint component targets for raw component apostrophes(expected ['ass-guide','param-ass-guide'] to deeply equal ['as-s-guide','param-as-s-guide']), a unit assertion on the slugifier, identical at base.docs/.i18n/glossary.zh-CN.jsongained 8 entries (seven child titles plus theSwarm collectorslink label the checker flagged). Resolved once against a concurrent split withpython3 .audit/resolve-glossary.py; verified set-wise as a true superset of both conflict sides with 0 duplicatesourcevalues (838 + 822 -> 846 union).Deliberately not fixed here
r3-0790(runTimeoutSeconds): this page says the override "Applies to native, ACP, and visible sessions", whiledocs/tools/acp-agents/sessions.md:104-107says ACPsessions_spawnrejectsrunTimeoutSeconds/timeoutSeconds. That needs a runtime check, not a documentation edit, and this PR is content-preserving. Both statements moved verbatim: the defaults bullet is nowdocs/tools/subagents/tool-reference.md:46and the<ParamField>isdocs/tools/subagents/tool-reference.md:115-117.### Allowlist,### Discoveryand### Auto-archivesit under## Thread-bound sessionsin the original although they are not thread-specific. Preserved as-is; re-homing them is a structure change for a later PR.r3-0798,r3-0799,r3-0800,r3-0801,r3-2366,r3-2367,r3-2368,r3-2369all propose rewrites, not moves, and stay open for the phase-3/4 PRs on this directory. Their line numbers now need re-targeting to the child pages.