From 5b7150d297dc9442dbd341ae007e47c43451d178 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Wed, 29 Apr 2026 07:09:46 +0200 Subject: [PATCH] Add skills --- skills/maintain-mutations/SKILL.md | 18 ++++++++++++++++++ skills/write-mutations/SKILL.md | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 skills/maintain-mutations/SKILL.md create mode 100644 skills/write-mutations/SKILL.md diff --git a/skills/maintain-mutations/SKILL.md b/skills/maintain-mutations/SKILL.md new file mode 100644 index 0000000..0563e7a --- /dev/null +++ b/skills/maintain-mutations/SKILL.md @@ -0,0 +1,18 @@ +--- +name: Maintain mutations +description: Trigger when asked to maintain mutations +--- + +Start with: + +```sh +mutannot --validate +``` + +Fix every reported error. Re-run `mutannot --validate` until it succeeds with no errors. + +If you change mutations, you must run the changed mutations with: + +```sh +mutannot --run <...> +``` diff --git a/skills/write-mutations/SKILL.md b/skills/write-mutations/SKILL.md new file mode 100644 index 0000000..97bc2ed --- /dev/null +++ b/skills/write-mutations/SKILL.md @@ -0,0 +1,25 @@ +--- +name: Write mutations +description: Trigger when asked to write mutations +--- + +Annotate tests with one or more mutations (`MutationCase`s) that will cause the test to fail. + +Example: + +```fs +[] +[] +member _.AddOne_increments() = + Assert.Equal(42, Calculator.addOne 41) +``` + +In this example, + +* `calc-operator-mixup` is the mutation name, +* `Calculator/Calculator.fs` is the path to the production code (relative to the repository root), +* `4` is the number of the line to mutate, +* `value + 1` is the string to find, and +* `value - 1` is the string to replace it with. + +Verify your work with `mutannot --run <...>`.