Skip to content
Agentmart
Submit a tool

talocode-bug-diagnosis

Repeatable, feedback-loop-first process for diagnosing bugs — build a tight, deterministic, red-capable signal before generating any hypotheses.

Skill by talocode

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/talocode-talocode-bug-diagnosis

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Repeatable, feedback-loop-first process for diagnosing bugs — build a tight, deterministic, red-capable signal before generating any hypotheses.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/talocode-bug-diagnosis

What's inside

Skill name
talocode-bug-diagnosis
Description
Repeatable, feedback-loop-first process for diagnosing bugs — build a tight, deterministic, red-capable signal before generating any hypotheses.
License
MIT
Instructions
117 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# talocode-bug-diagnosis

A 6-phase discipline for diagnosing hard bugs and performance regressions.

## Purpose

Provide a repeatable, feedback-loop-first process for diagnosing bugs. The core insight: build a **tight** (fast, deterministic, red-capable) signal for the bug before generating any hypotheses. Everything else follows mechanically.

## When to Use

Use this skill when:
- The user says "diagnose", "debug this", or reports something broken, throwing, failing, or slow
- Debugging a performance regression
- A bug is intermittent, hard to reproduce, or has survived initial attempts
- The codebase has no test coverage for the suspected area

## Workflow

### Phase 1 — Build a feedback loop

**This is the skill.** Everything else is mechanical. If you have a tight pass/fail signal for the bug — one that goes **red** on this bug — you will find the cause. If you don't, no amount of staring at code will save you.

Spend disproportionate effort here. Build the loop by trying these in roughly this order:

1. **Failing test** at whatever seam reaches the bug — unit, integration, e2e.
2. **Curl / HTTP script** against a running dev server.
3. **CLI invocation** with a fixture input, diffing stdout against a known-good snapshot.
4. **Headless browser script** (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network.
5. **Replay a captured trace** — save a real network request / payload / event log to disk; replay through the code path.
6. **Throwaway harness** — spin up a minimal subset of the system that exercises the bug path.
7. **Property / fuzz loop** — for "sometimes wrong output", run 1000 random inputs.
8. **Bisection harness** — automate "boot at state X, check, repeat" so you can `git bisect run`.
9. **Differential loop** — run same input through old vs new version, diff outputs.

**Tighten the loop** once you have one:
- Faster? Cache setup, skip unrelated init, narrow test scope.
- Sharper signal? Assert on the specific symptom, not "didn't crash".
- More deterministic? Pin time, seed RNG, isolate filesystem, freeze network.

**Non-deterministic bugs**: goal is not a clean repro but a higher reproduction rate. Loop the trigger 100x, parallelise, add stress, narrow timing windows.

When you genuinely cannot build a loop, stop and say so explicitly. List what you tried. Ask for: (a) access to reproducing environment, (b) a captured artifact (HAR, log dump, core dump), or (c) permission to add temporary production instrumentation.

**Completion criterion**: you can name one command (a script path, test invocation, curl) that you have already run at least once, and that is:
- Red-capable — drives the actual bug code path and asserts the user's exact symptom
- Deterministic — same verdict every run
- Fast — seconds, not minutes
- Agent-runnable — you can run it unattended

### Phase 2 — Reproduce and minimise

Run the loop. Watch it go red. Confirm the loop produces the failure mode the **user** described — not a different failure nearby. Then shrink the repro to the smallest scenario that still goes red. Cut inputs, callers, config, data, and steps one at a time, re-running the loop after each cut.

Done when every remaining element is load-bearing — removing any one makes the loop go green.

### Phase 3 — Hypothesise

Generate **3-5 ranked hypotheses** before testing any of them. Each must be falsifiable: state what prediction it makes.

Format: "If <X> is the cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."

Show the ranked list to the user before testing. They often have domain knowledge that re-ranks instantly.

### Phase 4 — Instrument

Each probe must map to a specific prediction from Phase 3. Change one variable at a time.

Tool preference:
1. Debugger / REPL inspection — one breakpoint beats ten logs.
2. Targeted logs at boundaries that distinguish hypotheses.
3. Never "log everything and grep".

Tag every debug log with a unique prefix, e.g. `[DEBUG-a4f2]`. Cleanup at the end becomes a single grep.

**Perf branch**: for performance regressions, establish a baseline measurement first (timing harness, profiler, query plan), then bisect.

### Phase 5 — Fix and regression test

Write a regression test **before the fix** — but only if there is a correct seam for it (one that exercises the real bug pattern as it occurs at the call site). If no correct seam exists, that itself is the finding — the architecture is preventing the bug from being locked down.

If a correct seam exists:
1. Turn the minimised repro into a failing test at that seam.
2. Watch it fail.
3. Apply the fix.
4. Watch it pass.
5. Re-run the Phase 1 loop against the original (un-minimised) scenario.

### Phase 6 — Cleanup and post-mortem

Before declaring done:
- [ ] Original repro no longer reproduces
- [ ] Regression test passes (or absence of seam is documented)
- [ ] All `[DEBUG-...]` instrumentation removed
- [ ] Throwaway prototypes deleted
- [ ] The correct hypothesis is stated in the commit / PR message

Then ask: what would have prevented this bug? If the answer involves architectural change, hand off to `talocode-architecture-design` with the specifics.

## Constraints

- Never skip Phase 1 — no hypothesising without a tight loop
- Tag all debug instrumentation for cleanup
- One hypothesis test at a time — change one variable
- Do not commit debug logs or throwaway code
- For non-deterministic bugs, raise reproduction rate before hypothesising
- If no loop can be built, state the blocker explicitly

## Validation Checklist

- [ ] Phase 1 loop is tight, red-capable, and agent-runnable
- [ ] Minimised repro is load-bearing
- [ ] 3-5 ranked hypotheses generated before testing
- [ ] Each probe maps to a specific prediction
- [ ] Regression test written before fix (or absence documented)
- [ ] All instrumentation removed
- [ ] Post-mortem recorded

From talocode/skills, MIT.

More from talocode/skills

Signals

Stars
0
Forks
0
Open issues
1
Last commit (this folder)
Aug 5, 2026 (2 months ago)
Last release
Jul 22, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from talocode

Cite this page

talocode-bug-diagnosis skill. Agent Mart. https://agentmart.dev/skills/talocode-talocode-bug-diagnosis (last updated 2026-10-24)