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:
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.