From 92af49680ac61f5d64fa6eaff923395b4002be7b Mon Sep 17 00:00:00 2001 From: Alejandro Rizzo Date: Wed, 18 Feb 2026 15:01:17 +0000 Subject: [PATCH 1/5] doc: add how to set up instructions --- docs/codacy-ai/codacy-ai.md | 32 +++++++++++++++++++ .../integrations/github-integration.md | 3 ++ 2 files changed, 35 insertions(+) diff --git a/docs/codacy-ai/codacy-ai.md b/docs/codacy-ai/codacy-ai.md index b169aea34f..bd2fb69d71 100644 --- a/docs/codacy-ai/codacy-ai.md +++ b/docs/codacy-ai/codacy-ai.md @@ -80,6 +80,38 @@ More details about [AI Reviewer here →](../repositories-configure/integrations 4. Save your changes. Once enabled, Codacy will start adding a Summary to your pull requests based on the AI-enriched reviews. 5. To request a PR Review from codacy, add a **`codacy-review`** label to your Pull Request. Codacy listens to the event and will publish the review as soon as it's ready. +#### Custom Instructions + +To improve the results of the AI Reviewer, you can provide custom instructions to the AI Reviewer. These instructions are specific to a repository and help the AI Reviewer understand the structure of the code, the business logic of the project, and your own preferences. + +These instructions are specified in a `review.md` file in the `.codacy/instructions` directory of your repository. + +You can kickstart this instructions file asking your AI coding agent of choice to summarize the project and the codebase. Here is an example prompt: + +``` +Analyze this repository and generate a concise AI PR reviewer instruction file in Markdown. + +The file should give a PR reviewer the essential context that won't be visible in a diff. Cover: + +- **Purpose**: What this repo does in 1-2 sentences. +- **Architecture**: High-level structure, patterns used (e.g. MVC, event-driven, monorepo, etc.). +- **Folder structure**: Key directories and what lives in each. Skip obvious ones. +- **Stack**: Languages, frameworks, major libraries, and their roles. +- **Testing**: Framework used, where tests live, what's expected to be tested. +- **Code style & conventions**: Naming, file organization, formatting tools, any patterns enforced. +- **PR-specific rules**: Branch strategy, what a PR should/shouldn't include, migration rules, etc. +- **Common pitfalls**: Things reviewers should flag — anti-patterns, known gotchas, areas that break easily. +- **Out of scope**: Anything reviewers should explicitly ignore or not enforce. + +Rules for the output: +- Output only the Markdown content, no preamble or explanation. +- Be concise. Every line should earn its place — no filler. +- Use short sections with bullet points. Avoid long prose. +- If something is not applicable or not inferable, omit the section entirely. +``` + + + **Notes** - Codacy does not use your code, repository contents, or comments to train external AI models. No customer code or review text is incorporated into model training. diff --git a/docs/repositories-configure/integrations/github-integration.md b/docs/repositories-configure/integrations/github-integration.md index 9f673219d3..2526c8eaca 100644 --- a/docs/repositories-configure/integrations/github-integration.md +++ b/docs/repositories-configure/integrations/github-integration.md @@ -41,6 +41,9 @@ The AI Reviewer combines the reliability of deterministic, rule-based static cod It provides feedback on missing or weak tests, complex or duplicated code, and keeps security concerns up to date. Beyond that, it adds contextual insights about whether the changes follow the requirements, business rules, and logic used in the project. +!!! tip + Improve the AI Reviewer results by providing custom instructions to the AI Reviewer. [Learn how to do it here →](../../codacy-ai/codacy-ai.md#custom-instructions). + This setting can be enabled at a repository or organization level. Once enabled, Codacy will start adding a Summary to your pull requests based on the AI-enriched reviews. To request a PR Review from Codacy, add a **`codacy-review`** label to your Pull Request. Codacy listens to the event and will publish the review as soon as it's ready. From 8ac5b488adc738a5a31580495924e3f5fd32ab53 Mon Sep 17 00:00:00 2001 From: Alejandro Rizzo Date: Wed, 18 Feb 2026 15:10:48 +0000 Subject: [PATCH 2/5] specify language in snippet --- docs/codacy-ai/codacy-ai.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codacy-ai/codacy-ai.md b/docs/codacy-ai/codacy-ai.md index bd2fb69d71..30394b1de0 100644 --- a/docs/codacy-ai/codacy-ai.md +++ b/docs/codacy-ai/codacy-ai.md @@ -88,7 +88,7 @@ These instructions are specified in a `review.md` file in the `.codacy/instructi You can kickstart this instructions file asking your AI coding agent of choice to summarize the project and the codebase. Here is an example prompt: -``` +```markdown Analyze this repository and generate a concise AI PR reviewer instruction file in Markdown. The file should give a PR reviewer the essential context that won't be visible in a diff. Cover: From 02fea5af1597e14ad3c011ba0d6fd39a633b56df Mon Sep 17 00:00:00 2001 From: Alejandro Rizzo Date: Thu, 19 Feb 2026 10:43:52 +0000 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/codacy-ai/codacy-ai.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codacy-ai/codacy-ai.md b/docs/codacy-ai/codacy-ai.md index 30394b1de0..4ace36f18e 100644 --- a/docs/codacy-ai/codacy-ai.md +++ b/docs/codacy-ai/codacy-ai.md @@ -78,7 +78,7 @@ More details about [AI Reviewer here →](../repositories-configure/integrations 2. Navigate to the "Integrations" or "AI features" section (depending on your Codacy plan and UI version). 3. Find "AI Reviewer", under "Status checks", and toggle the feature to "On" for the repository or organization scope you want to enable. 4. Save your changes. Once enabled, Codacy will start adding a Summary to your pull requests based on the AI-enriched reviews. -5. To request a PR Review from codacy, add a **`codacy-review`** label to your Pull Request. Codacy listens to the event and will publish the review as soon as it's ready. +5. To request a PR Review from Codacy, add a **`codacy-review`** label to your Pull Request. Codacy listens to the event and will publish the review as soon as it's ready. #### Custom Instructions @@ -86,7 +86,7 @@ To improve the results of the AI Reviewer, you can provide custom instructions t These instructions are specified in a `review.md` file in the `.codacy/instructions` directory of your repository. -You can kickstart this instructions file asking your AI coding agent of choice to summarize the project and the codebase. Here is an example prompt: +You can kickstart this instructions file by asking your AI coding agent of choice to summarize the project and the codebase. Here is an example prompt: ```markdown Analyze this repository and generate a concise AI PR reviewer instruction file in Markdown. From a06ee91aaed4a22a0fbb85086992db733e9c47d8 Mon Sep 17 00:00:00 2001 From: Alejandro Rizzo Date: Thu, 19 Feb 2026 10:52:22 +0000 Subject: [PATCH 4/5] Apply suggestion from @codacy-production[bot] Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com> --- docs/repositories-configure/integrations/github-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repositories-configure/integrations/github-integration.md b/docs/repositories-configure/integrations/github-integration.md index 2526c8eaca..b4445f0513 100644 --- a/docs/repositories-configure/integrations/github-integration.md +++ b/docs/repositories-configure/integrations/github-integration.md @@ -42,7 +42,7 @@ The AI Reviewer combines the reliability of deterministic, rule-based static cod It provides feedback on missing or weak tests, complex or duplicated code, and keeps security concerns up to date. Beyond that, it adds contextual insights about whether the changes follow the requirements, business rules, and logic used in the project. !!! tip - Improve the AI Reviewer results by providing custom instructions to the AI Reviewer. [Learn how to do it here →](../../codacy-ai/codacy-ai.md#custom-instructions). + Improve the AI Reviewer results by providing custom instructions. [Learn how to do it here →](../../codacy-ai/codacy-ai.md#custom-instructions). This setting can be enabled at a repository or organization level. Once enabled, Codacy will start adding a Summary to your pull requests based on the AI-enriched reviews. To request a PR Review from Codacy, add a **`codacy-review`** label to your Pull Request. Codacy listens to the event and will publish the review as soon as it's ready. From f5b717b274f59d48b1c502f75892267ede8f2202 Mon Sep 17 00:00:00 2001 From: Alejandro Rizzo Date: Thu, 19 Feb 2026 16:32:45 +0000 Subject: [PATCH 5/5] Remove weird --> --- docs/codacy-ai/codacy-ai.md | 6 +++--- .../integrations/github-integration.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/codacy-ai/codacy-ai.md b/docs/codacy-ai/codacy-ai.md index 4ace36f18e..0833bf3113 100644 --- a/docs/codacy-ai/codacy-ai.md +++ b/docs/codacy-ai/codacy-ai.md @@ -14,7 +14,7 @@ _This feature leverages OpenAI models, and is strictly opt-in: it will only run AI-enhanced comments are optional, machine-generated suggestions that appear directly in pull requests and review threads. They use Codacy's AI to provide concise issue summaries, remediation suggestions, and links to relevant documentation — helping reviewers and authors quickly understand and fix problems. -More details about [AI-enhanced comments here →](../repositories-configure/integrations/github-integration.md#ai-enhanced-comments). +More details about [AI-enhanced comments here](../repositories-configure/integrations/github-integration.md#ai-enhanced-comments). **How to turn it on** @@ -47,7 +47,7 @@ _This feature leverages OpenAI models, and is strictly opt-in: you need to get i Codacy False Positive triage analyzes results on a commit basis to give you visibility into issues that may be false positives (based on their context). During triage, each issue is given a confidence score along with an explanation. When the confidence level falls below a defined threshold, the issue is then flagged as an AI false positive and surfaced for manual review. You can evaluate potential false positives during a pull request in app or on any Codacy page where issues appear. These issues can be ignored or marked as Not a false positive. -More details about [False Positives here →](../repositories/commits.md#false-positive-issues). +More details about [False Positives here](../repositories/commits.md#false-positive-issues). **How to turn it on** @@ -70,7 +70,7 @@ _This feature leverages Google Gemini models, and is strictly opt-in: it will on The AI Reviewer combines the reliability of deterministic, rule-based static code analysis with the power of AI. It draws in the necessary context from source code and PR metadata to ensure the business intent matches the technical outcome, and can catch logic gaps that conventional scanners (and human reviewers) often miss. -More details about [AI Reviewer here →](../repositories-configure/integrations/github-integration.md#ai-reviewer). +More details about [AI Reviewer here](../repositories-configure/integrations/github-integration.md#ai-reviewer). **How to turn it on** diff --git a/docs/repositories-configure/integrations/github-integration.md b/docs/repositories-configure/integrations/github-integration.md index b4445f0513..79356b7ab4 100644 --- a/docs/repositories-configure/integrations/github-integration.md +++ b/docs/repositories-configure/integrations/github-integration.md @@ -42,7 +42,7 @@ The AI Reviewer combines the reliability of deterministic, rule-based static cod It provides feedback on missing or weak tests, complex or duplicated code, and keeps security concerns up to date. Beyond that, it adds contextual insights about whether the changes follow the requirements, business rules, and logic used in the project. !!! tip - Improve the AI Reviewer results by providing custom instructions. [Learn how to do it here →](../../codacy-ai/codacy-ai.md#custom-instructions). + Improve the AI Reviewer results by providing custom instructions. [Learn how to do it here](../../codacy-ai/codacy-ai.md#custom-instructions). This setting can be enabled at a repository or organization level. Once enabled, Codacy will start adding a Summary to your pull requests based on the AI-enriched reviews. To request a PR Review from Codacy, add a **`codacy-review`** label to your Pull Request. Codacy listens to the event and will publish the review as soon as it's ready.