change-primitive
Installation
SKILL.md
Change a primitive
Both packages are published to npm. Every change here is a change to someone's app.
Where the code goes
- Logic that doesn't need React (geometry, value mapping, clip operations, peaks):
packages/core/src/primitives/<name>/, with a*.test.tsnext to it. Shared helpers:packages/core/src/{shared,value,dom}/. - React parts:
packages/react/src/primitives/<name>/elements/<part>.tsx, the context incontext.ts, tests intest/. The public surface ispackages/react/src/entries/<name>.ts, re-exported byindex.ts. - A new export from core that adapters need but users don't goes in
packages/core/src/internal.ts, notindex.ts. - Audio logic (devices, time, analysis, MIDI, scales, playback), and anything built on an audio.js atom:
packages/engine/src/<module>/. Core takes no dependency; the engine imports core only through its public entries.
Rules
- Relative imports end in
.ts/.tsx(./controller.ts). A.jsspecifier breaks the www build. - Keep the domain words of CONTEXT.md:
onValueChangestreams every change,onValueCommittedfires once when the gesture ends. - Accessibility is part of the behavior: every interactive part keeps a role, an accessible name hook (
aria-labelor aLabelpart), keyboard support andaria-valuetextwhere a value is shown. - Public API: removing or renaming a prop, part or export is a breaking change. Prefer adding. If you must break, say so in the changeset and ask first.