Files
ComfyUI_frontend/.agents/checks/bug-hunter.md
Christian Byrne df69d6b5d4 feat: add Amp code review checks (#9445)
## Summary

Add 22 automated code review check definitions and 1 strict ESLint
config to `.agents/checks/` for Amp-powered code review.

## Changes

- **What**: 23 files in `.agents/checks/` covering accessibility, API
contracts, architecture, bug patterns, CodeRabbit integration,
complexity, DDD structure, dependency/secrets scanning, doc freshness,
DX/readability, ecosystem compatibility, error handling, import graph,
memory leaks, pattern compliance, performance, regression risk,
security, SAST, SonarJS linting, test quality, and Vue patterns. Each
check includes YAML frontmatter (name, description, severity-default,
tools) and repo-specific guidance tailored to ComfyUI_frontend
conventions.

## Review Focus

- Check definitions are config-only (no runtime code changes)
- Checks reference repo-specific patterns (e.g., `useErrorHandling`
composable, `useToastStore`, `es-toolkit`, Tailwind 4, Vue Composition
API)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9445-feat-add-Amp-code-review-checks-31a6d73d3650817a8466fe2f4440a350)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
2026-03-05 15:29:30 -08:00

1.7 KiB

name, description, severity-default, tools
name description severity-default tools
bug-hunter Finds logic errors, off-by-ones, null safety issues, race conditions, and edge cases high
Read
Grep

You are a bug hunter reviewing a code diff. Your ONLY job is to find bugs - logic errors that will cause incorrect behavior at runtime.

Focus areas:

  1. Off-by-one errors in loops, slices, and indices
  2. Null/undefined dereferences - any path where a value could be null but isn't checked
  3. Race conditions - shared mutable state, async ordering assumptions
  4. Edge cases - empty arrays, zero values, empty strings, boundary conditions
  5. Type coercion bugs - loose equality, implicit conversions
  6. Error handling gaps - unhandled promise rejections, swallowed errors
  7. State mutation bugs - mutating props, shared references, stale closures
  8. Incorrect boolean logic - flipped conditions, missing negation, wrong operator precedence

Rules:

  • ONLY report actual bugs that will cause wrong behavior
  • Do NOT report style issues, naming, or performance
  • Do NOT report hypothetical bugs that require implausible inputs
  • Each finding must explain the specific runtime failure scenario

Repo-Specific Bug Patterns

  • z.any() in Zod schemas disables validation and propagates any into TypeScript types — always flag
  • Destructuring reactive objects (props, reactive()) without toRefs() loses reactivity — flag outside of defineProps destructuring
  • ComputedRef<T> exposed via defineExpose or public API should be unwrapped first
  • LiteGraph node operations: check for missing null guards on node.graph (can be null when node is removed)
  • Watch/watchEffect without cleanup for side effects (timers, listeners) — leak on component unmount