Skip to main content

UI workflow

Implement from the shared contract; use Paper and Storybook when requested.
2 min read

Start with DESIGN.md §0 and §5, the existing screen family, and the local @agata/ui components. AGENTS.md owns execution policy. Ordinary UI work uses source review and scoped static checks.

Default workflow#

  1. Identify the page family, reusable components, shared chrome, and data states.
  2. Implement product UI in apps/app/features/<product>/domains/. Keep data I/O behind service aggregators and shared app compositions in shared/.
  3. Prefer Astryx component props and layout primitives. Use StyleX only for requirements the existing APIs cannot express.
  4. Author copy in messages/en/ and synchronize messages/es/.
  5. Remove replaced code and update the affected stable documentation.
  6. Run the scoped static checks required by AGENTS.md. Report what they prove and any runtime behavior that remains unverified.

Browser sessions, screenshots, tests, builds, Paper, and Storybook require an explicit user request. A UI change alone does not authorize them. Requesting Paper does not automatically authorize Storybook or browser verification.

When Paper is requested#

Use Paper Desktop and the actual open file. Reuse the existing kit, patterns, and product frames. Keep C2 density, semantic tokens, and one active app accent. Include Default, Empty, Loading, and Error states where the product has them; add a narrow layout when its structure changes.

The canvas records visual intent. Component source owns executable behavior and exact props. Treat Paper HTML/JSX as reference material, never as code to paste into the app. If the file is unavailable, report the missing reference rather than guessing what it contains.

Keep requested frames aligned with the implementation or mark them stale.

When Storybook is requested#

Use apps/storybook for component stories, shared patterns, and page fixtures. Automated hosted builds are disabled, so local source is the current inventory. See DESIGN.md §7 for locations, providers, and explicit Node.js commands.

  • Components use a literal category/title, autodocs, and meaningful variants.
  • Pages use DS primitives and local English fixtures. They do not import apps/app or #/*. Use Default, Empty, Loading, and ErrorState where applicable.
  • Pattern stories may use real props-driven app components when they do not depend on route/session/server state. Explain necessary mirrors in the story.
  • Delete stories and variants made obsolete by the requested Storybook change.

Updating story source does not authorize running Storybook, a build, or a browser session. Perform only the requested verification.