Bezel Team playground-generation-protocol design-001
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
playground-generation-protocol · supabase_json

Bezel Team playground-generation-protocol design-001

playground-generation-protocol artifact · for Bezel Team · phase design-001 · status draft

Planning Surface

Use this to decide what happens next.

Status

draft

Phase

design-001

open questions
  • Should preview storage use content.preview in v1 or create studio_artifact_previews immediately?
  • Should playground generation run as a script first, backend route second, or platform task first?
  • Should generated playgrounds be public URLs, signed URLs, or authenticated app routes? Recommendation: authenticated/sandboxed app route for customer data; public only for internal dogfood without sensitive data.
Agent Handoff
Start Here

playground-generation-protocol artifact · for Bezel Team · phase design-001 · status draft

Completion Evidence

No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.

Open Questions
  • Should preview storage use content.preview in v1 or create studio_artifact_previews immediately?
  • Should playground generation run as a script first, backend route second, or platform task first?
  • Should generated playgrounds be public URLs, signed URLs, or authenticated app routes? Recommendation: authenticated/sandboxed app route for customer data; public only for internal dogfood without sensitive data.
Structured Payload

Machine-readable source fields

kind

bezel.playground-generation-protocol

name

Artifact Playground Generation Protocol

version

1

principle

Canonical artifacts remain the source of truth. Playgrounds are generated human-review surfaces derived from artifacts so customers can see, test, and comment before build.

created at

2026-05-04T14:57:26.058Z

project id

bezel-team

first slice
name

Wireframe Playground for Bezel Dogfood Screens

screens
  • project.overview
  • discovery.chat
  • screen.map
success

Justin can visually review the first three Bezel screens and request changes against screen/component ids.

input artifact

wireframe-spec/design-001

expected preview

Interactive static HTML showing phase rail, current-step header, next-action panel, discovery chat with extracted facts, screen map cards, Ask Bezel, and model perspectives.

model policy
default model

Claude Sonnet for quality; cheaper model acceptable for mechanical regeneration once template stabilizes.

output contract

Model returns one complete HTML document with inline CSS/JS, no external dependencies, and clear screen/component ids matching source artifact ids.

multi model future

Allow model comparison for playground alternatives, but require one accepted synthesis/preview before build.

artifact flow
  • Artifact exists as draft or approved studio_artifacts row.
  • User or Dreamborn operator clicks Generate Playground.
  • Backend job sends artifact content plus playground system prompt to selected model.
  • Generated HTML is validated/sanitized enough for sandboxed preview and uploaded to Supabase Storage.
  • Preview metadata is stored and linked to artifact id/version.
  • Customer opens playground in sandboxed iframe or new preview route.
  • Customer comments/requested changes attach to artifact ids, screen ids, state ids, or component ids.
  • Accepted changes patch the canonical artifact, not the generated HTML.
  • Build plan/agent briefs use approved artifacts and may reference playground preview as visual evidence.
storage model
v1 fast path

Store preview metadata under studio_artifacts.content.preview if schema changes are not desired.

preferred model

Create studio_artifact_previews table for production once implementation begins.

preferred fields
  • id
  • artifact_id
  • project_id
  • artifact_type
  • phase_id
  • source_version
  • preview_type
  • model
  • storage_bucket
  • storage_path
  • public_url
  • status
  • created_at
  • created_by
  • error
open questions
  • Should preview storage use content.preview in v1 or create studio_artifact_previews immediately?
  • Should playground generation run as a script first, backend route second, or platform task first?
  • Should generated playgrounds be public URLs, signed URLs, or authenticated app routes? Recommendation: authenticated/sandboxed app route for customer data; public only for internal dogfood without sensitive data.
trigger policy
v1

manual_button

why

Manual generation avoids runaway model cost, avoids regenerating on every edit, makes debugging easier, and keeps review intentional.

label

Generate Playground

later
  • generate after artifact approval
  • generate on explicit revision request
  • compare playground variants from multiple models
role in process
phase

Screen + Wireframe Design

primary use

Turn screen-map, wireframe-spec, and screen-state-spec artifacts into sandboxed interactive previews for HITL review.

secondary use

Later, generate architecture diagrams, workflow simulations, and release-review previews from other artifacts.

not source of truth

The generated HTML/playground is disposable evidence and review UI. Approved artifact content drives architecture, plan, and build briefs.

security policy
  • Generated HTML is untrusted and must run in sandboxed iframe or isolated preview route.
  • No customer secrets, service keys, credentials, or private environment values are included in generation prompts.
  • Generated HTML must use static/sample data derived from artifact content, not live privileged APIs.
  • No arbitrary external scripts by default.
  • Preview URLs are evidence/review aids, not production deployments.
  • Playground comments and accepted changes write back through controlled Bezel APIs, not from generated HTML directly.
ui requirements
status badges
  • not_generated
  • generating
  • ready
  • needs_regeneration
  • failed
  • approved_for_reference
artifact view controls
  • Generate Playground
  • Open Playground
  • Regenerate
  • View Source Artifact
  • View Playground Feedback
playground view controls
  • Comment on screen/component
  • Request change
  • Approve preview
  • Back to artifact
  • View model evidence
feedback contract
feedback types
  • question
  • request_change
  • approval
  • concern
  • scope_change
promotion rule

Material feedback must become artifact patches, open questions, revision tasks, or decisions before build planning.

comment targets
  • artifact_id
  • screen_id
  • flow_id
  • state_id
  • component_id
supported sources v1
purposephase idartifact type
Generate interactive preview for project.overview, discovery.chat, and screen.map.design-001wireframe-spec
Generate visual screen inventory/review board.design-001screen-map
Generate state matrix review surface once artifact exists.design-001screen-state-spec