bug-diagnosis
Skill2 starsChanged 49 days agoMITView on GitHub
Diagnoses a bug before anyone fixes it: a red loop that reproduces it, a minimal case, the cause found by elimination. Use when something is broken, throws, regressed, got slower, fails sometimes, or is reported in production.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- ericwang200608-beep/LANYANT-Skillstheir own version, first seen Nov 8, 2026
- juanitourquiza/shipframetheir own version, first seen Oct 23, 2026
- mcabreradev/hermes-sdd-agencytheir own version, first seen Oct 13, 2026
- gigio1023/agent-skillstheir own version, first seen Oct 13, 2026
- gigio1023/gigio-skillstheir own version, first seen Oct 13, 2026
- karthikrshet/aiskillstheir own version, first seen Aug 20, 2026
Used with
Projects with it also use session-handoff.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
wpankSkillsession-handoff
WHAT: Create comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves long-running agent context exhaustion problem.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- juanitourquiza/shipframe★ 4same name
- karthikrshet/aiskills★ 4same name
- ericwang200608-beep/LANYANT-Skills★ 2same name
- gigio1023/agent-skills★ 2same name
- gigio1023/gigio-skills★ 2same name
- Dizzy-Ten/skills★ 1same name
- mcabreradev/hermes-sdd-agency★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-designSkill
- agents-mdSkill
- builder-osSkill
- business-caseSkill
- delivery-disciplineSkill
- domain-modelSkill
- evidence-ledgerSkill
- gate-checksSkill
- go-to-marketSkill
- ideation-methodsSkill
- opportunity-mappingSkill
- outcome-reviewSkill
- pressure-testingSkill
- problem-framingSkill
- product-analysisSkill
- release-opsSkill
- research-methodsSkill
- spec-writingSkill
- system-designSkill
- tracking-standardsSkill
- using-builder-osSkill
- ux-architectureSkill
- wayfindingSkill
The file
Files
Bug Diagnosis
A fix proposed before the bug is reproduced is a guess with a commit attached. Diagnosis turns a report into a red loop (a fast, repeatable signal that fails on this bug and passes when it is gone), shrinks it to a minimal case, finds the cause by elimination, and makes the bug impossible to bring back unnoticed.
Mode. Standalone diagnoses, and fixes when authorized, with no lifecycle state. In the lifecycle, phase 5 calls it for a bug found while building, phase 6 for a problem after exposure, phase 7 when a watch breach looks like a defect; the fix follows phase 5's rules. Both per operating modes.
Procedure
- Build the red loop. A failing test, a script, a request, a timing with a threshold: whatever fails fastest on this bug alone. Capture it failing (
run-checkwhere commands run). For a production-only bug the loop starts as the narrowest log or trace query that shows it, and reproducing it locally is the next move; a flaky failure gets a loop that repeats until it fails and reports the rate. Done when the loop is captured red. - Shrink it. Strip data, steps, configuration and code paths while the loop stays red. Done when removing anything else turns it green: that is the minimal case, and it often names the cause.
- List the hypotheses. Up to three, ranked, each with the observation that would kill it. A recent change counts as a hypothesis with its commit named;
git bisectagainst the loop settles it mechanically. Done when each hypothesis has its killing observation written next to it. - Eliminate one at a time. Add the log line, assertion or timing that tests the top hypothesis, run the loop, cross it out or confirm it. Instrumentation observes; behavior stays as it was until the cause is known. Done when one hypothesis is confirmed by an observation and the instrumentation is removed.
- Fix where the bad value is created. The fix turns the minimal loop green with the loop untouched; then the full suite runs. Done when both are captured green.
- Close the class. The loop becomes a regression test at the module's seam. A mechanical cause (a banned call, a missing await, a forbidden import) gets the check that catches the whole class, per
delivery-discipline→ Guardrails. The trap goes intoTECH.md→ Known traps with the commit. Done when the regression test is in the suite and any new check has run once. - Say it in plain words. Four lines the owner can repeat: what broke and for whom, why, what changed, how we know it will stay fixed. In the lifecycle a production bug also goes into the release or outcome artifact of the initiative that shipped it. Done when those four lines are written.
Watch for
| Do | Instead of |
| Red loop first, then shrink | A fix read off the stack trace, where it crashed rather than where it broke |
| One hypothesis per run | Five changes at once, none attributable |
| Narrow the production signal until it reproduces, or record what is missing | Closing as "could not reproduce" |
| Fix where the bad value is born | A guard clause around the symptom |
A check that catches the class, then the trap in TECH.md | A rule about the bug in prose only |
Capabilities
| Capability | Used for | Floor if absent |
shell.exec | The loop, the tests, the instrumented build | Write the exact commands for the person and wait for their output |
repo.read | The code path, recent changes | Ask for the relevant files |
logs.query | Production errors, traces, timings around the report | Ask for the error text, time and affected account; tag it [doc:user-…] |
analytics.replay | What the user did before it broke | Ask for the steps |
db.query | The rows in the state that triggers it | Ask; read the schema from migrations |
Output Contract
## BUG DIAGNOSED with the red loop (captured failing and passing), the minimal case, the hypotheses and which one held, the fix, the regression test and any new check, and the plain-words summary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

