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.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- journal-management-genericSkill
- simplified-technical-englishSkill
- code-implementationSkill
- python-quality-gatesSkill
- journal-managementSkill
- plan-trackingSkill
- project-notesSkill
- task-routingSkill
- herdrSkill
- plan-output-templateSkill
- risk-and-dependency-identificationSkill
- task-decompositionSkill
- source-selectionSkill
- code-review-checklistSkill
- production-issue-flaggingSkill
- test-case-structureSkill
- test-strategy-selectionSkill
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
- Distinctive: line 25
Test files for the changed module
- Distinctive: line 26
Test files for callers of the changed module
- Distinctive: line 50
Run the relevant existing tests and confirm: all previously passing tests still pass, and any test updated for new behavior is correct.
- Distinctive: line 104
Never mark a change done without running the relevant existing tests
≈ “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.
Files
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:
- Direct callers/importers
- Test files for the changed module
- Test files for callers of the changed module
Dependency mapping techniques:
| Technique | How | Best For |
| Static grep/search | Search for imports/references | Quick, small-medium projects |
| Build graph traversal | Use build system deps | Large projects |
| Dynamic call tracing | Run coverage tools on existing tests | Precise 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:
| Scenario | Check |
| Changed function | Does a test call this with relevant inputs? |
| New function | Is there a new test? |
| Changed behavior | Do tests assert the OLD behavior that changed? |
| Removed code | Were there tests for the removed functionality? |
| Error paths | Are 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
| Pattern | What's Missing | Risk |
| New code, no tests | Untested new functionality | 🔴 High |
| Behavior changed, tests unchanged | Tests pass for wrong reasons | 🔴 High |
| Bug fixed, no regression test | Same bug can reappear | 🟠 Medium |
| Refactored code, coverage dropped | Previously tested paths untested | 🟠 Medium |
| Integration point changed, no integration test | Interface mismatch | 🔴 High |
| Dependency upgraded, no integration test | Breaking change undetected | 🟠 Medium |
Prioritize gaps by: business criticality → change complexity → defect probability → test proximity.
Step 5: Write New Tests
| Gap Type | Best Level | Why |
| New logic path | Unit | Fast, precise, isolated |
| Changed behavior | Unit + Integration | Verifies behavior AND integration |
| Bug fix | Unit (reproduces the bug) | Prevents regression |
| API change | Contract | Catches consumer/provider mismatch |
Change Impact Heuristics
| Change Type | What to Test |
| Bug fix | Fix + adjacent behavior |
| Refactor (no behavior change) | Run existing; add characterization tests if missing |
| New feature | New paths; verify integration points unchanged |
| Interface/API change | All callers; contract tests; backward compat |
| Dependency upgrade | Full suite; check changelog for breaking changes |
| Data schema migration | Migration forward + rollback; data integrity |
Tiered Regression Strategy
| Tier | Trigger | Scope | Budget |
| Tier 1: Smoke | Every commit | 20-30 critical tests | < 2 min |
| Tier 2: Selective | Every PR/merge | Impact-analyzed tests from Steps 1-3 | < 15 min |
| Tier 3: Complete | Merge to main | Full test suite | Nightly |
| Tier 4: Full E2E | Pre-release | E2E + manual exploration | Before release |
For individual changes, apply Tier 2 — selective, impact-analyzed regression.
Core Rules
- Never mark a change done without running the relevant existing tests
- Turn every production bug into a regression test — the fix isn't complete without it
- Refactors: test coverage must increase or stay the same, never decrease
- Dependency changes: always run the full integration test suite
- Trace transitive dependencies, not just direct ones
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
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.

