agentleFS
moah0911moah0911/aftermath/skills/test-regression/SKILL.md

test-regression

Skill14 starsChanged 6 days agoMITView on GitHub

Use when a test suite goes green to red after an edit, or a previously passing test starts failing. Diff against last-known-good, isolate the one change, revert just that hunk instead of patching around it. Includes runner-specific failure signatures, subset re-runs, and checkpoint behavior.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. hishamkaram/markdown-memory★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Stop. No new edits.

    line 17
  2. Distinctive:

    Never blame the test before the diff is read.

    line 41
  3. Distinctive:

    After an auto-revert, re-run the failing subset before any new edit.

    line 46
  4. Distinctive:

    Never patch around a regression with a new guard elsewhere.

    line 51
  5. Distinctive:

    Never widen the change to "make the test pass".

    line 52
  6. Distinctive:

    Never claim green from a partial run.

    line 53

≈ “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

Test Regression

A green suite just turned red. The edit caused it until proven otherwise.

Steps

  1. Stop. No new edits.
  2. State what broke: which runner, which suite, which tests, what the last edit touched. One line each.
  3. Find last-known-good: last passing run, last commit, or the ultra checkpoint.
  4. git diff against it. Isolate the single hunk that correlates with the failure.
  5. Revert just that hunk (at lite, propose it and wait; at full, ask before the next edit; at ultra with autoRevert: true, the plugin may already have restored it — verify the diff).
  6. Re-run the failing subset only. Green → stand down. Still red → escalate to retry-loop, do not vary the fix blindly.

Runner signatures and subset re-runs

RunnerFailure signatureRe-run the subset
pytestFAILED tests/..., 1 failed, Tracebackpytest tests/test_auth.py::test_login -q
Jest / Vitest✕, 1 failed, FAILnpx jest auth.spec -t "login"
Go--- FAIL: TestLogingo test ./pkg/auth -run TestLogin -v
Cargotest result: FAILED, panicked atcargo test auth::login -- --nocapture
node:test✖, fail 1node --test tests/auth.test.js
Mocha1 failingnpx mocha tests/auth.spec.js --grep login
RSpecFailures:, 1 example, 1 failurebundle exec rspec spec/auth_spec.rb:42
PHPUnitFAILURES!, Tests: 3, Failures: 1vendor/bin/phpunit --filter testLogin
Rake / RailsFailure:, 1 failurebin/rails test test/models/auth_test.rb:12
Gradle / MavenBUILD FAILED / BUILD FAILURE./gradlew test --tests '*AuthTest*' / mvn -Dtest=AuthTest test

Was it already red?

Never blame the test before the diff is read. If the test was already red before your edit, say so with evidence: the prior run log, or stash your change and re-run. Without evidence, assume your edit did it.

Checkpoints

  • At ultra with autoRevert: true, a green→red transition restores files that still match the agent's edit. Conflicts (manual edits) are left alone and reported.
  • After an auto-revert, re-run the failing subset before any new edit. A restore is not proof of green.
  • /aftermath-checkpoint status shows tracked files; restore and clear are manual overrides.

Never

  • Never patch around a regression with a new guard elsewhere.
  • Never widen the change to "make the test pass".
  • Never claim green from a partial run; name the command you ran.

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.