Skip to content
Runtime
Framework

Contributing

The full guide lives in CONTRIBUTING.md. This page is the orientation.

Read the architecture page, the relevant ADR, and the package’s README. Most review comments on this repository are about a boundary, not about style — and the boundaries are written down.

Node.js 22.13 or newer — CI’s full gate runs on 24 — and pnpm 11.17.0.

Terminal window
pnpm install --frozen-lockfile
pnpm exec playwright install chromium firefox webkit

Run the narrow check for what you touched:

Terminal window
pnpm vitest run --project core --project runtime

Then the full gate before opening a pull request:

Terminal window
pnpm check

pnpm check runs, in order: format, lint, root type check, workspace type checks, every Vitest project with coverage thresholds, builds, the dependency-boundary check, package checks (publint and @arethetypeswrong/cli), artifact and archive validation, the documentation build, and Knip.

Anything touching packaging, exports, declarations, or peer dependencies also needs:

Terminal window
pnpm consumers:check

which packs every package and installs the archives into clean projects outside the workspace. It needs network access and takes about two minutes.

  1. Keep the dependency graph directional. A package may depend only on what scripts/packages.mjs allows it to.

  2. Keep core framework-independent. No framework dependency in @queryweave/core, ever, and no React dependency anywhere.

  3. Respect the globals boundary. No browser global in core, server, node, vue, or nuxt — the checker matches whole words in source text, comments included. No Node built-in in core or server.

  4. Use public entry points. Never import another package’s source path.

  5. Keep the layers honest. An adapter must not decode, validate, or apply defaults. A codec must not navigate, read a request, touch globals, or create reactive state.

  6. Do not add a rejected identity. useQueryState, useQueryStates, parseAs*, createParser, createLoader, createSerializer, withDefault, and tuple setters are rejected by ADR 0001 and by a test.

  7. Write an ADR for a cross-package architectural decision or any breaking public API change.

  8. Add a changeset for anything a consumer can observe.

    Terminal window
    pnpm changeset

    Versioning and npm publish are described in Releasing.

Both have a shape worth following:

  • A new parameter family needs both directions, an issue for every failure mode, round-trip tests, type tests, and a documentation page.
  • A new adapter needs the four contract methods, lazy subscription, deterministic cleanup, and tests against the memory adapter’s behavior. See writing an adapter.

This site lives in apps/docs and is built with Astro and Starlight. Two rules matter more than the rest:

  • Never document an API that does not exist. Planned work belongs on the roadmap, marked as planned.
  • Do not make Vue or Nuxt the identity. They are integrations. Core pages stay framework-independent.

Run it locally:

Terminal window
pnpm docs:dev

Do not open a public issue. Follow SECURITY.md.