Skip to content

Commit 7660b72

Browse files
authored
Merge pull request #56 from bluewave-labs/copilot/fix-ab7992c1-f004-4744-bb6d-5ad135759474
docs: align Development Guide with current repo structure
2 parents 04fc82f + 0f2f252 commit 7660b72

File tree

2 files changed

+217
-462
lines changed

2 files changed

+217
-462
lines changed

.coderabbit.yaml

Lines changed: 112 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,161 @@
1+
# yaml-language-server: $schema=https://storage.googleapis.com/coderabbit_public_assets/schema.v2.json
2+
13
language: en-US
4+
early_access: false
5+
enable_free_tier: true
26

37
reviews:
48
# Tone & automation
59
profile: assertive
610
auto_review:
711
base_branches:
8-
- "dev"
12+
- 'dev'
13+
- 'master'
914
enabled: true
1015
drafts: false
11-
16+
1217
# Reviewers & labels
1318
suggested_reviewers: true
1419
auto_assign_reviewers: true
1520
suggested_labels: true
1621
auto_apply_labels: true
1722

23+
# Status handling
24+
fail_commit_status: true
25+
26+
# Additional review features
27+
high_level_summary: true
28+
changed_files_summary: true
29+
sequence_diagrams: true
30+
1831
# Focus CR on the meaningful parts of the repo
1932
path_filters:
20-
- "src/**"
21-
- "prisma/**"
22-
- "docker/**"
23-
- "scripts/**"
24-
- "docs/**"
25-
- "README.md"
26-
- "!public/assets/**"
27-
- "!.next/**"
28-
- "!**/*.tsbuildinfo"
33+
- 'src/**'
34+
- 'prisma/**'
35+
- 'docker/**'
36+
- 'scripts/**'
37+
- 'docs/**'
38+
- 'README.md'
39+
- '!public/assets/**'
40+
- '!.next/**'
41+
- '!**/*.tsbuildinfo'
2942

3043
# Apply house rules per area
3144
path_instructions:
32-
- path: "src/app/(server)/api/**/route.ts"
45+
- path: 'src/app/[(]server[)]/api/**/route.ts'
3346
instructions: >
3447
Keep route handlers thin: validate with Zod (shared schemas), call a Service,
3548
then return a typed response. Do NOT import prisma/redis or perform business logic here.
36-
- path: "src/app/(server)/services/**"
49+
Example: parse with a schema from src/lib/validation/** and call a function in
50+
src/app/(server)/services/** that returns typed data.
51+
- path: 'src/app/[(]server[)]/services/**'
3752
instructions: >
3853
All business logic lives here. No Request/Response/cookies; accept plain inputs
3954
and return typed results. Reuse shared types and Zod schemas from src/lib/validation/**.
40-
- path: "src/lib/validation/**"
55+
Keep services framework-agnostic and unit-testable.
56+
- path: 'src/lib/validation/**'
4157
instructions: >
4258
Define Zod schemas and infer types via z.infer. Avoid duplicate shapes; export
43-
schemas for reuse in Services and API routes.
44-
- path: "src/app/(client)/**"
59+
schemas for reuse in Services and API routes. Co-locate schema files by domain.
60+
- path: 'src/app/[(]client[)]/**'
4561
instructions: >
4662
Use TanStack Query hooks for server data (no inline fetches in components).
47-
Keep components presentational; Tailwind-first styling.
48-
- path: "prisma/**"
63+
Import query keys from src/lib/queryKeys.ts (canonical). Keep components presentational;
64+
Tailwind-first styling. Example: import { keys } from 'src/lib/queryKeys' and call
65+
a typed hook rather than fetch in the component.
66+
- path: 'src/shadcn-ui/**'
67+
instructions: >
68+
Generated shadcn primitives. Do not modify these files. Create wrapper or
69+
derivative components under src/app/(client)/components/** and compose from
70+
the shadcn primitives instead.
71+
- path: 'prisma/**'
4972
instructions: >
5073
If schema changes, include proper Prisma migration(s) and update seed/types.
5174
Avoid schema edits without migrations.
52-
- path: "scripts/**"
75+
- path: 'src/db/prisma.ts'
76+
instructions: >
77+
Prisma client must be a singleton and server-only. Do not import in client code.
78+
- path: 'scripts/**'
5379
instructions: >
5480
Tooling only (env/db/ops). No app business logic.
55-
- path: "docker/**"
81+
- path: 'src/lib/queryKeys.ts'
82+
instructions: >
83+
Canonical source for TanStack Query keys. Add new keys here and import
84+
from this module across the client instead of ad-hoc arrays.
85+
- path: 'docker/**'
5686
instructions: >
5787
Ensure env parity with env/.env.example. Prefer minimal, portable changes.
58-
- path: "docs/**"
88+
- path: 'docs/**'
5989
instructions: >
6090
Keep Development Guide aligned with current directory structure and conventions.
6191
Update docs when APIs/routes/schemas change.
62-
- path: "src/shadcn-ui/**"
63-
instructions: >
64-
Generated shadcn primitives. Do not modify these files. Create wrapper or
65-
derivative components under src/app/(client)/components/** and compose from
66-
the shadcn primitives instead.
67-
- path: "src/middleware.ts"
92+
- path: 'src/middleware.ts'
6893
instructions: >
6994
Global middleware for auth/guards/request shaping only. No business logic.
70-
- path: "src/lib/middleware/**"
95+
- path: 'src/lib/middleware/**'
7196
instructions: >
7297
Shared middleware helpers. Keep lean; no business logic or side effects.
73-
- path: "src/lib/queryKeys.ts"
74-
instructions: >
75-
Canonical source for TanStack Query keys. Add new keys here and import
76-
from this module across the client instead of ad-hoc arrays.
77-
78-
# Teach CR how to label PRs for this repo
79-
labeling_instructions: |
80-
Apply labels as follows (multiple may apply):
81-
- 🛠 Backend: changes under src/app/(server)/**, src/db/**, prisma/**
82-
- 🎨 Frontend: changes under src/app/(client)/**, src/shadcn-ui/**
83-
- 📖 Documentation: changes under docs/**, README.md, CONTRIBUTING.md, SECURITY.md
84-
- 🔧 Refactor: structural moves/renames or cleanup without API/route contract changes
85-
- 🐛 Bug: fixes for regressions, runtime errors, or failing paths (commit messages often start with "fix:")
86-
- ✨ New Feature: new API route/service, new UI page/component, or new capability
87-
- 🧹 Cleanup: dead code removal, lint fixes, directory tidying
88-
- 🖌️ UX/UI Change: layout/CSS/props purely for UI/UX
89-
- 🧩 Core: proxy/chat/auth/llmConfig or other critical modules
90-
- ✅ Testing: adds or updates tests/test scaffolding
98+
99+
# Teach CR how to label PRs for this repo (array of objects)
100+
labeling_instructions:
101+
- {
102+
label: '🛠 Backend',
103+
instructions: 'Apply to changes under src/app/(server)/**, src/db/**, or prisma/**.',
104+
}
105+
- {
106+
label: '🎨 Frontend',
107+
instructions: 'Apply to changes under src/app/(client)/** or src/shadcn-ui/**.',
108+
}
109+
- {
110+
label: '📖 Documentation',
111+
instructions: 'Apply to changes under docs/**, README.md, CONTRIBUTING.md, SECURITY.md.',
112+
}
113+
- {
114+
label: '🔧 Refactor',
115+
instructions: 'Apply to structural moves/renames or cleanup without API/route contract changes.',
116+
}
117+
- {
118+
label: '🐛 Bug',
119+
instructions: "Apply to fixes for regressions, runtime errors, or failing paths (e.g., commit starts with 'fix:').",
120+
}
121+
- {
122+
label: '✨ New Feature',
123+
instructions: 'Apply to new API routes/services, new UI pages/components, or new capabilities.',
124+
}
125+
- {
126+
label: '🧹 Cleanup',
127+
instructions: 'Apply to dead code removal, lint fixes, or directory tidying.',
128+
}
129+
- {
130+
label: '🖌️ UX/UI Change',
131+
instructions: 'Apply to layout/CSS/prop changes purely for UI/UX.',
132+
}
133+
- {
134+
label: '🧩 Core',
135+
instructions: 'Apply to proxy/chat/auth/llmConfig or other critical modules.',
136+
}
137+
- {
138+
label: '✅ Testing',
139+
instructions: 'Apply to additions or updates to tests/test scaffolding.',
140+
}
141+
142+
tools:
143+
eslint:
144+
enabled: true
145+
yamllint:
146+
enabled: true
147+
hadolint:
148+
enabled: true
149+
gitleaks:
150+
enabled: true
91151

92152
knowledge_base:
93153
code_guidelines:
94154
enabled: true
95155
filePatterns:
96-
- "README.md"
97-
- "docs/**"
98-
- "docs/development-guide.md"
156+
- 'README.md'
157+
- 'docs/architecture.md'
158+
- 'docs/getting-started.md'
159+
- 'docs/development-guide.md'
160+
web_search:
161+
enabled: true

0 commit comments

Comments
 (0)