Repository navigation
[Spec] AST-046: rules for splitting a docs topic into a namespace - #7210
Conversation
Adds the generic rules a docs-tree split follows (FR13), lets a section read on a namespace resolve through its guides (FR6), and states how the docsite shows a root namespace (FR14). The record stays draft for owner review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis ReportView Storybook for this PR · View Sandbox for this PR
Generated by PR Enrichment workflow | View current CI run |
…ches, as a topic's read does
There was a problem hiding this comment.
This change is waiting on a maintainer decision before it can be approved.
The proposal would make the docs-tree record governing and settle three useful rules: when a flat topic may split into a namespace of guides, how a section read resolves through those guides, and how the docsite shows a namespace as one page. The split and paging rules fit the existing route and response contracts, the paging description matches how the site already behaves, and validation passes. Approval, though, needs an engineering owner to approve the whole record as governing on the exact head through the repository's owner gate, which is still pending. Automated review cannot take that step.
Two corrections should land before the text governs:
- The section-lookup description says a topic read already looks up by key first and then by title. Today a topic read returns the first title-substring match and only falls back to keys (key-first applies only with localized titles). Please restate the namespace rule as its own cross-guide precedence and name where it differs from within-topic behavior, including two title matches inside one guide.
- The repeated promise that every released read keeps working needs its exceptions beside it: an ambiguous title query across two guides now errors instead of returning the first match, and references from other packages remain an open question.
Once a maintainer is ready to make the record governing, ideally with those fixes on the head they approve, the follow-up implementation work can proceed against clear rules.
[Automated review]
…y the no-break promise
There was a problem hiding this comment.
This change is waiting on a maintainer decision before it can be approved.
The proposal would make the docs-tree record governing and settle three useful rules: when a flat topic may split into a namespace of guides, how a section read resolves through those guides, and how the docsite shows a namespace as one page. The lookup rule is stated exactly on its own terms, and the compatibility promise is properly limited to unambiguous reads inside a topic's own package, with ambiguous title queries across guides and cross-package references named as exceptions. The paging description matches how the site already behaves, and validation passes. Approval still needs an engineering owner to approve the whole record as governing on the exact head through the repository's owner gate, which is pending. Automated review cannot take that step.
One addition should land before the text governs: the split rules keep each section's title and authored id, but readers address sections by a derived key that is allocated per document and can change when sections move between guides. Please require each section's addressed key to stay unchanged across a split (pinning it explicitly when regrouping would change it), so a split that follows every listed rule cannot break a released key read.
Once a maintainer is ready to make the record governing, ideally with that addition on the head they approve, the follow-up implementation work can proceed against clear rules.
[Automated review]
There was a problem hiding this comment.
This change is waiting on a maintainer decision before it can be approved.
The proposal would make the docs-tree record governing and settle three useful rules: when a flat topic may split into a namespace of guides, how a section read resolves through those guides, and how the docsite shows a namespace as one page. The lookup rule is stated exactly on its own terms, the compatibility promise is properly limited to unambiguous reads inside a topic's own package (with ambiguous title queries across guides and cross-package references named as exceptions), and the split rules now also keep each section's addressed key unchanged, pinning it explicitly when regrouping would change it. The paging description matches how the site already behaves, and validation passes. Approval still needs an engineering owner to approve the whole record as governing on the exact head through the repository's owner gate, which is pending. Automated review cannot take that step.
Once a maintainer is ready to make the record governing, the follow-up implementation work can proceed against clear rules.
[Automated review]
|
/approve-spec 6770522 |
Approving makes the whole AST-046 record current, not only these three rules. Everything already in it becomes current too: FR1–FR5 and FR7–FR12 (doc identity and routes, one home per doc, unique routes, one-level
astryx docsreads, the topic list, Doctor's tree checks, the CLI's own tree, section-level search, integrations in the tree, and the Unorganized level) and decisions DEC-1–DEC-4.The one behavior decision: Reading one section of a split topic: when exactly one guide has the section, it returns it, as it did before the split. When the same title fragment matches in two guides, it used to guess (first match); now it asks (error with suggestions). Fine?
Joey approved the four docs pieces on 2026-10-08. FR6 states the namespace rule on its own terms: each guide's own section read picks that guide's section (within one guide it still returns its first match, as any topic read does); across guides, a section whose key is the query answers when exactly one guide returns it, otherwise a single guide's result answers, and anything else asks with suggestions. The no-break promise is limited to unambiguous reads inside the topic's own package: a title fragment that now matches in two guides asks instead of guessing, and references from other packages stay an open question (OQ2).
Exact decision needed
Three generic rules for the docs tree (
spec:AST-046), so a split of a long docs topic into short guides is governed by a current record:astryx docs <namespace> <section>returns once a topic is a namespace (FR6, amended).Existing authority searched
spec:AST-046(draft) owns the tree, routes, andastryx docsreads. Its FR6 failed every section argument on a namespace, which breaks a released section read of any topic that becomes a namespace. Nothing in it said when a topic may become a namespace or how the docsite shows one; an open question left the docsite layout undecided.spec:AST-047(draft) owns links, moves, and the graph walk; FR13 relies on its FR9 and FR11 and changes neither.spec:AST-017FR45 (current): docs routes are mutable data anddocsresponse schemas are contractual. FR13 and FR6 keep more than FR45 requires; nothing here relaxes it.architecture:cli-surfaceINV25 and INV26 (current): unchanged; INV26 still describes the tree and its one-level reads.AST-046,AST-047, ordocs/architecture/cli-surface.md: one touches the architecture record for an unrelated rule; none touches this record.Decision
idunchanged, and no two guides share a section key; each guide answers one task or decision; every link,{@link}target, and token reference in the provider's docs still resolves (a token reference to the namespace reads its guides as one topic, in tree order);--dense/--zhreads keep their text; each piece of content appears once in the topic list, search, and data.astryx docs <namespace> <section>returns the section when exactly one guide below the namespace has it, taking from each guide the section its own section read returns; across guides, a returned section whose key is the query wins when exactly one guide returns it, otherwise a single guide's result answers, in the samedocs.detail.sectionshape. None, or several at the deciding step:ERR_UNKNOWN_SECTION, with suggestions naming the guide routes. A typed doc still refuses a section argument.astryx docs <namespace> --depth all --detail fullreturns it. Guide and nested-namespace slugs are temporary redirects to their place on that page. A namespace whose slug is a package's page keeps per-guide pages. Sidebar group: the namespace'scategory, elsefoundationswhen every guide is foundations, elseguide. No page for a namespace with no guide below it. The build fails on a slug that is both a page and a redirect.josephfarina, 2026-10-08).Rejected alternatives
Claim scope and non-goals
Owner approval
The owner approved this record's content on 2026-10-08. The head carries the approval commit:
authority: current,approved_by: josephfarina,approved_at: 2026-10-08, and the owner as decider on DEC-5 to DEC-7;pnpm check:knowledgepasses with it. The PR is ready, and/approve-spec <head sha>on the exact head completes the owner gate. That makes the whole record current, not only these three rules.Evidence and implementation relationship
apps/docsite/scripts/docs-pages.mjsandgenerate-data.mjs, with their page and route-resolution tests). No implementation is in this PR.Writing rubric results
#followed by digits,/pull/,/issues/).Scope
Validation
pnpm check:knowledge: passes on the head, with the record current.prettier --checkpasses on the record.git diff --check: clean.scripts/check-knowledge.test.mjsand.github/scripts/spec-owner-reconcile.test.mjs: 160 tests pass.