From 57416be3e1a70ec81ec335f7a7fb47238861daf0 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Tue, 16 Jun 2026 15:24:26 +0800 Subject: [PATCH] docs(showcase): add "Live Metadata Views" example doc (ADR-0051 P1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A `doc` whose Markdown embeds four ```metadata fences — two state machines (task/project lifecycles), a flow at business altitude, and a permission matrix — demonstrating ADR-0051 inline metadata views. Compiles via the existing doc collector (the fence is valid CommonMark, not MDX); renders live once the objectui `element:metadata_viewer` (objectstack-ai/objectui#1774) is deployed. Verified end-to-end in the browser against this showcase backend. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/docs/showcase_metadata_views_guide.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 examples/app-showcase/src/docs/showcase_metadata_views_guide.md diff --git a/examples/app-showcase/src/docs/showcase_metadata_views_guide.md b/examples/app-showcase/src/docs/showcase_metadata_views_guide.md new file mode 100644 index 00000000000..c972b4147c8 --- /dev/null +++ b/examples/app-showcase/src/docs/showcase_metadata_views_guide.md @@ -0,0 +1,64 @@ +--- +title: Live Metadata Views in Docs +description: Embed live, read-only views of state machines, flows, and permissions directly in the prose. +--- + +# Live Metadata Views in Docs + +Documentation is for the reader who can't — or shouldn't — open Studio: a +business analyst, a project manager, an auditor. For them a running screen only +ever shows *their own slice* of the system. It never shows the whole shape of a +process, the full set of legal state transitions, or who can do what across an +object. + +This page embeds those **live, read-only views** straight into the prose with a +` ```metadata ` fenced block. Each view is **resolved at read time** from the +current metadata — change the underlying state machine and the diagram below +changes with it. Nothing here is a screenshot (ADR-0051). + +## A record lifecycle — state machine + +A Task moves across a board. Which moves are legal is governed by the +`task_status_flow` state machine on the `showcase_task` object. Here it is, +rendered live from that rule: + +```metadata +type: state_machine +object: showcase_task +name: task_status_flow +``` + +Projects have their own lifecycle, including terminal (dead-end) states: + +```metadata +type: state_machine +object: showcase_project +name: project_status_flow +``` + +## A process — flow + +The reassignment wizard, shown at the **business altitude** — purely technical +steps (scripts, record I/O) are folded away so the reader sees the process, not +the plumbing: + +```metadata +type: flow +name: showcase_reassign_wizard +detail: business +``` + +## Who can do what — permission + +The `showcase_contributor` permission set, as an object-access matrix: + +```metadata +type: permission +name: showcase_contributor +``` + +--- + +> These four views are not authored prose — they are the live metadata, +> projected read-only into the document. See +> [the showcase overview](./showcase_index.md) for the rest of the workspace.