Skip to content

Commit 85a8c5e

Browse files
authored
Revise CodeRabbit review context and guidelines
Updated the context document for CodeRabbit, enhancing the guidelines for code reviews and project architecture. Added sections on review directives, project values, and what to look for during refactors.
1 parent d5861a7 commit 85a8c5e

1 file changed

Lines changed: 58 additions & 56 deletions

File tree

.coderabbit/CODERABBIT.md

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,58 @@
1-
# Degoog project context for Coderabbit
2-
3-
Degoog is a Bun and Hono TypeScript search aggregator created by fccview. It combines server-side search orchestration, a browser UI, extension registries, themes, admin settings, a plugin store, optional Valkey caching, Docker deployment, and tests.
4-
5-
## Before changing code
6-
7-
- Check `STANDARDS.md` in this same folder before making code changes.
8-
- Preserve existing app behavior unless the user explicitly approves a behavior change.
9-
- Preserve public API routes, response shapes, settings keys, environment variables, plugin APIs, extension IDs, theme behavior, and UI expectations.
10-
- Prefer small, reviewable changes over rewrites unless asked.
11-
- Add or update focused tests around behavior you touch.
12-
- Do not make style-only churn across unrelated files.
13-
- Style is in modularised scss files and built at runtime, ignore any .css file unless you are in a ./store folder.
14-
- Follow existing styling patterns and the `degoog-*` class name convention.
15-
16-
## Architecture overview
17-
18-
- Server entrypoint and app boot live around `src/server/index.ts`.
19-
- Hono routes live under `src/server/routes/`.
20-
- Search logic lives around `src/server/search.ts` plus route-specific handlers under `src/server/routes/search/` and streaming search in `src/server/routes/search-stream.ts`.
21-
- Extension registries live under `src/server/extensions/` and share registry behavior through `src/server/extensions/registry-factory.ts`.
22-
- Extension store install, update, uninstall, and repo handling live under `src/server/extensions/store/`.
23-
- Server settings, plugin settings, cache, rate limiting, proxy handling, auth helpers, and path helpers live under `src/server/utils/`.
24-
- Client UI code lives under `src/client/`.
25-
- Public templates and theme files live under `src/public/`.
26-
- Tests live under `tests/`.
27-
28-
## Important project values
29-
30-
- The lead developer is a Front End tech lead, HE REALLY CARES about UI consistecy. No borders, no blur, no transparency, check the existing styling and follow suit for frontend changes.
31-
- Don't write comments, only the human lead developer should ever manually add them.
32-
- Readability and maintainability matter more than cleverness.
33-
- Degoog should stay quirky and human, but understandable.
34-
- Existing users should not have to change configuration, URLs, plugins, themes, or workflows because of cleanup work.
35-
- Security fixes are welcome, but compatibility and migration impact must be considered.
36-
- Treat installed plugins, themes, engines, and transports as a trusted extension system unless the user asks for a stricter trust model.
37-
38-
## Common cleanup themes
39-
40-
- Reduce duplicated logic between streaming and non-streaming search without changing response formats.
41-
- Keep cache keys complete and behavior-specific.
42-
- Keep extension IDs and settings IDs deterministic and backward compatible.
43-
- Keep registry loading deterministic, especially for duplicate triggers, duplicate names, and skip behavior.
44-
- Keep file writes atomic for persistent JSON settings or store metadata.
45-
- Keep route JSON parsing, auth checks, and rate limiting consistent.
46-
- Keep path handling safe for plugin, theme, proxy, and store assets.
47-
- Keep large modules moving toward smaller responsibility-focused modules when they are already being touched.
48-
49-
## What not to do
50-
51-
- Do not rewrite the app.
52-
- Do not replace Bun or Hono.
53-
- Do not rename public routes or settings without compatibility.
54-
- Do not break plugin, theme, engine, transport, or store compatibility.
55-
- Do not redesign the UI as part of cleanup.
56-
- Do not change production defaults without explicit approval.
1+
# CodeRabbit Code Review Context for Degoog
2+
3+
Degoog is a Bun and Hono TypeScript search aggregator created by fccview. It combines server-side search orchestration, a browser UI, extension registries, themes, admin settings, a plugin store, optional Valkey caching, Docker deployment, and tests.
4+
5+
As an AI code reviewer, use the following guidelines to evaluate PRs, generate feedback, and flag regressions.
6+
7+
## Key Review Directives
8+
9+
- **Enforce Standards:** Verify that PRs align with `STANDARDS.md` (located in the root folder). Flag any violations.
10+
- **Protect App Behavior:** Flag any changes that alter existing app behavior unless the PR explicitly notes that the behavior change is intended and approved.
11+
- **Protect Public Contracts:** Ensure public API routes, response shapes, settings keys, environment variables, plugin APIs, extension IDs, theme behavior, and UI expectations remain strictly intact.
12+
- **Scope Checking:** Call out massive rewrites or scope creep. Suggest breaking large, unstructured PRs into smaller, reviewable changes.
13+
- **Test Coverage:** Verify that focused tests have been added or updated for the behavior touched in the PR. Flag missing test coverage for new logic.
14+
- **Reject Style Churn:** Flag and discourage style-only code churn across unrelated files.
15+
- **CSS/SCSS Enforcement:** Check that UI styling is done in modularised `.scss` files. Flag any modifications to standard `.css` files unless the changes are strictly within a `./store` folder.
16+
- **Class Naming:** Ensure new UI elements follow the existing styling patterns and the `degoog-*` class name convention.
17+
18+
## Architecture Context (For validating file placement)
19+
20+
When reviewing, ensure changes are logically placed according to this architecture:
21+
- **Boot/Entry:** Server entrypoint and app boot live around `src/server/index.ts`.
22+
- **Routing:** Hono routes live under `src/server/routes/`.
23+
- **Search Logic:** Core search lives around `src/server/search.ts`. Route-specific handlers are under `src/server/routes/search/` and streaming search is in `src/server/routes/search-stream.ts`.
24+
- **Extensions:** Registries live under `src/server/extensions/` (sharing behavior via `src/server/extensions/registry-factory.ts`). Store install, update, uninstall, and repo handling live under `src/server/extensions/store/`.
25+
- **Utilities:** Server settings, plugin settings, cache, rate limiting, proxy handling, auth helpers, and path helpers live under `src/server/utils/`.
26+
- **Frontend:** Client UI code lives under `src/client/`. Public templates and theme files live under `src/public/`.
27+
- **Testing:** Tests live under `tests/`.
28+
29+
## Important Project Values
30+
31+
- **Strict UI Consistency:** The Front End tech lead is highly particular about UI consistency. Reject PRs that introduce borders, blur, or transparency. Enforce existing styling paradigms strictly.
32+
- **No Developer Comments:** Flag and request the removal of any inline code comments added in the PR. Only the human lead developer is permitted to manually add comments.
33+
- **Code Quality:** Prioritize readability and maintainability over clever, overly terse code in your review suggestions.
34+
- **Backward Compatibility:** Existing users must not be forced to change configuration, URLs, plugins, themes, or workflows due to a PR. Flag any breaking migration impacts immediately.
35+
- **Security vs. Compatibility:** Security fixes are welcome, but scrutinize them heavily for compatibility and migration impact.
36+
- **Extension Trust Model:** Treat installed plugins, themes, engines, and transports as a trusted extension system unless the PR explicitly introduces a stricter user-requested trust model.
37+
38+
## What to Look For During Refactors / Cleanups
39+
40+
Praise or suggest the following improvements during PR reviews:
41+
- **Deduplication:** Look for opportunities to reduce duplicated logic between streaming and non-streaming search, provided the response formats do not change.
42+
- **Cache Integrity:** Verify that cache keys remain complete and behavior-specific.
43+
- **Deterministic IDs:** Ensure extension IDs and settings IDs remain deterministic and backward compatible.
44+
- **Reliable Registries:** Check that registry loading remains deterministic, paying special attention to duplicate triggers, duplicate names, and skip behavior.
45+
- **Data Safety:** Verify that file writes remain atomic for persistent JSON settings or store metadata.
46+
- **Route Consistency:** Ensure route JSON parsing, auth checks, and rate limiting remain consistent across endpoints.
47+
- **Path Safety:** Scrutinize path handling for plugin, theme, proxy, and store assets to prevent directory traversal or unsafe access.
48+
- **Modularization:** Encourage developers moving large modules toward smaller, responsibility-focused modules.
49+
50+
## PR Rejection Criteria (What to Flag Immediately)
51+
52+
Leave blocking review comments if a PR attempts to do any of the following:
53+
- Rewrite the app or replace core architectural decisions.
54+
- Replace Bun or Hono.
55+
- Rename public routes or settings without a clear, approved compatibility strategy.
56+
- Break plugin, theme, engine, transport, or store compatibility.
57+
- Redesign the UI as a byproduct of a cleanup/refactor.
58+
- Change production defaults without explicit approval documented in the PR.

0 commit comments

Comments
 (0)