From 1a13c6e2c2e45819e04be8f79bcd4bc850fc5089 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Sat, 28 Nov 2026 11:16:27 +0000 Subject: [PATCH 1/7] add copilot instructions --- .github/README.md | 49 ++++++++++++++++++++++++++------- .github/copilot-instructions.md | 37 +++++++++++++++++++++++++ .vscode/cspell.json | 1 + .vscode/mcp.json | 8 ++++++ 4 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 .github/copilot-instructions.md create mode 100644 .vscode/mcp.json diff --git a/.github/README.md b/.github/README.md index 6f62842..5514718 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,23 +1,52 @@ -# README Template +# Coderabbit Central Configuration - +Defines standard Coderabbit configuration for 3ware repositories -[![GitHub release](https://img.shields.io/github/release/3ware/template-base?include_prereleases=&sort=semver&color=green)](https://github.com/3ware/template-base/releases/) [![issues - workflows](https://img.shields.io/github/issues/3ware/template-base)](https://github.com/3ware/template-base/issues) [![CI](https://img.shields.io/github/actions/workflow/status/3ware/template-base/pr-check.yaml?label=CI&logo=githubactions&logoColor=white)](https://github.com/3ware/template-base/actions/workflows/pr-check.yaml) +[![GitHub release](https://img.shields.io/github/release/3ware/coderabbit?include_prereleases=&sort=semver&color=green)](https://github.com/3ware/coderabbit/releases/) [![issues - workflows](https://img.shields.io/github/issues/3ware/coderabbit)](https://github.com/3ware/coderabbit/issues) [![CI](https://img.shields.io/github/actions/workflow/status/3ware/coderabbit/pr-check.yaml?label=CI&logo=githubactions&logoColor=white)](https://github.com/3ware/coderabbit/actions/workflows/pr-check.yaml) ## Configuration - +[.coderabbit.yaml](../.coderabbit.yaml) sets the org-wide defaults. Notable settings: + +| Setting | Value | Reason | +| --------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | +| `language` | `en-GB` | | +| `reviews.profile` | `chill` | Only comment on significant issues | +| `knowledge_base.code_guidelines.enabled` | `false` | Stop this repository's agent instructions applying to every repository | +| `knowledge_base.*.scope` | `global` | Share learnings, issues and PRs across the org | +| `reviews.high_level_summary` | `false` | Avoids editing the PR body, which skips workflows that ignore `edited` events. The summary appears in the walkthrough instead | +| Extras (poem, fortune, diagrams, labels, reviewers, etc.) | disabled | Reduce noise | +| `reviews.auto_review.ignore_title_keywords` | `wip`, `draft`, `chore(release):`, `ci(trunk):` | Skip non-reviewable PRs | +| `reviews.auto_review.ignore_usernames` | `3ware[bot]`, `github-actions[bot]`, `renovate[bot]` | Skip bot PRs | +| `reviews.pre_merge_checks.title` | `off` | PR titles are validated by the PR Check workflow | +| `reviews.tools` | actionlint, checkov, markdownlint, shellcheck, trufflehog, yamllint, zizmor disabled | Overlap with [Trunk](https://trunk.io) | +| `reviews.path_filters` / `path_instructions` | empty | Set these in the local repository | ## Requirements - +- The CodeRabbit GitHub App is installed on the `3ware` organisation and has access to both this repository and the repository being reviewed. +- This repository must stay named `coderabbit`. CodeRabbit looks it up by name. +- Repositories that rely on the disabled tools above should run [Trunk](https://trunk.io) instead. ## Usage - - -## Maintenance - - +Add a `.coderabbit.yaml` file to the root of your repository. As a minimum set `inheritance` to true and add `path_filters` and `path_instructions` to focus the reviews. + +> [!IMPORTANT] +> Without a local `.coderabbit.yaml`, CodeRabbit doesn't read your repository's own `.github/copilot-instructions.md` or `.github/skills//SKILL.md`. A local config with `inheritance: true` keeps the central settings. Code guidelines are disabled centrally, so also set `knowledge_base.code_guidelines.enabled: true` to have CodeRabbit read your repository's own guideline files and skills. If you already use those agent instructions, consider omitting `path_instructions`. + +```yaml +inheritance: true +knowledge_base: + code_guidelines: + enabled: true +reviews: + path_filters: + - iac/** + path_instructions: + - path: "**/*.tf" + instructions: | + Say what to check and what to flag. Concrete rules work better than general advice +``` diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..3422dd7 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,37 @@ +# CodeRabbit Central Configuration + +This repository holds the org-wide [CodeRabbit](https://coderabbit.ai) defaults for the `3ware` GitHub organisation. CodeRabbit reads `.coderabbit.yaml` from a repository named exactly `coderabbit` and applies it to every 3ware repository that has no `.coderabbit.yaml` of its own. Repositories that add their own file with `inheritance: true` merge their settings over these defaults. + +Changes here affect reviews across the whole organisation, so keep them deliberate and minimal. + +## Tech stack + +- CodeRabbit configuration in YAML - V2 schema only. CodeRabbit ignores a central file that declares `version: 3`. +- GitHub Actions, mostly calling reusable workflows from `3ware/workflows`. +- [Trunk](https://trunk.io) Code Quality (CLI 1.25.0) with plugins from `3ware/trunk-code-quality-plugins`. +- release-please (`simple` release type) for versioning and the changelog. +- Renovate, extending `local>3ware/renovate-config`. +- `gh actions-lock` for the actions lockfile. + +## Guidelines + +- Keep `reviews.path_filters` and `reviews.path_instructions` empty. Repositories set them in their own `.coderabbit.yaml`. +- Give every non-obvious setting a one-line comment saying why it is set. +- Don't enable CodeRabbit tools that overlap with Trunk (actionlint, checkov, markdownlint, shellcheck, trufflehog, yamllint, zizmor). +- Check every key against the [configuration reference](https://docs.coderabbit.ai/reference/configuration) before adding it. An invalid central file is ignored for every repository. +- Keep the Configuration table in `.github/README.md` in sync with `.coderabbit.yaml`. +- Follow `.editorconfig`: 2-space indentation, LF line endings and a final newline. +- Use British English spelling. + +## Project structure + +- `.coderabbit.yaml`: the central CodeRabbit configuration. +- `.github/README.md`: usage documentation for repositories consuming this configuration. +- `.github/renovate.json` and `.github/CODEOWNERS`: may need updating when the central configuration changes. +- Workflows, `.trunk/`, release-please files and `.vscode/` (except `mcp.json`) are standard across 3ware repositories. Leave them unchanged. + +## Resources + +- `trunk check` and `trunk fmt` lint and format changed files. +- Comment `@coderabbitai configuration` on a PR in another 3ware repository to see which configuration a review used. +- The `coderabbit-docs` MCP server (configured in `.vscode/mcp.json`) searches the CodeRabbit documentation. Use it to check configuration keys and behaviour. diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 7f000f2..df051bf 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -6,6 +6,7 @@ "words": [ "chazypro", "coderabbit", + "coderabbitai", "docstrings", "pullrequest", "shellcheck", diff --git a/.vscode/mcp.json b/.vscode/mcp.json new file mode 100644 index 0000000..182b630 --- /dev/null +++ b/.vscode/mcp.json @@ -0,0 +1,8 @@ +{ + "servers": { + "coderabbit-docs": { + "type": "http", + "url": "https://docs.coderabbit.ai/mcp" + } + } +} From 4332769bd3715149e28b429468e126553459ba00 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Sat, 28 Nov 2026 11:16:52 +0000 Subject: [PATCH 2/7] add coderabbit configuration --- .coderabbit.yaml | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..d71255f --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,86 @@ +language: en-GB + +tone_instructions: | + Provide feedback in a professional, friendly, constructive, and concise tone. + Offer clear, specific suggestions and best practices to help enhance the code + quality and promote learning. Be concise and only comment on significant issues. + +early_access: false + +knowledge_base: + # Stop this repo's agent instructions becoming review guidelines for every repo + code_guidelines: + enabled: false + # `global` uses the organization's learnings, + learnings: + scope: global + issues: + scope: global + pull_requests: + scope: global + +reviews: + profile: chill + # Disable summary in PR body – workflows that ignore `edited` events were being skipped + high_level_summary: false + # Still include the summary inside CodeRabbit’s walkthrough comment + high_level_summary_in_walkthrough: true + # Don't post review details on each review. + review_status: false + review_info: false + commit_status: false + # Ensure the walkthrough is visible now that the summary is disabled + collapse_walkthrough: false + changed_files_summary: false + sequence_diagrams: false + estimate_code_review_effort: false + related_issues: false + related_prs: false + suggested_labels: false + suggested_reviewers: false + in_progress_fortune: false + poem: false + # Define path filters and instructions in the local repository + path_filters: [] + path_instructions: [] + auto_review: + # Keywords are case-insensitive + ignore_title_keywords: + - wip + - draft + - "chore(release):" + - "ci(trunk):" + ignore_usernames: + - 3ware[bot] + - github-actions[bot] + - renovate[bot] + finishing_touches: + docstrings: + enabled: false + unit_tests: + enabled: false + pre_merge_checks: + docstrings: + mode: "off" + title: + # PR Check / Validate PR title does this to ensure conventional commit syntax + mode: "off" + tools: + # All tools are enabled by default and relevant tools are determined per project. + # Disable tools where Trunk (https://trunk.io) overlaps. + actionlint: + enabled: false + checkov: + enabled: false + markdownlint: + enabled: false + shellcheck: + enabled: false + trufflehog: + enabled: false + yamllint: + enabled: false + zizmor: + enabled: false +chat: + art: false From 93526599f97e6b3aca1acdc683c4a1ba5e59eaf2 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Sat, 28 Nov 2026 11:41:19 +0000 Subject: [PATCH 3/7] enable high-level summary in walkthrough --- .coderabbit.yaml | 5 ++--- .github/README.md | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index d71255f..9480e79 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -21,9 +21,8 @@ knowledge_base: reviews: profile: chill - # Disable summary in PR body – workflows that ignore `edited` events were being skipped - high_level_summary: false - # Still include the summary inside CodeRabbit’s walkthrough comment + high_level_summary: true + # Move the high-level summary into the walkthrough comment instead of the PR body high_level_summary_in_walkthrough: true # Don't post review details on each review. review_status: false diff --git a/.github/README.md b/.github/README.md index 5514718..db4297c 100644 --- a/.github/README.md +++ b/.github/README.md @@ -10,19 +10,19 @@ Defines standard Coderabbit configuration for 3ware repositories [.coderabbit.yaml](../.coderabbit.yaml) sets the org-wide defaults. Notable settings: -| Setting | Value | Reason | -| --------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -| `language` | `en-GB` | | -| `reviews.profile` | `chill` | Only comment on significant issues | -| `knowledge_base.code_guidelines.enabled` | `false` | Stop this repository's agent instructions applying to every repository | -| `knowledge_base.*.scope` | `global` | Share learnings, issues and PRs across the org | -| `reviews.high_level_summary` | `false` | Avoids editing the PR body, which skips workflows that ignore `edited` events. The summary appears in the walkthrough instead | -| Extras (poem, fortune, diagrams, labels, reviewers, etc.) | disabled | Reduce noise | -| `reviews.auto_review.ignore_title_keywords` | `wip`, `draft`, `chore(release):`, `ci(trunk):` | Skip non-reviewable PRs | -| `reviews.auto_review.ignore_usernames` | `3ware[bot]`, `github-actions[bot]`, `renovate[bot]` | Skip bot PRs | -| `reviews.pre_merge_checks.title` | `off` | PR titles are validated by the PR Check workflow | -| `reviews.tools` | actionlint, checkov, markdownlint, shellcheck, trufflehog, yamllint, zizmor disabled | Overlap with [Trunk](https://trunk.io) | -| `reviews.path_filters` / `path_instructions` | empty | Set these in the local repository | +| Setting | Value | Reason | +| --------------------------------------------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | +| `language` | `en-GB` | | +| `reviews.profile` | `chill` | Only comment on significant issues | +| `knowledge_base.code_guidelines.enabled` | `false` | Stop this repository's agent instructions applying to every repository | +| `knowledge_base.*.scope` | `global` | Share learnings, issues and PRs across the org | +| `reviews.high_level_summary_in_walkthrough` | `false` | Moves high level summary to the walkthrough to avoid editing the PR body, which skips workflows that ignore `edited` events. | +| Extras (poem, fortune, diagrams, labels, reviewers, etc.) | disabled | Reduce noise | +| `reviews.auto_review.ignore_title_keywords` | `wip`, `draft`, `chore(release):`, `ci(trunk):` | Skip non-reviewable PRs | +| `reviews.auto_review.ignore_usernames` | `3ware[bot]`, `github-actions[bot]`, `renovate[bot]` | Skip bot PRs | +| `reviews.pre_merge_checks.title` | `off` | PR titles are validated by the PR Check workflow | +| `reviews.tools` | actionlint, checkov, markdownlint, shellcheck, trufflehog, yamllint, zizmor disabled | Overlap with [Trunk](https://trunk.io) | +| `reviews.path_filters` / `path_instructions` | empty | Set these in the local repository | ## Requirements From eef3a87576df4415faacd7738f9b1f37fa82a961 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Sat, 28 Nov 2026 11:43:53 +0000 Subject: [PATCH 4/7] disable autofix --- .coderabbit.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 9480e79..6cc20bc 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -54,6 +54,8 @@ reviews: - github-actions[bot] - renovate[bot] finishing_touches: + autofix: + enabled: false docstrings: enabled: false unit_tests: From 0a4aab085e8c5cf77c3b28cb8d02093da47b1133 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Sat, 28 Nov 2026 13:14:41 +0000 Subject: [PATCH 5/7] add chazypro to ignore_usernames --- .coderabbit.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 6cc20bc..469301d 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -50,6 +50,7 @@ reviews: - "chore(release):" - "ci(trunk):" ignore_usernames: + - chazypro - 3ware[bot] - github-actions[bot] - renovate[bot] From 5eabb7c1adc6d98a0ca883586bd6ddc9219055a7 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Sat, 28 Nov 2026 13:37:37 +0000 Subject: [PATCH 6/7] add comments and format tone --- .coderabbit.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 469301d..9587fcb 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -1,14 +1,15 @@ language: en-GB tone_instructions: | - Provide feedback in a professional, friendly, constructive, and concise tone. + Provide feedback in a professional, friendly, constructive and concise tone. Offer clear, specific suggestions and best practices to help enhance the code - quality and promote learning. Be concise and only comment on significant issues. + quality and promote learning. + Be concise and only comment on significant issues. early_access: false knowledge_base: - # Stop this repo's agent instructions becoming review guidelines for every repo + # Stop this repo's agent instructions becoming code guidelines for every repo code_guidelines: enabled: false # `global` uses the organization's learnings, @@ -22,7 +23,7 @@ knowledge_base: reviews: profile: chill high_level_summary: true - # Move the high-level summary into the walkthrough comment instead of the PR body + # Add the high-level summary into the walkthrough instead of the PR body high_level_summary_in_walkthrough: true # Don't post review details on each review. review_status: false @@ -50,7 +51,9 @@ reviews: - "chore(release):" - "ci(trunk):" ignore_usernames: + # Reduce noise as chazypro is not currently licensed - chazypro + # Ignore bots as they perform automated tasks that do not require review - 3ware[bot] - github-actions[bot] - renovate[bot] @@ -65,10 +68,9 @@ reviews: docstrings: mode: "off" title: - # PR Check / Validate PR title does this to ensure conventional commit syntax + # PR Check does this to ensure conventional commit syntax mode: "off" tools: - # All tools are enabled by default and relevant tools are determined per project. # Disable tools where Trunk (https://trunk.io) overlaps. actionlint: enabled: false From 143be0850e8b3de68dc223ae7e7545adeadbe63b Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Sat, 28 Nov 2026 13:38:16 +0000 Subject: [PATCH 7/7] update README --- .github/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index db4297c..22fa86a 100644 --- a/.github/README.md +++ b/.github/README.md @@ -16,10 +16,9 @@ Defines standard Coderabbit configuration for 3ware repositories | `reviews.profile` | `chill` | Only comment on significant issues | | `knowledge_base.code_guidelines.enabled` | `false` | Stop this repository's agent instructions applying to every repository | | `knowledge_base.*.scope` | `global` | Share learnings, issues and PRs across the org | -| `reviews.high_level_summary_in_walkthrough` | `false` | Moves high level summary to the walkthrough to avoid editing the PR body, which skips workflows that ignore `edited` events. | +| `reviews.high_level_summary_in_walkthrough` | `true` | Moves high level summary to the walkthrough to avoid editing the PR body, which skips workflows that ignore `edited` events. | | Extras (poem, fortune, diagrams, labels, reviewers, etc.) | disabled | Reduce noise | | `reviews.auto_review.ignore_title_keywords` | `wip`, `draft`, `chore(release):`, `ci(trunk):` | Skip non-reviewable PRs | -| `reviews.auto_review.ignore_usernames` | `3ware[bot]`, `github-actions[bot]`, `renovate[bot]` | Skip bot PRs | | `reviews.pre_merge_checks.title` | `off` | PR titles are validated by the PR Check workflow | | `reviews.tools` | actionlint, checkov, markdownlint, shellcheck, trufflehog, yamllint, zizmor disabled | Overlap with [Trunk](https://trunk.io) | | `reviews.path_filters` / `path_instructions` | empty | Set these in the local repository | @@ -49,4 +48,5 @@ reviews: - path: "**/*.tf" instructions: | Say what to check and what to flag. Concrete rules work better than general advice + Consider omitting this if it overlaps with coding guidelines. ```