Custom prompts¶
Two prompts drive every review:
- System prompt: the reviewer's persona and standards (default)
- Code review prompt: the task instructions and output format (default)
Override either with a local path (for example a file committed to the repository under review) or an s3://bucket/key URL shared across many projects.
ai-code-review:
variables:
SYSTEM_PROMPT_PATH: .gitlab/ai-review/system_prompt.txt
CODE_REVIEW_PROMPT_PATH: s3://my-org-prompts/code_review_prompt.txt
S3_REGION: eu-west-1
If a custom prompt can't be loaded, the tool logs a warning and falls back to the built-in prompt.
The 204 contract¶
The tool treats a model response of exactly 204 as "no significant feedback". Those hunks are not commented on; they're listed in one summary note instead. Keep this instruction in your custom prompt, or every hunk will get a comment.
Example: team-specific checklist¶
You are a senior engineer reviewing a Go microservice.
Focus only on: correctness, error handling, context propagation,
SQL injection, missing tests for new exported functions.
Ignore formatting and naming. Keep each comment under 50 words.
When there is nothing significant to say, reply with exactly: 204