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---2id: github-ci-diagnose3name: forge-ci-diagnose4autonomy_tier: T15version: 1.1.06description: 'Parse failing GitHub Actions logs, identify root cause patterns, and7 propose fixes without executing irreversible changes. Use this skill whenever a8 federation repo shows a red CI status, a workflow fails, or a build/test/lint gate9 breaks. This skill reads logs, classifies failure modes, and outputs a diagnostic10 report — it does not re-run CI, edit workflows, or dismiss security findings without11 sovereign approval.'12owner: AAA13risk_tier: medium14knowledge_basis:15 language: true16 math: false17 physics: false18host_compatibility:19- claude-code20- codex21- opencode22- kimi23- kimi-code24dependencies:25 servers:26 - a-forge27 tools:28 - forge_filesystem_read29 - forge_shell_dryrun30 - forge_log_tail31examples:32- AAA CI is failing on main — diagnose the GitHub Actions log33- arifOS pytest suite failing after last push — what's the root cause?34- Secret scan gate blocking A-FORGE PR — analyze and propose fix35tests:36- Identify a failing test from a 500-line Actions log37- Distinguish between flake, dependency break, and code regression38- Propose fix for a lint failure without editing workflow files39- Refuse to dismiss a secret-scan gate as false positive40version_lock:41 schema_version: '1'42 artifact_hash: pending43orthogonal_tags:44 trinitarian:45 - Ω46 functional:47 - Ops48 layer: CODING/FI49 autonomy_tier: T150floor_scope:51- F152- F253- F454- F955- F1156- F1357canonical_siblings:58- github-pr-review # gate reviewer on PR-branch CI failure59- secret-safety-scan # if root cause is secret-gate60- parallel-authority-detection # if root cause is cross-repo break61capability_tier: fed-agent-subagent62ecology_state: WARM63---6465# GitHub CI Diagnose6667## Overview6869CI failures are symptoms, not diseases. This skill treats the GitHub Actions70log as a patient: parse it, classify the symptom, name the disease, prescribe71a reversible fix — but do not perform surgery without consent.7273Companion skills:74- `github-pr-review` — for the PR branch whose CI failed75- `secret-safety-scan` — if root cause class is `secret-gate`76- `parallel-authority-detection` — if root cause class is `cross-repo-break`7778This skill reads and reports. It never edits `.github/workflows/*.yml` and79never re-runs CI without sovereign ack.8081## When to Use8283Before using this skill on any mutating, irreversible, or high-blast-radius task:841. **ART** — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).852. **Kernel** — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.863. **ACT** — Apply narrow, Constrain scope, Trace witness, STOP before corruption.874. **Receipt** — Leave evidence of what changed, why, and under whose authority.888990CI failures are symptoms, not diseases. This skill treats the log as a patient:91listen to it, classify the symptom, name the disease, prescribe a fix — but do92not perform surgery without consent.9394## When to Use9596- Red X on any `ariffazil/*` repo CI97- Build failure, test failure, lint failure, secret scan failure98- Workflow that passed yesterday but fails today (potential flake or dependency drift)99100## When NOT to Use101102- Do NOT use if failure is in a fork or external repo — scope is federation only103- Do NOT use if failure is a deliberate security gate blocking a known-bad PR — that is the gate working correctly104- Do NOT use if you already know the fix and just want to apply it — this skill is for diagnosis, not patching105106## Inputs107108| Input | Required | Description |109|-------|----------|-------------|110| repo | yes | Owner/repo name (e.g., ariffazil/AAA) |111| workflow_name | yes | Name of failing workflow |112| run_id | yes | GitHub Actions run ID |113| branch | no | Branch the run executed on |114115## Procedure116117### Step 1: Fetch & Parse Log118119Retrieve the full Actions log. Look for these structural markers:120121- `Error:` or `FAILED` — explicit failure line122- `npm ERR!` / `pip FAILED` / `pytest FAILED` — dependency or test break123- `secrets found` / `detect-secrets` — secret scan gate124- `timeout` / `cancelled` — infrastructure or infinite loop125- `checksum mismatch` / `lockfile out of date` — dependency drift126127### Step 2: Classify Failure Mode128129Assign exactly one primary cause:130131| Class | Pattern | Typical Fix |132|-------|---------|-------------|133| `code-regression` | Test fails after code change | Fix code, not CI |134| `dependency-drift` | Lockfile mismatch, version conflict | Update lockfile, pin versions |135| `infra-flake` | Timeout, network error, runner crash | Re-run (with approval) |136| `lint-format` | Ruff, eslint, prettier violation | Run formatter, fix style |137| `secret-gate` | detect-secrets, TruffleHog alert | Rotate secret, clean history |138| `config-error` | Invalid YAML, missing env var, wrong path | Fix workflow config |139| `cross-repo-break` | Dependent repo changed interface | Coordinate multi-repo fix |140141### Step 3: Root Cause Analysis142143Ask five whys:1441. What failed? (the symptom)1452. What command produced the failure? (the trigger)1463. What changed since the last green run? (the delta)1474. Is this reproducible or a flake? (the confidence)1485. What is the minimal fix? (the prescription)149150Document the chain in the diagnostic report.151152### Step 4: Propose Fix153154Draft a fix proposal that is:155- **Reversible** (can be reverted with `git revert`)156- **Bounded** (touches only the failing component)157- **Tested** (includes how to verify the fix locally)158159Do NOT:160- Edit `.github/workflows/*.yml` directly161- Re-run CI without Arif approval162- Dismiss a security scan failure163- Suggest `npm audit fix --force` or equivalent blind upgrades164165### Step 5: Report & Escalation166167Output a diagnostic report (see format below).168169Escalation rules:170- `secret-gate` → escalate to `secret-safety-scan` skill + alert Arif171- `cross-repo-break` → escalate to `parallel-authority-detection` skill172- `config-error` touching constitutional workflow → escalate to 888_JUDGE173- All others → present fix proposal, await Arif ack174175## Forbidden Actions176177- **NEVER** re-run CI without Arif approval (masks flakes, wastes compute)178- **NEVER** edit `.github/workflows/` without 888_JUDGE179- **NEVER** dismiss a security scan failure as "false positive" without evidence180- **NEVER** propose `--force` upgrades or destructive dependency resolution181- **NEVER** commit directly to main to "fix CI quickly"182183## Output Format184185```markdown186## CI Diagnostic Report187188- **Repo:** owner/repo189- **Workflow:** name190- **Run ID:** id191- **Branch:** branch192- **Failure Class:** <class>193- **Confidence:** <high | medium | low>194- **Root Cause:** <concise explanation>195- **Last Green Run:** <run-id or unknown>196- **Delta Since Green:** <what changed>197- **Proposed Fix:** <reversible, bounded fix>198- **Local Verification:** <command to reproduce/fix locally>199- **Escalation:** <none | secret-safety-scan | parallel-authority-detection | 888_JUDGE>200```