From 95ff14618cdd10410be6d68f3053ad96ad87fd35 Mon Sep 17 00:00:00 2001 From: pooreumjung Date: Wed, 1 Jul 2026 23:16:43 +0900 Subject: [PATCH 01/11] =?UTF-8?q?refactor:=20CLAUDE.md=20=EC=BB=A8?= =?UTF-8?q?=EB=B2=A4=EC=85=98=EC=9D=84=20.claude/rules=EB=A1=9C=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 파일 경로별로만 필요한 테스트/영속성/코멘팅 컨벤션을 rules/testing.md, rules/persistence.md, rules/commenting.md로 옮겨 관련 없는 작업 시 불필요한 컨텍스트 로드를 줄인다. --- .claude/rules/commenting.md | 12 ++++++++++++ .claude/rules/persistence.md | 12 ++++++++++++ .claude/rules/testing.md | 10 ++++++++++ CLAUDE.md | 21 --------------------- 4 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 .claude/rules/commenting.md create mode 100644 .claude/rules/persistence.md create mode 100644 .claude/rules/testing.md diff --git a/.claude/rules/commenting.md b/.claude/rules/commenting.md new file mode 100644 index 00000000..86df7560 --- /dev/null +++ b/.claude/rules/commenting.md @@ -0,0 +1,12 @@ +--- +paths: + - "src/main/java/**/*.java" +--- + +# Commenting Convention + +- Comments should be written in a single line whenever possible. +- Each comment must include the author's name and the date. +- Use IntelliJ's default `FIX ME` comment format. + - Use this for parts of the code where there may be a potential issue but immediate exception handling is unnecessary. + - Also use this for parts that are not yet finalized due to unclear business requirements. diff --git a/.claude/rules/persistence.md b/.claude/rules/persistence.md new file mode 100644 index 00000000..8f75fc57 --- /dev/null +++ b/.claude/rules/persistence.md @@ -0,0 +1,12 @@ +--- +paths: + - "**/persistence/**/*.java" + - "**/repository/**/*.java" + - "src/main/resources/db/migration/**" +--- + +# Persistence & Migration Convention + +- Complex queries use the `*RepositoryCustom` interface + `*RepositoryImpl` (QueryDSL) pattern. +- Schema is managed with Flyway migration files at `src/main/resources/db/migration/V{n}__{설명}.sql`. +- `ddl-auto` is set to `none`, so any schema change must be accompanied by a new migration file. diff --git a/.claude/rules/testing.md b/.claude/rules/testing.md new file mode 100644 index 00000000..6eaca78e --- /dev/null +++ b/.claude/rules/testing.md @@ -0,0 +1,10 @@ +--- +paths: + - "src/test/**/*.java" +--- + +# Test Code Convention + +- Test method names must be written in **English**. +- If the code is related to test, write comments for "given, when, then". +- Tests run with `@SpringBootTest` connected to a real DB. Do not mock the DB. diff --git a/CLAUDE.md b/CLAUDE.md index b898f9fc..a6628e13 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,19 +15,6 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co 3. Present trade-offs (각 방향의 장단점 제시) 4. Do NOT write code unless the user explicitly asks with a direct command such as "개발해줘", "작성해줘", "구현해줘". -## Commenting Convention - -- Comments should be written in a single line whenever possible. -- Each comment must include the author's name and the date. -- Use IntelliJ's default `FIX ME` comment format. - - Use this for parts of the code where there may be a potential issue but immediate exception handling is unnecessary. - - Also use this for parts that are not yet finalized due to unclear business requirements. - -## Test Code Convention - -- Test method names must be written in **English**. -- But if the codes is related to test, write the comment for "given, when, then". - ## Build & Run Commands ```bash @@ -84,18 +71,10 @@ src/main/java/ssu/eatssu/ **다국어(i18n)**: `Localizable` 인터페이스의 `getLocalizedValue(language, ko, en, ja, vi)`를 구현하여 언어별 필드를 반환한다. -**복잡한 쿼리**: `*RepositoryCustom` 인터페이스 + `*RepositoryImpl`(QueryDSL) 패턴을 사용한다. - -**DB 마이그레이션**: Flyway를 사용하며, `src/main/resources/db/migration/V{n}__{설명}.sql` 형식으로 관리한다. `ddl-auto: none`이므로 스키마 변경 시 반드시 마이그레이션 파일을 추가해야 한다. - ### API 버전 관리 일부 Controller/Service는 V1/V2로 버전이 분리되어 있다(예: `ReviewController`/`ReviewControllerV2`, `ReviewService`/`ReviewServiceV2`). 새 기능은 V2 이상에 추가하거나, 필요 시 새 버전을 생성한다. -### 테스트 - -테스트는 `@SpringBootTest`로 실제 DB에 연결하여 실행한다. 목(Mock) DB를 사용하지 않는다. - ### 배포 GitHub Actions(`deploy.yml`)로 Docker 이미지를 빌드하여 EC2에 SSH 배포한다. `prod`/`dev` 브랜치에 따라 배포 환경이 분기된다. From 65765cc79951721e586099f48839b93a71455799 Mon Sep 17 00:00:00 2001 From: pooreumjung Date: Wed, 1 Jul 2026 23:16:51 +0900 Subject: [PATCH 02/11] =?UTF-8?q?refactor:=20review=20=EC=BB=A4=EB=A7=A8?= =?UTF-8?q?=EB=93=9C=EB=A5=BC=20backend-review=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code 내장 review/code-review skill과 이름이 겹쳐 /review 실행 시 혼선이 생길 수 있어 backend-review로 구분한다. 체크리스트 내용은 그대로 유지. --- .claude/commands/{review.md => backend-review.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .claude/commands/{review.md => backend-review.md} (100%) diff --git a/.claude/commands/review.md b/.claude/commands/backend-review.md similarity index 100% rename from .claude/commands/review.md rename to .claude/commands/backend-review.md From 9b335f48358f69d604358b6e1dd2e4061321e5f4 Mon Sep 17 00:00:00 2001 From: pooreumjung Date: Wed, 1 Jul 2026 23:17:12 +0900 Subject: [PATCH 03/11] =?UTF-8?q?docs:=20=EC=BD=94=EB=93=9C=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=20=EC=A0=84=20=EB=90=98=EB=AC=BB=EA=B8=B0=20=EB=B0=8F?= =?UTF-8?q?=20=EC=9D=B4=EC=8A=88=20=EB=8B=A8=EC=9C=84=20=EC=9E=91=EC=97=85?= =?UTF-8?q?=20=EA=B7=9C=EC=B9=99=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 방향 제시 전 불명확한 부분은 먼저 확인 질문을 하도록 프로세스를 보강하고, 여러 기능이 담긴 이슈는 항목 단위로 분석→방향→트레이드오프→승인 사이클을 반복하도록 명시한다. --- CLAUDE.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a6628e13..6f81abff 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,9 +11,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - Suggest based on logical reasons. - For every request, follow this order before writing any code: 1. Analyze the process (현재 구조/흐름 파악) - 2. Suggest a direction (어떤 방향으로 접근할지 제시) - 3. Present trade-offs (각 방향의 장단점 제시) - 4. Do NOT write code unless the user explicitly asks with a direct command such as "개발해줘", "작성해줘", "구현해줘". + 2. If anything is unclear or requires a decision only the user can make, ask clarifying questions before proposing a direction + 3. Suggest a direction based on the analysis (and any answers received) + 4. Present trade-offs for each direction + 5. Do NOT write code unless the user explicitly asks with a direct command such as "개발해줘", "작성해줘", "구현해줘". +- When implementing from a GitHub issue with multiple feature items, process one item at a time: complete the full analyze → clarify → direction → trade-off → explicit approval cycle for a single item before moving to the next. ## Build & Run Commands From 0c9fc52940cab89e966c3a715078cff5bb5a359a Mon Sep 17 00:00:00 2001 From: pooreumjung Date: Wed, 1 Jul 2026 23:24:21 +0900 Subject: [PATCH 04/11] =?UTF-8?q?feat:=20=EC=9D=B4=EC=8A=88/PR=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=8B=9C=20=EB=8B=B4=EB=8B=B9=EC=9E=90=C2=B7?= =?UTF-8?q?=EB=9D=BC=EB=B2=A8=C2=B7=EB=A6=AC=EB=B7=B0=EC=96=B4=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feature-issue/fix-issue 커맨드는 실제 생성 시 --assignee @me와 템플릿에 맞는 라벨을 자동으로 붙이고, pr 커맨드는 --assignee @me에 더해 고정 리뷰어(eunseo9311, sjinssun)와 브랜치 타입 기반 라벨을 자동으로 지정한다. --- .claude/commands/feature-issue.md | 9 +++++++++ .claude/commands/fix-issue.md | 9 +++++++++ .claude/commands/pr.md | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/.claude/commands/feature-issue.md b/.claude/commands/feature-issue.md index 5ed737dd..a7325b5c 100644 --- a/.claude/commands/feature-issue.md +++ b/.claude/commands/feature-issue.md @@ -38,3 +38,12 @@ Rules: - Do not invent implementation details that are not implied by the request. - Prefer concrete acceptance criteria over vague descriptions. - If there is no attachment/reference, write `- 없음`. + +When the user explicitly asks to create the issue (not just draft it), run: + +```bash +gh issue create --title "feature: " --body "" --assignee @me --label feat +``` + +- Always include `--assignee @me` so the issue is assigned to the current user. +- Always include `--label feat` to match this template's convention. diff --git a/.claude/commands/fix-issue.md b/.claude/commands/fix-issue.md index f6bdc53c..3882cddd 100644 --- a/.claude/commands/fix-issue.md +++ b/.claude/commands/fix-issue.md @@ -38,3 +38,12 @@ Rules: - If the issue is operational, include the relevant environment such as prod, dev, EC2, Docker, or CloudWatch. - Do not claim a root cause unless it is directly supported by the given context. - If there is no attachment/reference, write `- 없음`. + +When the user explicitly asks to create the issue (not just draft it), run: + +```bash +gh issue create --title "fix: " --body "" --assignee @me --label fix +``` + +- Always include `--assignee @me` so the issue is assigned to the current user. +- Always include `--label fix` to match this template's convention. diff --git a/.claude/commands/pr.md b/.claude/commands/pr.md index 5c92101b..a0a8a826 100644 --- a/.claude/commands/pr.md +++ b/.claude/commands/pr.md @@ -56,3 +56,25 @@ Rules: - For the checklist, mark an item checked only if the evidence is clear from the context or command results. - If tests were not run, leave the test checkbox unchecked and mention that in reviewer notes. - Do not include unrelated refactoring in the summary. + +When the user explicitly asks to create the PR (not just draft it), run: + +```bash +gh pr create --title ": " --body "" --assignee @me --reviewer eunseo9311,sjinssun --label