Skip to content
Create a UI Surface
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

Create a UI Surface

Workflow Create a UI Surface
agent stardesign
tags
workflowsurface

A UI Surface defines the visual layout and interactive elements of a screen or component. It uses a restricted Pug DSL for wireframing and layout.

Phase 1 β€” Context

Identify which feature, action, or event this UI serves. Verify that the target document exists in content/.

Phase 2 β€” Layout Strategy

Determine the high-level layout container:

  • section: Large page section
  • card: Grouped content block
  • modal: Overlay window
  • nav: Navigation shell

Phase 3 β€” Detailed Design (Pug DSL)

Author the surface block.

  • Use indentation for nesting.
  • Use literal strings for content (e.g., heading "Title Text", button Click Me or checkbox Remember me).
  • Use semantic components: stack, row, input, button, list, table.
  • Add placeholder tags for missing visual elements.

Phase 4 β€” Interactive Elements

Define form fields, buttons, and navigation links. Ensure every primary action (button/link) corresponds to a requirement or domain action.

Phase 5 β€” Draft & Confirm

Present the complete .surface.mdoc draft for confirmation before writing. Output: content/uis/{id}.ui.mdoc


Do’s and Don’ts

Do:

  • Identify which feature, action, or event this UI serves before designing
  • Use semantic components (stack, row, input, button, list, table) in the Pug DSL
  • Ensure every primary action (button/link) corresponds to a requirement or domain action
  • Use placeholder tags for missing visual elements that will be designed later
  • Present the full draft for confirmation before writing

Don’t:

  • Don’t use implementation-level components (React, Vue, etc.) in the Pug DSL
  • Don’t design a surface without a linked feature β€” surfaces always serve a feature
  • Don’t create interactive elements that have no backing requirement or domain action
  • Don’t mix tabs and spaces for indentation; inconsistent indentation breaks renders
  • Don’t skip the context phase; knowing what the UI serves shapes every design decision

Definition of Done

  • Draft presented to user for confirmation
  • Document written as content/uis/{id}.ui.mdoc with correct frontmatter and root tag
  • for attribute links to an existing feature or domain document
  • Every primary action corresponds to a requirement or domain action
  • Indentation is consistent throughout
  • All cross-references resolve to existing documents
  • pnpm compile succeeds