agentleFS
las-pinterlas-pinter/persona-agents/skills/tester/regression-identification/SKILL.md

regression-identification

Skill2 starsChanged 2 months agoMITView on GitHub

Identify which existing tests are relevant to code changes and what new tests are needed to cover gaps.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test files for the changed module

    line 25
  2. Distinctive:

    Test files for callers of the changed module

    line 26
  3. Distinctive:

    Run the relevant existing tests and confirm: all previously passing tests still pass, and any test updated for new behavior is correct.

    line 50
  4. Distinctive:

    Never mark a change done without running the relevant existing tests

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Regression Identification

Core Methodology (5 Steps)

Step 1: Identify Changed Units

Map exactly what changed using git diff. Categorize each change:

  • [ADD] — New code added
  • [MOD] — Existing code modified
  • [DEL] — Code removed
  • [REF] — Code restructured (behavior unchanged)
  • [CFG] — Configuration/environment changes

Track: which functions/methods were touched, which files, whether interfaces/contracts changed, whether data schemas changed.

Step 2: Trace Dependents

For every changed file, trace at minimum:

  1. Direct callers/importers
  2. Test files for the changed module
  3. Test files for callers of the changed module

Dependency mapping techniques:

TechniqueHowBest For
Static grep/searchSearch for imports/referencesQuick, small-medium projects
Build graph traversalUse build system depsLarge projects
Dynamic call tracingRun coverage tools on existing testsPrecise method-level mapping

Flag changes with radius > 3 modules as high-risk. Stop tracing at 5+ modules deep (diminishing returns).

Step 3: Check Existing Coverage

For each changed unit:

ScenarioCheck
Changed functionDoes a test call this with relevant inputs?
New functionIs there a new test?
Changed behaviorDo tests assert the OLD behavior that changed?
Removed codeWere there tests for the removed functionality?
Error pathsAre error handling changes tested?

Run the relevant existing tests and confirm: all previously passing tests still pass, and any test updated for new behavior is correct.

Step 4: Identify Gaps

PatternWhat's MissingRisk
New code, no testsUntested new functionality🔴 High
Behavior changed, tests unchangedTests pass for wrong reasons🔴 High
Bug fixed, no regression testSame bug can reappear🟠 Medium
Refactored code, coverage droppedPreviously tested paths untested🟠 Medium
Integration point changed, no integration testInterface mismatch🔴 High
Dependency upgraded, no integration testBreaking change undetected🟠 Medium

Prioritize gaps by: business criticality → change complexity → defect probability → test proximity.

Step 5: Write New Tests

Gap TypeBest LevelWhy
New logic pathUnitFast, precise, isolated
Changed behaviorUnit + IntegrationVerifies behavior AND integration
Bug fixUnit (reproduces the bug)Prevents regression
API changeContractCatches consumer/provider mismatch

Change Impact Heuristics

Change TypeWhat to Test
Bug fixFix + adjacent behavior
Refactor (no behavior change)Run existing; add characterization tests if missing
New featureNew paths; verify integration points unchanged
Interface/API changeAll callers; contract tests; backward compat
Dependency upgradeFull suite; check changelog for breaking changes
Data schema migrationMigration forward + rollback; data integrity

Tiered Regression Strategy

TierTriggerScopeBudget
Tier 1: SmokeEvery commit20-30 critical tests< 2 min
Tier 2: SelectiveEvery PR/mergeImpact-analyzed tests from Steps 1-3< 15 min
Tier 3: CompleteMerge to mainFull test suiteNightly
Tier 4: Full E2EPre-releaseE2E + manual explorationBefore release

For individual changes, apply Tier 2 — selective, impact-analyzed regression.


Core Rules

  1. Never mark a change done without running the relevant existing tests
  2. Turn every production bug into a regression test — the fix isn't complete without it
  3. Refactors: test coverage must increase or stay the same, never decrease
  4. Dependency changes: always run the full integration test suite
  5. Trace transitive dependencies, not just direct ones

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.