regression-check
Compare current behavior against baseline to detect regressions
What this skill does
# Regression Check Command
Compare current system behavior against a baseline to detect regressions using executable feedback patterns.
## Task
I'll perform comprehensive regression detection by:
1. Establishing baseline comparison point (branch, tag, commit, or timestamp)
2. Identifying scope of changes to test
3. Executing relevant test suites with baseline comparison
4. Analyzing execution feedback for behavioral changes
5. Reporting detected regressions with severity and impact
6. Optionally correlating with bug reports
## Arguments
- `--baseline <ref>` - Comparison baseline (branch name, git tag, commit hash, or ISO timestamp)
- Examples: `--baseline main`, `--baseline v2026.1.4`, `--baseline abc123`, `--baseline 2026-01-20T10:00:00Z`
- Default: `main` branch or most recent release tag
- `--scope <level>` - Testing scope
- `full` - Run complete test suite (default)
- `module <name>` - Test specific module/component
- `changed-files` - Test only files changed since baseline
- Example: `--scope module auth`
- `--format <type>` - Output format
- `summary` - High-level regression report (default)
- `detailed` - Full execution logs with diffs
- `json` - Machine-readable format for CI/CD integration
- `--bug-report <path>` - Correlate with bug report
- Verifies bug fix doesn't introduce regressions
- Cross-references test failures with reported issues
- Example: `--bug-report .aiwg/bugs/BUG-042.md`
- `--save-baseline` - Save current execution as new baseline
- Useful after confirming changes are intentional
- Updates regression detection baseline for future runs
## Process
### Step 1: Baseline Establishment
```bash
# Determine baseline reference
BASELINE_REF="${--baseline:-main}"
# Checkout baseline (in temporary worktree)
git worktree add /tmp/baseline-check "$BASELINE_REF"
# Capture baseline test results
cd /tmp/baseline-check
npm test -- --json > /tmp/baseline-results.json
```
### Step 2: Scope Identification
**Full Scope**:
- Run entire test suite in both baseline and current
- Compare all test outcomes
**Module Scope**:
- Identify module-specific tests
- Run subset of test suite
- Focus regression detection on specified component
**Changed Files Scope**:
```bash
# Identify changed files
git diff --name-only "$BASELINE_REF" > /tmp/changed-files.txt
# Map to test files
# Example: src/auth/login.ts → test/unit/auth/login.test.ts
# Run only affected tests
```
### Step 3: Execution Comparison
Execute tests in current state:
```bash
# Run tests with same configuration as baseline
npm test -- --json > /tmp/current-results.json
# Capture additional metrics
# - Performance timing
# - Code coverage deltas
# - Error types and frequencies
```
### Step 4: Regression Analysis
Compare execution results:
```yaml
regression_detection:
new_failures:
- test: "test/unit/auth/login.test.ts::validateCredentials"
baseline_status: PASS
current_status: FAIL
error: "Expected 200, received 401"
severity: CRITICAL
behavior_changes:
- test: "test/integration/api/users.test.ts::createUser"
baseline_output: "User created in 150ms"
current_output: "User created in 450ms"
delta: +200%
severity: MAJOR
fixed_tests:
- test: "test/unit/utils/parser.test.ts::edgeCase"
baseline_status: FAIL
current_status: PASS
note: "Intentional fix"
```
### Step 5: Reporting
**Summary Format**:
```markdown
## Regression Check Report
**Baseline**: main (commit abc123)
**Scope**: full
**Date**: 2026-01-25T15:30:00Z
### Summary
- **New Failures**: 3 tests
- **Behavior Changes**: 5 tests (performance degradation)
- **Fixed Tests**: 2 tests
- **Overall**: ⚠️ REGRESSIONS DETECTED
### Critical Regressions
1. **auth/login.test.ts::validateCredentials**
- Status: PASS → FAIL
- Error: "Expected 200, received 401"
- Impact: Breaks user authentication
- Action: BLOCK MERGE
2. **payments/process.test.ts::chargeCard**
- Status: PASS → FAIL
- Error: "Transaction timeout"
- Impact: Payment processing broken
- Action: BLOCK MERGE
### Behavior Changes
1. **api/users.test.ts::createUser**
- Performance: 150ms → 450ms (+200%)
- Severity: MAJOR
- Action: INVESTIGATE
[... detailed report continues ...]
```
**JSON Format**:
```json
{
"baseline": {
"ref": "main",
"commit": "abc123",
"timestamp": "2026-01-20T10:00:00Z"
},
"current": {
"commit": "def456",
"timestamp": "2026-01-25T15:30:00Z"
},
"summary": {
"new_failures": 3,
"behavior_changes": 5,
"fixed_tests": 2,
"total_tests": 247
},
"regressions": [
{
"test": "auth/login.test.ts::validateCredentials",
"type": "failure",
"severity": "critical",
"baseline_status": "PASS",
"current_status": "FAIL",
"error": "Expected 200, received 401",
"action": "block"
}
],
"verdict": "FAIL"
}
```
## Bug Report Integration
When `--bug-report` is provided:
```bash
# Load bug report
BUG_REPORT=$(cat .aiwg/bugs/BUG-042.md)
# Extract:
# - Bug description
# - Affected components
# - Expected fix behavior
# Cross-reference regression results:
# 1. Did fix resolve reported bug? (test now passes)
# 2. Did fix introduce new failures? (regressions)
# 3. Did fix change behavior elsewhere? (side effects)
# Generate correlation report:
```
**Example Output**:
```markdown
## Bug Fix Verification: BUG-042
**Bug**: Login fails for users with special characters in email
**Fix Verification**: ✅ PASS
- Test `auth/login.test.ts::specialCharactersInEmail` now passes
- Previously failing with "Email validation error"
**Regression Check**: ⚠️ WARNING
- **New failure detected**: `auth/login.test.ts::standardLogin`
- Error: "Unexpected character escape"
- Likely caused by overly aggressive input sanitization
- **Action**: Refine fix to avoid breaking standard login flow
**Recommendation**: REFINE FIX before merge
```
## Baseline Modes
### Branch Baseline
```bash
# Compare against branch
/regression-check --baseline develop --scope changed-files
# Use case: Feature branch testing
# Ensures changes don't break existing functionality
```
### Tag Baseline
```bash
# Compare against release
/regression-check --baseline v2026.1.4 --format detailed
# Use case: Release regression testing
# Verifies new version doesn't break previous release behavior
```
### Commit Baseline
```bash
# Compare against specific commit
/regression-check --baseline abc123def --scope module auth
# Use case: Pinpoint regression introduction
# Identifies exact commit that introduced regression
```
### Timestamp Baseline
```bash
# Compare against point in time
/regression-check --baseline 2026-01-20T10:00:00Z
# Use case: Time-based regression detection
# Finds when behavior changed over time
```
## Executable Feedback Pattern
Implements REF-013 MetaGPT executable feedback loop:
```yaml
executable_feedback_loop:
1_execute_baseline:
- checkout_baseline_ref
- run_test_suite
- capture_execution_results
2_execute_current:
- run_test_suite_current
- capture_execution_results
3_compare_feedback:
- detect_new_failures
- detect_behavior_changes
- detect_performance_regressions
4_analyze_root_cause:
- diff_source_changes
- identify_likely_culprits
- suggest_fixes
5_iterate_or_report:
- if_regressions_critical: block_merge
- if_regressions_minor: warn_and_document
- if_no_regressions: approve
```
## Usage Examples
### Example 1: Pre-Merge Regression Check
```bash
# Before merging feature branch
/regression-check --baseline main --scope changed-files --format summary
# Expected outcome:
# - Fast execution (only changed files tested)
# - Summary of any regressions introduced
# - Recommendation: merge/block/investigate
```
### Example 2: Bug Fix Verification
```bash
# After implementing bug fix
/regression-check --baseline v2026.1.4 --bug-report .aiwg/bugs/BUG-042.md
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.