| name | debug-agent |
| description | Systematic evidence-based debugging using runtime logs or focused reproductions. Use when the user reports a bug, unexpected behavior, or asks to debug an issue. |
Debug Mode
Debug with evidence. For this package, prefer a failing Vitest case or a small local Node reproduction over live provider calls.
Workflow
- Generate 3-5 precise hypotheses about why the bug occurs.
- Create the smallest reproduction that can prove or reject those hypotheses.
- Instrument only if assertions are not enough. Never log API keys, prompts, authorization headers, raw publication content, or private cache paths.
- Run the reproduction and classify each hypothesis as
CONFIRMED, REJECTED, or INCONCLUSIVE with cited evidence.
- Fix only after evidence points to the cause.
- Verify with the same reproduction plus the relevant repo checks.
- Remove temporary instrumentation before finishing.
Preferred Commands
corepack yarn test -- tests/challenge.test.ts
corepack yarn type-check
If the bug needs the external debug-agent logger:
npx debug-agent --daemon
Use its returned endpoint/log path only for this debugging session. Clear that session's logs between runs and never touch logs from other sessions.
Constraints
- Do not call live moderation providers unless the user explicitly asks.
- Do not keep speculative defensive code from rejected hypotheses.
- Do not claim success without rerunning the reproduction.