Frontend Prompting

When an AI builder creates or edits a custom page, give it Cessy-specific context. Generic UI prompts often produce pages that look plausible but duplicate business rules or call the wrong surface.

Good prompt shape

Use this structure:

Use the Cessy Design MCP server for this app. Inspect the current model,
projection schemas, commands, permissions, and page references before editing.
Build a custom page for <user task>. The page must read from <projection>,
execute <commands>, handle empty/loading/error/permission states, and avoid
duplicating business rules that belong in DomainConfig.

Required context

Give the agent:

  • target app and environment
  • page slug or page name
  • intended users and permissions
  • projections the page may read
  • commands the page may execute
  • states the UI must handle
  • whether a BFF is allowed
  • preview and verification expectations

Review checklist

Before accepting a generated page:

  • all command calls use generated runtime contracts
  • projection reads match the published schema
  • permission failures are visible and useful
  • text fits in buttons and compact panels
  • mobile and desktop layouts are verified
  • page preview works with realistic data
  • no business rule is hidden only in the frontend

When to use a BFF

Use a BFF when the page needs external service data, server-side composition, or sensitive credentials. Do not use a BFF to bypass DomainConfig or permissions.