From sdlc
Automates git bisect to pinpoint the commit introducing a regression by running tests during binary search, showing diff and blame info, and generating analysis reports.
npx claudepluginhub jmagly/aiwg --plugin sdlcThis skill uses the workspace's default tool permissions.
Automatically identify the commit that introduced a regression using git bisect.
Enforces C++ Core Guidelines for writing, reviewing, and refactoring modern C++ code (C++17+), promoting RAII, immutability, type safety, and idiomatic practices.
Provides patterns for shared UI in Compose Multiplatform across Android, iOS, Desktop, and Web: state management with ViewModels/StateFlow, navigation, theming, and performance.
Implements Playwright E2E testing patterns: Page Object Model, test organization, configuration, reporters, artifacts, and CI/CD integration for stable suites.
Automatically identify the commit that introduced a regression using git bisect.
This skill automates regression root cause analysis by:
When triggered, this skill:
Validates prerequisites:
Executes git bisect:
Analyzes breaking commit:
Provides context:
Documents findings:
bisect_manual:
mode: interactive
good_commit: v1.2.0 # Known good state
bad_commit: HEAD # Known bad state
test_command: "npm test -- auth.test.ts"
workflow:
- git bisect start
- git bisect bad HEAD
- git bisect good v1.2.0
- git bisect run npm test -- auth.test.ts
bisect_automated:
mode: automated
detect_good: auto # Use last passing CI build
detect_bad: auto # Use current failing state
test_command: "npm test"
timeout: 600 # 10 minutes per commit test
auto_detection:
- check_ci_history
- find_last_green_build
- set_as_good_commit
- use_current_as_bad
bisect_custom:
mode: custom
test_script: scripts/regression-test.sh
success_exit_code: 0
failure_exit_code: 1
test_script_template: |
#!/bin/bash
# Custom regression test
npm run build || exit 1
npm test -- specific-test.ts || exit 1
./validate-output.sh || exit 1
exit 0
# Regression Bisect Report
**Date**: 2026-01-28
**Issue**: Authentication fails on login
**Analyzer**: regression-bisect skill
## Executive Summary
**Breaking Commit**: abc123def456
**Author**: John Developer <john@example.com>
**Date**: 2026-01-15 14:32:00
**Bisect Duration**: 8 commits tested, 12 minutes
**Root Cause**: Token validation logic changed to require `iss` claim
## Bisect Results
### Commit Range
- **Good**: v1.2.0 (2026-01-10) - 50 commits ago
- **Bad**: HEAD (2026-01-28) - Current state
- **Breaking**: abc123def456 (2026-01-15) - 25 commits into range
### Bisect Log
| Commit | Status | Test Result | Duration |
|--------|--------|-------------|----------|
| abc123 | ❌ Bad | auth.test.ts failed | 45s |
| def789 | ❌ Bad | auth.test.ts failed | 42s |
| ghi012 | ✅ Good | all tests passed | 48s |
| jkl345 | ✅ Good | all tests passed | 46s |
| mno678 | ❌ Bad | auth.test.ts failed | 44s |
| **pqr901** | **❌ Breaking** | **First failure** | **43s** |
| stu234 | ✅ Good | all tests passed | 47s |
| vwx567 | ✅ Good | all tests passed | 45s |
## Breaking Commit Analysis
### Commit Details
commit pqr901xyz Author: John Developer john@example.com Date: Mon Jan 15 14:32:00 2026 +0000
feat(auth): add JWT issuer validation
- Require `iss` claim in JWT tokens
- Validate issuer against whitelist
- Update token generation to include issuer
Closes #456
### Files Changed
| File | Changes | Impact |
|------|---------|--------|
| src/auth/validate-token.ts | +15/-5 | High - Core validation logic |
| src/auth/generate-token.ts | +8/-2 | Medium - Token generation |
| test/auth/token.test.ts | +25/-0 | Low - Test updates |
### Diff Analysis
```diff
diff --git a/src/auth/validate-token.ts b/src/auth/validate-token.ts
index abc123..def456 100644
--- a/src/auth/validate-token.ts
+++ b/src/auth/validate-token.ts
@@ -15,6 +15,11 @@ export function validateToken(token: string): TokenPayload {
throw new Error('Invalid token signature');
}
+ // NEW: Require issuer claim
+ if (!payload.iss) {
+ throw new Error('Token missing issuer claim');
+ }
+
return payload;
}
Breaking Change: The new validation requires iss claim, but existing tokens don't include it.
The commit added mandatory iss (issuer) claim validation without:
Impact: All existing user sessions became invalid immediately.
Git history shows related changes:
src/auth/validate-token.ts:
85% John Developer <john@example.com>
10% Jane Reviewer <jane@example.com>
5% Bob Maintainer <bob@example.com>
iss validation optional with feature flagiss claimRecommended: Option B - Feature flag allows gradual rollout
// src/auth/validate-token.ts
export function validateToken(token: string): TokenPayload {
const payload = jwt.verify(token, SECRET_KEY);
if (!payload.sub) {
throw new Error('Invalid token signature');
}
// FIXED: Make issuer validation optional during migration
if (featureFlags.requireIssuer && !payload.iss) {
throw new Error('Token missing issuer claim');
}
return payload;
}
requireIssuer: falseissrequireIssuer: true2026-01-10: v1.2.0 released (working)
2026-01-15: Commit pqr901 merged (breaking change introduced)
2026-01-15: No CI failure (tests didn't catch integration issue)
2026-01-16: Deployed to production
2026-01-16: User reports started (authentication failures)
2026-01-28: Bisect identified root cause
Time to Detection: 13 days Time to Root Cause: Immediate (via bisect)
This regression could have been prevented by:
## Usage Examples
### Basic Regression Bisect
User: "Find which commit broke authentication"
Skill executes:
Output: "Regression Bisect Complete
Breaking Commit: pqr901xyz Author: John Developer Date: 2026-01-15 14:32:00 Message: feat(auth): add JWT issuer validation
Root Cause: Required iss claim without backward compatibility
Files Changed:
Recommendation: Make validation optional with feature flag
Full report: .aiwg/testing/regression-bisect-auth.md"
### Bisect with Custom Test
User: "Bisect the payment processing regression"
Skill asks: "What is a good commit (when it worked)?" User: "v2.1.0"
Skill executes:
Output: "Breaking Commit: def456 Broke payment refund logic Changed: src/payments/refund.ts
Bisected 45 commits in 32 minutes See .aiwg/testing/regression-bisect-payment.md"
### Automatic Good/Bad Detection
User: "When did the API start returning 500 errors?"
Skill analyzes:
Runs bisect automatically.
Output: "Regression introduced in commit abc123 2 days ago by Jane Developer Changed database query logic
Breaking change: Added JOIN without NULL check See full analysis in .aiwg/testing/regression-api-500.md"
## Integration
This skill uses:
- `regression-baseline`: Load known good states
- `project-awareness`: Detect test commands and CI configuration
- `test-coverage`: Identify relevant test suites
- Git tools: For bisect operations and history analysis
## Agent Orchestration
```yaml
agents:
analysis:
agent: debugger
focus: Root cause analysis and blame
testing:
agent: test-engineer
focus: Test execution and validation
documentation:
agent: technical-writer
focus: Report generation
bisect_presets:
auth_regression:
test_command: npm test -- auth.test.ts
timeout: 300
auto_detect_good: true
api_regression:
test_command: npm run test:api
timeout: 600
auto_detect_good: true
performance_regression:
test_command: npm run benchmark
threshold: "response_time < 1000ms"
timeout: 900
timeout_config:
per_commit_test: 600 # 10 minutes
total_bisect: 3600 # 1 hour max
on_timeout: skip_commit # or fail_bisect
If test results are inconsistent:
If commit doesn't build:
If bisect takes too long:
.aiwg/testing/regression-bisect-{issue}.md.aiwg/testing/bisect-logs/.aiwg/working/regression-fixes/