regression-oracle
Installation
SKILL.md
Automated Regression Oracle
The "Automated Regression Oracle" uses the current version of the software as the definition of correctness for refactoring or optimization tasks.
Workflow
- Capture: Identify the function to be modified. Generate a "Snapshot Test" (or "Characterization Test") that records the output of the function for a diverse set of inputs (randomized fuzzing or captured production traffic).
- Action: Use the
oracle_capturetool to run the capture command and lock the behavior.
- Action: Use the
- Lock: Save these outputs to a temporary file (e.g.,
oracle_snapshot.json). - Modify: Perform the refactoring or optimization.
- Verify: Run the Snapshot Test against the new code.
- Action: Use the
oracle_verifytool to compare the new output to theoracle_snapshot.json. Any deviation is a failure.
- Action: Use the
- Release: Only if the verification passes, delete the snapshot and commit the changes.
When to use
Use this skill when you need to "clean up" or optimize code and want to ensure no behavioral regressions occur.