with one click
unified-toc
// Update the unified table of contents when pages are added, removed, or moved. Use when you need to register a new page, deregister a removed page, or relocate an entry in the ToC hierarchy.
// Update the unified table of contents when pages are added, removed, or moved. Use when you need to register a new page, deregister a removed page, or relocate an entry in the ToC hierarchy.
Draft MongoDB drivers release notes for a new version by fetching the corresponding release from the driver source code and adding them to the documentation. Use when asked to create release notes or What's New sections for the drivers and frameworks listed in the Workflow section.
Run local docs build checks on pending content/ changes before opening a PR. Catches broken directives, bad refs, missing includes, invalid substitutions, and indentation errors using the Snooty RST parser. Applies unambiguous fixes from a learned per-repo knowledge base, surfaces ambiguous ones, and appends new errors to a local log. Use when the user is about to commit or open a PR and the pending changes include: edits to .txt or .rst files, changes to YAML extract files in source/includes/, any file renamed/moved/ deleted in content/ (could break :ref:, literalinclude, or include paths), or snooty.toml changes. Also use when the user asks to "check the build", "test before PR", "lint the build", or wants to validate edits work. Do NOT trigger for image-only changes, code-example file edits that don't touch RST, or non-RST config files with no path impact.
Batch workflow for completing small DOCSP Jira tickets via sage-bot-beta. Selects tickets, hands them off to sage-bot-beta for implementation, polls for the resulting draft PRs, and adds staging links. Use this skill whenever the user wants to work through multiple small DOCSP Jira tickets or pick up batch work. Trigger phrases: "start tickets", "captain tickets", "do some tickets", "work on backlog", "bug tickets", "bug bash".
Help the user understand and complete their assigned DOCSP tickets for drivers. Provides a prioritized overview of all assigned tickets and suggests next steps. Use only when the user explicitly uses the slash command.
Use this skill for any Jira operation in the DOCSP project — creating, viewing, searching, updating, transitioning, commenting on, or linking tickets. Also handles follow-up ticket creation to manage scope creep. TRIGGER when: user mentions a DOCSP-XXXXX ticket number or any Jira ticket URL; user asks to view, open, check, update, transition, close, comment on, link, or search tickets; user references "the ticket", "the Jira", or "open a ticket". SKIP: GitHub issues; non-Jira platforms; questions unrelated to ticket operations.
Opens a GitHub Pull Request with the standard PR template: Description, Staging Links, and JIRA ticket. Infers the ticket from the branch name and generates staging preview URLs from changed files after the PR is created. TRIGGER when: user asks to open, create, submit, make, update, or edit a PR or pull request, or wants to refresh staging links on an existing PR.
| name | unified-toc |
| description | Update the unified table of contents when pages are added, removed, or moved. Use when you need to register a new page, deregister a removed page, or relocate an entry in the ToC hierarchy. |
You are an assistant that keeps the MongoDB documentation unified table of contents in sync with the content directory.
Do NOT use this skill when:
snooty.toml for the target version directory and check for eol = true. If present, stop and inform the user that EOL versions are not maintained.content/atlas-cli/.../command/). Atlas CLI command ToC entries are managed by dedicated tooling in content/tools/atlas-cli-commands-toc/ and are maintained in docset-data/atlas-cli-commands.ts, atlas-cli-k8s-commands.ts, and atlas-cli-local-commands.ts. Do not modify these files.The ToC is a four-tier hierarchy. Each tier is a directory of TypeScript files:
toc.ts ← Root. NEVER MODIFY.
L1-data/ ← Top-level nav sections (Development, Management, etc.)
└─ imports from L2-data/ and sometimes docset-data/
L2-data/ ← Topic-level hierarchies per product area
└─ imports from docset-data/ and sometimes manual-data/
docset-data/ ← Complete page trees for a single content site
manual-data/ ← Reusable fragments for the Database Manual only
All files live in content/table-of-contents/.
Key types (defined in types/index.ts):
InternalTocItem — requires contentSite and urlExternalTocItem — requires isExternal: trueCollapsibleTocItem — requires collapsible: true and itemsGroupTocItem — requires group: true and items; no urlSubNavTocItem — requires showSubNav: true, items, and url; cannot have versionsL1TocItem — cannot have versions, collapsible, group, showSubNav, versionDropdown, or isExternal. Do not create or modify L1TocItems.contentSite is not inherited. Every InternalTocItem in an items array must declare its own contentSite. To avoid repetition when adding a block of items that all share the same content site, use the inheritContentSite(contentSite, items) helper exported from types/index.ts. Items passed through this helper may omit contentSite and will receive it from the parent call. The corresponding type for those items is InheritedTocItem. When adding to an existing file, update the import to import { inheritContentSite, type TocItem } from '../types'; and use it inline as the items value: items: inheritContentSite('content-site', [{ label: '...', url: '...' }]).
Symlink items vs. source-of-truth items: A page that appears in multiple locations in the ToC has exactly one source-of-truth entry and one or more symlink entries. The source-of-truth entry uses a docs-relative URL path that starts with / (e.g. /docs/atlas/triggers/overview). A symlink entry uses a full absolute URL that starts with https:// and carries isExternal: true (e.g. { label: 'Triggers Overview', isExternal: true, url: 'https://www.mongodb.com/docs/atlas/triggers/overview' }). When adding a symlink, always include isExternal: true. When searching for symlinks to remove, look for entries with both isExternal: true and an https://www.mongodb.com/docs/ URL matching the page being removed. When adding, removing, or moving entries, identify whether the target is a source-of-truth item or a symlink, and handle it accordingly (see per-operation instructions below).
Versioning: Some TocItems are scoped to specific product versions using the versions field. Use { includes: [...] } or { excludes: [...] } — never both.
includes scoped to the versions where the page exists. Start with includes: ['upcoming'] if it is upcoming-only; extend the array as it gets backported to other versions; remove the versions field entirely once it exists in all versions.excludes with a Versions helper to identify the versions where the page no longer exists (e.g. excludes: manualVersions.after('v8.0', { inclusive: true })). This is self-maintaining — new versions are automatically excluded as they are added to the version array. Do not hardcode version strings in excludes.Version arrays live in version-arrays/ and are organized by product:
version-arrays/server-docs/manual.ts — MongoDB Server (Manual)version-arrays/server-docs/mongosync.ts — MongoSyncversion-arrays/drivers/ — one file per driver (e.g. node-versions.ts)version-arrays/cloud-docs/ — Atlas and cloud productsEach file exports a Versions instance with helper methods to generate version arrays without hardcoding strings:
manualVersions.before('v8.0') — all active versions before v8.0 (exclusive); pass { inclusive: true } to include v8.0manualVersions.after('v8.0') — all active versions after v8.0 (exclusive); pass { inclusive: true } to include v8.0Deprecated versions are automatically excluded from all helper outputs. Do not reference deprecated versions directly in includes or excludes arrays.
Use versionDropdown: true on a GroupTocItem or CollapsibleTocItem to render a version selector in the navigation. Use :version as a placeholder in url values for versioned pages (e.g. /docs/:version/release-notes).
If registering multiple pages in one invocation, complete Steps 1–2 for all pages before making any edits. Apply all changes first, then run the compile check once at the end.
When adding entries that have a parent/child relationship (e.g. a new CollapsibleTocItem and its child pages), plan and apply them as a single edit: write the parent node with the children already nested in its items array. Do not insert a parent node as a placeholder and fill in children in a separate edit.
Before making any change, determine which file owns the entry:
docset-data/ for the content site (e.g. contentSite: 'atlas-cli'). If a file exists for the product, changes to individual pages go there.manual-data/ for the relevant topic fragment.L2-data/ for the topic area.L1-data/.| Situation | Type |
|---|---|
| Standalone page with a URL | InternalTocItem |
| Page with child pages | CollapsibleTocItem |
| Logical heading with no URL | GroupTocItem |
| Page that opens a drill-down sidebar | SubNavTocItem |
| Link outside mongodb.com/docs | ExternalTocItem |
GroupTocItem: Use when a set of pages belongs under a named section that has no page of its own. Unlike CollapsibleTocItem, it has no URL and is not collapsible — it renders as a static label in the sidebar that always shows its children. Do not create a new GroupTocItem without confirming the section label and placement with the user.
SubNavTocItem: Use only for products that have their own complete documentation tree (e.g., driver docs). When a user navigates to this entry, the entire sidebar switches to display that product's page hierarchy. This is a structural navigation decision — do not create a new SubNavTocItem without explicit user instruction.
TocItem object. Required fields:
label: Display text matching the page's H1 titlecontentSite: The DocSite enum value for the product (copy from adjacent entries)url: The path relative to the content site's source/ directory, without the extension, appended to the base URL pattern for that content site. Use adjacent entries to determine the base URL — it is not always derivable from the directory name (e.g. content/c-driver/ uses /docs/languages/c/c-driver/:version/).versions field with either includes or excludes. Use the helper methods from the appropriate version-arrays/ file (e.g. manualVersions.before('v8.0')) rather than hardcoding version strings.CollapsibleTocItem and add an items array.versions field using excludes with a Versions helper to identify the versions where the page no longer exists. Do not delete the entry. Do not hardcode version strings.TocItem entry for the page. Search the ToC for any symlinks pointing to the same page. Inform the user of any symlinks found and confirm whether they should also be removed before proceeding.items array with children. If so, decide with the user whether to remove the children or re-parent them.items):
url, convert it to an InternalTocItem by removing collapsible: true and the items array. Keep label, contentSite, and url.url (i.e. it is a GroupTocItem), remove it entirely.TocItem entry from the source location.contentSite and url to match the destination product.User: Add a new standalone page "Create a Scatter Plot" to Atlas Charts under Tutorials, at /docs/charts/tutorial/scatter-plot.
Agent:
docset-data/ — finds docset-data/atlas-charts.ts for contentSite: 'charts'. Confirms with user.InternalTocItem.Tutorials CollapsibleTocItem, after the last existing tutorial entry.{
label: 'Create a Scatter Plot',
contentSite: 'charts',
url: '/docs/charts/tutorial/scatter-plot',
},
cd content/table-of-contents && pnpm tsc --noEmit — passes.InternalTocItem to docset-data/atlas-charts.ts, inserted after the last existing tutorial entry under Tutorials. Asks user to confirm before committing.User: Remove the "Create a Column Chart" page from Atlas Charts.
Agent:
docset-data/atlas-charts.ts:
{
label: 'Create a Column Chart',
contentSite: 'charts',
url: '/docs/charts/tutorial/order-data/column-chart-sales-by-store',
}
column-chart-sales-by-store. No symlinks found — proceeds.items array on this entry — no children to re-parent.CollapsibleTocItem still has other items — no further changes needed.docset-data/atlas-charts.ts.toc.ts.cd content/table-of-contents && pnpm tsc --noEmit