Worked Examples · 2026-06-18Platform Capabilities — End-to-End Examples
Detailed, contract-grounded worked examples for the platform's authoring & runtime capabilities, using the showcase tenant as the canonical example (its home + a /components gallery page exercise all 11 page-builder components). Evidence tier: illustrative worked examples grounded in real GraphQL/route/manifest contracts — backend/CLI-lane evidence (commands & payloads), not live-demo screenshots; claim-cap per capability below. Authority for readiness remains each spec's review.md.
1. Page Builder (manifest-driven, DB-backed, no rebuild)
Pages are arrays of sections; each section names a component from the component-manifest SSOT (componentManifests GraphQL ← backend/internal/componentmanifest/manifests.json) plus its props. The CMS Pages builder edits sections and saves the whole section array via updatePageSections(id, sections: [JSON!]!). Public routes are force-dynamic, so adding an already-registered component to a page is DB-data-only — no image rebuild.
# Showcase home is built from these manifest-backed sections (backend/seeds/showcase-pages.json):
HeroSection · FeatureGrid · ContentList · EventSection · ImpactStats · CTASection
# The /components gallery page additionally demonstrates:
ResourceGrid · ContentSection · EnhancedContentList · EnhancedEventCalendar
# Save an edited page (full-array replace) — from the CMS page builder:
mutation { updatePageSections(id: "<pageId>", sections: [ /* the full ordered section array */ ]) { id } }
Claim-cap: manifest-validated section authoring; adding registered components is runtime-proven DB-only. NOT a new-component rebuild path. Authority: shadcn-component-library-a2ui-authoring/review.md.
2. AI Content Generation (backend BYOK)
Generation runs server-side through generateAIContent(prompt, providerId); the CMS never holds provider secrets in the browser (see the 2026-06-18 security hardening). Each site declares its own provider profiles (Google Vertex/Gemini, AWS Bedrock, Azure AI/OpenAI, OpenAI, Anthropic, TensorZero, OpenCode) with BYOK secret metadata + a usage ledger.
mutation { generateAIContent(prompt: "Draft a launch blog post about our new studio", providerId: "") { content model tokensUsed } }
# providerId "" = use the site's default profile; the backend resolves the BYOK key, never the browser.
Claim-cap: backend-routed generation contract; NO live external-provider call in this manual. Authority: site-byok-ai-provider-settings/review.md.
3. Content Management (types · draft/publish · submissions · RBAC)
Content is modeled by content types and moves through a draft → published → unpublished status lifecycle (status-scoped listing). Public forms submit into a governed submission workflow (submit → approve/reject) reviewed in the CMS. Every operation is permission-checked (e.g. site.content.*, site.social.read/manage).
# Public site form section (showcase /contact) → backend-issued submissionId → CMS review queue (approve/reject).
# Content list/detail pages render DB content by contentType (article/event) via ContentList/ContentSection.
Claim-cap: draft/publish breadth + submission workflow proven at unit/backend tier (LAUNCH-007); CMS review is backend-backed where the governed bundle runs.
4. MCP & Agent-Friendly Surfaces
Each site exposes agent-friendly read surfaces: a Model Context Protocol endpoint at /mcp (list/get/search contents), an MCP discovery doc at /.well-known/mcp.json, and per-site + platform llms.txt. Non-VIP tenants' reads are confined by D2 Row-Level Security (routed non-superuser role) when SCHEMA_TIER_APP_USER is enabled.
# Discover + read a site over MCP (HTTP/JSON-RPC):
GET /.well-known/mcp.json # server description
POST /mcp → tools: list_contents(site) · get_content(site, slug) · search_contents(site)
GET /site/showcase/llms.txt # agent-friendly site summary
Claim-cap: /mcp read path is backend-backed on the full local stack + RLS-confined as a non-superuser role on governed PG; cloud-deploy/UAT remains owner/infra (SPTR-LIVE-WIRING-001). Authority: schema-per-tenant-routing-rls/review.md.
5. Agent Skills (per-site declarative skill templates)
Sites define declarative skill/prompt templates (internal/skilltmpl; seeds skills-platform.json/skills-naelt.json) used to convert/optimize content — no script/code execution, no sandbox. Templates are versioned and managed via upsertSkillTemplate (create ⇒ v1; update ⇒ version bump; published templates immutable; cross-site fail-closed; @requirePermission("site.social.manage")).
mutation { upsertSkillTemplate(input: { id: 0, kind: "post-conversion", name: "LINE→blog", body: "..." }) { id version kind } }
# id:0 → creates version 1; id>0 → updates + bumps version.
Claim-cap: declarative template contract (no code execution); service + RBAC proven at enttest tier. Authority: messaging-ingest-social-publishing/review.md.
6. A2UI (agent-authored pages via the manifest)
The A2UI agent (backend/internal/adk) authors page-builder sections from the same component-manifest catalog, gated by a manifest-validation step + a design-contract no-invented-facts honesty boundary + an untrusted-content boundary. It proposes manifest-valid sections that you save through the normal updatePageSections path — so agent output is held to the exact same contract as human page-builder edits.
# A2UI flow: catalog prompt (componentManifests) → agent proposes sections → manifest validation gate
# → design-contract honesty check → human review → updatePageSections(save).
Claim-cap: manifest-validated authoring + honesty boundary proven at unit/contract + dev-web browser tier; NO live-LLM round-trip claim. Authority: shadcn-component-library-a2ui-authoring/review.md.
7. Social Media — Complete Flow (ingest → AI convert → review → publish)
A platform-agnostic, integration-first pipeline (messaging-ingest-social-publishing): inbound messages arrive on a single canonical webhook, are normalized, converted to a post draft via the site's AI provider + a declarative skill template, queued for review, then published through pluggable publisher drivers. Site-scoped RBAC throughout (site.social.read/manage/publish/secret); secrets are site-BYOK.
# 1) INGEST — providers self-register; one canonical inbound route per platform/site:
POST /api/webhooks/messaging/{platform}/{site} # e.g. line, telegram, whatsapp (signature-verified, fail-closed)
# 2) CONVERT — normalized message → post draft via SiteAIProviderResolver + per-site skill template (no sandbox).
# 3) REVIEW — draft sits in the CMS "Messaging & Social" review queue:
mutation { updatePostDraft(input: { id: "<draftId>", blocks: [...], metadata: {...} }) { id status version } } # published drafts are immutable
# 4) PUBLISH — through a pluggable SocialPublisher driver (e.g. Facebook Graph):
mutation { publishPostDraft(id: "<draftId>") { id status } } # @requirePermission("site.social.publish")
Claim-cap: repo-local integrated feature + governed cms-e2e backend-backed Messaging & Social browser smoke (T16.6); NO real LINE/Telegram/WhatsApp delivery, real Facebook publish, real OAuth, or live-AI quality. Authority: messaging-ingest-social-publishing/review.md.
Evidence Source: real GraphQL/route/manifest contracts + spec review.md (no new runtime screenshots — worked-example/contract tier). Coverage Tier: per-capability claim-caps above (mix of backend-backed, unit/contract, and runtime-backed). Readiness State: local proof only; NO hosted-Postgres, live external provider/OAuth/AI, DNS/TLS/deploy/UAT/production. Authority: .agents/specs/SPECS.md, RTM.md, and the cited per-spec review.md.