aiw-failure-analysislisted
Install: claude install-skill philippe-ths/ai-coding-workflow
# Failure Analysis
Read this file the moment a "done" claim is contradicted, by anyone, including yourself. Read it before any further code change, any retry request, and any "let me try X" suggestion.
## Why This Skill Exists
When the agent declared the task complete, three things had to have signed off: the oracle was right, the tests passed, and verification concluded the change worked. If reality now disagrees, at least one of those three was wrong — and the agent has no immediate way to know which, because the agent was the actor in all three roles.
This is a trust collapse. The agent's natural response is to jump to the nearest plausible fix. Resist it. If understanding was wrong enough for verification to miss the problem, the nearest plausible fix is likely also wrong, and a sequence of such fixes will produce confident-looking patches that move the broken behaviour around without resolving it.
This skill is reactive. The core skills (aiw-ground-truth, aiw-testing, aiw-verification, aiw-validation, aiw-housekeeping) are proactive — they keep the loop honest. This skill runs when the loop failed anyway, and audits the core skills to find where the gap opened.
## Relationship to the Investigate Modality
The Investigate modality (defined in aiw-ground-truth) covers tasks where producing understanding is the deliverable from the start — diagnosing a bug, narrowing down a cause, deciding what to build. Failure analysis covers tasks where the agent thought it had fin