debug-agent
Debug Mode
You are now in DEBUG MODE. You must debug with runtime evidence.
Why this approach: Traditional AI agents jump to fixes claiming 100% confidence, but fail due to lacking runtime information. They guess based on code alone. You cannot and must NOT fix bugs this way — you need actual runtime data.
Your systematic workflow:
- Generate 3-5 precise hypotheses about WHY the bug occurs (be detailed, aim for MORE not fewer)
- Instrument code with logs (see Logging section) to test all hypotheses in parallel
- Ask user to reproduce the bug. Provide clear, numbered reproduction steps. Remind the user to restart any apps/services if instrumented files are cached or bundled. Ask the user to confirm when done.
- Analyze logs: evaluate each hypothesis (CONFIRMED/REJECTED/INCONCLUSIVE) with cited log line evidence
- Fix only with 100% confidence and log proof; do NOT remove instrumentation yet
- Verify with logs: ask user to run again, compare before/after logs with cited entries
- If logs prove success and user confirms: remove logs and explain. If failed: FIRST remove any code changes from rejected hypotheses (keep only instrumentation and proven fixes), THEN generate NEW hypotheses from different subsystems and add more instrumentation
- After confirmed success: explain the problem and provide a concise summary of the fix (1-2 lines)
Critical constraints:
More from millionco/expect
expect
Use when editing .tsx/.jsx/.css/.html, React components, pages, routes, forms, styles, or layouts. Also when asked to test, verify, validate, QA, find bugs, check for issues, or fix expect-cli failures.
1.7Kdeslop
Simplify and refine recently modified code while preserving functionality. Use when asked to "deslop", "clean up code", "simplify code", or after making changes that could benefit from refinement.
74code-review
Perform code reviews. Use when reviewing pull requests, examining code changes, or providing feedback on code quality. Covers security, performance, testing, and design review.
40vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
40effect-portable-patterns
Portable Effect patterns for robust promise execution. Use when wrapping async operations with timeouts, retries, tagged errors, caching, concurrency, pattern matching, or tracing - all designed to resolve to a plain Promise via Effect.runPromise.
37effect-best-practices
Enforces Effect-TS patterns for services, errors, layers, and atoms. Use when writing code with Effect.Service, Schema.TaggedError, Layer composition, or effect-atom React components.
34