Command Palette

Search for a command to run...

Назад к скиллам
скилл № 43938

Seed Faults

Fault seeding: plants realistic defects in a throwaway worktree (never commits or edits your checkout), runs tests (or `--reviewer`), and reports…

БесплатноБез исполняемых скриптов
melodic-softwareот melodic-software★ 34 звезды на GitHub

Установить Seed Faults в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Seed faults

Plant a few realistic, hand-written defects, one at a time, and see which ones the tests catch. Fault seeding is the older sibling of mutation analysis: a mutant comes from a fixed operator catalog applied mechanically, a seed is a defect a person (here, an agent) would plausibly write, such as a wrong boundary, a dropped error path, swapped arguments or a stale cache read. Where /mutation-testing:audit asks whether each changed line is checked, this skill asks whether the suite catches the kind of bug a developer actually ships.

Arguments

  • --count <n>: seeds to plant. Default 5. Keep it small: each seed costs one full run of the selected tests.
  • --paths <glob>...: where seeds may go. Default: the configured mutate globs, else the production source files under the change on this branch.
  • --tests <path>...: which test suites run against each seed. Default: the suites the configured test-command selects, with {tests} filled by the tests that cover the seeded paths.
  • --reviewer: grade a fresh-context reviewer instead of the suite (Grading a reviewer).

The contract this skill holds

  1. Nothing planted reaches the repository. Seeds live only in a throwaway worktree created outside the repository tree, never on a branch, never committed (not even inside the throwaway), and the worktree is removed on every exit path, failures included.
  2. What is graded never sees the seeds. The planter may read the tests to make a seed realistic. The suite runs unchanged, and planted code carries no marker comment. The seed ledger (file, line, change, rationale) is kept outside the worktree, where neither the test run nor a graded reviewer can read it.
  3. The result is an estimate, not a defect count. See Reading the result.

Phase 0: Preflight

  1. Config. Resolve the config as /mutation-testing:audit does (config and fallback): the same layers, and the same rule that the test command is never guessed. With no test-command at any layer, ask for one or have the user confirm one you propose; an unattended run with no test command stops and asks.
  2. Snapshot. Capture git status --porcelain and git rev-parse HEAD of the user's checkout. The run must end with both unchanged.
  3. Worktree. git worktree add --detach <dir> HEAD, where <dir> is a fresh directory from mktemp -d, outside every repository tree (a copy inside the repository can be picked up by test discovery). Seeds go into HEAD: uncommitted edits in the user's checkout are not graded, and the scope report says so. Install what the tests need inside the worktree the way the project documents it.
  4. Baseline inside the worktree. Run the selected tests there before any seed. A red baseline "catches" every seed and reports a perfect result, so a red baseline stops the run with its failure, after the worktree is removed.

Phase 1: Plant (one ledger, outside the worktree)

Read the production code under the seed paths and the tests that cover it, then write the seed ledger to a scratch file outside the worktree. Each seed is:

  • One realistic defect a competent developer could commit: an off-by-one or wrong boundary, an inverted or dropped condition, a missing guard or error path, swapped arguments, a wrong default, a stale or wrong variable. Prefer defects the operator catalog in operators-and-states.md would not produce; a seed that is a one-token operator swap is a mutant, which audit already covers.
  • In a different function or branch from every other seed, so one test cannot catch them all.
  • Behavior-changing. Not a refactor, not dead code, not an equivalent change; if no input could tell the seeded program from the original, it is not a seed.
  • Code-only. The planter reads tests and never edits them, and never edits test data or config.

Record per seed: id, file:line, the original text, the seeded text, and one line on the bug it models. The ledger never enters the worktree.

Phase 2: Run (one seed at a time)

Before the first seed, find from the repository and its toolchain every compiled or cached artifact a test run can reuse instead of reading source: bytecode, incremental build output, test-runner caches. A seed that keeps the file's size and lands in the same second as the last run can otherwise run the cached build of the original code and read as survived.

For each seed: clear those artifacts in the worktree, or force a rebuild, then apply the seed, run the selected tests, record the outcome, restore the file with git -C <worktree> restore -- <file>, and confirm git -C <worktree> status --porcelain is empty before the next seed. One seed at a time is what lets a catch be attributed; seeds planted together cannot say which one a failing test notice

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Seed Faults?

Fault seeding: plants realistic defects in a throwaway worktree (never commits or edits your checkout), runs tests (or `--reviewer`), and reports caught/planted as an estimate with survivor file:lines. Use when: 'seed faults', 'plant some bugs and see if the tests catch them', or grading a reviewer. Not for mutants: /mutation-testing:audit.

Как установить скилл Seed Faults?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Seed Faults запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Seed Faults с