Refactor docs nav: one CLI page, no AI Resources, four tabs - #59
Merged
Conversation
Three structural changes to the docs site. **One CLI page.** `content/docs/(guide)/usage/cli/` (ten generated pages plus a hand-authored hub) collapses into a single `usage/cli.mdx`, in the shape of opencode's CLI reference: intro, global flags, then one `##` section per command group with commands nested beneath. `scripts/generate-cli.mjs` now emits the whole page — `cli-overlays/index.md` supplies the frontmatter and intro (moved from the old hub page), and each `cli-overlays/<group>.md` supplies a section. Flags every command accepts (`-j/--json`, `--json`, `--human`) are hoisted into one Global flags table instead of repeating across 107 command tables. That is partly editorial and partly load-bearing: MDX compilation is superlinear in table rows, and the un-hoisted page (733 table lines) OOM'd the compiler at a 12 GB heap. Hoisting drops it to 438 and the page builds. **AI Resources dissolved.** Skills moves to `usage/skills.mdx` (retitled Agent Skills), the docs MCP server merges into `usage/mcp.mdx` as its own section alongside the origin server, and the llms.txt page is retired — the `/llms.txt` and `/api/docs/llms-full.txt` endpoints still serve, they just no longer have a docs page. Usage is now the three ways to drive BitRouter: CLI, MCP, Skills. **Integrations and Guides are top-level tabs.** Both move out of the `(guide)` folder group to `content/docs/`, marked `"root": true` alongside Documentation and API Reference. URLs are unchanged — `(guide)` was already stripped from them. Integrations lists `index` in its `pages` so the tab resolves to `/docs/integrations` rather than its first child; Guides has no index page, so it gets a `pagesIndex`. Every retired URL has a 301 in `next.config.ts`, with the ten CLI pages landing on their section anchors. Also drops the lone page-level icon in the Usage sidebar and gives Documentation a tab icon so all four tabs match. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
SPIKESPIGEL404
added a commit
that referenced
this pull request
Aug 6, 2026
Main's #59 collapsed the ten generated `usage/cli/` pages into one `usage/cli.mdx`, moved Integrations and Guides out of the `(guide)` group into their own tabs, and dissolved AI Resources into `usage/`. Three resolutions: - `usage/meta.json`: main made Usage cli + mcp + skills. Insert `tui` after `cli` — those two are the binary's human-facing surfaces, and mcp/skills are how agents drive it. - `scripts/check-docs.mjs`: main independently closed the same `usage/` lint gap this branch did, and did it better for the new layout — section paths are now `(guide)/`-prefixed since Integrations and Guides are top-level, and GENERATED is an exact-path Set because the CLI reference is one file rather than a subtree. Took main's version wholesale and re-applied only what it doesn't have: the alert rule and the frontmatter line-number offset. - `usage/tui.mdx` See also: the CLI subpages it linked to no longer exist. Repointed at the single page's anchors. Main also folded the `tui` blurb into the Harnesses section intro and noted it has no generated subsection (it is absent from the alpha.26 snapshot's `--help`), so the section link now lands on real prose. Also lists `tui.mdx` in CONTRIBUTING's `usage/` inventory. Verified: lint 48 docs / 6 sections; the alert rule still fails a bare alert at the right line and passes a fenced one; 83/83 tests; `generate:cli` reproduces the committed page byte-for-byte; every outbound link on the TUI page returns 200 and all three CLI anchors resolve.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three structural changes to the docs site, plus a build fix they surfaced.
1. The CLI reference is one page
content/docs/(guide)/usage/cli/— ten generated pages plus a hand-authored hub — collapses into a singleusage/cli.mdx, shaped like opencode's CLI reference: intro, global flags, then one##section per command group with commands nested beneath as###/####/#####.scripts/generate-cli.mjsnow emits the whole page. Overlays keep the same role, with one addition:cli-overlays/index.md(new)cli-overlays/<group>.mdtitle:→ the##section heading; prose → section intro;## @<cmd>→ per-command extrasThe flag-hoisting is load-bearing, not just editorial. Flags every command accepts (
-j/--json,--json,--human) now live in one## Global flagstable instead of repeating across 107 command tables. Without that, the page carries 733 table lines and OOMs the MDX compiler at a 12 GB heap — MDX compilation is superlinear in table rows, and a probe confirmed it's the rows specifically (3,205 lines of headings compile fine; 1,200 table rows do not). Hoisting drops it to 438 lines and the page builds.2. AI Resources is dissolved
skills.mdx→usage/skills.mdx, retitled Agent Skillsusage/mcp.mdxas## The docs MCP server, next to the origin server, with the "not the MCP gateway" section extended to distinguish all three roles/llms.txtand/api/docs/llms-full.txtstill serve. Say the word if you want those retired too.Usage now reads as the three ways to drive BitRouter: CLI, MCP Server, Agent Skills.
3. Integrations and Guides are top-level tabs
Both move out of the
(guide)folder group tocontent/docs/, marked"root": truealongside Documentation and API Reference. URLs are unchanged —(guide)was already stripped from them.Two fumadocs gotchas hit along the way:
indexin itspageslist, or the tab resolved to/docs/integrations/modelsand/docs/integrationsfell back to rendering under the Documentation tab.index.mdx, so it needs apagesIndex.Icon polish
usage/skills.mdxwas the only page in the whole tree with a frontmattericon:— a lone Box next to icon-less CLI and MCP Server siblings. Removed.BookOpen.integrations/index.mdxretitled Overview → Integrations, matching howreference/index.mdxis titled API Reference (it was the third "Overview" in that sidebar).Redirects
Every retired URL has a 301 in
next.config.ts. The ten CLI pages land on their section anchors:/docs/usage/cli/daemon/docs/usage/cli#daemon-lifecycle/docs/usage/cli/misc/docs/usage/cli#key-workflow-state-and-update/docs/ai-resources/skills/docs/usage/skills/docs/ai-resources/mcp/docs/usage/mcp#the-docs-mcp-server/docs/guides/docs/guides/cloud-api(…and the rest — all twelve verified returning 308 to a live anchor.)
Section headings are now anchor targets that redirects depend on, so renaming one means updating
next.config.ts. Noted indocs/CONTRIBUTING.mdandAGENTS.md.Verified
pnpm build— clean, 107 docs pages prerenderedpnpm test— 83 passing (footer-nav test updated for the new hrefs)pnpm lint:docs— 47 docs across 6 sections;check-docs.mjsupdated for the moved sections, now covering hand-authoredusage/pages while exempting generatedcli.mdxNot fixed here
A pre-existing React
unique "key" propwarning in fumadocs'Sidebar— confirmed present onmainbefore these changes.🤖 Generated with Claude Code