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.ts next to it. Shared helpers: packages/core/src/{shared,value,dom}/.
  • React parts: packages/react/src/primitives/<name>/elements/<part>.tsx, the context in context.ts, tests in test/. The public surface is packages/react/src/entries/<name>.ts, re-exported by index.ts.
  • A new export from core that adapters need but users don't goes in packages/core/src/internal.ts, not index.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 .js specifier breaks the www build.
  • Keep the domain words of CONTEXT.md: onValueChange streams every change, onValueCommitted fires once when the gesture ends.
  • Accessibility is part of the behavior: every interactive part keeps a role, an accessible name hook (aria-label or a Label part), keyboard support and aria-valuetext where 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.

Steps

Installs
4
GitHub Stars
205
First Seen
Oct 25, 2026