Skip to content

Commit a291492

Browse files
committed
docs: Gemini 리뷰 스타일 가이드 추가
1 parent f417ad4 commit a291492

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.gemini/styleguide.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Gemini Code Assist Review Guide
2+
3+
## Language
4+
- Always write review comments in Korean.
5+
- Keep comments direct, practical, and specific to the current codebase.
6+
7+
## Review Priority
8+
- Prioritize findings in this order: bugs, data consistency, security, performance, design, maintainability, readability.
9+
- Focus on backend behavior, API compatibility, persistence behavior, integration risks, and missing tests.
10+
- Avoid nitpicks and preference-only comments unless they hide a real maintainability risk.
11+
12+
## Project Context
13+
- This is a Spring Boot backend project.
14+
- Use Java 21 and Gradle.
15+
- Follow the existing package structure, naming, and style.
16+
- Prefer existing services, repositories, DTOs, response conventions, and package boundaries over new abstractions.
17+
- Keep suggested changes narrowly scoped to the pull request.
18+
19+
## Backend Review Rules
20+
- Verify Controller, Service, Repository, DTO, and Entity responsibilities are separated clearly.
21+
- Business logic should live in the appropriate Service or domain model, not in controllers.
22+
- Entity state changes should use clear behavior methods instead of uncontrolled public setters.
23+
- Check soft delete behavior, nullable policies, enum expansion, and DB constraints for consistency.
24+
- Avoid duplicating business rules, payload construction, validation checks, formatting, or helper logic across services.
25+
- Suggest a shared service/helper only when it removes meaningful duplication, reduces real complexity, or matches an existing local pattern.
26+
- Check exception handling for consistency between business exceptions and system exceptions.
27+
- Avoid meaningless `RuntimeException` usage and unnecessary try-catch blocks.
28+
- Review transaction boundaries, `readOnly` usage, exception propagation, and rollback behavior carefully.
29+
- When reviewing notification, messaging, FCM, or external side effects, verify failures do not unintentionally roll back the main business operation unless intended.
30+
- Check for unnecessary queries, N+1 risks, lazy loading issues, missing indexes, and inefficient count/existence checks.
31+
- For user-specific state, prefer ID-based repository queries when loading the full entity is unnecessary.
32+
- Check race condition risks, duplicate creation risks, and whether DB unique constraints support application-level validation.
33+
- Verify authentication, JWT handling, refresh token storage, external token validation, and sensitive logging.
34+
- If secrets, tokens, DB passwords, JWT secrets, or other sensitive values appear in code, logs, screenshots, or config, warn clearly.
35+
- Verify request/response DTO usage and avoid returning entities directly from APIs.
36+
- For backend/frontend integration changes, separate what the backend expects, what the frontend must send, and what environment/config values must match.
37+
38+
## Test Review
39+
- Check whether new behavior has focused tests.
40+
- Prefer focused tests before broad tests for narrow changes.
41+
- Test method names must be written in English.
42+
- Test comments should use `given`, `when`, `then` only when comments are necessary.
43+
- If tests cannot be executed due to local infrastructure or existing unrelated failures, state that separately from issues caused by the PR.
44+
45+
## Review Style
46+
- Lead with findings ordered by severity.
47+
- Use severity labels such as `[P1]`, `[P2]`, and `[P3]` when helpful.
48+
- For each finding, explain the problem, why it matters, and a concrete improvement.
49+
- Include the affected file, method, or behavior whenever possible.
50+
- Keep each review comment concise and actionable.
51+
- Use one comment per issue.
52+
- Do not repeat the same issue in multiple comments.
53+
- If suggesting code, keep the snippet minimal.
54+
- Do not wrap the entire review comment in a code block.
55+
- If a suggestion is optional, say so explicitly.
56+
- If there are no issues, say that clearly and mention any remaining test gaps or residual risk.
57+
58+
## Commenting Convention
59+
- Use `FIX ME` only when the code has a real potential issue but immediate exception handling or implementation is intentionally deferred.
60+
- Use `FIX ME` for unclear business requirements that must be revisited.

0 commit comments

Comments
 (0)