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, andcanSubmit. - 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/uiand@amisi-mobile-starter/themebefore creating primitives or tokens. - Prefer the repository’s Uniwind
classNamestyling patterns over new inline styles. - Keep user-facing English text in
@amisi-mobile-starter/i18nrather than embedding it in shared UI. - Route logging, analytics, crash reporting, and provider calls through their existing adapters.