fix-regression-guard
Skill6 starsChanged 33 days agoMITView on GitHub
Mandatory regression analysis before committing a bug fix. Use before any fix commit, after any change to a guard, condition, ownership check, or flow-control trigger, or after an agent proposes a fix. Prevents the fix-break-fix cycle by tracing every callsite, actor, and follow-up action that depends on the changed condition, and by escalating to a redesign after repeated review findings.
In this repository79 other files it gives its agents.
- adr-phase-coverageSkill
- aposd-red-flag-reviewSkill
- apple-on-device-aiSkill
- artifact-gatesSkill
- asc-app-create-uiSkill
- asc-build-lifecycleSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-localize-metadataSkill
- asc-metadata-syncSkill
- asc-notarizationSkill
- asc-ppp-pricingSkill
- asc-release-flowSkill
- asc-revenuecat-catalog-syncSkill
- asc-shots-pipelineSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-subscription-localizationSkill
- asc-testflight-orchestrationSkill
- asc-wall-submitSkill
- asc-workflowSkill
- asc-xcode-buildSkill
- choose-boring-technologySkill
- ci-preflightSkill
- conways-lawSkill
- cost-routingSkill
- cost-tier-routingSkill
- cunninghams-lawSkill
- ddd-strategic-auditSkill
- ddd-tactical-reviewSkill
- debug-test-captureSkill
- developing-ios-appsSkill
- doerrs-lawSkill
- fitts-lawSkill
- galls-lawSkill
- goodharts-lawSkill
- greenspuns-tenth-ruleSkill
- gsd-core-hooksSkill
- hofstadters-lawSkill
- hyrums-lawSkill
- ios-accessibilitySkill
- ios-simulator-boot-healthSkill
- kerckhoffs-principleSkill
- kernighans-lawSkill
- knuths-optimization-principleSkill
- lady-lovelaces-objectionSkill
- leaky-abstractionsSkill
- linuss-lawSkill
- mobile-ios-designSkill
- money-boundary-judgmentSkill
- moores-lawSkill
- no-deferSkill
- norvigs-lawSkill
- parkinsons-lawSkill
- peter-principleSkill
- postels-lawSkill
- post-fix-traceSkill
- qa-test-architectSkill
- rubber-duckSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
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 8
Before committing ANY fix, complete this analysis.
- Distinctive: line 13
Every change to a guard, condition, or ownership/permission check
- Distinctive: line 14
Every change to flow control (retry triggers, scheduling, reconcile or refresh paths)
- Distinctive: line 15
After any agent proposes a fix
- Distinctive: line 24
Intent: Only match the actual owner, not the symbolic default
- Distinctive: line 44
If you changed a guard that previously allowed code to run:
- Distinctive: line 47
If not, is there an alternative path?
- Distinctive: line 53
If the bug was seen by one actor, write a test for the other.
- Distinctive: line 54
If the bug was on the producer side, write a test for the consumer, and vice versa.
- Distinctive: line 55
If the bug was single-actor, write a test for the multi-actor interaction.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Fix Regression Guard
Before committing ANY fix, complete this analysis. A common source of new bugs in any codebase is a fix that changes a condition or guard without tracing all code paths that depend on it.
When to trigger
- Every
fix:commit - Every change to a guard, condition, or ownership/permission check
- Every change to flow control (retry triggers, scheduling, reconcile or refresh paths)
- After any agent proposes a fix
The Analysis
Step 1: List every condition you changed
For each changed if, guard, where, or boolean check, write (illustrative example from an order service):
- Before:
if order.ownerID == DEFAULT_OWNER - After:
if order.ownerID == resolvedOwnerID - Intent: Only match the actual owner, not the symbolic default
Step 2: Find ALL callsites of the changed condition
# For each changed variable/function, find every reference (names are illustrative)
grep -rn "ownerID\|refreshOrders\|reconcileItems" src/ | grep -v "test"For EACH callsite:
- Does it still work for the positive case (condition is true)?
- Does it still work for the negative case (condition is false)?
- Is there a code path that previously worked but now falls through?
Step 3: Enumerate every actor that runs the changed code
List every actor, role, or client that executes the changed code (user roles, service instances, client platforms, background jobs, other tenants). For each one, does the condition still evaluate correctly?
Step 4: Check for orphaned follow-up actions
If you changed a guard that previously allowed code to run:
- What code ran AFTER the guard in the old version?
- Does that code still run in the new version?
- If not, is there an alternative path?
Example: if registerWorker() previously triggered a polling cycle, and your fix changes that method, verify the polling cycle still happens.
Step 5: Write a regression test for the OPPOSITE case
If the bug was seen by one actor, write a test for the other. If the bug was on the producer side, write a test for the consumer, and vice versa. If the bug was single-actor, write a test for the multi-actor interaction.
Step 6: Escalate after three findings
Count the adversarial-review findings (automated reviewer, isolated human or agent reviewer, post-fix trace) on THIS feature. At 3, stop patching. Write one paragraph on why the findings keep coming (they usually share a design cause: placement, lifecycle, gate ownership) and propose a redesign to the user before writing more fix code.
Common Patterns
Fix chains tend to follow the same shapes:
- Fix one side, break the other: each fix is tested only against the broken actor, never the working one, so the working one regresses and the cycle repeats.
- Narrow a race, open an edge case: each fix shrinks a race window or tightens a guard, but introduces a new uncovered state (for example a case the old, looser guard happened to handle).
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.

