/fde-operate:ci-forensicsfrom fde-operate
Diagnoses CI pipeline failures by classifying them as genuine break, flake, environment drift, ordering dependency, or resource contention before attempting fixes. Use when builds fail, tests pass locally but not in CI, suites are intermittently red, pipelines are too slow, or 'just re-run it' has become normal.
Ships in fde-operate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Getting the pipeline back to meaning something.
A flaky pipeline is worse than no pipeline. Once "just re-run it" becomes the standard response to a red build, the suite has stopped being a signal — and the genuine failure it eventually catches gets re-run away like all the others.
Teams reach this state gradually and rarely climb out, because each individual re-run is cheaper than each individual investigation. The economics only look right locally.
An FDE lands in this often, and has a specific advantage: no accumulated tolerance for it. You haven't learned which failures to ignore, which means you notice that the team has learned to ignore them.
The main discipline is diagnosing the class of failure before fixing anything. The classes look identical from the outside — a red build — and have completely different causes and fixes.
incident-triageResolve <workspace> before reading or writing artifacts: use FDE_WORKSPACE if set (report an unavailable explicit path rather than falling back), otherwise the charter's recorded Location (look in .fde/ and ../*-fde/), then an existing .fde/ or ../<repo>-fde/. If none exists, run core fde-orient; do not create a second workspace. All artifact paths below use that location. Follow core workspace conventions for headers; preserve existing sections when appending.
<workspace>/01-environment.md — a working local build, so you can compare against CIFive classes. They present identically and have nothing else in common.
| Class | Signature | Fix direction |
|---|---|---|
| Genuine break | Fails consistently, same point, correlates with a change | Fix the code |
| Flake | Same commit passes and fails | Find the nondeterminism |
| Environment drift | Passes locally, fails in CI; or worked last week | Align the environments |
| Ordering dependency | Fails only in some run orders or in parallel | Isolate the shared state |
| Resource contention | Fails under load; timeouts; more common on busy days | Resource limits |
The distinguishing question for a flake: does the same commit both pass and fail? That's the definitive test, and it's usually answerable from build history in a minute.
# Re-run the same commit a few times — flakes surface fast
for i in 1 2 3 4 5; do <test command> >/dev/null 2>&1 && echo "$i pass" || echo "$i FAIL"; done
The most informative source, and routinely skipped in favour of staring at one log.
Where it passes locally and fails in CI, something differs. It's almost always in this list:
fde-core _shared/stack-detection.md. Do not conclude a pin is missing from dedicated files alone.CThat last one catches people constantly: a stale artifact locally makes a broken build pass on your machine.
Flakes come from a short list. Work through it:
now(), timeouts too tight for a loaded agent, dates crossing midnight or DSTThe strongest signal for order dependence is a test that passes alone and fails in the suite. Bisect the suite to find the pair.
Both are legitimate. Conflating them is not.
Where you take the stopgap, record it with an owner and a date. A quarantined test with no removal plan is a permanently reduced test suite, and after enough of them the pipeline is green because it stopped checking.
Never add a blanket retry to make a suite green. It converts a visible flake into an invisible one and destroys the pipeline's value as a signal — the exact failure this skill exists to reverse.
Stop when the failure is classified, one class has been treated (fixed or a dated quarantine), and the verification impact is written. A flaky estate can absorb a week; this skill does not.
A pipeline slow enough that people avoid running it has the same effect as an unreliable one.
Find where the time goes — most suites have a small number of dominant contributors. Common wins: parallelize independent tests, cache dependencies, and split fast checks from slower integration checks so feedback arrives early. Replace uncontrolled external calls in unit tests with fakes while preserving dedicated integration coverage and required release gates. Do not delete coverage to improve timing.
Establish what feedback time the team actually needs, and optimize toward that rather than toward an abstract "faster."
If the suite is quarantined heavily, or the flake rate is 30%, that is a verification finding and it belongs in verification-plan and release-readiness. A green build from an untrustworthy pipeline is not evidence, and reporting it as evidence is how a bad change ships with a passing build behind it.
Write to <workspace>/07b-ci-notes.md:
# CI forensics
**Engagement:** <name> · **Author:** FDE · **Date:** <YYYY-MM-DD>
**Pipeline:** <name> · **Observation window:** <n> builds, <dates>
**Status:** draft
**Source revision:** <repo>@<short SHA>, or "no repository yet"
**Confidence:** <what is confirmed, inferred, or unverified>
## State
- **Pass rate:** 61% on unchanged commits — **suite is not trustworthy**
- **Median duration:** 34 min · **Team's needed feedback time:** < 10 min
- **Quarantined tests:** 7, oldest quarantined 14 months ago
## Failures by class
| Class | Count | Examples | Status |
|---|---|---|---|
| Flake | 12 | `OrderSyncTest` — order dependence | 4 fixed, 8 open |
| Environment drift | 1 | Agent had Java 17, build needs 21 | fixed — pinned in CI config |
| Ordering | 3 | Shared static cache not reset | fixed |
| Resource contention | 2 | Timeouts on busy agents | mitigated — timeout raised |
| Genuine | 1 | Real null-handling regression | fixed |
## Root causes
| # | Cause | Tests affected | Fix | Done |
|---|---|---|---|---|
| 1 | Static `OrderCache` not reset between tests | 3 | Reset in teardown | ✅ |
| 2 | `PaymentTest` calls a real sandbox API | 1 | Replaced with a fake | ✅ |
| 3 | Unseeded random in fixture builder | 2 | Seeded | ✅ |
## Stopgaps in place
| What | Why | Owner | Remove by |
|---|---|---|---|
| `ReconciliationTest` quarantined | Order-dependent, needs restructure | <name> | <date> |
## Verification impact
Before this work the suite could not be used as release evidence (61% pass on unchanged
commits). Now at 97%. The 7 quarantined tests mean **reconciliation logic is not covered**
by CI — recorded as a gap in `07-verification.md`.
Fixing before classifying. Five classes, identical symptoms, unrelated fixes.
Staring at one log instead of reading history. History tells you when it started and how often.
Blanket retries. Converts a visible flake into an invisible one and finishes off the pipeline's value.
Quarantining with no owner or date. A permanently reduced suite that's green because it stopped checking.
Not saying which mode you're in. Green-now and right are both legitimate; conflating them isn't.
Ignoring slowness. A suite people avoid has the same effect as one they don't trust.
Treating every network test as a defect. Uncontrolled external calls in unit tests need isolation; intentional integration and contract tests still protect real boundaries and must retain their coverage.
Treating a green build from an untrusted pipeline as evidence. It isn't, and release-readiness needs to know.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rpraharaj/forward-deployed-engineer --plugin fde-operate3 skills in this plugin
/observability-gapAsk whether a failure could have been seen, then close the gaps - missing logs, metrics, traces, and alerts - so the next incident is cheaper to diagnose. Use after any incident where the answer was hard to find, before shipping anything whose failure would be silent, when a change has no way to be detected going wrong, or when diagnosis required guessing. The compounding skill: each pass makes every future incident shorter, and silent failures are the ones worth spending on./post-deploy-watchDefine and execute the observation window after a release - smoke checks, the specific metrics that would show this change broke something, how long to watch, and pre-agreed rollback triggers - converting "seems fine" into a recorded verification. Use immediately after any non-routine deploy, during a staged or percentage rollout, or when a change shipped with unverified items that were accepted as residual risk. A deploy is not done when the pipeline goes green; it is done when the observation window closes without incident.Other plugins' skills for the same job