AGENTS.md
Copy the section below into your application’s AGENTS.md. Keep its existing
rules and adapt the guidance to your installed WebMusic version. See the
AGENTS.md format guide for general project instructions.
Copy into your project instructions
Section titled “Copy into your project instructions”## WebMusic
- Check package.json, the lockfile and installed @webmusic packages before coding. Confirm imports against their public exports and TypeScript declarations. Match references to the installed version; do not assume a development API is released or silently upgrade packages to use it.- Follow this application's integration choice: Web Components for ready-made interactions, Headless for behavior behind custom UI, or API + UI for explicit composition. API-only parsing and analysis need no UI. Preserve the existing framework and styling conventions.- Start from the relevant public reference: - [Context index](https://koperative-lab.github.io/WebMusic/llms.txt) - [Setup](https://koperative-lab.github.io/WebMusic/score/) - [First composition](https://koperative-lab.github.io/WebMusic/quick-start/) - [Components](https://koperative-lab.github.io/WebMusic/score/element/) - [Headless](https://koperative-lab.github.io/WebMusic/score/headless/) - [API and shared playback](https://koperative-lab.github.io/WebMusic/score/api/) - [UI presenters](https://koperative-lab.github.io/WebMusic/uikit/)- Use the documented dependencies and resources for the chosen entry. Keep browser-only operations in the client lifecycle. Start sound from a user action and provide loading and error feedback.- Keep units explicit: nominal seconds, transport seconds, quarter notes, MIDI pitches and velocity ranges follow the owning API. Use matching position and duration axes; do not infer units from a field name alone.- Let related views and analysis borrow the intended player's score, state and time where supported. Do not create a second player merely to draw a view.- Track ownership of players, audio contexts, workers and subscriptions. Release owned resources during teardown; detach from borrowed resources without disposing them. Handle cancellation and late results when inputs change. Destroying a UI presenter does not dispose its state owner.- Run this application's checks and verify the affected browser interaction, including cleanup. State which checks passed and which audible, timing or device behavior remains unverified.Add your application’s music-file location, integration choice and verification
commands alongside this section. If AGENTS.md does not exist, create it in
your application’s root.
For offline work, save the relevant documentation bundles and add their local paths to the section. Review saved context and project instructions when upgrading WebMusic.