Skip to content

ADR-0046: Package documentation as metadata#1777

Merged
os-zhuang merged 1 commit into
mainfrom
docs/adr-0046-package-docs
Jun 12, 2026
Merged

ADR-0046: Package documentation as metadata#1777
os-zhuang merged 1 commit into
mainfrom
docs/adr-0046-package-docs

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

New ADR establishing documentation as a first-class metadata element:

  • src/docs/ compiles into the manifest like objects/views — docs ship with the package, registry grants apply automatically (zero registry change for v1, rides manifest_json)
  • Derived content is rendered, never written: field dictionaries, permission matrices, validation lists, state machines are metadata views rendered by console/registry; the only legitimate generation is a frozen export (confirmation PDF) bound to a released version
  • Four-lifecycle repo layout: src/ (ships) / delivery/ (contract-bound, never ships) / internal/ (engineering) / root CHANGELOG.md (collected at publish)
  • Closed docSet enum + meta.json subset (title/pages) for structure; pure Markdown, no MDX (trust boundary, ADR-0025), no images in v1 (asset service in v2 with content-addressed immutable URLs)
  • Minimal set per package type: App → index/user/admin/CHANGELOG; plugin/driver → index/CHANGELOG; enforced by publish lint
  • Rendering surfaces: registry package page → console help center → contextual help via binds → in-app AI assistant grounding
  • i18n: locale-suffix files, single canonical source language, translations as AI-derived-but-reviewed with source-hash staleness checks
  • AI authorship quality gates: binds coverage floor, derived-content ban + token budget ceiling, manifest fact-checking, docs-only Q&A evals (os docs lint / os docs verify)

Includes rejected-alternatives table (static sites, generated reference markdown, MDX, ordering schemes) and a five-phase rollout plan.

Piloted on os-tianshun-mtc (steedos-labs): conventions validated there, including the empirical case for the derived-content rule (a generated 26-page dictionary was shipped and deleted within a day).

🤖 Generated with Claude Code

Docs become a manifest element compiled from src/docs/ (pure Markdown,
no MDX, no images in v1; meta.json subset for ordering). Derived content
(field dictionaries, permission matrices, state machines) is rendered
from metadata, never authored or generated. Repo layout separates four
doc lifecycles (src / delivery / internal / CHANGELOG). Defines minimal
docs set per package type, registry/console/AI-assistant rendering
surfaces, i18n via locale-suffix files with AI-derived translations,
and machine quality gates for AI authorship. Piloted on os-tianshun-mtc.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 12, 2026 9:19am

Request Review

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 12, 2026
@os-zhuang
os-zhuang merged commit 965884b into main Jun 12, 2026
7 of 8 checks passed
@os-zhuang
os-zhuang deleted the docs/adr-0046-package-docs branch June 12, 2026 09:20
os-zhuang added a commit that referenced this pull request Jun 16, 2026
feat(chatbot): surface AI quota refusals as upgrade/top-up CTA (P1d) (#1777)

objectui@6d4cc0971bfe4c3ffc65bd0c9a71d29a3ba1e31b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant