From 8e30e5e9625ef1230fbf790db478ed45a580e23a Mon Sep 17 00:00:00 2001 From: Meni Yakove Date: Tue, 25 Nov 2025 13:17:04 +0200 Subject: [PATCH 1/2] feat: add CodeRabbit AI configuration based on CLAUDE.md rules - Configure assertive review profile for strict enforcement - Enable Python linters: ruff, pylint - Enable JavaScript linter: eslint - Enable security tools: gitleaks, semgrep - Enable CI/CD validation: actionlint, hadolint - Enable YAML/shell validation: yamllint, shellcheck - Reference CLAUDE.md as authoritative code guidelines - Add path-specific coverage requirement overrides - Configure auto-review for main/master branches --- .coderabbit.yaml | 115 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 00000000..2aeae5cf --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,115 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +# CodeRabbit AI Review Instructions +# Based on project-specific rules from CLAUDE.md + +# Language for reviews +language: en-US + +# Review tone and communication style (max 250 chars) +tone_instructions: "Be direct and specific. Explain WHY rules exist. Provide code examples. Distinguish critical violations from suggestions. Use severity levels: CRITICAL (blocking/security), HIGH (types/defensive), MEDIUM (style), LOW (suggestions)." + +# Enable early access features +early_access: true + +reviews: + # Review profile: assertive for strict enforcement + profile: assertive + + # Request changes for critical violations + request_changes_workflow: true + + # Review display settings + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: false + + # Auto-review configuration + auto_review: + enabled: true + drafts: false + base_branches: + - main + - master + + # Enable relevant tools for Python/JavaScript project + tools: + # Python linting + ruff: + enabled: true + pylint: + enabled: true + + # JavaScript linting + eslint: + enabled: true + + # Shell script checking + shellcheck: + enabled: true + + # YAML validation + yamllint: + enabled: true + + # Security scanning + gitleaks: + enabled: true + semgrep: + enabled: true + + # GitHub Actions workflow validation + actionlint: + enabled: true + + # Dockerfile linting + hadolint: + enabled: true + + # Path-specific overrides (CLAUDE.md contains main rules - only add path-specific context here) + path_instructions: + # Test files - coverage requirement + - path: "webhook_server/tests/**/*.py" + instructions: | + ADDITIONAL to CLAUDE.md rules: + - 90% coverage is mandatory for all new code + - All test functions must have descriptive names + + # Migration files - coverage exception + - path: "webhook_server/migrations/**/*.py" + instructions: | + OVERRIDE CLAUDE.md coverage requirement: + - Low coverage acceptable for Alembic migration code + - This is infrastructure code with different patterns + + # Frontend JavaScript - coverage exception + - path: "webhook_server/web/static/**/*.js" + instructions: | + OVERRIDE CLAUDE.md coverage requirement: + - Lower coverage acceptable for complex chart rendering code + - Focus remains on defensive programming for edge cases + +# Knowledge base configuration +knowledge_base: + # Enable code guidelines enforcement from CLAUDE.md + code_guidelines: + enabled: true + filePatterns: + - "CLAUDE.md" + - "**/CLAUDE.md" + + # Enable learning from repository patterns + learnings: + scope: auto + + # Enable learning from issues + issues: + scope: auto + + # Enable learning from pull requests + pull_requests: + scope: auto + +# Chat settings +chat: + auto_reply: true From 04ac3d767bef41280dae3da251fa33bead20a7d5 Mon Sep 17 00:00:00 2001 From: Meni Yakove Date: Tue, 25 Nov 2025 14:28:59 +0200 Subject: [PATCH 2/2] fix: remove folder specific instractions --- .coderabbit.yaml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 2aeae5cf..f6e32ce3 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -30,7 +30,6 @@ reviews: drafts: false base_branches: - main - - master # Enable relevant tools for Python/JavaScript project tools: @@ -66,29 +65,6 @@ reviews: hadolint: enabled: true - # Path-specific overrides (CLAUDE.md contains main rules - only add path-specific context here) - path_instructions: - # Test files - coverage requirement - - path: "webhook_server/tests/**/*.py" - instructions: | - ADDITIONAL to CLAUDE.md rules: - - 90% coverage is mandatory for all new code - - All test functions must have descriptive names - - # Migration files - coverage exception - - path: "webhook_server/migrations/**/*.py" - instructions: | - OVERRIDE CLAUDE.md coverage requirement: - - Low coverage acceptable for Alembic migration code - - This is infrastructure code with different patterns - - # Frontend JavaScript - coverage exception - - path: "webhook_server/web/static/**/*.js" - instructions: | - OVERRIDE CLAUDE.md coverage requirement: - - Lower coverage acceptable for complex chart rendering code - - Focus remains on defensive programming for edge cases - # Knowledge base configuration knowledge_base: # Enable code guidelines enforcement from CLAUDE.md @@ -96,7 +72,6 @@ knowledge_base: enabled: true filePatterns: - "CLAUDE.md" - - "**/CLAUDE.md" # Enable learning from repository patterns learnings: