Skip to content

docs: inherit feature states from ancestor routes in the docs sidebar - #31975

Merged
nickvigilante merged 6 commits into
mainfrom
docs/ai-governance-state-inheritance
Nov 12, 2026
Merged

nickvigilante merged 6 commits into
mainfrom
docs/ai-governance-state-inheritance

Conversation

@nickvigilante

Copy link
Copy Markdown
Collaborator

Summary

A feature state in docs/manifest/ now applies to a route and all its descendants, so each state is set once on the highest route it applies to.
docsmanifestgen check rejects a route that repeats an ancestor's state, and the repeated states on main are removed.

State model

  • Put a state on the highest route it applies to.
  • Add a state to a descendant only when it is new, such as an early access page inside a Premium section.
  • The sidebar shows a pill on the route that sets the state and on descendants whose state differs.
  • Every page shows its full state, own plus inherited, under the title.

Changes

  • docsmanifestgen check (make lint/docs-manifest) fails when a route repeats an ancestor's state, following include files and overlays, or lists a state twice.
    It runs only after the manifest builds cleanly.
    Table-driven tests in scripts/docsmanifestgen/state_test.go.
  • Keep state: [premium] on AI Governance and External provisioners only.
    Remove the 27 states their descendants repeat in docs/manifest/ai-governance/** and docs/manifest/install/operate/provisioners.yml, and regenerate docs/manifest.json.
  • Document the model in contributing/documentation.md (new "Feature states" section with a YAML example), docs/.style/content-guidelines.md, and the doc-check skill.

Important

Inherited pills under the page title and the new sidebar behavior need the matching docs-engine change (DOCS-1440).
Merge this after that ships, or child pages show no state pill until it does.

Testing

  • go test ./scripts/docsmanifestgen/... ./scripts/docgenenv/...
  • golangci-lint run ./scripts/docsmanifestgen/...
  • GOOS=windows and GOOS=darwin go vet ./scripts/docsmanifestgen/
  • make lint/docs-manifest, make lint/markdown, make lint/docs-redirects
  • make gen/docs-manifest leaves the tree clean.
Decision log: rebase onto main after #31645
  • docs: promote the AI sections and Templates to the top level of the sidebar #31645 (merged 2026-11-04) moved AI Governance to a top-level section with Agent Firewall and AI Gateway nested under it, and added the ai-coder/... redirects.
    That covered this PR's move commits, link and URL updates, and redirects, which caused the conflicts.
  • The branch was rebuilt on main: the two move commits were dropped, and the four state-tooling and guidance commits were cherry-picked.
    The manifest cleanup was redone as a new commit against main's layout, using the new lint's output as the list of repeated states.
  • Agent Relay is now top-level with state: [premium, beta] and no child states, so it needs no change.
  • Conflicts in content-guidelines.md and the doc-check skill were resolved to keep main's newer text (Vale word-choice updates and relative redirect syntax) and apply only the feature-states lines.
  • The pre-rebase head was a797f59737.

Generated by Coder Agents on behalf of @nickvigilante.

Supersedes #31481, reopened under a human author for attribution.

default and others added 5 commits November 10, 2026 00:05
A route's state applies to all of its descendants, so a descendant that
repeats an ancestor's state is redundant. docsmanifestgen check now
reports each such route with its file, breadcrumb, and the ancestor that
already sets the state.
Add a Feature states section to contributing/documentation.md with the
inheritance rules, a YAML example of a Premium parent with an early
access child, and what the sidebar and the page title show for each
route. Link to it from the content guidelines.
Run repeatedStates only when BuildManifest succeeds, so it no longer
needs to tolerate undecodable files or guard against repeated includes.
Use slices.Clip for copy-on-append, rename the per-route state map, and
report a state listed more than once on the same route.
AI Governance sets state: [premium], and External provisioners sets it
on its own route, so their descendants inherit it. Remove the repeated
values that docsmanifestgen check now rejects.
@nickvigilante nickvigilante added the community Pull Requests and issues created by the community. label Nov 10, 2026
@nickvigilante nickvigilante self-assigned this Nov 10, 2026
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:52 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:52 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:52 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:52 — with GitHub Actions Inactive
@nickvigilante
nickvigilante marked this pull request as ready for review November 12, 2026 15:30
@nickvigilante
nickvigilante temporarily deployed to main November 12, 2026 15:30 — with GitHub Actions Inactive
@nickvigilante
nickvigilante marked this pull request as draft November 12, 2026 15:30
@nickvigilante
nickvigilante temporarily deployed to main November 12, 2026 15:31 — with GitHub Actions Inactive
@nickvigilante
nickvigilante marked this pull request as ready for review November 12, 2026 15:50
@nickvigilante
nickvigilante temporarily deployed to main November 12, 2026 15:50 — with GitHub Actions Inactive

@ianjevans ianjevans 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.

lgtm

@nickvigilante
nickvigilante merged commit 1271dcb into main Nov 12, 2026
36 of 37 checks passed
@nickvigilante
nickvigilante deleted the docs/ai-governance-state-inheritance branch November 12, 2026 18:19
@nickvigilante
nickvigilante temporarily deployed to main November 12, 2026 18:19 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

1 inactive deployment
main — 7986507d Deployed Nov 12, 2026 by nickvigilante via cla #255155
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.

2 participants