# Regression Check

> Re-run the baseline suite and compare against the last known-good run. Flags metric drift, test failures, or behavioral changes.

- Skill: `swarm-ai-safety/regression-check` (Agent Skill)
- Install (CLI): `npx skillmds@latest add swarm-ai-safety/regression-check`
- Raw SKILL.md: https://api.skillmd.com/api/skills/swarm-ai-safety/regression-check/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: swarm-ai-safety (https://skillmd.com/u/swarm-ai-safety)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/swarm-ai-safety/regression-check

---


## EXECUTE NOW

**Mode: $ARGUMENTS**

Parse:
- `tests` — run pytest suite only
- `baseline` — re-run baseline scenario and compare metrics
- `full` or empty — run both tests and baseline comparison

---

## Step 1: Run tests

```bash
python -m pytest tests/ -v --tb=short
```

Report pass/fail count. If any failures, list them.

## Step 2: Run baseline scenario

```bash
python -m swarm run scenarios/baseline.yaml --seed 42 --epochs 10 --steps 10
```

## Step 3: Compare against last known-good

Read the most recent baseline run from memory at `.letta/memory/runs/latest.md`.

If a previous baseline exists, compare:
- Welfare: delta and percentage change
- Toxicity: delta
- Acceptance rate: delta
- Quality gap: delta

Flag any metric that changed by more than 10% as a potential regression.

## Step 4: Report

```
## Regression Check

### Tests
- {passed}/{total} passed
- Failures: {list or "none"}

### Baseline comparison
| Metric | Previous | Current | Delta | Status |
|--------|----------|---------|-------|--------|
| Welfare | ... | ... | ... | OK/DRIFT |
| Toxicity | ... | ... | ... | OK/DRIFT |

### Verdict
{CLEAN — no regressions detected}
{REGRESSED — {details}}
```

