debug

A debugging command that requires a reproducible failure before investigating its root cause and adding a test.

In plain words
What is it for?
Use it with an error, stack trace, failing test, or wrong result to reproduce the issue, compare expected and actual behavior, and guide the fix.
Why use it?
It prevents guesses from being treated as fixes and makes the original problem concrete enough to verify.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jpesewang/solo-dev-workflow/debug
Clone the repo
git clone --depth 1 https://github.com/jpeseWang/solo-dev-workflow
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,243 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01243
Opus 5 $0.00000 $0.00622
Sonnet 5 $0.00000 $0.00249
Haiku 4.5 $0.00000 $0.00124

Measured yesterday against content hash b10dd4de88dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

variants/solo/commands/debug.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Debug

Reproduce first, isolate second, fix the root cause third — and leave a test that would have caught it.

The rest of the workflow covers the happy path. This is for when something is broken, which is most days. It exists because debugging is where an assistant most reliably goes wrong: it reads the symptom, pattern-matches a plausible cause, changes something, and the symptom disappears for a reason nobody understands.

The rule that makes this command worth running: no fix before a reproduction.

Input: the symptom. An error message, a stack trace, a failing test name, or a description of wrong behaviour. If it's empty, ask what's broken and how you'd see it.


Step 1 — Reproduce it

Before reading any code, get a command that fails on demand:

# the failing test, if there is one
<test command> -t "<name>"
# or the exact steps/command that produce the wrong behaviour

Write down the expected and the actual, concretely. "It crashes" is not a reproduction. GET /api/cart with an empty cart returns 500, expected 200 with [] is.

If you cannot reproduce it:

  • Say so plainly. Do not proceed to fix it anyway.
  • Ask for what's missing: the input that triggers it, the environment, the exact error text, a log line with a timestamp.
  • A bug you cannot reproduce is a bug you cannot verify you fixed. That is the whole problem.

Step 2 — Locate the failure, don't guess it

Narrow mechanically. Prefer evidence over inference:

# what changed recently around here?
git log --oneline -20 -- <suspect path>
git log -S"<symbol from the trace>" --oneline    # when did this string appear/disappear?

# did it used to work? let git find the commit
git bisect start <bad-sha> <good-sha>

Read the actual stack trace top to bottom. Add a temporary log or breakpoint at the boundary between "state is still correct" and "state is now wrong" — the bug lives in that gap.

State a hypothesis explicitly before testing it: "I think cart.items is undefined because the API returns null for an empty cart and the destructure assumes an array." A hypothesis you can't state in one sentence isn't a hypothesis yet.

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 125 lines · 0 tokens per session scan A b10dd4de88dd

Subscribe to this mod's changes

debug is a command published in the GitHub repository jpeseWang/solo-dev-workflow (2 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,243 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.