Skip to content

Teach the write-unit-test skill to derive mutations from each rule clause and to record removed tests #2603

Description

@josecelano

Source: the implementation retrospective of #2415, which proposed these two skill changes and left them unapplied because changing a skill needs the maintainer's approval (merged in PR #2591).

Goal

Add two short, evidence-backed rules to the write-unit-test skill: derive at least one mutation from each clause of a stated rule, including its negative clauses, and record every removed or merged test in a refactor whose acceptance criterion is that the existing tests still pass.

Background

The spec of #2415 says a dropped unspawned reservation "must release its state without cancelling unrelated components", which has two clauses. The mutations were chosen by mechanism, so only the first clause had one, and the release test passed under a mutation that cancels the other components on drop until the Task Reviewer found it. The skill's mutation guidance is written for bug regressions, so it did not prompt this for a feature or refactor.

In the same work, converting the JobManager tests to reservations deleted a test that had become a duplicate, and the manager's test count went from 17 to 16, without any record in the evidence or the commit message, although the acceptance criterion was that all existing tests pass. Nothing in the skill mentions removing or merging tests.

Each observation is a single instance; whether that is enough evidence for a rule is an open question in the specification.

Acceptance criteria

  • AC1: the write-unit-test skill asks for at least one mutation per clause of a rule a test claims to guard, names negative clauses explicitly, and defines what the evidence records. It links to the existing mutation guidance instead of repeating it.
  • AC2: the skill asks that a removed or merged test, its replacement, and the new test count be recorded in the evidence and in the commit message when the acceptance criterion is that the existing tests still pass.
  • AC3: the "Quick Checklist" of the skill has an entry for each rule.
  • AC4: the two walk-throughs (M1 and M2) were run on the real Give each application component its own cancellation token #2415 artifacts and show that each rule would have prompted the missing action.
  • linter all exits with code 0.

Specification: docs/issues/open/2603-write-unit-test-skill-rule-mutations-and-removed-tests/ISSUE.md (added by the spec-only PR).

Activity

  1. added 5 commits that reference this issue on Oct 21, 2026
  2. self-assigned this
    on Oct 21, 2026
  3. added 3 commits that reference this issue on Oct 21, 2026
  4. added 5 commits that reference this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions