@./AGENTS.md
- Runtime: Bun 1.x
- Language: TypeScript (strict mode)
- Testing: Vitest
- Build: tsdown (all packages)
- Linting: Biome
- Versioning: Changesets
- Visual Testing: Chromatic (ui only)
bun install # Install all workspace dependencies
bun test # Run all workspace tests
bun run build # Build all packages
bun --filter @resq-sw/<pkg> test # Test single package
bun --filter @resq-sw/<pkg> build # Build single package
bun --filter @resq-sw/ui storybook # Start Storybook dev server
bun --filter @resq-sw/ui lint # Lint UI package with Biome
bun changeset # Create a changeset for your changes@resq-sw/dsamust have zero runtime dependencies (Effect is a peer dep for optional schemas only).@resq-sw/uiuses Radix UI for interaction logic and Tailwind CSS v4 for styling.- All packages must be tree-shakeable.
- Zero
any— strict typing throughout. - Each package has its own build and test scripts.
- Commit messages follow Conventional Commits.
- Package manager is bun — do not use npm, yarn, or pnpm.
- Use
bun changesetto describe changes for versioning. CI handles the rest.
- Don't add runtime dependencies to
@resq-sw/dsa— it must stay zero-dep. - Don't publish without running the full test suite (
bun test). - Lockfile (
bun.lock) must be committed with dependency changes. - Don't commit secrets, private keys, or
.envfiles. console-fail-testis active in UI tests: anyconsole.log/warn/errorcall inside a test causes failure.
- Run
bun installfrom workspace root after dependency changes. - Make changes in the relevant
packages/directory. - Run
bun testbefore finalizing. - Create a changeset (see below).
- Each package builds independently (
bun --filter <pkg> build). - Summarize: files changed, behavior change, tests run.
This repo uses Changesets for versioning and changelog generation. Every PR that changes package behavior must include a changeset.
- Yes: New features, bug fixes, performance improvements, refactors that change public API, dependency changes that affect consumers.
- No: Documentation-only changes, test-only changes, CI/tooling changes, internal refactors with no public API change.
Since bun changeset is interactive and cannot be used by agents, create the file directly:
- Generate a random kebab-case name (e.g.,
brave-dogs-swim,quick-foxes-jump). - Write the file to
.changeset/<name>.mdwith this format:
---
"@resq-sw/dsa": minor
"@resq-sw/helpers": patch
---
Add LRU cache data structure with configurable capacitypatch— Bug fix, internal refactor with no API change, dependency update.minor— New feature, new export, new option on existing API.major— Breaking change: removed export, renamed function, changed return type, changed required params.
- List every affected package in the frontmatter.
- When a dependency package changes, bump its dependents as
patch(changesets handles this automatically viaupdateInternalDependencies: "patch"in config, but be explicit when the dependent's public behavior also changes).
- One line, present tense, no period at end.
- Start with a verb: "Add ...", "Fix ...", "Remove ...", "Update ...".
- Reference the specific thing that changed, not the file.
---
"@resq-sw/ui": minor
---
Add Combobox component with keyboard navigation and filtering---
"@resq-sw/dsa": patch
---
Fix Graph.dijkstra returning incorrect path when source equals target---
"@resq-sw/security": minor
"@resq-sw/http": patch
---
Add HTTPS redirect utility and move it from rate-limiting to http packageOn push to master, the changesets GitHub Action:
- If pending changesets exist: creates/updates a "Version Packages" PR with bumped versions and updated CHANGELOGs.
- If that PR is merged: publishes all bumped packages to npm.
You do not need to manually bump versions, edit CHANGELOGs, or run npm publish.