agentleFS
ClarituneClaritune/mutantx/.cursor/skills/mx-validate/SKILL.md

mx-validate

Skill2 starsChanged 4 months agoMITView on GitHub

MutantX — AI review of mutants flagged as needs-review after source file changes.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .mutants/manifest.json.

    line 22
  2. Distinctive:

    If there are none, tell the user: "No mutants need review.

    line 24
  3. Very specific:

    Read the mutant's patch file from .mutants/patches/NNN.patch.

    line 28
  4. Distinctive:

    Read the current version of the source file the mutant targets.

    line 30
  5. Distinctive:

    Is the mutation still a realistic bug?: If the code around it changed significantly, the mutation might no longer represent a plausible …

    line 38
  6. Very specific:

    After reviewing all mutants for a file, update the file_hashes entry to the current SHA-256 so future validations don't re-flag these …

    line 50
  7. Distinctive:

    Write the updated manifest to disk.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MutantX — Mutation Validation (AI Review)

You are the validation phase of a mutation testing engine. Your job is to review mutants that were flagged as needs-review by the deterministic validator.

These are mutants whose source file changed since generation, but whose patch still applies cleanly. The patch is syntactically applicable, but you need to determine if the mutation is still semantically meaningful.

When This Runs

This skill is invoked after mx-validate.py has already run and marked some mutants as needs-review. If no mutants have that status, tell the user there's nothing to review and exit.

Workflow

1. Read the manifest

Read .mutants/manifest.json. Find all mutants with status: "needs-review".

If there are none, tell the user: "No mutants need review. All are either valid or stale."

2. For each needs-review mutant

Read the mutant's patch file from .mutants/patches/NNN.patch.

Read the current version of the source file the mutant targets.

Evaluate:

  1. Does the mutation still target the same logical code? The patch applies, but did the surrounding code change in a way that shifts what the mutation actually does? For example, if the mutation changes a return value but a new early return was added above it, the mutated line may now be unreachable.
  2. Is the mutation still semantically different from the original? Could the file change have made this mutation equivalent (no observable behavior difference)?
  3. Is the mutation still a realistic bug? If the code around it changed significantly, the mutation might no longer represent a plausible developer mistake.

3. Decide: promote or discard

For each mutant, set the status:

  • pending — the mutation is still valid. The file changed but the mutation still targets the same logic, is semantically different, and represents a realistic bug. Update validation_note to briefly explain why it's still valid.
  • stale — the mutation is no longer meaningful. Update validation_note to explain why (e.g., "Mutated line is now unreachable due to new guard clause at line 42", "Mutation is now equivalent — return value is immediately overwritten").

4. Update file hashes

After reviewing all mutants for a file, update the file_hashes entry to the current SHA-256 so future validations don't re-flag these mutants.

Compute with: sha256sum <file> | cut -d' ' -f1

5. Save and report

Write the updated manifest to disk.

Report to the user:

Validation review complete:
  Promoted: 4 mutants (still valid)
  Discarded: 2 mutants (now stale)

Promoted mutants are ready to test. Run mx-test.py or /mx-test.
Stale mutants can be regenerated with /mx-generate.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.