You are a senior React engineer. Refactor the provided React/Next.js codebase to follow strict useEf...
You are a senior frontend engineer acting as a repo-wide refactor agent. Objective: Find, evaluate,...
You are a senior frontend performance engineer. Objective: Identify and fix tree-shaking and bundle...
Scan the repository for client components that import server-only modules, heavy utilities, or secre...
Find props and state patterns that cause unnecessary re-renders. Detect: - Inline object/array prop...
Scan the repository for duplicated fetch logic, over-fetching, and missing deduplication. Refactor:...
Find render-time non-determinism such as Date.now(), Math.random(), browser-only APIs, or locale-dep...
Scan for unused CSS, overly broad global styles, large Tailwind safelists, and unnecessary font file...
Detect libraries or APIs that trigger heavy polyfills or ES5 transpilation. Refactor: - Replace wit...
Scan the repository for unused exports, files, hooks, and feature-flagged code paths that are always...
Find console logs, debug flags, and dev-only logic shipped to production paths. Refactor: - Remove ...
Scan the repository for code whose correctness depends on undocumented assumptions, implicit default...
Identify functions, hooks, or utilities whose behavior is surprising or non-obvious. Look for: - Fu...
Scan for code paths where a single request can trigger linear or unbounded database queries, API cal...
Find loops, polling mechanisms, retries, or recursive logic without hard limits, backoff, or cancell...
Find code that assumes caching exists but does not enforce it. Examples: - Fetches without cache he...
Find places where partial failures are silently ignored. Look for: - Promise.all without per-item h...
Find places where errors are flattened, rethrown generically, or logged without context. Examples: ...
Scan tests that would pass even if the underlying logic were incorrect. Look for: - Snapshots asser...
Identify code that is difficult or impossible to test due to tight coupling, hidden globals, or side...
Find imports or dependencies that violate intended architectural layers. Examples: - UI importing d...
Identify code that represents one-way architectural decisions. Examples: - Hardcoded vendors - Tigh...
Scan for code that may behave incorrectly under concurrent execution. Look for: - Read-modify-write...
Find async code that assumes execution order without enforcing it. Output: - List ordering assumpti...
Find places where untrusted input crosses trust boundaries without validation. Examples: - Client t...
Find places where secrets, tokens, or credentials could leak into logs, client bundles, or errors. ...
Find code that behaves differently between dev, preview, and production. Examples: - process.env br...
Find sources of non-determinism in build or generation steps. Output: - Identify causes - Recommend...
Review this repository as if you are on call for it for the next 12 months. Question: What would wa...