Skip to content

docs: rename the user-guides folder to workspaces - #31650

Merged
nickvigilante merged 19 commits into
mainfrom
docs/ia-workspaces-folder
Nov 4, 2026
Merged

nickvigilante merged 19 commits into
mainfrom
docs/ia-workspaces-folder

Conversation

@coder

@coder coder Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Note

Generated by Coder Agents. The branch and this description were written by an AI agent and need human review.

Summary

Fourth stacked PR for the docs IA overhaul. PR C renamed the User guides sidebar section to Workspaces. This PR renames its folder to match, so the folder tree and the sidebar agree (DOCS-1154). The section's title, position, and contents don't change.

  • docs/user-guides/** moves to docs/workspaces/** with git mv: 33 files. That includes pages that are not in the sidebar and the three pages PR C moved in (persistent-shared-workspaces.md, cloning-git-repositories.md, speed-up-templates.md).
  • docs/manifest/user-guides.yml and docs/manifest/user-guides/ (4 files) move to docs/manifest/workspaces.yml and docs/manifest/workspaces/, and index.yml lists workspaces.yml in the same position.
  • Every relative link and image path is fixed, in moved pages and in pages that link to them. This was done in one scripted pass from a clean tree. docs/images/ stays where it is, so images under docs/images/user-guides/ keep their names; only the relative paths that point at them change.
  • Commit 2, chore: point in-product docs links at the new docs paths, updates docs URLs outside docs/, then regenerates the files built from them with make gen. You can drop that commit; the redirects cover the old URLs.
    • Updated sources: site/ docs() links and hardcoded docs URLs, cli/sharing.go help text, README.md, examples/templates/ READMEs and docker/main.tf, templatebuilder base READMEs, and the doc-check skill's audience persona.
    • Regenerated files: the coder sharing add/remove CLI golden files, docs/reference/cli/sharing/{add,remove}.md, and examples/examples.gen.json.
  • Commit 3, fix: keep docs links healthy before the release, keeps links working on the live site until a release that includes this stack becomes the default docs version:
    • In hand-written pages, the docs commit's rewrite left 4 absolute https://coder.com/docs/workspaces/... URLs. They are now relative links, anchors kept: admin/networking/wildcard-access-url.md, install/operate/upgrade/esr-2.24-2.29-upgrade.md (2 links), and workspaces/workspace-access/jetbrains/gateway.md.
    • Every hardcoded, unversioned https://coder.com/docs/workspaces/... URL that commit 2 introduced outside docs/ goes back to https://coder.com/docs/user-guides/.... That covers 32 URLs in README.md, cli/sharing.go, the examples and templatebuilder READMEs, examples/templates/docker/main.tf, the UserDropdownContent.tsx constant and its story assertion, and a JSDoc link in site/src/api/queries/workspaces.ts. make gen then regenerated the CLI golden files, docs/reference/cli/sharing/{add,remove}.md, and examples/examples.gen.json. See "Post-release follow-up".
    • The site/ docs() changes stay, because those URLs are versioned (/docs/@vX.Y.Z/...) and resolve once the release ships.

Stack: docs/ia-ai-sections (#31645, with Templates squash-merged in #31646) → docs/ia-tutorials-nav (#31647) → this PR.

Refs: Linear DOCS-1154, DOCS-1179.

Move map

Old New
docs/user-guides/** (33 files) docs/workspaces/**
docs/manifest/user-guides.yml docs/manifest/workspaces.yml
docs/manifest/user-guides/** (4 files) docs/manifest/workspaces/**

Redirects added

Source Destination
/docs/user-guides /docs/workspaces
/docs/user-guides/:path* /docs/workspaces/:path*

Updated existing rules so none of them chain through the new wildcard:

Source Old destination New destination
/docs/ai-coder/ide-agents /docs/user-guides/workspace-access /docs/workspaces/workspace-access
/docs/tutorials/best-practices/speed-up-templates /docs/user-guides/speed-up-templates /docs/workspaces/speed-up-templates
/docs/tutorials/cloning-git-repositories /docs/user-guides/cloning-git-repositories /docs/workspaces/cloning-git-repositories
/docs/tutorials/persistent-shared-workspaces /docs/user-guides/persistent-shared-workspaces /docs/workspaces/persistent-shared-workspaces

coder.com and router static redirects: a chain simulation of coder.com's and the router's static rules together with this branch's docs/redirects.json finds one problem from this PR. The static /docs/workspaces → /docs/user-guides/workspace-management rule in both repos would hide the new docs/workspaces/index.md behind a redirect to /docs/workspaces/workspace-management. coder/coder.com#1201 and coder/docs-engine#304 remove it, together with the Templates loops from #31645, once a release with this layout is the docs mainline. If this PR ships in a later release than #31645, drop the /docs/workspaces part of those PRs until then. The other static /docs/user-guides/... destinations there still work; each now takes two redirects.

Deviations from the proposal

  • Not in Proposal 1. The proposal only renamed the sidebar title. This folder rename was requested afterward so the folder-driven renderer shows the same name.
  • Generated files belong to commit 2. Commit 1 doesn't edit generated docs. They change only through their sources and make gen.
  • Left unchanged on purpose:
    • docs/images/user-guides/ keeps its name, as requested.
    • .github/workflows/test-docs-preview-mapper.sh uses docs/user-guides/... as synthetic fixture paths.
    • docs/templates/extending-templates/jetbrains-airgapped.md has a "file a GitHub issue" link whose URL-encoded body names coder.com/docs/user-guides/workspace-access/jetbrains/jetbrains-airgapped. That URL was already wrong before this PR (the page lives under templates/), and it only pre-fills an issue body, so I left it.
    • Database migrations and notification golden files: none of them contain user-guides links.

Open questions for Nick

  1. Should docs/images/user-guides/ be renamed to docs/images/workspaces/ in a follow-up, or stay as is?
  2. Frontend review nits on existing code that this PR only touched; I didn't change them:
    • UserDropdownContent.tsx defines CODER_DESKTOP_DOCS_URL as a hardcoded https://coder.com/docs/... URL instead of docs("/workspaces/desktop"), which SSHButton.tsx uses for the same page.
    • The UserDropdown and SecretsPageView stories' play functions only assert link attributes.

Post-release follow-up

After a release that includes this stack becomes the default docs version on coder.com, point these hardcoded URLs at the new paths. They work today and redirect after the release. Anchors are unchanged. Rerun make gen afterward to update the CLI golden files, docs/reference/cli/sharing/{add,remove}.md, and examples/examples.gen.json.

Current (old) URL Post-release URL Files
https://coder.com/docs/user-guides/desktop https://coder.com/docs/workspaces/desktop site/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.tsx, UserDropdown.stories.tsx
https://coder.com/docs/user-guides/devcontainers https://coder.com/docs/workspaces/devcontainers README.md
https://coder.com/docs/user-guides/shared-workspaces https://coder.com/docs/workspaces/shared-workspaces cli/sharing.go (CLI help, 2 places)
https://coder.com/docs/user-guides/workspace-access https://coder.com/docs/workspaces/workspace-access README.md
https://coder.com/docs/user-guides/workspace-access/jetbrains/toolbox https://coder.com/docs/workspaces/workspace-access/jetbrains/toolbox examples/templates/docker/main.tf
https://coder.com/docs/user-guides/workspace-dotfiles https://coder.com/docs/workspaces/workspace-dotfiles coderd/templatebuilder/bases/{azure-linux,docker,kubernetes}/README.md, examples/templates/{azure-linux,docker,kubernetes}/README.md
https://coder.com/docs/user-guides/workspace-management https://coder.com/docs/workspaces/workspace-management README.md, coderd/templatebuilder/bases/{aws-linux,aws-windows,azure-linux,digitalocean-linux,docker,kubernetes}/README.md, examples/templates/{aws-linux,aws-windows,azure-linux,azure-windows,digitalocean-linux,docker-devcontainer,docker-envbuilder,docker,kubernetes-devcontainer,kubernetes,nomad-docker}/README.md, site/src/api/queries/workspaces.ts (JSDoc)

Validation run

  • make gen/docs-manifest: clean diff afterward.
  • make lint/docs-manifest, lint/docs-redirects (-base docs/ia-tutorials-nav: 36 rules OK), lint/docs-html, lint/emdash: pass.
  • pnpm check-docs (markdownlint + table formatter): pass.
  • Vale over docs/: identical to docs/ia-tutorials-nav (12 warnings, 1 error, 645 suggestions, all pre-existing).
  • Local relative-link check over docs/**/*.md: 0 unresolved (3410 links and images in 498 files).
  • grep -rn user-guides docs/ finds only docs/redirects.json, image paths under docs/images/user-guides/, and the issue link above.
  • Pre-commit hook: make pre-commit-light on the docs commit, and the full make pre-commit (gen, fmt, lint/go, lint/ts, build, and others) on the chore commit. make gen left a clean tree.
  • Targeted tests:
    • Go: go test ./cli -run TestCommandHelp, ./examples/..., ./coderd/templatebuilder/....
    • Site: Vitest for the touched directories (22 files, 409 tests), and the UserDropdown and SecretsPageView story tests (2 files, 59 tests).
  • Every docs() path and coder.com/docs URL in the chore diff resolves to a page and heading in this branch.
  • Frontend deep review (all 8 roles) on the site/ diff: no blocking or should-fix findings; the nits are in question 2.
  • Restacked on the rebased docs/ia-tutorials-nav (on main at ccf5ec74ae). After the restack, make gen/docs-manifest (clean), lint/docs-manifest, lint/docs-redirects (36 rules OK), lint/docs-html, lint/emdash, pnpm check-docs, and the relative-link and anchor check over the changed pages pass.
  • Page counts: docs/**/*.md (excluding .style) 485 → 485; manifest.json routes 482 → 482 (moves only).
  • Link health (commit 3):
    • linkspector 0.5.6 with .github/.linkspector.yml over all of docs/, like the weekly docs job, run locally.
    • origin/main: 0 errors. Before the fix (7382a41faa): 11 errors. 10 were https://coder.com/docs/<new path> 404s: the 6 from docs: promote the AI sections and Templates to the top level of the sidebar #31645 plus 4 workspaces/... URLs. The 11th was a transient Red Hat URL failure in install/server/openshift.md, which is unchanged from main and passed on reruns. After the fix (c1f287fc1b): 0 errors. Nothing is new compared with main.
    • After the fix: make gen/docs-manifest (clean), lint/docs-manifest, lint/docs-redirects (36 rules OK against docs/ia-tutorials-nav), lint/docs-html, lint/emdash, pnpm check-docs, and the relative-link check (0 unresolved in 3419 links) pass. The full make pre-commit, including make gen, passed on the commit.
    • Outside docs/, no line in this stack adds an unversioned coder.com/docs URL compared with main.
    • Tests after the fix:
      • Go: go test ./cli -run 'TestCommandHelp|TestServerYAMLConfig', ./examples/..., ./coderd/templatebuilder/..., ./cli/cliui.
      • Site: Vitest for the touched directories (21 files, 404 tests), and the UserDropdown story tests (28 tests).
  • Skipped: the docs-engine sync check, which was not available in this environment.
Implementation notes
  • Same one-shot move script as PRs A to C, with a single rule, docs/user-guides/ → docs/workspaces/. It resolves each relative link against the page's old directory, maps the target through the move, recomputes it from the new directory, and also rewrites coder.com/docs/... and github.com/coder/coder/(blob|edit|tree)/main/docs/... URLs. It skips fenced code blocks and inline code, and refuses to run on a dirty docs/ tree.
  • After docs: promote the AI sections and Templates to the top level of the sidebar #31645 and docs: redistribute tutorials and rename top-level sidebar sections #31647 got their link-health fixes, a plain rebase of this branch conflicted in esr-2.24-2.29-upgrade.md, where both changed the same table rows. Instead of resolving by hand, I rebuilt the docs and chore commits from the fixed docs/ia-tutorials-nav with the same scripts. The resulting docs commit differs from the earlier one only by docs: promote the AI sections and Templates to the top level of the sidebar #31645's fix, and the chore commit touches the same 36 files.
  • No hand edits were needed in the docs commit. The sidebar sources were renamed with git mv and their path/include prefixes rewritten.
  • The redirect script repointed every existing destination under /docs/user-guides before appending the two new rules.
  • Restacked on 2026-11-03 onto docs/ia-tutorials-nav at 76aed1a618. The chore commit conflicted with fix(site/src): open docs links in a new tab #31603 in site/src/pages/WorkspacesPage/WorkspaceHelpPopover.tsx; both links keep main's target="_blank" rel="noreferrer" with only the path changed, and the WorkspacesPage Vitest suite (24 tests) passes. Folded into the docs commit: the ../user-guides/ links in docs/coder-agents/bring-your-own-mcp-servers.md, a page main added, now point at ../workspaces/.

@coder
coder Bot requested a review from nickvigilante November 2, 2026 22:11
@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Nov 2, 2026
@coder
coder Bot force-pushed the docs/ia-tutorials-nav branch from 5fe2b62 to c664641 Compare November 2, 2026 22:24
@coder
coder Bot force-pushed the docs/ia-workspaces-folder branch from 7382a41 to c1f287f Compare November 2, 2026 22:30
@nickvigilante
nickvigilante requested a review from a team as a code owner November 3, 2026 18:52
@nickvigilante
nickvigilante force-pushed the docs/ia-workspaces-folder branch from c1f287f to b08bae4 Compare November 3, 2026 18:52
@linear-code

linear-code Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

DOCS-1154

DOCS-1179

coder Bot and others added 13 commits November 3, 2026 22:07
Dissolve docs/ai-coder into four top-level sections: Coder Agents,
AI Governance (with Agent Firewall and AI Gateway), Agent Relay, and
MCP server. Delete the ai-coder hub, best practices, and IDE agents
pages, and redirect every moved or removed URL.
> [!NOTE]
> Generated by Coder Agents. The branch and this description were
written by an AI agent and need human review.

Second of three stacked PRs for the docs IA overhaul (Proposal 1,
section 2). This PR promotes **Templates** out of Administration to a
top-level sidebar section between Install and User guides.

- `docs/admin/templates/**` moves to `docs/templates/**` with `git mv`:
46 files, including pages that are not in the sidebar, such as
`extending-templates/external-auth.md`, and
`extending-templates/script-ordering.md`, which was added to `main`
after the first version of this PR.
- Two of the three tutorials the proposal names still exist on `main`,
and both move into the new section. `template-from-scratch.md` goes
after "Creating templates" and `testing-templates.md` goes before
"Troubleshoot templates". Their Tutorials sidebar entries are removed.
- `docs/manifest/admin/templates.yml` and
`docs/manifest/admin/templates/` move to `docs/manifest/templates.yml`
and `docs/manifest/templates/`. `admin.yml` no longer includes them, and
`index.yml` lists `templates.yml` after `install.yml`. The Script
ordering entry from `main` moves with them.
- Every relative link and image path is fixed, in moved pages and in
pages that link to them. This includes repo-relative links out of
`docs/`, such as `../../../examples/templates`, whose depth changed.
`docs/images/` stays where it is.
- Commit 2, `chore: point in-product docs links at the new docs paths`,
updates docs URLs outside `docs/`, then regenerates the files built from
them with `make gen`. You can drop that commit; the redirects cover the
old URLs.
- Updated sources: `site/` `docs()` links, `cli/cliui` troubleshooting
links, CLI flag help, the `agentFallbackTroubleshootingURL` default, the
prebuilds metric help text, `examples/`, and templatebuilder READMEs.
- Regenerated files: CLI golden files,
`docs/reference/cli/templates/{create,edit}.md`,
`scripts/metricsdocgen/generated_metrics`, and the generated table in
`docs/admin/integrations/prometheus.md`.

Stack: `docs/ia-ai-sections` → **this PR** → `docs/ia-tutorials-nav`.

Refs: Linear DOCS-1154, DOCS-1179.

| Old | New |
| --- | --- |
| `docs/admin/templates/**` (46 files) | `docs/templates/**` |
| `docs/tutorials/template-from-scratch.md` |
`docs/templates/template-from-scratch.md` |
| `docs/tutorials/testing-templates.md` |
`docs/templates/testing-templates.md` |

| Source | Destination |
| --- | --- |
| `/docs/tutorials/template-from-scratch` |
`/docs/templates/template-from-scratch` |
| `/docs/tutorials/testing-templates` |
`/docs/templates/testing-templates` |
| `/docs/admin/templates/:path*` | `/docs/templates/:path*` |

The wildcard also covers `script-ordering`, which is new on `main`.

Updated an existing rule to avoid a chain:
`/docs/admin/templates/extending-templates/dynamic-parameters` now
points to `/docs/templates/extending-templates/parameters`. It stays
above the new wildcard so it still applies first.

**coder.com `redirects.json`:** I could not check it, because the file
is not readable anonymously and the provided credentials cover only
`coder/coder`. Someone with access should look for `/docs` destinations
under `/docs/admin/templates/...` or
`/docs/tutorials/{template-from-scratch,testing-templates}`.

- **`tutorials/external-database.md` is not in this PR.** The proposal
puts it under Templates, but the page is about pointing the Coder
control plane at an external PostgreSQL database, not about templates.
PR C moves it to `install/server/external-database.md`, next to
`postgres-ssl.md`. If you want it under Templates, it's a one-line
change.
- **Manifest position of the two tutorials.** The proposal doesn't say
where they go, so I placed them as described in the Summary.
- **Generated files belong to commit 2.** Commit 1 doesn't edit
generated docs. Those files change only through their sources and `make
gen`, so `lint/docs-gen-filter` stays clean.
- **Left unchanged on purpose:**
- Database migrations, the notification `.golden` files rendered from
them, and the matching `site/src/testHelpers/entities.ts` fixtures still
contain `coder.com/docs/admin/templates/...` URLs. Existing migrations
can't be edited, so those links rely on the wildcard redirect.
- Test fixtures in `scripts/docsredirectscheck`,
`site/scripts/audit-docs-paths.test.mjs`, and
`.github/workflows/test-docs-preview-mapper.sh` are synthetic.
`Tool.stories.tsx` uses `https://coder.com/docs/admin/templates` as a
sample web search result.
- The style guide's "What's next?" example in
`docs/.style/style-guide/word-choice.md` shows a link to
`admin/templates/...` inside a fenced code block. It is sample Markdown,
not a live link.

1. Should `external-database.md` go under Install (as in PR C) or
Templates (as in the proposal)?
2. Templates keeps its `picture.svg` icon. Is that OK at the top level?
3. Frontend review nits on existing code that this PR only touched; I
didn't change them:
- `TemplatesFilter.tsx` has a commented-out `learnMoreLink` to the
`#template-filtering` anchor, which doesn't exist.
- `TemplateAlternatives.tsx` hardcodes a `https://coder.com/docs/...`
URL instead of using `docs()`.
- The `CreateWorkspacePageView` story's `play` function only asserts
link attributes.

- `make gen/docs-manifest`: clean diff afterward.
- `make lint/docs-manifest`, `lint/docs-redirects` (`-base
docs/ia-ai-sections`: 15 rules OK), `lint/docs-html`, `lint/emdash`:
pass.
- `pnpm check-docs` (markdownlint + table formatter): pass.
- Vale over `docs/`: the same 12 warnings and 1 error as `main`, all
pre-existing (suggestions: 645, the same as PR A).
- Local relative-link check over `docs/**/*.md`: 0 unresolved.
- Pre-commit hook: `make pre-commit-light` on the docs commit, and the
full `make pre-commit` on the chore commit. `make gen` left a clean
tree. Targeted tests passed:
- Go: `go test ./cli -run 'TestCommandHelp|TestServerYAMLConfig'`,
`./enterprise/cli -run TestEnterpriseCommandHelp`, `./coderd/render`,
`./cli/cliui`, `./agent/agentscripts`, `./coderd/prebuilds`,
`./enterprise/coderd/prebuilds`.
- Site: Vitest for the touched directories (17 files, 188 tests), and
the `CreateWorkspacePageView` story tests (14 tests).
- Frontend deep review (all 8 roles) on the `site/` diff: no blocking or
should-fix findings, and every new `docs()` path and anchor resolves,
except the pre-existing commented-out anchor in question 3.
- Page counts: `docs/**/*.md` 486 → 486 (moves only); `manifest.json`
routes 491 → 491.
- **Skipped:** the docs-engine sync check, which was not available in
this environment.

<details>
<summary>Implementation notes</summary>

- Rebuilt on the new `docs/ia-ai-sections`, which is based on `main` at
`9839406ff7` (2026-11-02).
- The same one-shot move script as PR A did the move and link pass from
a clean tree. Run on the old base, it reproduced the old commit exactly
(apart from the generated files, which belong to commit 2), so no hand
edits were needed in this PR's docs commit.
- The chore commit uses the same rewrite over the files outside `docs/`
that link to moved pages. Its diff for `site/`, `cli/cliui`, and the
other sources matches the earlier version of this branch line for line.
- Changes from the earlier version of this branch: 1 more page moves
(`extending-templates/script-ordering.md`), with its sidebar entry.
`docs/install/cli.md` no longer exists on `main` (#31513), so its link
fix is gone.

</details>

---------

Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
Turn absolute coder.com/docs URLs to moved pages in hand-written docs
into relative links, and point unversioned coder.com/docs URLs outside
docs/ back at the paths that are live today. The redirects carry them
to the new pages after the release. Regenerate the files built from
them.
The move script wrote links to targets in or below the page's own folder without a ./ prefix. They resolved, but every other relative link in the docs starts with ./ or ../.
Deleting docs/ai-coder/index.md removed the only instructions for installing a terminal-based coding agent in a template with a registry module. Move that guidance to the Reuse template code page, next to the other Coder modules.
Move every remaining docs/tutorials page into the section it belongs
to and delete the Tutorials and Best practices hub pages. Rename the
About, Quickstart, and User guides sections to Home, Get started, and
Workspaces, and make Support the last top-level section. Redirect every
moved or removed URL.
Match the Home sidebar title in the README front matter and drop the
stale warning that the first section must be titled About.
Move docs/user-guides to docs/workspaces so the folder matches the
Workspaces sidebar title, mirror it in docs/manifest, and redirect
every moved URL. Repoint existing redirects that ended under
/docs/user-guides so none of them chain.
Turn absolute coder.com/docs URLs to moved pages in hand-written docs
into relative links, and point unversioned coder.com/docs URLs outside
docs/ back at the paths that are live today. The redirects carry them
to the new pages after the release. Regenerate the files built from
them.
Turn absolute coder.com/docs URLs to moved pages in hand-written docs
into relative links, and point unversioned coder.com/docs URLs outside
docs/ back at the paths that are live today. The redirects carry them
to the new pages after the release. Regenerate the files built from
them.
@nickvigilante
nickvigilante force-pushed the docs/ia-workspaces-folder branch from b08bae4 to 64165b1 Compare November 3, 2026 22:10
nickvigilante added a commit that referenced this pull request Nov 4, 2026
…idebar (#31645)

> [!NOTE]
> Generated by Coder Agents. The branch and this description were
written by an AI agent and need human review.

## Summary

First of three stacked PRs for the docs IA overhaul (Proposal 1, section
3). This PR dissolves `docs/ai-coder/` into four top-level sidebar
sections, in this order, where "Run AI coding agents in Coder" used to
be: **Coder Agents**, **AI Governance** (with Agent Firewall and AI
Gateway nested under it), **Agent Relay**, and **MCP server**.

- Files move with `git mv`, so `git log --follow` keeps their history.
The move includes every file in the moved folders, including pages that
are not in the sidebar, such as `agent-firewall/example-policy.md`, and
pages added to `main` after the first version of this PR, such as
`agents/projects.md` (#30684) and `agents/acp-subagents.md` (#31430).
- `docs/ai-coder/index.md`, `best-practices.md`, and `ide-agents.md` are
deleted. Each has a redirect (see below).
- `docs/manifest/` mirrors the new folders: `coder-agents.yml` (+
`coder-agents/`), `ai-governance.yml` (+ `ai-governance/`),
`agent-relay.yml`, and `mcp-server.yml`. `ai-coder.yml` is deleted. The
Projects and ACP subagents entries from `main` move with Coder Agents.
- Every relative link and image path is fixed, both in the moved pages
(their base directory changed) and in pages that link to them. This was
done in one scripted pass from a clean `main` checkout. Every link was
then checked to resolve on disk.
- Commit 2, `chore: point in-product docs links at the new docs paths`,
updates docs URLs outside `docs/`: `site/` `docs()` links, Go error
strings and comments, `README.md`, `server.json`, templatebuilder
modules, and the doc-check skill. Commit 4 reverts the unversioned
`https://coder.com/docs/...` URLs among them (see below), so after this
PR only these differ from `main` outside `docs/`: the `site/` `docs()`
links, the versioned `cli/cliui` troubleshooting links, and repo file
paths in comments and the doc-check skill's examples
(`docs/coder-agents/...`, `docs/templates/...`). You can drop commit 2;
the redirects cover the old URLs.
- **#31646 (Templates) was squash-merged into this branch** as
`98377a3a3b`. This PR now also carries the Templates move
(`docs/admin/templates/**` → `docs/templates/**`, plus
`template-from-scratch.md` and `testing-templates.md`) and its chore
changes. Refer to #31646 for that part's move map, redirects, and
review.
- Commit 4, `fix: keep docs links healthy before the release`, keeps
links working on the live site until a release that includes this stack
becomes the default docs version:
- Hand-written pages that linked to moved pages with absolute
`https://coder.com/docs/...` URLs now use relative links, anchors kept.
The new paths 404 on the live site today, but relative links resolve for
every version and are checked locally.
- Hardcoded, unversioned `https://coder.com/docs/<new path>` URLs
outside `docs/` that the chore commits introduced (Go strings including
the prebuilds metric help, CLI help, the
`agentFallbackTroubleshootingURL` default, `README.md`, `server.json`,
examples, templatebuilder files, and one `site/` constant) go back to
their current paths. Then `make gen` regenerated the generated table in
`docs/admin/integrations/prometheus.md`,
`scripts/metricsdocgen/generated_metrics`, the CLI golden files, and
`docs/reference/cli/templates/{create,edit}.md`. See "Post-release
follow-up".
- The `site/` `docs()` changes and the `cli/cliui` links stay, because
those URLs are versioned (`/docs/@vX.Y.Z/...`) and resolve once the
release ships.
- Commit 5, `docs: prefix relative links in the moved pages with ./`,
adds `./` to 13 relative links that the move script wrote without it, in
`docs/mcp-server.md` and three Templates pages.
They resolved, but every other relative link in the docs starts with
`./` or `../`.
- Commit 6, `docs: keep the coding agent module guidance in the
templates docs`, adds an **AI agent modules** section to
`docs/templates/extending-templates/modules.md`.
Deleting `docs/ai-coder/index.md` removed the only instructions for
adding a terminal coding agent to a template with a registry module.
The example (`registry.coder.com/coder/claude-code/coder`, `version =
"~> 5.2"`) passes `terraform validate`, and the Template Builder labels
it cites match `site/src/pages/TemplateBuilder/ModuleSelectStep.tsx`.

Stack: **this PR** (with #31646 squash-merged in) →
`docs/ia-tutorials-nav` (#31647, Tutorials + nav renames) →
`docs/ia-workspaces-folder` (#31650, folder rename).

Refs: Linear DOCS-1154, DOCS-1179, and DOCS-1479 for the coder.com and
router redirect fix.

## Move map

| Old | New |
| --- | --- |
| `docs/ai-coder/agents/**` (25 files) | `docs/coder-agents/**` |
| `docs/ai-coder/ai-governance.md` | `docs/ai-governance/index.md` |
| `docs/ai-coder/agent-firewall/**` (9 files) |
`docs/ai-governance/agent-firewall/**` |
| `docs/ai-coder/ai-gateway/**` (26 files) |
`docs/ai-governance/ai-gateway/**` |
| `docs/ai-coder/agent-relay/**` (3 files) | `docs/agent-relay/**` |
| `docs/ai-coder/mcp-server.md` | `docs/mcp-server.md` |
| `docs/ai-coder/index.md` | deleted |
| `docs/ai-coder/best-practices.md` | deleted |
| `docs/ai-coder/ide-agents.md` | deleted |

## Redirects added

Appended to `docs/redirects.json`, using the absolute `/docs/...` format
that `main` validates today. Wildcards cover every page under each moved
folder, including pages that are not in the sidebar and the pages added
to `main` since the first version of this PR.

| Source | Destination |
| --- | --- |
| `/docs/ai-coder` | `/docs/coder-agents` (deleted hub, **please
confirm**) |
| `/docs/ai-coder/best-practices` | `/docs/coder-agents` (deleted,
**please confirm**) |
| `/docs/ai-coder/ide-agents` | `/docs/user-guides/workspace-access`
(deleted, **please confirm**) |
| `/docs/ai-coder/ai-governance` | `/docs/ai-governance` |
| `/docs/ai-coder/mcp-server` | `/docs/mcp-server` |
| `/docs/ai-coder/agents/:path*` | `/docs/coder-agents/:path*` |
| `/docs/ai-coder/agent-firewall/:path*` |
`/docs/ai-governance/agent-firewall/:path*` |
| `/docs/ai-coder/ai-gateway/:path*` |
`/docs/ai-governance/ai-gateway/:path*` |
| `/docs/ai-coder/agent-relay/:path*` | `/docs/agent-relay/:path*` |

None of the 3 existing rules in `docs/redirects.json` points into
`ai-coder/`, so no destinations needed updating.

**coder.com and router static redirects.**
coder.com applies its own `redirects.json` and the rules it generates
from this file before it hands `/docs` to the docs-engine router, which
applies its own static `redirects.json` before the page.
Three older static rules in both repos send `/docs/templates`,
`/docs/templates/open-in-coder`, and `/docs/templates/troubleshooting`
to `/docs/admin/templates/...`, and the `/docs/admin/templates/:path*`
rule here sends them back, so each loops once a release with this layout
is the docs mainline.
A static `/docs/workspaces` rule would also hide the new
`docs/workspaces/index.md` page from #31650.
coder/coder.com#1201 and coder/docs-engine#304 (draft, DOCS-1479) remove
those rules; they must merge when that release becomes the mainline, not
before, because the old-layout mainline still needs them.
A chain simulation of every page and static source on each branch of
this stack finds no other loops or hidden pages.
The `/docs/ai-coder/...` and other legacy rules there still work; some
now take two redirects.

## Deviations from the proposal

- **Glossary "IDE agent" entry.** The proposal says to remove this link
and leave plain text. I pointed it at Access your workspace
(`docs/user-guides/workspace-access/index.md`) instead, the same page
the `ide-agents` redirect uses, because "Refer to IDE agents." with no
link reads as a dead end. The "Coding agent" entry now links to Coder
Agents, as the proposal says.
- **Top-level icons.** The new sections need icons. I chose `wand.svg`
(Coder Agents, the old ai-coder icon), `ai_intelligence.svg` (AI
Governance), `link.svg` (Agent Relay), and `plug.svg` (MCP server).
- **Coding agent module guidance.** Kept on the Reuse template code page
(commit 6) instead of deleted with `docs/ai-coder/index.md`. The
best-practices and IDE-agent pages are deleted as proposed.
- **Order relative to Administration.** In this PR the four sections sit
where `ai-coder` was, after Administration. PR C moves Administration
after MCP server to reach the final order.
- **`docs/mcp-server.md` repo link.** A relative link to
`codersdk/toolsdk/toolsdk.go`, outside `docs/`, was re-based for the new
depth.
- **Left unchanged on purpose:**
- Database migrations and the notification `.golden` files rendered from
them still contain `coder.com/docs/ai-coder/...` URLs. Existing
migrations can't be edited, so those links rely on the redirects.
- `aibridge/client/client.go` links to a commit-pinned GitHub permalink,
which still resolves.
- Test fixtures in `scripts/docsredirectscheck` and
`.github/workflows/test-docs-preview-mapper.sh` use `ai-coder` as sample
data.
-
`site/src/pages/AgentsPage/components/ChatElements/tools/Tool.stories.tsx`
uses `https://coder.com/docs/ai-coder/ai-gateway` as a sample web search
result. Changing it would only change a visual snapshot.

## Open questions for Nick

1. Do you agree with the three redirect targets for the deleted pages
above?
2. Should the "IDE agent" glossary entry link to Access your workspace
(current) or be plain text (proposal)?
3. Are the icons for the new top-level sections OK?
4. Open PRs that touch the moved files, checked with `git merge-tree`
against this branch. I didn't change them.
- #31169 merges cleanly: Git's rename detection carries its edit to
`docs/ai-governance/ai-gateway/clients/claude-code.md`, and its new
relative link still resolves at the new path.
- #30262 now targets `tk/ai-gateway-responses-ws-endpoint` and conflicts
with `main` in 21 files. Against this branch it conflicts in the same 21
files, with `codex.md` at its new path, so this PR doesn't add new
conflicts. Its new relative links still resolve after the move.
- #30805 conflicts in `docs/redirects.json`. It already conflicts with
`main` there, because `main` added the `/docs/about/screenshots` and
`/docs/install/cli` rules.

## Release

No backport to `release/2.39` for now; Nick may apply it by hand later.
A cherry-pick of this branch onto `release/2.39` conflicts in 25 files,
and #31647 and #31650 would need the same treatment to keep the stack
together.
coder/coder.com#1201 and coder/docs-engine#304 merge when the first
release line that carries this layout becomes the docs mainline (2.38
today).

## Known limitations

- **CLI newer than its server.** The `cli/cliui` troubleshooting links
append `/templates/troubleshooting#...` to the server's versioned docs
URL.
A CLI from this release against an older server prints
`/docs/@v2.38.x/templates/troubleshooting#...`.
The router's static
`/docs/templates/:page(open-in-coder|troubleshooting)` rule redirects
that to the old page today, but coder/docs-engine#304 removes that rule
to fix the loop, so after the cutover that case gets the version's
not-found page.

## Post-release follow-up

After a release that includes this stack becomes the default docs
version on coder.com, point these hardcoded URLs at the new paths. They
work today and redirect after the release, so nothing breaks in the
meantime. Anchors are unchanged. Rerun `make gen` afterward to update
`docs/admin/integrations/prometheus.md`,
`scripts/metricsdocgen/generated_metrics`, the CLI golden files, and
`docs/reference/cli/templates/{create,edit}.md`.

| Current (old) URL | Post-release URL | Files |
| --- | --- | --- |
| `https://coder.com/docs/ai-coder/agents` |
`https://coder.com/docs/coder-agents` |
`.claude/skills/doc-check/output.md`, `README.md` |
| `https://coder.com/docs/ai-coder/agents/architecture` |
`https://coder.com/docs/coder-agents/architecture` |
`coderd/x/chatd/chattool/execute_test.go`,
`codersdk/toolsdk/workspacetools/execute.go` |
| `https://coder.com/docs/ai-coder/ai-gateway` |
`https://coder.com/docs/ai-governance/ai-gateway` | `README.md`,
`coderd/templatebuilder/modules/claude-code/module.json`,
`coderd/templatebuilder/modules/codex/module.json` |
| `https://coder.com/docs/ai-coder/mcp-server` |
`https://coder.com/docs/mcp-server` | `server.json` |
| `https://coder.com/docs/admin/templates` |
`https://coder.com/docs/templates` | `README.md` |
|
`https://coder.com/docs/admin/templates/extending-templates/docker-in-workspaces`
|
`https://coder.com/docs/templates/extending-templates/docker-in-workspaces`
| `examples/templates/docker-devcontainer/main.tf` |
|
`https://coder.com/docs/admin/templates/extending-templates/parameters`
| `https://coder.com/docs/templates/extending-templates/parameters` |
`examples/parameters-dynamic-options/README.md`,
`examples/parameters/README.md`, `examples/parameters/main.tf`,
`examples/templates/kubernetes-envbox/README.md`,
`examples/workspace-tags/README.md` |
|
`https://coder.com/docs/admin/templates/extending-templates/prebuilt-workspaces`
|
`https://coder.com/docs/templates/extending-templates/prebuilt-workspaces`
| `coderd/prebuilds/api.go`,
`enterprise/coderd/prebuilds/metricscollector.go` (metric help text) |
|
`https://coder.com/docs/admin/templates/extending-templates/workspace-tags`
| `https://coder.com/docs/templates/extending-templates/workspace-tags`
| `examples/workspace-tags/README.md` |
| `https://coder.com/docs/admin/templates/managing-templates` |
`https://coder.com/docs/templates/managing-templates` |
`cli/templatecreate.go`, `cli/templateedit.go` (CLI help) |
|
`https://coder.com/docs/admin/templates/managing-templates/image-management`
| `https://coder.com/docs/templates/managing-templates/image-management`
| `coderd/templatebuilder/bases/docker/README.md`,
`coderd/templatebuilder/bases/kubernetes/README.md` |
| `https://coder.com/docs/admin/templates/troubleshooting` |
`https://coder.com/docs/templates/troubleshooting` |
`agent/agentscripts/agentscripts.go`,
`coderd/render/escape_internal_test.go`, `codersdk/deployment.go`
(`agentFallbackTroubleshootingURL` default) |
| `https://coder.com/docs/tutorials/template-from-scratch` |
`https://coder.com/docs/templates/template-from-scratch` |
`site/src/pages/TemplateBuilder/TemplateAlternatives.tsx` |

## Validation run

- `make gen/docs-manifest`: clean diff afterward.
- `make lint/docs-manifest`, `lint/docs-redirects` (`go run
./scripts/docsredirectscheck -base origin/main`: 15 rules OK, no
removed-route warning), `lint/docs-html`, `lint/emdash`: pass.
- `pnpm check-docs` (markdownlint + table formatter): pass.
- Vale (`vale --no-exit docs/`): the same 12 warnings and 1 error as
`main`, all pre-existing. Suggestions drop from 646 to 645; the one
removed was in the deleted `ide-agents.md`.
- Local relative-link check over `docs/**/*.md`: 0 unresolved links or
images (also 0 on `main`).
- Pre-commit hook: `make pre-commit-light` on the docs commit, and the
full `make pre-commit` (gen, fmt, lint/go, lint/ts, build, and others)
on the chore commit. Both passed.
- Targeted tests:
- Go: `go test ./coderd/x/chatd/chattool/... ./codersdk/toolsdk/...
./coderd/templatebuilder/...`.
- Site: Vitest for the touched directories (107 files, 1879 tests), and
the story tests for `CoderAgentsProductCard`, `GroupSettingsPageView`,
`GatewayKeysPageView`, and `ModelForm` (4 files, 63 tests).
- Every `docs()` path and anchor in the `site/` and Go diff resolves to
a page and heading in this branch.
- Frontend deep review (all 8 roles) on the `site/` diff of PRs A and B:
no blocking or should-fix findings. Nits on existing code that this PR
only touched, not changed here: a single-use `docsLink` constant in
`ChatAccessDeniedAlert.tsx`, and assertion-only `play` functions in the
`GatewayKeysPageView`, `ModelForm`, `CoderAgentsProductCard`, and
`GroupSettingsPageView` stories.
- Page counts: `docs/**/*.md` (excluding `.style`) 490 → 487;
`manifest.json` routes 495 → 492. With #31646 squash-merged in, the
counts don't change, because the Templates move only moves files.
- **Link health (commit 4):**
- linkspector 0.5.6 with `.github/.linkspector.yml` over all of `docs/`,
like the weekly docs job (`umbrelladocs/action-linkspector`, `reporter:
local`, `filter_mode: nofilter`). I ran it locally with Chrome in
`--no-sandbox` mode.
- `origin/main`: 0 errors. Before the fix (`17e54ad555`): 6 errors, all
`https://coder.com/docs/<new path>` 404s (`shared-workspaces.md:19`,
`esr-2.24-2.29-upgrade.md:80-82`, `tasks-to-chats-migration.md:73`,
`prometheus.md:298`). After the fix (`def074caab`): 0 errors. A first
run after the fix also flagged a Red Hat URL in
`install/server/openshift.md`. That URL is unchanged from `main`, and it
passed on a rerun, so the failure was transient.
- After the fix: `make gen/docs-manifest` (clean), `lint/docs-manifest`,
`lint/docs-redirects` (15 rules OK against `origin/main`),
`lint/docs-html`, `lint/emdash`, `pnpm check-docs`, and the
relative-link check (0 unresolved in 3416 links) pass. The full `make
pre-commit`, including `make gen`, passed on the commit.
  - Tests after the fix:
- Go: `go test ./cli -run 'TestCommandHelp|TestServerYAMLConfig'`,
`./enterprise/cli -run TestEnterpriseCommandHelp`, `./coderd/render`,
`./agent/agentscripts`, `./coderd/prebuilds`,
`./enterprise/coderd/prebuilds`, `./coderd/x/chatd/chattool/...`,
`./codersdk/toolsdk/...`, `./coderd/templatebuilder/...`.
    - Site: Vitest for `src/pages/TemplateBuilder` (7 files, 67 tests).
- **After the rebase onto `ccf5ec74ae`** (commits 5 and 6 included):
`make gen/docs-manifest` (clean), `lint/docs-manifest`,
`lint/docs-redirects` (15 rules OK), `lint/docs-html`, `lint/emdash`,
`pnpm check-docs`, and a relative-link and anchor check over the changed
pages pass.
The only unresolved anchor,
`docs/ai-governance/ai-gateway/cost-controls.md` →
`enterprise.md#list-organization-ai-spend-by-user`, is also broken on
`main`.
The pre-commit hook (`make pre-commit-light`, because both new commits
touch only `docs/`) passed on commits 5 and 6. The rebased code commits
rely on CI for Go and TypeScript checks.
- **Redirect chains:** a Node simulation of coder.com's static rules,
its generated rules from this branch's `docs/redirects.json`, the
router's static rules, the page, then this branch's rules on a miss,
over every page and exact static source, reports the 3 loops above and
nothing else new; with coder/coder.com#1201 and coder/docs-engine#304
applied, 0.
- **Skipped:** the docs-engine sync check, which was not available in
this environment.

<details>
<summary>Implementation notes</summary>

- Rebuilt on `main` at `ccf5ec74ae` (2026-11-03) to clear conflicts with
`main`, after an earlier rebase the same day onto `1a963c628d`. The
previous rebuild was on `9839406ff7` (2026-11-02), and the first version
on `9b8d880d63` (2026-10-23).
- Rebase conflicts with #31603, which added `target="_blank"
rel="noreferrer"` to docs links: 4 `site/` files in the chore commit and
5 in the Templates commit. Each kept `main`'s version of the link with
only the docs path changed. Vitest for the 7 affected page directories
(233 tests) and the story tests for the 8 changed or affected stories
(102 tests) pass, and every `docs()` path in `site/src` resolves except
the same 13 that are unresolved on `main`.
- Rebase conflict: `docs/manifest/coder-agents.yml`. `main` added
`docs/ai-coder/agents/bring-your-own-mcp-servers.md`; it moves to
`docs/coder-agents/` with its sidebar entry, and its
`../../user-guides/` links become `../user-guides/`.
- Folded into the Templates commit: a link that `main` added to
`docs/user-guides/workspace-dotfiles.md` (#31606) now points at
`../templates/extending-templates/environment-variables.md`.
- `git range-diff` against `def074caab`, the head before both rebases,
shows only those changes.
- The move script reads every page from the clean `main` checkout and
resolves each relative link (inline, reference-style, and HTML
`src`/`href`) against the page's **old** directory. It maps the target
through the move map and recomputes the link from the page's **new**
directory. It runs once and refuses to run on a dirty `docs/` tree, so
it can't apply the path math twice. It also rewrites absolute
`coder.com/docs/...` and
`github.com/coder/coder/(blob|edit|tree)/main/docs/...` URLs, and skips
fenced code blocks and inline code.
- Before reusing the script, I ran it on the old base and diffed the
result against the old commit. The only differences were the two
hand-edited glossary entries and table padding from the formatter, so
the rebuild applies the same changes to the current `main`.
- Afterward, `grep -r ai-coder docs/` finds matches only in
`docs/redirects.json`.
- Changes from the earlier version of this branch: 2 more pages move
(`agents/projects.md`, `agents/acp-subagents.md`) and their sidebar
entries move with them. The chore commit also updates
`SessionSummaryTable.tsx` (new on `main`) and the doc-check skill's
`output.md` (its examples moved there from `SKILL.md`). The
`AICostControl.tsx` anchor question is gone, because `main` fixed it.

</details>

---------

Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
Base automatically changed from docs/ia-tutorials-nav to main November 4, 2026 22:30

@nickvigilante nickvigilante left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after review. Disclosure: this review was generated by Coder Agents on behalf of @nickvigilante.

#31645 and #31647 were squash-merged, so this branch conflicted with main. I rebuilt the merge as main plus this PR's net change (18a451e8ce, a merge commit, so there is no force-push). The result is the same 84-file diff against main as before, and no content was dropped.

Checked locally:

  • docs/manifest.json is in sync with the YAML sources.
  • lint/docs-manifest, lint/docs-redirects, lint/docs-html and lint/emdash pass. The 36 redirect rules resolve.
  • The /docs/user-guides redirects point at /docs/workspaces, and the rules that used to chain through them now point there directly.
  • A relative-link and image check over docs/ finds no new misses.
  • No docs/user-guides path references remain in CODEOWNERS, .github, scripts or the site/ docs() links. The remaining coder.com/docs/user-guides URLs are unversioned and intentionally left, as the PR describes, and they redirect.

@nickvigilante
nickvigilante merged commit a988af5 into main Nov 4, 2026
28 of 29 checks passed
@nickvigilante
nickvigilante deleted the docs/ia-workspaces-folder branch November 4, 2026 22:41
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant