Skip to content

[global] AGENTS.md SOT 재구성 및 CLAUDE.md import 적용#323

Draft
ZaMan0806 wants to merge 16 commits into
developfrom
docs/refine-agents-and-claude-md
Draft

[global] AGENTS.md SOT 재구성 및 CLAUDE.md import 적용#323
ZaMan0806 wants to merge 16 commits into
developfrom
docs/refine-agents-and-claude-md

Conversation

@ZaMan0806

Copy link
Copy Markdown
Collaborator

개요

AGENTS.mdCLAUDE.md를 Anthropic 공식 메모리 가이드와 HumanLayer의 CLAUDE.md 베스트 프랙티스에 맞춰 재구성하였습니다. AGENTS.md를 단일 진실 소스(SOT)로 두고 CLAUDE.md@AGENTS.md import + Claude Code 전용 지시만 남겼으며, 두 파일의 부정확한 서술과 중복 지시를 정정하였습니다.

본문

구조 재설계

  • AGENTS.md를 SOT로 두고 CLAUDE.md는 첫 줄에 @AGENTS.md로 import하도록 변경하였습니다. 이는 Anthropic 공식 문서가 권장하는 패턴으로, 두 파일에 동일 내용을 중복 유지하던 문제를 제거하였습니다.
  • 세부 컨벤션은 이미 .claude/rules/에 분리되어 있어, AGENTS.md 본문에서 상세 규칙을 빼고 인덱스만 남겼습니다.
  • 전체 라인 수: 155줄 → 77줄. 공식 가이드의 200줄 권장선과 80줄 이상치를 모두 충족하도록 조정하였습니다.

부정확한 내용 정정

  • datagsm-openapi 모듈 설명을 "Public read-only API"에서 "외부 공개 API (API Key 인증)"로 수정하였습니다. 실제 ProjectController, ClubController, StudentController, WebhookControllerPOST/PUT/DELETE 엔드포인트가 존재합니다.
  • 누락되어 있던 도메인(project, webhook 등)을 모듈 설명에 추가하였습니다.
  • 존재하지 않는 "Common Mistakes section"을 참조하던 Context Compaction Rules 항목을 제거하였습니다.
  • Spring Boot 4.0 표기를 실제 버전인 Spring Boot 4.0.3으로 수정하고 Kotlin 2.3.10을 명시하였습니다.
  • 모호하던 .../domain/ 경로를 풀 패키지 경로로 수정하였습니다.

셀프 리뷰 후 추가 정정

문서 재작성 직후 셀프 리뷰를 통해 발견한 7가지 문제를 각각 별도 커밋으로 수정하였습니다.

  1. 존재하지 않는 .geminiignore 파일 언급 제거
  2. AGENTS.md와 중복되는 한국어 응답 지시 제거
  3. 자동 로드 확인 지시를 검증 가능한 행동 지시로 변경
  4. commit 스킬이 ktlintFormat을 자동 실행하지 않으므로, 사용자 직접 실행 안내로 정정
  5. 스킬 자동 트리거와 중복되는 우선 호출 지시 제거
  6. CommonApiResponse 설명을 실제 동작에 맞게 정정 (ResponseBodyAdvice가 없고, 컨트롤러는 DTO를 직접 반환하며 GlobalExceptionHandler만 명시적으로 래핑함을 확인)
  7. 모듈 설명 라인이 길어 가독성을 위해 줄바꿈

참고

@ZaMan0806 ZaMan0806 added the documentation:문서화 문서에 대한 개선 또는 추가사항이 있습니다 label May 13, 2026
@github-actions github-actions Bot added the waiting for review:검토 대기 확인을 대기하고 있습니다 label May 13, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates AGENTS.md and CLAUDE.md to refine project documentation, tech stack details, and core development rules. The reviewer identified a Kotlin version inconsistency between AGENTS.md and CONTRIBUTING.md, and highlighted a discrepancy between the updated API response documentation and the repository's style guide regarding response wrapping.

Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md
Comment thread AGENTS.md
Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread AGENTS.md
ZaMan0806 added 6 commits May 18, 2026 03:15
AGENTS.md Core Rules에 있던 테스트(Kotest 구조)와 주석 작성 기준을 별도
rules 파일로 분리한다. AGENTS.md는 요약을 들고 있지 않고, rules 파일이
Single Source of Truth가 되도록 한다.

- testing.md: Kotest DescribeSpec + MockK + Given-When-Then 구조와 한국어 명명
- comments.md: 주석 작성 기준과 안티패턴 예시
AGENTS.md의 Core Rules 요약 섹션은 계층/DI/불변성/null safety/트랜잭션/JPA처럼
Kotlin·Spring 모델이 이미 학습한 일반 컨벤션을 재선언하는 형태였다.
세부 규칙은 .claude/rules/에 있으므로 요약 섹션을 제거하고 Detailed Rules
참조만 남긴다.
Build/Test/Format은 일반 Gradle 사용법으로 모델이 이미 안다.
ktlintFormat은 .claude/hooks/postToolUse.sh가 .kt 파일 저장 시 자동 실행하므로
명시 지시가 불필요하다. 프로젝트 고유 정보인 '실행 가능 모듈 목록'만
Runnable Modules 섹션으로 남긴다.
postToolUse hook이 .kt 파일 Edit/Write 시 자동으로 ktlintFormat을 실행한다.
명시 프롬프트로 두면 토큰만 차지하고 실효성이 없으므로 제거한다.
Claude Code는 .claude/rules/ 파일을 작업 컨텍스트에 따라 자동 로드한다.
'규칙 파일을 직접 읽으세요'는 자동 주입과 이중 지시가 되어 rules 메커니즘의
의미를 퇴색시키므로 제거한다. 자동 로드된 규칙과 코드가 충돌할 때 규칙
파일을 보완 제안하라는 지시만 남긴다.
평균적으로 한국어 입력이 영어 대비 토큰 사용량이 2배 이상 증가한다.
사용자 상호작용 언어 정책(line 1 한국어 응답 지시)은 그대로 유지하면서
본문 설명만 영어로 옮겨 토큰 효율을 개선한다.
@github-actions github-actions Bot requested a review from snowykte0426 May 17, 2026 18:34
Comment thread CLAUDE.md
- Common Entity: `datagsm-common/src/main/kotlin/.../domain/`
- Exception Handler: `datagsm-common/.../global/common/error/`
- API Response: Use `CommonApiResponse` wrapper
- `.claude/rules/`의 세부 규칙은 Claude Code가 작업 컨텍스트에 맞춰 자동 로드합니다. 자동 로드된 규칙과 충돌하는 코드를 발견하면 단순 수정에 그치지 말고 규칙 파일에 누락된 항목이 있는지 점검하고 보완을 제안하세요. No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사용자 상호작용 규칙에 따른다고 하셨는데 사실 이해가 되지 않습니다. 해당 내용도 한국어로 유지할 이유가 있을까요

Comment thread .claude/rules/comments.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr 코멘트 달때 규칙인가요?

Comment thread .claude/rules/testing.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kotest-guide 같은 스킬이 존재하는데 충돌하는 것 같습니다. 테스트 컨벤션을 rule로 정의한다면 차라리 path 프론트매터를 추가하는게 좋을 것 같습니다.

Comment thread AGENTS.md
Comment on lines +38 to 41
## Runnable Modules

## Coding Conventions
Modules launched via `./gradlew :<module>:bootRun`: `datagsm-oauth-authorization`, `datagsm-oauth-userinfo`, `datagsm-openapi`, `datagsm-web`. (`datagsm-common` is a library module and is not run directly.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gradle 사용법을 재차 알려줄 필요는 없을 것 같습니다

@ZaMan0806 ZaMan0806 marked this pull request as draft May 18, 2026 03:12

@wwwcomcomcomcom wwwcomcomcomcom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGENTS.md를 SOT(Single Source of Truth)로 재구성하고 CLAUDE.md에서 import하는 구조가 명확합니다. comments.md, testing.md 규칙 파일 추가 및 Kotlin 버전 정보 수정도 적절합니다. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation:문서화 문서에 대한 개선 또는 추가사항이 있습니다 waiting for review:검토 대기 확인을 대기하고 있습니다

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants