AI tool

AI Code Review & Error Analysis Prompt Generator

Collect the environment, expected behavior, symptoms, and constraints an AI needs to help review code.

This builds an analysis prompt; it does not run code or diagnose the error.

Analysis typeGive the AI evidence, environment, and a precise output checklist.
Code analysis prompt

Show what changed for a specific input

  1. Set the task and environment

    Choose Error, Review, Refactor, or Performance, then enter the language and versions. Environment details help avoid assumptions about how code behaves.

  2. Separate expected and actual behavior

    Describe the intended result and symptom separately. Add minimal code, the full error, and constraints such as keeping the public API unchanged.

  3. Request evidence and verification

    The prompt asks for evidence, confirmed findings versus hypotheses, a minimal fix, side effects, and focused tests. Remove secrets before sharing code or logs elsewhere.

Explain a missing-filter failure

Start with
Java 21 · Spring Boot 3 · expected: return a list · actual: NullPointerException when filter is omitted · constraint: keep public API
Check the result
The prompt separates environment, behavior, code, and constraints, then requests an evidence-based cause and tests.

Code or an error message is required. Generating the prompt does not confirm or fix a null-handling bug.