Skip to content

Commit df67a98

Browse files
authored
Merge pull request #127 from lambda-curry/codegen/lc-319-create-a-new-dropdown-selector-component-for-us-states-and
2 parents 54c953b + 4e2a6ae commit df67a98

23 files changed

+2083
-376
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
2+
You are an expert release manager for a Yarn 4 monorepo who uses the npm CLI for quick version bumps and patch releases.
3+
4+
# Versioning With npm CLI
5+
6+
## Policy
7+
- Prefer small, fast patch releases for incremental work.
8+
- Treat new components and minor fixes as patch releases when they are additive and low-risk.
9+
- Reserve minor/major only for notable feature waves or breaking changes.
10+
11+
Note: While the repo supports Changesets for broader release coordination, this rule documents the npm CLI flow for quick iterations.
12+
13+
## What Counts As “Small”
14+
- Additive components (new UI or form wrappers) without breaking changes
15+
- Bug fixes, perf tweaks, a11y refinements, copy/docs updates
16+
- Internal refactors that don’t change public APIs
17+
18+
## Pre-flight
19+
- Clean working tree: no uncommitted changes
20+
- On a release-worthy branch (e.g., `main`)
21+
- Build and tests pass: `yarn build && yarn test`
22+
23+
## Patch Bump (Single Workspace)
24+
For the published package `@lambdacurry/forms`:
25+
26+
```bash
27+
# Bump version with custom message
28+
npm version patch -w @lambdacurry/forms -m "Add DateField component and fix TextField accessibility"
29+
30+
# The -m flag creates the git commit automatically with your message
31+
# No need for separate git add/commit steps
32+
33+
## Post-version Steps
34+
After running `npm version patch`, you'll need to:
35+
36+
1. **Return to top level**: `cd ../..` (if you're in the package directory)
37+
2. **Update lockfile**: `yarn install` to update `yarn.lock` with the new version
38+
3. **Commit lockfile**: `git add yarn.lock && git commit -m "Update yarn.lock for @lambdacurry/forms vX.Y.Z"`
39+
40+
This ensures the lockfile reflects the new package version and maintains consistency across the monorepo.
41+
```
42+
43+
Guidelines:
44+
- Keep the summary one line and human-readable.
45+
- Examples: "Add DateField; fix TextField aria; smaller bundle".
46+
- This updates `packages/components/package.json` and creates a normal commit without tags.
47+
48+
## Open PR and Merge
49+
- Push your branch and open a PR.
50+
- When the PR merges into `main`, GitHub CI publishes the package. No manual tagging or `npm publish` needed.
51+
52+
## Minor / Major (When Needed)
53+
- Minor: larger feature sets or notable additions across multiple components
54+
```bash
55+
npm version minor -w @lambdacurry/forms -m "Add comprehensive form validation and new field types"
56+
```
57+
- Major: any breaking change (API removals/renames, behavior changes)
58+
```bash
59+
npm version major -w @lambdacurry/forms -m "Breaking: rename onSubmit to handleSubmit; remove deprecated props"
60+
```
61+
62+
## Summary Message Tips
63+
- Keep it under ~100 chars; list 2–3 highlights separated by semicolons
64+
- Focus on user-visible changes first; include critical fixes
65+
- Avoid noisy implementation detail; link to PR/issue in the PR body
66+
67+
## Coordination With Changesets
68+
- Use this npm CLI flow for quick, low-risk patches.
69+
- For multi-package changes, coordinated releases, or richer changelogs, prefer Changesets (`yarn changeset`) and follow the existing repo workflow.
70+
71+
72+
## Coordination With Changesets
73+
- Use this npm CLI flow for quick, low-risk patches.
74+
- For multi-package changes, coordinated releases, or richer changelogs, prefer Changesets (`yarn changeset`) and follow the existing repo workflow.

AGENTS.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `apps/docs`: Storybook docs, examples, and UI tests.
5+
- `packages/components`: Source for `@lambdacurry/forms` (`src/**`, built to `dist/`).
6+
- `types/`: Shared ambient types.
7+
- `.changeset/`: Versioning and release metadata.
8+
- Root configs: `biome.json`, `turbo.json`, `tsconfig.json`, `package.json` (Yarn workspaces).
9+
10+
## Build, Test, and Development Commands
11+
- `yarn dev`: Run all workspace dev tasks via Turbo.
12+
- `yarn build`: Build all packages/apps.
13+
- `yarn serve`: Serve built Storybook (`apps/docs`).
14+
- `yarn test`: Run workspace tests (Storybook test-runner in `apps/docs`).
15+
- `yarn format-and-lint` | `:fix`: Check/auto-fix with Biome.
16+
- Per workspace (examples):
17+
- `yarn workspace @lambdacurry/forms build`
18+
- `yarn workspace @lambdacurry/forms-docs dev`
19+
20+
## Coding Style & Naming Conventions
21+
- Indentation: 2 spaces; max line width 120; single quotes (Biome enforced).
22+
- TypeScript + React (ES modules). Keep components pure and typed.
23+
- Filenames: kebab-case (e.g., `text-field.tsx`, `data-table-filter/**`).
24+
- Components/Types: PascalCase; hooks: camelCase with `use*` prefix.
25+
- Imports: organized automatically (Biome). Prefer local `index.ts` barrels when useful.
26+
27+
## Testing Guidelines
28+
- Framework: Storybook Test Runner (Playwright under the hood) in `apps/docs`.
29+
- Naming: co-locate tests as `*.test.tsx` near stories/components.
30+
- Run: `yarn test` (CI-like) or `yarn workspace @lambdacurry/forms-docs test:local`.
31+
- Cover critical interactions (forms, validation, a11y, filter behavior). Add stories to exercise states.
32+
33+
## Commit & Pull Request Guidelines
34+
- Commits: short imperative subject, optional scope, concise body explaining rationale.
35+
- Example: `Fix: remove deprecated dropdown select`.
36+
- PRs: clear description, linked issues, screenshots or Storybook links, notes on testing.
37+
- Required checks: `yarn format-and-lint` passes; build succeeds; tests updated/added.
38+
- Versioning: when changing published package(s), add a Changeset (`yarn changeset`) before merge.
39+
40+
## Security & Configuration
41+
- Node `22.9.0` (`.nvmrc`) and Yarn 4 (`packageManager`).
42+
- Do not commit secrets. Keep large artifacts out of VCS (`dist`, `node_modules`).
43+
- PR previews for Storybook are published via GitHub Pages; verify links in PR comments.
44+
45+
## Cursor Rules Review
46+
- `.cursor/rules/react-typescript-patterns.mdc` (Always): React 19 + TS conventions, refs, props/types, naming.
47+
- `.cursor/rules/ui-component-patterns.mdc` (Always): Radix + Tailwind 4 + CVA patterns, a11y, performance.
48+
- `.cursor/rules/form-component-patterns.mdc`: Remix Hook Form + Zod wrappers, errors, server actions.
49+
- `.cursor/rules/storybook-testing.mdc`: Storybook play tests, router stub decorator, local/CI flows.
50+
- `.cursor/rules/monorepo-organization.mdc`: Imports/exports, package boundaries, Turbo/Vite/TS paths.
51+
- `.cursor/rules/versioning-with-npm.mdc`: npm CLI version bumps (patch-first), CI publishes on merge.
52+
53+
When to review before starting work
54+
- Building/refactoring UI components: react-typescript-patterns + ui-component-patterns.
55+
- Form-aware components or validation: form-component-patterns.
56+
- Writing/updating stories or interaction tests: storybook-testing.
57+
- Moving files, changing exports/imports, adding deps/build entries: monorepo-organization.
58+
- Complex UI (data table, Radix primitives, variants): ui-component-patterns for a11y/perf.
59+
60+
Quick checklist
61+
- Files/names: kebab-case files; PascalCase components; named exports only.
62+
- Types: explicit props interfaces; React 19 ref patterns; organize imports (Biome).
63+
- Forms: Zod schemas, proper messages, `fetcher.Form`, show `FormMessage` errors.
64+
- Tests: per-story decorators, semantic queries, three-phase play tests; run `yarn test`.
65+
- Monorepo: no cross-package relative imports; verify `exports`, TS `paths`, Turbo outputs.

apps/docs/src/remix-hook-form/dropdown-menu-select.stories.tsx

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)