Don't assume. Don't hide confusion. Surface tradeoffs.
Think Before Coding
- State assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them — don't pick silently.
- For non-trivial tasks, start in Plan Mode and don't implement until approved.
Simplicity First
- Minimum code that solves the problem. Nothing speculative.
- No features beyond what was asked. No abstractions for single-use code.
Surgical Changes
- Touch only what you must. Don't "improve" adjacent code or formatting.
- Match existing style, even if you'd do it differently.
- Every changed line should trace directly to the user's request.
Goal-Driven Execution
- Define success criteria before starting.
- For multi-step tasks, state a brief plan and verify each step.
- 프로젝트 구조 → 이 파일 (CLAUDE.md)
- 도메인 목록 →
src/main/java/com/opensource/docgrid/domain/
- 항상 로드 →
git-conventions.md(브랜치·커밋·환경설정) - Java 파일 작업 시 →
java-style.md - Service 작업 시 →
service-pattern.md - Controller 작업 시 →
controller-pattern.md - Converter 작업 시 →
converter-pattern.md - 테스트 작성/수정 시 →
testing_guide.md - Security/Config 만질 때 →
security.md - Flyway 마이그레이션 작성 시 →
db-migration.md - docs/ 문서 작성 시 →
docs-management.md
- 새로 알게 된 패턴·주의점·오류 기록 →
learnings/ - 작업 중 임시 메모 (작업 종료 후 삭제 — 비어있는 게 정상) →
scratchpad/
- Framework: Spring Boot 3.5.16
- Language: Java 17
- Build: Gradle
- DB: PostgreSQL + Flyway
- Package:
com.opensource.docgrid
src/main/java/com/opensource/docgrid/
├── global/
│ ├── common/ # 공통 응답 (ApiResponse, ErrorResponse, BaseEntity)
│ ├── config/ # 설정 (SecurityConfig, CorsConfig, SwaggerConfig)
│ └── exception/ # 전역 예외 (DocGridException, ErrorCode, GlobalExceptionHandler)
└── domain/
└── {도메인}/
├── entity/
├── repository/
├── service/
│ ├── command/ # 상태 변경
│ └── query/ # 조회 전용
├── controller/
├── dto/
│ ├── request/
│ └── response/
├── converter/ # Entity ↔ DTO 변환
└── enums/
docs/
├── design/
│ └── {github아이디}-#{이슈번호}-{설명}.md # PR 설계 문서 (배경·API명세·에러케이스)
├── test-results/
│ └── {github아이디}-#{이슈번호}-{설명}.md # 테스트 결과 문서 (Swagger 수동 + 자동 테스트 통합)
./gradlew build
./gradlew clean build
./gradlew build -x test
./gradlew testgit add -A/git add .(민감 파일 우회 위험)git push --force/--no-verify/--amend(안전장치 우회)main브랜치 직접 push — PR + 리뷰 후 merge만 허용- 시크릿을
application.yml에 하드코딩 - Entity를 Controller 계층에 직접 노출