Skip to Content
Soundor Skills

soundor-debug-plugin

Diagnoses and fixes bugs in Soundor audio plugins from evidence.

pnpm dlx skills add soundor/skills --skill soundor-debug-plugin

SKILL.md on GitHub

When an agent uses it

Diagnoses and fixes bugs in Soundor audio plugins from evidence. Reproduces the problem, inspects the running plugin with Soundor Driver, DevTools and the VST3 host (node tree, screenshots, input, parameters, state, processed audio, logs), narrows it to a layer, verifies a hypothesis, makes a focused fix and adds a regression test; covers wrong or silent audio, clicks, NaNs, CPU spikes, layout bugs, parameters that do nothing, broken restore, native versus web differences and build failures. Use when a Soundor plugin misbehaves, a test fails, or a user reports a bug.

Instructions

Tests say what should happen; debugging finds out why something else happens. Work from evidence gathered from the running plugin, not from reading code and guessing.

Know the installed tools

Debugging tools are versioned with Soundor. Check the installed versions (npm ls --depth=0), any bundled skills (find node_modules/soundor node_modules/@soundor -name SKILL.md; none ship yet), npx soundor driver --help, and the documentation at https://soundor.dev/docs/driver and https://soundor.dev/docs/testing. Use only operations you have confirmed exist.

The workflow

  1. Reproduce. Get exact steps, inputs, parameter values, runtime (VST3 or web), platform, host, sample rate and block size. Reproduce it yourself, as an automated script or test when possible.
  2. Identify where it happens: VST3 or web, which OS, which host (the Soundor VST3 host, a DAW, a browser), Debug or release build.
  3. Classify the failure: build or link, crash or panic, wrong audio, real-time problem (dropouts, CPU), wrong UI (layout, rendering, values), wrong state (restore, presets, automation), or a difference between runtimes.
  4. Gather runtime evidence with the tools below: logs, the node tree, screenshots, parameter values, processed audio, saved state.
  5. Narrow the layer: contract (soundor.config.ts), UI (src/), controller, processor, runtime or build. Check each boundary: is the value right before it and wrong after?
  6. Form one hypothesis and test it with an experiment whose result could prove it wrong: a smaller input, one parameter changed, a log in the UI, a value published to a stream, a unit test.
  7. Fix the cause with the smallest change that addresses it.
  8. Re-run the relevant tests and suites.
  9. Verify the original symptom is gone, with the same reproduction, screenshot or measurement that showed it.
  10. Add a regression test at the layer where the bug lived.

Tools for evidence

NeedTool
Toolchain, config and prerequisitesnpx soundor doctor, npx soundor gen --check
UI console output and errorsthe terminal of npm run dev, mapped to TypeScript; .soundor/dev/build.log
The native UI tree, bounds, stylesnpx soundor driver tree / inspect, DevTools at the URL dev prints
Click, drag, type, scroll in the real UInpx soundor driver click / drag / type, or @soundor/driver in a script
What the UI looks likenpx soundor driver screenshot, plugin.screenshot() (VST3); Playwright (web)
Audio, parameters, state, latency@soundor/vst3-host or @soundor/vitest-e2e launchHost()
UI and audio together@soundor/driver/vst3 launch(), or launchPlugin() in a test
A failed end-to-end test.soundor/test-results/<file>/<test>/: screenshot.png, tree.json, host.log
DSP in isolationsoundor::testing::TestProcessor in a Rust test
The web buildPlaywright: console messages, page errors, screenshots, ARIA locators

The Driver and DevTools reach Debug VST3 builds only (npm run dev or npx soundor build vst3 --debug), not release builds or the web runtime. Runtime evidence shows how to start a session and use each tool.

Look at the UI, don't infer it

For any visual bug, capture the rendering, open the image, and describe what is wrong in it before touching code; after the fix, capture again and compare. A screenshot you did not open is not evidence. Visual debugging covers clipping, overflow, alignment, typography, graphs and meters, resizing and scaling.

By kind of problem

  • Audio (silence, wrong gain, distortion, clicks, NaN, unstable feedback, wrong frequency response, channel bugs, sample-rate dependence, CPU and real-time problems): DSP debugging.
  • Wiring and lifecycle (a parameter that does nothing, UI to controller to processor communication, streams, state restore, automation, native versus web, host integration, build and link failures): Architecture debugging.

Rules

  • Do not rewrite large parts of the code without evidence that they cause the problem.
  • Do not delete, skip or weaken tests to make CI pass, and do not hide failures (catch-all error handlers, clamping NaNs away without finding their source, raising timeouts on a real hang).
  • Do not add allocation, locks, logging or I/O to process(), even temporarily for debugging: publish diagnostic values through a stream or read-only parameter, or test the DSP in Rust.
  • Do not replace working infrastructure (the scaffold, the runtimes, the test tools) instead of diagnosing.
  • Do not say a bug is fixed until the original reproduction passes; say what was verified and what could not be (for example, a DAW you do not have).

Report

State the symptom, the evidence, the cause, the fix, how it was verified, and the regression test that now guards it.

References

The skill reads these when a task needs them:

On this page