# enterprise-react-forms-v2 — Implementation Tasks Implementation order follows Wave 5 of the master design (`openspec/cross-cutting-designs/2026-05-05-react-ui-react-i18n-react-forms.md`): each layer is gated independently and must hit `bunx turbo lint typecheck test --filter=@suaveplan/react-forms` green plus `test:coverage` at 100/100/100/100 plus 100% docs coverage before the next layer starts. Prerequisites (must be green on `genesis` before this change starts): - [ ] `@suaveplan/react-i18n` shipped (Wave 1) — provides `TranslationKey`, `TranslationProvider`, `useTranslation`, ``. - [ ] `@suaveplan/react-ui` core scaffolding shipped (Wave 2) — provides `Field`, `FieldGroup`, `Input`, `Select`, `Combobox`, `Calendar`, `Button`, `Skeleton`, `InputOTP`. - [ ] `@suaveplan/react-ui` form-primitive batch shipped (Wave 3b) — full set of form-primitive components. --- ## 0. Pre-flight (non-negotiable) - [ ] 0.1 Confirm clean working tree (`git status` reports nothing) and no in-flight worktrees with uncommitted work (`git worktree list` then `git status` in each) - [ ] 0.2 If any worktrees exist under `.claude/worktrees/`, account for each one: still-active agent, work-pending-merge, or stale-and-prune. Stale worktrees MUST be removed (`git worktree remove`) before opening a new one — code that has been lost twice on main is the failure mode this guards against. - [ ] 0.3 Confirm the package set in `MANIFEST.md` matches `find packages -maxdepth 3 -name package.json` count. Drift here means a prior change archived without regenerating the manifest. ## 0. Scaffolding - [ ] Create `packages/forms/react-forms/` with `package.json` (`workspace:^` for internal deps, `catalog:` for externals). - [ ] Wire `tsconfig.json` and `tsconfig.lib.json` extending `@suaveplan/typescript-config/react-library.json`. - [ ] Wire `vite.config.ts` (Vite 7) for the build. - [ ] Wire `vitest.config.ts` via `createTestConfig()` from `@suaveplan/testing/config` — `provider: 'istanbul'`, thresholds `100/100/100/100`. - [ ] Wire `playwright.config.ts` for `e2e/` via `@suaveplan/testing-e2e`. - [ ] Add `README.md` (package name, one-paragraph description, install, quick-start, Modules section linking each co-located `.md`). - [ ] Add `src/index.ts` as an explicit named-export barrel (no `export *`, per CLAUDE.md §10). - [ ] Add `src/error-codes.ts` registering `defineCodes("REACT_FORMS", [...])` with codes: `FIELD_CONFIG_INVALID`, `SCHEMA_RESOLVER_FAILED`, `ASYNC_VALIDATOR_ABORTED`, `SERVER_VALIDATION`, `WIZARD_STEP_INVALID`, `WIZARD_STEP_NOT_FOUND`, `REPEATING_ROW_LIMIT`, `CUSTOM_FIELD_NO_RENDER`, `CONTEXT_NOT_PROVIDED`. - [ ] Add `src/error-codes.md` documenting each code (purpose, when thrown, how to recover). **Gate:** package builds, `bunx turbo build --filter=@suaveplan/react-forms` green; banned-pattern scan from AGENTS.md §13 step 4 returns zero output; barrel-shape scan from §13 step 4a returns zero output; test-runner import scan from §13 step 4b returns zero output. --- ## Layer 1 — Primitives Each primitive ships as a five-files-per-feature module: `.tsx` + `.types.ts` + `.test.tsx` + `.stories.tsx` + `.md` + `index.ts` (explicit named exports). - [ ] **`primitives/field/`** — re-export `Field` and `FieldGroup` from `@suaveplan/react-ui` so the forms package has a single import path. Tests assert the re-exported references are identity-equal to the upstream symbols. - [ ] **`primitives/accessible-date-picker/`** — Calendar + ARIA wrapper with `` integration; props typed with `TranslationKey` for `label`, `placeholder`, `helperText`. - [ ] **`primitives/date-time-picker/`** — composes `AccessibleDatePicker` + a time input; supports `granularity: 'minute' | 'second' | 'hour'`. - [ ] **`primitives/money-input/`** — locale-aware via `@suaveplan/i18n` `formatCurrency` / `parseCurrency`; `currency: string` (ISO 4217), `locale?: string` (defaults to active i18n locale). - [ ] **`primitives/searchable-select/`** — async option loading; debounce + dedup via `@suaveplan/timing`'s `debounce({ leading: false, trailing: true, maxWait })`; `AbortSignal` cancellation on subsequent queries. - [ ] **`primitives/tag-input/`** — chip-based multi-value input with keyboard (Enter / Backspace / arrow) navigation. - [ ] **`primitives/file-upload-field/`** — peer-dep on `@suaveplan/react-file-upload`; falls back to native `` when peer absent. - [ ] **`primitives/rich-text-field/`** — peer-dep on `@suaveplan/react-rich-text`; falls back to a styled `