GitHub CI Diagnose
Overview
CI failures are symptoms, not diseases. This skill treats the GitHub Actions
log as a patient: parse it, classify the symptom, name the disease, prescribe
a reversible fix — but do not perform surgery without consent.
Companion skills:
github-pr-review — for the PR branch whose CI failed
secret-safety-scan — if root cause class is secret-gate
parallel-authority-detection — if root cause class is cross-repo-break
This skill reads and reports. It never edits .github/workflows/*.yml and
never re-runs CI without sovereign ack.
When to Use
Before using this skill on any mutating, irreversible, or high-blast-radius task:
- ART — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).
- Kernel — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.
- ACT — Apply narrow, Constrain scope, Trace witness, STOP before corruption.
- Receipt — Leave evidence of what changed, why, and under whose authority.
CI failures are symptoms, not diseases. This skill treats the log as a patient:
listen to it, classify the symptom, name the disease, prescribe a fix — but do
not perform surgery without consent.
When to Use
- Red X on any
ariffazil/* repo CI
- Build failure, test failure, lint failure, secret scan failure
- Workflow that passed yesterday but fails today (potential flake or dependency drift)
When NOT to Use
- Do NOT use if failure is in a fork or external repo — scope is federation only
- Do NOT use if failure is a deliberate security gate blocking a known-bad PR — that is the gate working correctly
- Do NOT use if you already know the fix and just want to apply it — this skill is for diagnosis, not patching
Inputs
| Input |
Required |
Description |
| repo |
yes |
Owner/repo name (e.g., ariffazil/AAA) |
| workflow_name |
yes |
Name of failing workflow |
| run_id |
yes |
GitHub Actions run ID |
| branch |
no |
Branch the run executed on |
Procedure
Step 1: Fetch & Parse Log
Retrieve the full Actions log. Look for these structural markers:
Error: or FAILED — explicit failure line
npm ERR! / pip FAILED / pytest FAILED — dependency or test break
secrets found / detect-secrets — secret scan gate
timeout / cancelled — infrastructure or infinite loop
checksum mismatch / lockfile out of date — dependency drift
Step 2: Classify Failure Mode
Assign exactly one primary cause:
| Class |
Pattern |
Typical Fix |
code-regression |
Test fails after code change |
Fix code, not CI |
dependency-drift |
Lockfile mismatch, version conflict |
Update lockfile, pin versions |
infra-flake |
Timeout, network error, runner crash |
Re-run (with approval) |
lint-format |
Ruff, eslint, prettier violation |
Run formatter, fix style |
secret-gate |
detect-secrets, TruffleHog alert |
Rotate secret, clean history |
config-error |
Invalid YAML, missing env var, wrong path |
Fix workflow config |
cross-repo-break |
Dependent repo changed interface |
Coordinate multi-repo fix |
Step 3: Root Cause Analysis
Ask five whys:
- What failed? (the symptom)
- What command produced the failure? (the trigger)
- What changed since the last green run? (the delta)
- Is this reproducible or a flake? (the confidence)
- What is the minimal fix? (the prescription)
Document the chain in the diagnostic report.
Step 4: Propose Fix
Draft a fix proposal that is:
- Reversible (can be reverted with
git revert)
- Bounded (touches only the failing component)
- Tested (includes how to verify the fix locally)
Do NOT:
- Edit
.github/workflows/*.yml directly
- Re-run CI without Arif approval
- Dismiss a security scan failure
- Suggest
npm audit fix --force or equivalent blind upgrades
Step 5: Report & Escalation
Output a diagnostic report (see format below).
Escalation rules:
secret-gate → escalate to secret-safety-scan skill + alert Arif
cross-repo-break → escalate to parallel-authority-detection skill
config-error touching constitutional workflow → escalate to 888_JUDGE
- All others → present fix proposal, await Arif ack
Forbidden Actions
- NEVER re-run CI without Arif approval (masks flakes, wastes compute)
- NEVER edit
.github/workflows/ without 888_JUDGE
- NEVER dismiss a security scan failure as "false positive" without evidence
- NEVER propose
--force upgrades or destructive dependency resolution
- NEVER commit directly to main to "fix CI quickly"
Output Format
## CI Diagnostic Report
- **Repo:** owner/repo
- **Workflow:** name
- **Run ID:** id
- **Branch:** branch
- **Failure Class:** <class>
- **Confidence:** <high | medium | low>
- **Root Cause:** <concise explanation>
- **Last Green Run:** <run-id or unknown>
- **Delta Since Green:** <what changed>
- **Proposed Fix:** <reversible, bounded fix>
- **Local Verification:** <command to reproduce/fix locally>
- **Escalation:** <none | secret-safety-scan | parallel-authority-detection | 888_JUDGE>
1---2name: forge-ci-diagnose3description: Parse failing GitHub Actions logs, identify root cause patterns, and propose fixes without executing irreversible changes. Use this skill whenever a federation repo shows a red CI status, a workflow fails, or a build/test/lint gate breaks. This skill reads logs, classifies failure modes, and outputs a diagnostic report — it does not re-run CI, edit workflows, or dismiss security findings without sovereign approval.4---56# GitHub CI Diagnose78## Overview910CI failures are symptoms, not diseases. This skill treats the GitHub Actions11log as a patient: parse it, classify the symptom, name the disease, prescribe12a reversible fix — but do not perform surgery without consent.1314Companion skills:15- `github-pr-review` — for the PR branch whose CI failed16- `secret-safety-scan` — if root cause class is `secret-gate`17- `parallel-authority-detection` — if root cause class is `cross-repo-break`1819This skill reads and reports. It never edits `.github/workflows/*.yml` and20never re-runs CI without sovereign ack.2122## When to Use2324Before using this skill on any mutating, irreversible, or high-blast-radius task:251. **ART** — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).262. **Kernel** — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.273. **ACT** — Apply narrow, Constrain scope, Trace witness, STOP before corruption.284. **Receipt** — Leave evidence of what changed, why, and under whose authority.293031CI failures are symptoms, not diseases. This skill treats the log as a patient:32listen to it, classify the symptom, name the disease, prescribe a fix — but do33not perform surgery without consent.3435## When to Use3637- Red X on any `ariffazil/*` repo CI38- Build failure, test failure, lint failure, secret scan failure39- Workflow that passed yesterday but fails today (potential flake or dependency drift)4041## When NOT to Use4243- Do NOT use if failure is in a fork or external repo — scope is federation only44- Do NOT use if failure is a deliberate security gate blocking a known-bad PR — that is the gate working correctly45- Do NOT use if you already know the fix and just want to apply it — this skill is for diagnosis, not patching4647## Inputs4849| Input | Required | Description |50|-------|----------|-------------|51| repo | yes | Owner/repo name (e.g., ariffazil/AAA) |52| workflow_name | yes | Name of failing workflow |53| run_id | yes | GitHub Actions run ID |54| branch | no | Branch the run executed on |5556## Procedure5758### Step 1: Fetch & Parse Log5960Retrieve the full Actions log. Look for these structural markers:6162- `Error:` or `FAILED` — explicit failure line63- `npm ERR!` / `pip FAILED` / `pytest FAILED` — dependency or test break64- `secrets found` / `detect-secrets` — secret scan gate65- `timeout` / `cancelled` — infrastructure or infinite loop66- `checksum mismatch` / `lockfile out of date` — dependency drift6768### Step 2: Classify Failure Mode6970Assign exactly one primary cause:7172| Class | Pattern | Typical Fix |73|-------|---------|-------------|74| `code-regression` | Test fails after code change | Fix code, not CI |75| `dependency-drift` | Lockfile mismatch, version conflict | Update lockfile, pin versions |76| `infra-flake` | Timeout, network error, runner crash | Re-run (with approval) |77| `lint-format` | Ruff, eslint, prettier violation | Run formatter, fix style |78| `secret-gate` | detect-secrets, TruffleHog alert | Rotate secret, clean history |79| `config-error` | Invalid YAML, missing env var, wrong path | Fix workflow config |80| `cross-repo-break` | Dependent repo changed interface | Coordinate multi-repo fix |8182### Step 3: Root Cause Analysis8384Ask five whys:851. What failed? (the symptom)862. What command produced the failure? (the trigger)873. What changed since the last green run? (the delta)884. Is this reproducible or a flake? (the confidence)895. What is the minimal fix? (the prescription)9091Document the chain in the diagnostic report.9293### Step 4: Propose Fix9495Draft a fix proposal that is:96- **Reversible** (can be reverted with `git revert`)97- **Bounded** (touches only the failing component)98- **Tested** (includes how to verify the fix locally)99100Do NOT:101- Edit `.github/workflows/*.yml` directly102- Re-run CI without Arif approval103- Dismiss a security scan failure104- Suggest `npm audit fix --force` or equivalent blind upgrades105106### Step 5: Report & Escalation107108Output a diagnostic report (see format below).109110Escalation rules:111- `secret-gate` → escalate to `secret-safety-scan` skill + alert Arif112- `cross-repo-break` → escalate to `parallel-authority-detection` skill113- `config-error` touching constitutional workflow → escalate to 888_JUDGE114- All others → present fix proposal, await Arif ack115116## Forbidden Actions117118- **NEVER** re-run CI without Arif approval (masks flakes, wastes compute)119- **NEVER** edit `.github/workflows/` without 888_JUDGE120- **NEVER** dismiss a security scan failure as "false positive" without evidence121- **NEVER** propose `--force` upgrades or destructive dependency resolution122- **NEVER** commit directly to main to "fix CI quickly"123124## Output Format125126```markdown127## CI Diagnostic Report128129- **Repo:** owner/repo130- **Workflow:** name131- **Run ID:** id132- **Branch:** branch133- **Failure Class:** <class>134- **Confidence:** <high | medium | low>135- **Root Cause:** <concise explanation>136- **Last Green Run:** <run-id or unknown>137- **Delta Since Green:** <what changed>138- **Proposed Fix:** <reversible, bounded fix>139- **Local Verification:** <command to reproduce/fix locally>140- **Escalation:** <none | secret-safety-scan | parallel-authority-detection | 888_JUDGE>141```