mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 23:20:04 +00:00
## 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>
51 lines
1.3 KiB
Markdown
51 lines
1.3 KiB
Markdown
---
|
|
name: coderabbit
|
|
description: Runs CodeRabbit CLI for AST-aware code quality review
|
|
severity-default: medium
|
|
tools: [Bash, Read]
|
|
---
|
|
|
|
Run CodeRabbit CLI review on the current changes.
|
|
|
|
## Steps
|
|
|
|
1. Check if CodeRabbit CLI is installed:
|
|
|
|
```bash
|
|
which coderabbit
|
|
```
|
|
|
|
If not installed, skip this check and report:
|
|
"Skipped: CodeRabbit CLI not installed. Install and authenticate:
|
|
|
|
```
|
|
npm install -g coderabbit
|
|
coderabbit auth login
|
|
```
|
|
|
|
See https://docs.coderabbit.ai/guides/cli for setup."
|
|
|
|
2. Run review:
|
|
|
|
```bash
|
|
coderabbit --prompt-only --type uncommitted
|
|
```
|
|
|
|
If there are committed but unpushed changes, use `--type committed` instead.
|
|
|
|
3. Parse CodeRabbit's output. Each finding should include:
|
|
- File path and line number
|
|
- Severity mapped from CodeRabbit's own levels
|
|
- Category (logic, security, performance, style, test, architecture, dx)
|
|
- Description and suggested fix
|
|
|
|
## Rate Limiting
|
|
|
|
If a rate limit is hit, skip and note it. Prefer reading the current quota from CLI/API output rather than assuming a fixed reviews/hour limit.
|
|
|
|
## Error Handling
|
|
|
|
- Auth expired: skip and report "CodeRabbit auth expired, run: coderabbit auth login"
|
|
- CLI timeout (>120s): skip and note
|
|
- Parse error: return raw output with a warning
|