Skip to content

docs(gateway): split the tools configuration reference by domain - #142960

Merged
vincentkoc merged 1 commit into
mainfrom
docs-audit/split-config-tools
Sep 9, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
docs-audit/split-config-tools

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

docs/gateway/config-tools.md was 59,564 characters across two H2 topics that mixed reference keys, a long explanation of the managed GitHub identity, and how-to provider recipes. It is now a short index (7,517 chars) over six children under docs/gateway/config-tools/, matching the existing config-agents/ and config-channels/ split shape.

Children

Page Job Chars
tool-policy Which tools a run may call: profiles, groups, sandbox tool gate, tools.codeMode, allow/deny, byProvider, toolsBySender, elevated 14,547
github-identity tools.github: shared managed gh identity, refresh, execution boundaries 10,641
built-in-tools tools.exec, tools.loopDetection, tools.web, tools.media, tools.updatePlan 6,254
sessions-and-subagents tools.agentToAgent, tools.sessions, tools.sessions_spawn, agents.defaults.subagents 7,033
custom-providers models.providers registration, base-URL trust, provider field reference 12,309
provider-examples Worked configurations for nine providers 8,980

Anchor preservation

Per-anchor routes are not possible: a path is not a fragment, and redirectSource() throws on any source containing [?#]. So every id the page published stays alive on the parent index as an authored <a id="..." /> stub beside a link to its new home.

  • parseDocsDocument reports 58 ids before the split. 57 are stubbed; related is still published by the index itself, so no duplicate authored/canonical ID is raised (collisions: 0 on the index and on all six children).
  • Backticked headings emit both a dotted and a dashed id, so both tools.github and tools-github are preserved — docs/plugins/codex-harness-runtime.md and docs/tools/exec.md link the dotted form, everything else links the dashed form.
  • The percent-encoded tools.allow-%2F-tools.deny, the pre-existing authored toolsupdateplan stub, the H4 custom-provider-capability-declarations, and the ten Accordion-minted ids are all preserved.
  • Proof, not a passing link audit: all 58 pre-split ids resolve through resolveDocsFragment against the new index, and all 40 index-to-child fragment links resolve on their destination child.
  • Re-verified against origin/main after rebase: main's config-tools.md still publishes exactly those 58 ids, so no anchor was added while this branch was open.

Losslessness

Measured mechanically against the page at origin/main, not against a working copy.

  • Fence markers: 54 before, 54 after, info strings identical as a multiset (fence-by-fence).
  • Table rows: 47 before, 47 after. One row's text changed — see the declared exception below.
  • Outbound links: all 12 original links still present, none lost.
  • Each child's body is byte-identical to its source line range after ### → ## promotion.
  • Dropped deliberately: the two thematic breaks (---) that separated the former H2 sections, now separate pages, and the empty container heading ## Tools (its anchor is stubbed).

One prose change (declared exception)

check-orphan-refs.py found 7 directional references. Six stayed inside a single child and were re-verified there. The seventh, See the llama.cpp example below in the compat table, pointed at a section that now lives on another page, so the orphaned cross-reference became a real link to /gateway/config-tools/provider-examples#local-models-llama-cpp-llama-server. No other prose was rewritten.

Downstream references

  • taxonomy.yaml references this page three times with no fragment, so validateTaxonomyDocsReferences still resolves it; maturity:check passes.
  • Eight qa/scenarios/*.yaml docsRefs entries, src/commands/doctor/shared/deprecation-compat.ts, src/security/audit-extra.summary.ts, and src/security/audit-cross-agent-session-access.test.ts all target the surviving /gateway/config-tools route (the last two with #tools-agenttoagent, which is stubbed).
  • .github/labeler.yml has no page-specific glob for this page; docs/gateway/** and docs/** already cover the new subdirectory.
  • .github/CODEOWNERS does not list docs/gateway/config-tools.md or the new directory — the secops entries under docs/gateway/ are the individually named security pages only.

Validators

All run after git add, on the rebased branch.

check-docs-mdx           Docs MDX check passed (1034 files)
docs-link-audit          checked_internal_links=10580  broken_links=0
docs-link-audit --anchors checked_internal_links=10918 broken_links=3  (3 pre-existing docs/maturity/* #windows-app-node, confirmed at base sha)
format-docs --check      Docs formatting clean (1021 files)
check-docs-i18n-glossary rc=0
markdownlint-cli2        0 issues in 0 files (1020 files)
check-docs-config-examples rc=0
maturity:check           maturity docs inputs are valid in docs

Test lanes: vitest.unit-src on src/docs/ — 16 passed / 8 files. vitest.unit-security on audit-cross-agent-session-access.test.ts — 29 passed. vitest.tooling on src/scripts/ — 303 passed, 1 failed: the pre-existing apostrophe-slug fixture in src/scripts/docs-link-audit.test.ts, confirmed failing at the base sha before any change here.

i18n

Six zh-CN glossary entries appended for the new page titles. The rebase conflict with the concurrent OpenTelemetry split was resolved as a union (825 entries, 0 duplicate sources, every entry from origin/main retained). docs/.i18n/zh-Hans-navigation.json deliberately untouched.

Closes audit findings: r3-0337, r3-1539. Partially addresses r3-1542 (custom providers now have their own page; inbound links from Models and Providers not rewired here).

docs/gateway/config-tools.md was 59,564 characters across two H2 topics
that mixed reference keys, a long explanation of the managed GitHub
identity, and how-to provider recipes. Split by reader job into
docs/gateway/config-tools/, keeping the parent as a short index.

Children:
- tool-policy — tool profiles, tool groups, the sandbox tool gate,
  tools.codeMode, and the allow/deny, byProvider, toolsBySender, and
  elevated layers (14,547 chars)
- github-identity — tools.github: the shared managed gh identity, token
  refresh, and the execution boundaries that receive it (10,641 chars)
- built-in-tools — tools.exec, tools.loopDetection, tools.web,
  tools.media, tools.updatePlan (6,254 chars)
- sessions-and-subagents — tools.agentToAgent, tools.sessions,
  tools.sessions_spawn, agents.defaults.subagents (7,033 chars)
- custom-providers — models.providers registration, base-URL trust, and
  the provider field reference (12,309 chars)
- provider-examples — worked configurations for nine providers
  (8,980 chars)

Anchor strategy: per-anchor routes are impossible here because
redirectSource() rejects any source containing [?#], so every id the
page published stays alive on the parent index as an authored
<a id="..." /> stub next to a link to its new home. parseDocsDocument
reports 58 ids before the split; 57 are stubbed and `related` is still
published by the index itself, so no duplicate authored/canonical ID is
raised. Backticked headings emit both a dotted and a dashed id
(tools.github and tools-github) and both are preserved, as is the
percent-encoded tools.allow-%2F-tools.deny, the pre-existing authored
toolsupdateplan stub, and the ten Accordion-minted ids. All 58 resolve
through resolveDocsFragment against the new index, and all 40
index-to-child fragment links resolve on their destination child.

Losslessness (source body vs. the six children, measured mechanically
against the base sha, not against a working copy): 54 fence markers
before and after with identical info strings; 47 table rows before and
after; all 12 original outbound links still present; each child's body
byte-identical to its source line range after H3-to-H2 promotion.
Two thematic breaks that separated the former H2 sections are dropped
because those sections are now separate pages, and the empty container
heading "## Tools" is not reproduced — its anchor is stubbed.

One prose change, the declared orphaned-cross-reference exception:
"See the llama.cpp example below" in the compat table pointed at a
section that now lives on another page, so it became a real link.
The other six directional references stayed within a single child and
were re-verified there.

taxonomy.yaml references this page without a fragment, so
validateTaxonomyDocsReferences still resolves it; maturity:check passes.
The eight qa/scenarios docsRefs and the two src/ docs URLs also target
the surviving route.

Closes audit findings: r3-0337, r3-1539
@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Sep 9, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 4:19 AM ET / 08:19 UTC.

ClawSweeper review

What this changes

Splits the tools configuration reference into six focused pages, adds navigation and glossary entries, and preserves existing section links through the original index.

Merge readiness

✅ Ready for maintainer review

The split remains useful: current main still contains the combined reference. Content preservation and navigation checks revealed no actionable defect, and this member-authored PR is protected from cleanup closure.

Priority: P3
Reviewed head: 24a2edc3968fdc630d10dc057d82d0ca38f2d449

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused documentation split with careful content and anchor preservation and no supported blocking finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 7 items Pinned scope and live state: The host verifies the introduced delta from 70bc5f3 to the reviewed head as documentation-only. A live REST read confirmed that the PR remains open, unmerged, and on that same head.
Current main still needs the split: Fetched main retains the combined Tools, Custom providers and base URLs, and Provider examples sections. Its original page matches the merge-base page; neither fetched main nor the supplied latest-release revision contains the new child directory.
Content preservation: All six child pages were read fully. An independent read-only comparison found the retained bodies unchanged after normalizing heading levels and excluding blank lines and section separators, except for the declared llama.cpp cross-reference repair. All 54 fence markers remain.
Findings None None.
Security None None.

How this fits together

The Gateway configuration documentation helps operators find tool settings, permission policies, and provider examples. Navigation and existing section links now lead through an index to focused reference pages.

flowchart TD
  A[Documentation navigation] --> C[Tools configuration index]
  B[Existing section links] --> C
  C --> D[Tool policy and identity]
  C --> E[Built-in and session tools]
  C --> F[Custom provider reference]
  F --> G[Provider examples]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs +146. Total +146 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 9 1076 930 +146
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 1076 930 +146

Review metrics

None.

Technical review

Best possible solution:

Keep one canonical home for each reference domain while retaining the parent route and its existing anchors.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this reorganizes a reference page rather than reporting a runtime defect; the combined page is directly observable on fetched main.

Is this the best way to solve the issue?

Yes: the split follows the existing configuration-reference structure, preserves detailed content, and retains old anchors without unsupported fragment redirects.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7115c4b6fccf.

Labels

Label changes:

  • add P3: This is a documentation organization improvement with preserved configuration content and existing link destinations.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Label justifications:

  • P3: This is a documentation organization improvement with preserved configuration content and existing link destinations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

What I checked:

  • Pinned scope and live state: The host verifies the introduced delta from 70bc5f3 to the reviewed head as documentation-only. A live REST read confirmed that the PR remains open, unmerged, and on that same head. (24a2edc3968f)
  • Current main still needs the split: Fetched main retains the combined Tools, Custom providers and base URLs, and Provider examples sections. Its original page matches the merge-base page; neither fetched main nor the supplied latest-release revision contains the new child directory. Public docs: docs/gateway/config-tools.md. (docs/gateway/config-tools.md:13, 7115c4b6fccf)
  • Content preservation: All six child pages were read fully. An independent read-only comparison found the retained bodies unchanged after normalizing heading levels and excluding blank lines and section separators, except for the declared llama.cpp cross-reference repair. All 54 fence markers remain. Public docs: docs/gateway/config-tools/custom-providers.md. (docs/gateway/config-tools/custom-providers.md:128, 24a2edc3968f)
  • Existing links retain destinations: The parent contains 57 distinct authored anchor stubs plus its Related heading. Dotted GitHub identity links and the security diagnostic's dashed agent-to-agent link have matching stubs leading to the appropriate children. The publishing parser accepts authored IDs, and path redirects explicitly reject fragment-bearing sources. Public docs: docs/gateway/config-tools.md. (docs/gateway/config-tools.md:28, 24a2edc3968f)
  • Navigation and translation scope: The six children are registered beside the parent using the existing Agents and Channels navigation pattern. The glossary adds their six titles without modifying existing entries; both JSON files parse successfully. Public docs: docs/docs.json. (docs/docs.json:2225, 24a2edc3968f)
  • Related documentation history: Current-main history includes Vincent Koc's earlier agents-reference split and recent maintenance of the tools reference. GitHub commit metadata independently identifies vincentkoc as the author of the earlier split. This supports routing, without claiming source-line introduction. Public docs: docs/gateway/config-agents.md. (docs/gateway/config-agents.md:30, 29ba80f738df)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc merged commit 008cf5d into main Sep 9, 2026
68 checks passed
@vincentkoc
vincentkoc deleted the docs-audit/split-config-tools branch September 9, 2026 08:24
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
…nclaw#142960)

docs/gateway/config-tools.md was 59,564 characters across two H2 topics
that mixed reference keys, a long explanation of the managed GitHub
identity, and how-to provider recipes. Split by reader job into
docs/gateway/config-tools/, keeping the parent as a short index.

Children:
- tool-policy — tool profiles, tool groups, the sandbox tool gate,
  tools.codeMode, and the allow/deny, byProvider, toolsBySender, and
  elevated layers (14,547 chars)
- github-identity — tools.github: the shared managed gh identity, token
  refresh, and the execution boundaries that receive it (10,641 chars)
- built-in-tools — tools.exec, tools.loopDetection, tools.web,
  tools.media, tools.updatePlan (6,254 chars)
- sessions-and-subagents — tools.agentToAgent, tools.sessions,
  tools.sessions_spawn, agents.defaults.subagents (7,033 chars)
- custom-providers — models.providers registration, base-URL trust, and
  the provider field reference (12,309 chars)
- provider-examples — worked configurations for nine providers
  (8,980 chars)

Anchor strategy: per-anchor routes are impossible here because
redirectSource() rejects any source containing [?#], so every id the
page published stays alive on the parent index as an authored
<a id="..." /> stub next to a link to its new home. parseDocsDocument
reports 58 ids before the split; 57 are stubbed and `related` is still
published by the index itself, so no duplicate authored/canonical ID is
raised. Backticked headings emit both a dotted and a dashed id
(tools.github and tools-github) and both are preserved, as is the
percent-encoded tools.allow-%2F-tools.deny, the pre-existing authored
toolsupdateplan stub, and the ten Accordion-minted ids. All 58 resolve
through resolveDocsFragment against the new index, and all 40
index-to-child fragment links resolve on their destination child.

Losslessness (source body vs. the six children, measured mechanically
against the base sha, not against a working copy): 54 fence markers
before and after with identical info strings; 47 table rows before and
after; all 12 original outbound links still present; each child's body
byte-identical to its source line range after H3-to-H2 promotion.
Two thematic breaks that separated the former H2 sections are dropped
because those sections are now separate pages, and the empty container
heading "## Tools" is not reproduced — its anchor is stubbed.

One prose change, the declared orphaned-cross-reference exception:
"See the llama.cpp example below" in the compat table pointed at a
section that now lives on another page, so it became a real link.
The other six directional references stayed within a single child and
were re-verified there.

taxonomy.yaml references this page without a fragment, so
validateTaxonomyDocsReferences still resolves it; maturity:check passes.
The eight qa/scenarios docsRefs and the two src/ docs URLs also target
the surviving route.

Closes audit findings: r3-0337, r3-1539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant