You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs(adr-0046): P3 increment — `book` navigation as a spine with derived 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>
* feat(spec): add `book` navigation element — spine + derived-membership resolver (ADR-0046 §6, P3a)
- BookSchema (spine: ordered groups + audience + identity), BookGroupSchema,
BookNodeSchema, defineBook(); additive scalar `doc.order` / `doc.group`.
- resolveBookTree(): pure derived-membership resolver — the AI-safety core. A
doc joins a group by `include` glob/tag or explicit `doc.group`; explicit
`pages` override (verbatim order, `---`, `...` rest, missing-doc, object
nodes); unmatched docs → synthetic Uncategorized; first-group-wins dedup;
package-scoped includes.
- deriveImplicitPackageBook(): the implicit per-package book (no "flat" fork).
- Register `book` metadata type (allowOrgOverride:true, loadOrder 99); artifact
field `books` → `book`; `stack.books`.
- 15 resolver/schema tests; spec tsc clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(book): REST resolved-tree endpoint + audience gating + runtime wiring (ADR-0046 §6, P3b)
- REST `GET /meta/book/:name/tree` resolves a book spine against the docs that
exist now into a rendered tree (resolveBookTree); unknown name → implicit
per-package book. Read-layer `audience` gating: anonymous callers get a book
only when its audience is `public` (else 401), enforced in the read path —
not just the UI — since /meta reads are anonymous-reachable.
- Register `book` across the runtime metadata enumerations that were missing it:
PLURAL_TO_SINGULAR (`books`→`book`), engine.registerApp metadataArrayKeys,
app-plugin app-category keys, and the builtin type-schema map (book→BookSchema
for Studio editing / diagnostics). Export `defineBook` from the spec root.
- Showcase ships a real `showcase_manual` book (audience: public) demonstrating
explicit `pages` + `...` rest (start) and a derived `include` rule (guides).
Verified live (artifact boot): GET /meta/book → 1 item; /tree returns the
derived tree (guides filled by rule, other-package docs → Uncategorized);
public book serves anonymously (200), implicit org book is gated (401).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: changeset for book navigation (ADR-0046 §6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(book): documentation navigation as a `book` element — spine + derived membership (ADR-0046 §6)
9
+
10
+
Adds the `book` metadata element: a navigation **spine** (ordered groups + `audience` + identity) whose membership is **derived** by rule (`include` glob/tag) plus optional per-doc `order`/`group`, never a central array. This keeps AI authoring create-and-forget (no central-array read-modify-write) and runtime overlay merge-safe (RFC 7396 treats arrays atomically).
- Register `book` as a render-time metadata type (`allowOrgOverride: true`); wire it through the runtime type enumerations (PLURAL_TO_SINGULAR, engine registration, artifact field map, type-schema map).
0 commit comments