Skip to main content
Use the existing repository patterns before introducing a new abstraction. AGENTS.md, .ai/conventions.md, and package-level documentation define the working rules; current source code confirms how each area applies them.

Place behavior in the owning layer

Keep route files focused on navigation and composition. Do not duplicate domain behavior in a route when it belongs in a package.

TypeScript and runtime data

  • Use TypeScript for implementation files.
  • Prefer interfaces for object shapes and literal unions or object maps instead of enums.
  • Use Zod for external, persisted, or cross-boundary data.
  • Export named components and utilities from reusable modules.
  • Use descriptive state names such as isLoading, hasError, and canSubmit.
  • Handle invalid and error paths early with guard clauses.

State, UI, and side effects

  • Put server state in TanStack Query and client or UI state in Zustand.
  • Derive values instead of adding synchronization effects when possible.
  • Reuse @amisi-mobile-starter/ui and @amisi-mobile-starter/theme before creating primitives or tokens.
  • Prefer the repository’s Uniwind className styling patterns over new inline styles.
  • Keep user-facing English text in @amisi-mobile-starter/i18n rather than embedding it in shared UI.
  • Route logging, analytics, crash reporting, and provider calls through their existing adapters.

Completion check

Keep changes small, add or update focused tests, and run: