docs(adr-0046): P3 — book navigation as a spine with derived membership#1865
Merged
Conversation
…ved membership
Adds §6 to ADR-0046 specifying the P3 navigation model. A `book` is a metadata
element that stores only an ordered spine (groups); membership is derived by
rule (`include` glob/tag) plus optional per-doc `order`/`group`, never a central
array. This is chosen so AI authoring stays create-and-forget (no central-array
read-modify-write, §6.2.1) and runtime overlay stays merge-safe under RFC 7396.
Also specified: the implicit per-package book (packageId), `audience` access
(org / public≡guest / {profile}) enforced at the read layer, and a host-based
anonymous "library" portal reusing apps/docs (Fumadocs + per-host ISR) rather
than greenfield SSR. No `meta.json`: `book` is metadata, authored as *.book.ts.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Adds §6 to ADR-0046, specifying the P3 documentation-navigation model.
A
bookis a metadata element that stores only an ordered spine (groups + identity + access). Membership — which doc sits in which group — is derived from a rule on each group (includeglob/tag) plus an optional per-docorder/group. There is no centralpagesarray.Why (the load-bearing decision, §6.2.1)
Storing the whole tree in one array conflates three concerns with very different change profiles. Only the low-cardinality group definitions deserve central storage; the high-cardinality, AI-churned membership must not live in an array, because:
pageswould shadow docs a later package version adds. With membership derived and only a small spine stored, the volatile part never enters an array; per-docorderis a scalar that 3-way-merges cleanly.Also specified
book⇒ a synthetic book keyed bypackageId; the model has no "flat vs book" fork.audienceaccess (orgdefault /public≡ data-layerguest/{ profile }for role-gating) — the first metadata access concept, shaped as a reference into the existing permission model, enforced at the/meta/docread layer (not just UI).apps/docs(Fumadocs + per-host ISR), tenant from host (resolveByHostname) — not greenfield SSR; honest about the cost and the §2 boundary.meta.json—bookis metadata, authored as*.book.ts(defineBook()), consistent with every other element.Reconciles with §4's prior rejection of directory taxonomy (§6.1): the rejection was about references encoding paths;
bookkeeps content flat/name-addressed and puts structure in a separate explicit element that names stable things.Docs-only change. Implementation (P3a→P3c) follows in subsequent PRs.
🤖 Generated with Claude Code