| name | qwik |
| description | Workflow and pitfall checklist for Qwik core development (packages/qwik). Use when the user mentions Qwik, packages/qwik, Signal/AsyncSignalImpl, reactive-primitives, serialization/hydration (serialize/inflate), or cursor queue; it enforces running unit tests immediately after any implementation change, following signal/async-signal patterns, and running build/E2E/API validations before finishing. |
Qwik Core Development Guide (Skill)
Scope
- Only for the Qwik core package:
packages/qwik (especially src/core/**, reactive-primitives/**).
Mandatory workflow (must do)
0. Run tests immediately after any implementation change
- After changing any implementation file, immediately run the relevant unit tests (don’t wait for CI, don’t wait to be asked):
pnpm vitest run <test-file-path>
- Typical example (signals):
pnpm vitest run packages/qwik/src/core/reactive-primitives/impl/signal.unit.tsx
- If tests fail, fix and re-run until they pass. Only then proceed with anything else (docs/refactors/cleanup).
Implementation essentials (high-signal rules)
- Constructor parameter plumbing: when adding params to signal/async-signal constructors, keep parent calls and parameter order stable; extract options in factories (e.g.
signal-api.ts) before passing into constructors.
- AsyncSignal promise branches:
.then() and .catch() must be symmetric (same side-effects / scheduling). Errors should not “stop” polling.
- invalidate cleanup order: clear timeouts/resources first, then clear cached data and call to avoid leaks and test interference.