doppler-debug
Original:🇺🇸 English
Translated
Diagnose inference regressions with Doppler's shared browser/Node command contract, runtime presets, and report artifacts. (project)
7installs
Sourceclocksmith/doppler
Added on
NPX Install
npx skill4agent add clocksmith/doppler doppler-debugTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →DOPPLER Debug Skill
Use this skill when generation fails, outputs drift, or Node/browser parity breaks.
Use this skill with when investigating performance regressions.
doppler-benchMandatory Style Guides
Read these before non-trivial debug-flow, parity, or harness-contract changes:
docs/style/general-style-guide.mddocs/style/javascript-style-guide.mddocs/style/config-style-guide.mddocs/style/command-interface-design-guide.mddocs/style/harness-style-guide.md
Developer Guide Routing
When debugging turns into extension work, also open:
docs/developer-guides/README.md
Common routes:
- new manifest/runtime knob or missing contract field:
docs/developer-guides/07-manifest-runtime-field.md - command-surface parity fix that becomes a new command or contract surface:
docs/developer-guides/12-command-surface.md - missing kernel or runtime path:
docs/developer-guides/11-wgsl-kernel.md - attention-path bug that requires a new implementation:
docs/developer-guides/13-attention-variant.md - cache/layout bug that requires a new layout strategy:
docs/developer-guides/15-kvcache-layout.md - family-level onboarding gap: or
docs/developer-guides/composite-model-family.mddocs/developer-guides/composite-pipeline-family.md
Execution Plane Contract
- Contract and tunables are declared in JSON (+ harness contract); do not substitute behavior in-place.
runtime - JS coordinates deterministic execution: resolve/validate config, dispatch pipelines, and collect artifacts.
- WGSL executes resolved kernels; any policy branch belongs to config/rule selection before dispatch.
- For parity checks, command intent must match: unknown/mismatched intent is a failure, not an alternate path.
Fast Triage
bash
# Primary debug run (auto surface = node-first transport; browser fallback only when node transport is unavailable)
npm run debug -- --config '{"request":{"modelId":"MODEL_ID","runtimePreset":"modes/debug"},"run":{"surface":"auto"}}' --json
# Verify pass/fail with inference suite
npm run verify:model -- --config '{"request":{"suite":"inference","modelId":"MODEL_ID","runtimePreset":"modes/debug"},"run":{"surface":"auto"}}' --json
# Force browser relay for mobile/WebGPU parity checks
npm run debug -- --config '{"request":{"modelId":"MODEL_ID","runtimePreset":"diagnostics/debug-logits"},"run":{"surface":"browser","browser":{"channel":"chrome","console":true}}}' --jsonRuntime Overrides (Config-First)
Use runtime JSON patches instead of ad-hoc flags:
bash
npm run debug -- \
--config '{"request":{"modelId":"MODEL_ID"},"run":{"surface":"auto"}}' \
--runtime-config '{"shared":{"tooling":{"intent":"investigate"},"debug":{"trace":{"enabled":true,"categories":["attn","ffn"],"maxDecodeSteps":2}}},"inference":{"batching":{"maxTokens":8},"sampling":{"temperature":0}}}' \
--jsonPerf-Focused Investigation
bash
# Investigate-mode profile run (trace/profiler enabled by preset)
npm run debug -- --config '{"request":{"modelId":"MODEL_ID","runtimePreset":"experiments/gemma3-profile"},"run":{"surface":"auto"}}' --json
# Fast readback sensitivity checks
npm run bench -- --config '{"request":{"modelId":"MODEL_ID","runtimePreset":"experiments/gemma3-investigate-readback-r1","cacheMode":"warm"},"run":{"surface":"browser"}}' --json
npm run bench -- --config '{"request":{"modelId":"MODEL_ID","runtimePreset":"experiments/gemma3-investigate-readback-r8","cacheMode":"warm"},"run":{"surface":"browser"}}' --json
# Direct override for decode cadence tuning
npm run bench -- \
--config '{"request":{"modelId":"MODEL_ID","cacheMode":"warm"},"run":{"surface":"browser"}}' \
--runtime-config '{"shared":{"tooling":{"intent":"investigate"}},"inference":{"batching":{"batchSize":4,"readbackInterval":4,"stopCheckMode":"per-token","maxTokens":128},"sampling":{"temperature":0}}}' \
--jsonNotes:
- forbids trace/profiler instrumentation.
runtime.shared.tooling.intent="calibrate" - Set for profiling/tracing runs.
runtime.shared.tooling.intent="investigate"
Cache and Surface Control
bash
# Cold browser run (wipe OPFS cache before launch)
npm run debug -- --config '{"request":{"modelId":"MODEL_ID","cacheMode":"cold"},"run":{"surface":"browser"}}' --json
# Warm browser run (reuse OPFS cache)
npm run debug -- --config '{"request":{"modelId":"MODEL_ID","cacheMode":"warm"},"run":{"surface":"browser"}}' --jsonWhat to Inspect in Results
- ,
result.metrics.modelLoadMsresult.metrics.firstTokenMs - (preferred) and
result.metrics.prefillTokensPerSecTtftresult.metrics.prefillTokensPerSec result.metrics.decodeTokensPerSec- (if available)
result.metrics.gpu result.memoryStatsresult.deviceInfo- (report backend/path)
result.reportInfo
Canonical Files
tools/doppler-cli.jssrc/tooling/command-api.jssrc/tooling/node-command-runner.jssrc/tooling/node-browser-command-runner.jssrc/inference/browser-harness.jssrc/config/presets/runtime/modes/debug.jsondocs/developer-guides/README.md
Related Skills
- for perf regression quantification
doppler-bench - when conversion integrity is suspected
doppler-convert