Loading...
Loading...
Call me when CI goes red. Pipeline fire brigade, deploy. Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local builds, standard implementation work, reviews, or setup.
npx skill4agent add chachamaru127/claude-code-harness ci| Feature | Details | Trigger |
|---|---|---|
| Failure Analysis | See references/analyzing-failures.md | "Check the logs", "Investigate the cause" |
| Test Correction | See references/fixing-tests.md | "Fix the tests", "Propose a fix" |
CI Failure Report
↓
┌─────────────────────────────────────────┐
│ Test vs Implementation Judgment │
├─────────────────────────────────────────┤
│ Analyze the cause of the error: │
│ ├── Implementation is incorrect → Fix the implementation │
│ ├── Test is outdated → Confirm with user │
│ └── Environment issue → Fix the environment │
└─────────────────────────────────────────┘⚠️ Prohibited Items When CI Fails
The following "solutions" are prohibited:
| Prohibited | Example | Correct Response |
|------|-----|-----------|
| Test skipping | `it.skip(...)` | Fix the implementation |
| Assertion removal | Remove `expect()` | Check the expected value |
| Bypass CI checks | `continue-on-error` | Fix the root cause |
| Relax lint rules | `eslint-disable` | Fix the code |🔴 CI has failed
**Need to make a judgment**:
1. **Implementation is incorrect** → Fix the implementation ✅
2. **Test expected value is outdated** → Ask user for confirmation
3. **Environment issue** → Fix environment settings
⚠️ Tampering with tests (skipping, removing assertions) is prohibited
Which one applies?## 🚨 Approval Request for Test/Configuration Changes
### Reason
[Why this change is necessary]
### Change Details
[Diff]
### Alternative Consideration
- [ ] Confirmed if implementation fix can resolve the issue
Wait for explicit user approval# Analyze commits in structured format
git log --format="%h|%s|%an|%ad" --date=short -10
# Chronological tracking with merge order consideration
git log --topo-order --oneline -20
# Link file changes to causes
git log --raw --oneline -5| Usage | Flag | Effect |
|---|---|---|
| Identify failure cause | `--format="%h | %s"` |
| Chronological tracking | | Track considering merge order |
| Understand change impact | | Detailed display of file changes |
| Merge exclusion analysis | | Extract only actual commits |
🔍 CI Failure Cause Analysis
Recent Commits (Structured):
| Hash | Subject | Author | Date |
|------|---------|--------|------|
| a1b2c3d | feat: update API | Alice | 2026-02-04 |
| e4f5g6h | test: add tests | Bob | 2026-02-03 |
File Changes (--raw):
├── src/api/endpoint.ts (Modified) ← Type error occurred
├── tests/api.test.ts (Modified)
└── package.json (Modified)
→ Commit a1b2c3d is likely the cause
Type error: src/api/endpoint.ts:42Task tool:
subagent_type="ci-cd-fixer"
prompt="Please diagnose and fix the CI failure. Error log: {error_log}"agents/ci-cd-fixer.md🔧 How to say when CI breaks
1. **"CI failed", "turned red"**
- State where automated tests are failing
2. **"Why is it failing?"**
- Want to investigate the cause
3. **"Fix it"**
- Automatically attempt to fix
💡 Important: Fixes that "cheat" tests are prohibited
- ❌ Delete or skip tests
- ⭕ Correctly fix the code
If you think "the test seems wrong",
First confirm, then decide on the response