This file combines all development guidelines from docs/*.md and .cursor/rules/*.mdc.
These rules apply to the entire repository unless a subdirectory defines its own
AGENTS.md.
- Run
pnpm lint,pnpm testandpnpm buildbefore each commit. - If new CSS variables are introduced, run the
tokens-checkscript.
- Follow GitFlow. Work on feature branches, open PRs, and never commit
directly to
mainordevelop. - Commits and PR titles use Conventional Commit format.
- Reference the relevant task ID from
docs/project_plan.mdin the PR description. CI must pass before merge.
- Implement all components under
packages/ui-kit/srcas described in.cursor/rules/components.mdcand the planning documents.- One component = one directory containing
index.ts,<Component>.tsx,<Component>.test.tsxand<Component>.stories.tsx. - Use wrappers around Shadcn UI primitives and expose your own prop API.
- No default exports. Export from
src/index.tsonly. - Tailwind classes may be used only inside ui-kit; never expose raw classes via the public API.
- Colors and spacing use CSS variables defined in
styles/globals.css. Use Shadcn semantic tokens (bg-primary,text-foreground, etc.). - Storybook stories include a Canvas demo and ArgsTable.
- Provide unit tests with Vitest and axe-core accessibility checks.
- Update
theme/TOKENS.mdwhen adding new CSS variables. - Add a Changeset entry for every public change.
- One component = one directory containing
- Apply the Tailwind and Shadcn rules from
.cursor/rules/styling_rules.mdcand.cursor/rules/components.mdc. - Local UI state uses
useState/useReducer. Global session state uses Zustand. Remote data fetching uses TanStack Query. Forms use React Hook Form + Zod. No direct fetch calls in components. - React hooks must clean up side effects and be named; avoid unnamed
useEffect. UseuseMemofor expensive calculations. - Follow TypeScript strict-mode practices: no
anyunless justified, prefer type aliases and generics, and useimport typefor type-only imports.
- Use React Router v7 with loaders and actions where appropriate. Routes should
rely on
<Outlet />for nesting. - Configure imports via the
@alias invite.config.tsand avoid deep relative paths. Keepindex.htmlminimal and let Vite inject scripts.
This repo is governed by the Etherisc SaaS architecture system.
- Compliance report:
.compliance/report.md - Configuration:
.compliance/config.yaml - Entity source:
github.com/etherisc-saas/saas-architecture/entities/
- Read
.compliance/report.mdbefore making changes - Each finding has a rule ID (e.g.
CON-GOV-005), evidence, and suggestion - Follow the suggestion unless you have a better approach -- explain why
- Never suppress a finding without explicit user approval
- Never weaken a constraint to make a finding pass
- Run
pnpm lint,pnpm test, andpnpm buildbefore committing
- Component ID:
COMP-PFM-008 - Repo archetype:
ui-monorepo - Active domains: PFM, DVO, GOV
- Key constraints: CON-GOV-005 (dependency allowlist), CON-DVO-001 (toolchain)
- The
docs/folder contains the planning documents for the project. Keep these files up to date when architectural or workflow changes occur. Storybook and design-token documentation are mandatory for new components.