dst
БесплатноЗапускает вложенные скриптыНе проверенBuilds or deepens a deterministic simulation test (DST) for a concurrent subsystem (actors, event loops, peers, storage) so that it finds real bugs and can…
от Roasbeef★ 33 звезды на GitHubОб этом скилле
Deterministic simulation testing
A DST runs the production code of a concurrent subsystem against a simulated world (network, storage, clock) that is driven by a seed. The same seed always produces the same run, so any failure is a reproducible bug report. Nearly every failure mode of a DST makes the bug invisible instead of producing a false alarm. A harness can be slow, never reach the fault that matters, check the wrong property, heal away the stall it caused, or encode the bug as the expected outcome. This skill exists to stop each of those, and to measure the harness instead of trusting it.
The method composes three things that were used on the neutrino header-sync DST, which found a checkpoint safety bug, deadlocks, livelocks and a dozen stalls in code that already had a DST and P models:
- An adversarial audit of what exists, with coverage and a CPU profile, not a reading of the test names.
- The
/depthdisciplines applied to the harness itself: start from the real production paths, use the field's instruments, set an unreasonable target with a guard, and let something other than the model judge. - A triage loop for each failing seed that refuses to patch a harness artifact or an unreachable path as if it were a production bug.
references/neutrino-case.md is the worked example: the numbers before and
after, the fault alphabet, the invariants, every bug found, the recall table,
and the mistakes made along the way. Read it before building anything.
1. Scope and premise
Parse $ARGUMENTS. Name the subsystem, its goroutines or actors, its stores,
and its peers. Record git rev-parse --short HEAD.
Then check the premise. Read the subsystem's entry points and list:
- every goroutine or actor that owns mutable state, and what it owns;
- every boundary where the outside world enters (network sends and receives, store reads and writes, timers, actor asks, lifecycle calls);
- every existing test that calls itself a DST, simulation, fuzz or model check.
If the subsystem has one goroutine and no I/O, a DST is the wrong tool; say
so and suggest /property-based-testing instead.
2. Audit what exists
Follow references/audit.md. Measure before judging:
- coverage of the production packages under the DST tests only
(
-coverpkg), listing the functions at 0%; - throughput (executions per second) and a CPU profile of one run;
- the size of the input space the decoder can actually reach;
- for each model checker, whether it explores any nondeterminism at all;
- whether CI runs any of it beyond a fixed corpus.
Then read the oracle and the heal or liveness phase, looking for the four
false-pass shapes in references/audit.md (a property never checked, a fault
class never generated, a heal step that resets the state that would show the
bug, a test that asserts the buggy outcome). Write the audit as a ranked list
of proposals, each with its expected bug yield per unit of effort. With
--audit-only, stop here and present it.
3. Apply depth to the harness
Answer the /depth questions for the harness, one to three lines each, with
concrete names from this repo. Read ~/.claude/skills/depth/SKILL.md if it is
not in context.
- Raw material. The production paths that matter, run for real: the handler functions, the actors, the timers, the validation. Replace only the network, the stores and the clock. A harness that drives a mock of the subsystem is testing the mock.
- Instruments. A virtual-time bubble (
testing/synctestin Go), a seeded generator, coverage-guided fuzzing over the same runner, a property test at the state-machine level (rapid), a model checker that explores choices (P withchoose), and mutation testing (gremlins). - Target. State it as achievable and well past the ask. Examples from the worked case: throughput from 0.2 to over 1,000 executions per second; the generic swarm finding a majority of the recorded bugs blind; coverage of the subsystem's production code past 85%. Pair it with a guard: production behaviour is unchanged except for confirmed bug fixes, and every production seam is a no-op when unset.
- Judge. Blind recall (section 7), the mutation score, the coverage
numbers, and
/advisor-reviewon the harness. Not the model's opinion that the harness is good.
Present the audit, the depth answers and the plan with one AskUserQuestion:
full plan, a cheaper plan that names what it drops (for example "no P work,
no nightly job"), audit only, or adjust the target. Ask the policy questions
the plan raises in the same call (for example: should an unresponsive peer be
banned or only quarantined; should a timeout be fixed or progress-based).
4. Build the harness
Follow references/harness.md. The rules that matter most:
- Run production code inside the bubble, and let the runner play the event loop. Do not start the subsystem's main goroutine; the runner calls its handler for eac
Установить dst в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
TaskReadWriteEditGrepGlobBashAskUserQuestionSkillВложенные файлы
FAQ
Что делает скилл dst?
Builds or deepens a deterministic simulation test (DST) for a concurrent subsystem (actors, event loops, peers, storage) so that it finds real bugs and can prove it. Audits the existing harness first, applies the /depth method (raw production paths instead of mocks, real instruments, an unreasonable measured target with a guard, a judge other than the model), then builds a seeded swarm harness: production code inside a virtual-time bubble, faults only at production boundaries (ambiguous commits, asks that apply then error, byzantine replies, churn, restart), an invariant checker after every event, a heal phase that cannot mask stalls, and a double-run determinism check. Judges the harness by blind recall (revert a known fix, see whether the generic swarm finds it), mutation testing, coverage and a fresh-context review, then triages every failing seed into production bug, harness artifact or policy gap. Modeled on the neutrino header-sync DST (lightninglabs/neutrino PR 415). Use when the user wants a DST built, extended, audited or made to catch more bugs, or invoke via /dst.
Как установить скилл dst?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dst запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic