forked from PostHog/posthog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
228 lines (181 loc) · 11.3 KB
/
Copy path.coderabbit.yaml
File metadata and controls
228 lines (181 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
tone_instructions: >-
Be direct and concise. State the issue, impact, and fix with no preamble, praise,
or repetition. In pull request conversations, never reply with agreement alone or
restate the author's explanation. Reply only to add actionable information.
reviews:
# Surface only the highest-signal feedback.
profile: 'quiet'
# The review lands as comments only. These surfaces mirror Greptile's
# statusCheck and statusCommentsEnabled, both off, so neither bot adds a
# check the merge queue has to wait on.
review_status: false
review_progress: false
commit_status: false
poem: false
# CodeRabbit writes this summary into the pull request description by
# default, so it would edit the body the author wrote.
high_level_summary: false
# Each section below renders in the walkthrough comment, the second comment
# CodeRabbit posts on a pull request. CodeRabbit has no setting that
# suppresses that comment, so the sections are off to keep it short. The
# walkthrough prose and the merge risk line have no toggle and stay.
changed_files_summary: false
sequence_diagrams: false
estimate_code_review_effort: false
assess_linked_issues: false
related_issues: false
related_prs: false
suggested_labels: false
suggested_reviewers: false
in_progress_fortune: false
auto_review:
enabled: true
# Review the commits pushed after the first review too, so work added
# while a pull request is open is not merged unreviewed. An incremental
# review reads only the diff since the last one, so it does not repeat
# findings already handled.
auto_incremental_review: true
# Most agent-authored pull requests open as drafts, which is where the
# findings are cheapest to act on.
drafts: true
# Without this, only pull requests into the default branch are reviewed,
# so every layer of a stack above the first would be skipped.
base_branches:
- '.*'
# Content rules shared with Greptile (.greptile/config.json "instructions"), so the two reviews can be compared.
path_instructions:
- path: '**/*'
instructions: >-
Do not comment on alphabetical sorting, trailing commas, or formatting. Linters catch these.
Judge code by four simplicity rules: it passes all the tests, expresses every idea it needs
to express, says everything once and only once, and has no superfluous parts.
Prefer parameterised tests over near-duplicate test functions.
In async Python, flag blocking synchronous calls such as ORM queries, HTTP requests, file I/O, and sleep.
pre_merge_checks:
# PostHog documents selectively and does not enforce docstring coverage.
docstrings:
mode: 'off'
# PostHog already validates Conventional Commit titles in GitHub Actions.
title:
mode: 'off'
# Retain the description check as useful, non-blocking PR context.
description:
mode: 'warning'
# PostHog does not consistently link issues to PRs.
issue_assessment:
mode: 'off'
knowledge_base:
code_guidelines:
enabled: true
filePatterns:
# AGENTS.md is omitted because CodeRabbit detects it automatically.
- files: '.agents/security.md'
applyTo: '**/*'
# Comment conventions apply to every language, so the entry is repository-wide.
- files: '.agents/skills/writing-code-comments/SKILL.md'
applyTo: '**/*'
# General frontend and backend conventions.
- files: '.claude/commands/conventions.md'
applyTo: 'posthog/**,frontend/src/**,products/**'
# Test conventions. These set the bar for whether a test earns its place.
- files: '.agents/skills/writing-tests/SKILL.md'
applyTo: '**/test_*.py,**/tests/**/*.py,**/*.test.ts,**/*.test.tsx,playwright/**/*.ts'
# Voice and word choices for text a person reads.
- files: '.agents/skills/writing-user-facing-copy/SKILL.md'
applyTo: 'frontend/src/**,products/**/frontend/**,posthog/templates/**'
# Python dataclass house rules.
- files: '.agents/skills/writing-dataclasses/SKILL.md'
applyTo: '**/*.py'
# Person-data access rules.
- files: 'docs/internal/person-data-access.md'
applyTo: 'posthog/**/*.py,products/**/backend/**/*.py'
# Activity logging conventions and implementation requirements.
- files: 'docs/internal/activity-logging.md,.agents/skills/adding-activity-logging/SKILL.md'
applyTo: 'posthog/models/activity_logging/**,products/**/backend/activity_logging.py,products/**/frontend/activityDescriber.tsx,frontend/src/lib/components/ActivityLog/**'
# Generated API and frontend types.
- files: 'docs/published/handbook/engineering/type-system.md,.agents/skills/adopting-generated-api-types/SKILL.md'
applyTo: 'posthog/api/**,frontend/src/**,products/**/backend/**,products/**/frontend/**'
# MCP implementation.
- files: 'docs/published/handbook/engineering/ai/implementing-mcp-tools.md,.agents/skills/implementing-mcp-tools/SKILL.md,.agents/skills/implementing-mcp-ui-apps/SKILL.md'
applyTo: 'services/mcp/**,products/**/mcp/**'
# Django migrations.
- files: 'docs/published/handbook/engineering/safe-django-migrations.md,docs/published/handbook/engineering/databases/async-migrations.md,docs/published/handbook/engineering/databases/schema-changes.md,.agents/skills/django-migrations/SKILL.md'
applyTo: '**/migrations/**/*.py'
# ClickHouse migrations.
- files: 'posthog/clickhouse/migrations/README.md,docs/published/handbook/engineering/databases/clickhouse-event-table-migrations.md,.agents/skills/clickhouse-migrations/SKILL.md'
applyTo: 'posthog/clickhouse/migrations/**'
# ClickHouse and HogQL query writing.
- files: '.agents/skills/writing-clickhouse-queries/SKILL.md'
applyTo: 'posthog/hogql/**,posthog/hogql_queries/**'
# Frontend implementation conventions.
- files: '.agents/skills/writing-kea-logics/SKILL.md,.agents/skills/writing-ui-components/SKILL.md,.agents/skills/using-kea-disposables/SKILL.md,.agents/skills/placing-product-frontend-code/SKILL.md'
applyTo: 'frontend/src/**,products/**/frontend/**'
# Feature flags in Storybook stories.
- files: '.agents/skills/setting-feature-flags-in-storybook/SKILL.md'
applyTo: '**/*.stories.tsx'
# The taxonomic filter, which is easy to break from the outside.
- files: '.agents/skills/modifying-taxonomic-filter/SKILL.md'
applyTo: 'frontend/src/lib/components/TaxonomicFilter/**'
# Django REST Framework endpoints.
- files: '.agents/skills/improving-drf-endpoints/SKILL.md'
applyTo: 'posthog/api/**,products/**/backend/**/api.py,products/**/backend/api/**'
# In-app notifications sent from backend code.
- files: '.agents/skills/sending-notifications/SKILL.md'
applyTo: 'posthog/**/*.py,products/**/backend/**/*.py'
# The personhog coordination protocol, where a mistake is hard to see.
- files: '.agents/skills/reviewing-personhog-protocol/SKILL.md,.agents/skills/adding-personhog-rpc/SKILL.md'
applyTo: 'posthog/personhog_client/**,rust/personhog-coordination/**,rust/personhog-test-harness/**'
- files: '.agents/skills/working-with-charts/SKILL.md,packages/quill/packages/charts/src/docs/**/*.md'
applyTo: 'packages/quill/packages/charts/**'
- files: '.agents/skills/posthog-desktop/SKILL.md,products/desktop/.claude/skills/storybook-stories/SKILL.md,products/desktop/docs/ARCHITECTURE.md,products/desktop/docs/CONVENTIONS.md,products/desktop/docs/TESTING.md'
applyTo: 'products/desktop/**'
# Product-specific implementation guidance.
- files: 'products/conversations/skills/organizing-conversations-code/SKILL.md'
applyTo: 'products/conversations/**/*'
- files: 'products/endpoints/skills/auditing-endpoints/SKILL.md,products/endpoints/skills/consuming-endpoints-from-client-code/SKILL.md,products/endpoints/skills/copying-endpoints-across-projects/SKILL.md,products/endpoints/skills/creating-an-endpoint/SKILL.md,products/endpoints/skills/managing-endpoint-versions/SKILL.md'
applyTo: 'products/endpoints/**/*'
# GitHub Actions. A workflow edit reaches every open pull request at once.
- files: '.agents/skills/authoring-ci-workflows/SKILL.md,.agents/skills/gating-production-deploys/SKILL.md'
applyTo: '.github/workflows/**,.github/actions/**'
# Eval suites, cases, scorers, and harness code.
- files: '.agents/skills/writing-evals/SKILL.md'
applyTo: 'products/posthog_ai/evals/**,products/**/evals/**,ee/hogai/eval/**'
# Skill authoring.
- files: '.agents/skills/writing-skills/SKILL.md'
applyTo: '**/skills/**/SKILL.md'
# Architecture and design documents, wherever they live. Each one applies
# to its own directory and below, so the scope follows the document.
- '**/ARCHITECTURE.md'
- '**/DESIGN.md'
# Contribution guides that carry review criteria rather than onboarding
# or release steps. The repository root guide is left out on purpose:
# it would apply to every file.
- 'common/hogql_parser/CONTRIBUTING.md'
- 'frontend/src/scenes/surveys/CONTRIBUTING.md'
- 'products/dashboards/CONTRIBUTING.md'
- 'products/workflows/CONTRIBUTING.md'
- 'services/mcp/CONTRIBUTING.md'
# Product and service architecture.
- 'products/README.md'
- 'products/architecture.md'
- 'services/llm-gateway/PARITY.md'
# Backend, data, API, and protocol contracts.
- 'posthog/clickhouse/hcl/README.md'
- 'posthog/hogql/ACCESS_CONTROL.md'
- 'posthog/models/scoping/README.md'
- 'posthog/models/team/README.md'
- 'posthog/schema_migrations/README.md'
- 'posthog/personhog_client/README.md'
- 'posthog/egress/README.md'
- 'proto/README.md'
- 'products/data_warehouse/backend/presentation/README.md'
- 'products/warehouse_sources/backend/temporal/data_imports/sources/README.md'
- 'products/revenue_analytics/backend/views/README.md'
# Service implementation guides stored below docs directories.
- files: 'services/agent-proxy/docs/SECURITY.md'
applyTo: 'services/agent-proxy/**/*'
- 'services/llm-gateway/README.md'
- 'services/mcp/src/tools/README.md'
- 'products/mcp_store/README.md'
- 'services/oauth-proxy/README.md'