From 08f775efd48f93cdc37d408f86a525e2de5404e3 Mon Sep 17 00:00:00 2001 From: hskwon Date: Fri, 19 Sep 2025 21:35:20 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EA=B0=80=EC=9D=B4=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CLAUDE.md 파일 동기화 규칙 정의 - CURRENT_WORKS.md 구조 및 작업 추적 시스템 문서화 - Git 커밋 워크플로우 및 컨벤션 정립 - 세션 관리 베스트 프랙티스 추가 - 데이터베이스 마이그레이션 관리 가이드 포함 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index dd9a6be..0a11446 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -330,6 +330,116 @@ ### Repository-Specific Operations - Dependencies and build processes - Deployment workflows +## Project Workflow Management + +### CLAUDE.md File Synchronization +This project uses multiple CLAUDE.md files for better workspace management: + +1. **Master File**: `/SAM/CLAUDE.md` - Contains comprehensive project documentation +2. **Local Copies**: Each repository has its own CLAUDE.md for focused development + +**Synchronization Rules**: +- At session start: Compare timestamps and update master file if local is newer +- When working: Use local CLAUDE.md for repository-specific guidance +- Before commit: Ensure synchronization is complete + +### Work Tracking System + +#### CURRENT_WORKS.md Structure +```markdown +# SAM 프로젝트 작업 현황 + +## YYYY-MM-DD (요일) - 작업 제목 + +### 주요 작업 +- 작업 항목들 나열 + +### 저장소별 작업 내용 + +#### API 저장소 (`/api`) +**수정된 파일:** +- 파일명 - 변경 내용 + +**삭제된 파일:** +- 파일명 - 삭제 이유 + +**추가된 파일:** +- 파일명 - 추가 목적 + +**작업 내용:** +- 상세한 작업 설명 +- 마이그레이션 상태 변경사항 +- 환경 설정 변경사항 + +#### [다른 저장소들도 동일한 구조로] +``` + +#### Git Commit Workflow +```bash +# 1. 작업 완료 후 CURRENT_WORKS.md 업데이트 +# 2. 각 저장소별 커밋 +cd api && git add . && git commit -m "feat: 작업 내용" +cd ../admin && git add . && git commit -m "feat: 작업 내용" +cd ../front/www && git add . && git commit -m "feat: 작업 내용" + +# 3. 커밋 메시지 형식 +# [type]: 간결한 제목 +# +# - 상세 변경 내용 (필요시) +# - 브레이킹 체인지 (있는 경우) +# +# 🤖 Generated with [Claude Code](https://claude.ai/code) +# Co-Authored-By: Claude +``` + +#### Commit Types +- `feat`: 새로운 기능 추가 +- `fix`: 버그 수정 +- `docs`: 문서 변경 +- `style`: 코드 포맷팅, 세미콜론 누락, 코드 변경이 없는 경우 +- `refactor`: 프로덕션 코드 리팩토링 +- `test`: 테스트 추가, 테스트 리팩토링 +- `chore`: 빌드 테스크 업데이트, 패키지 매니저 설정 등 + +### Session Management Best Practices + +#### Session Start +1. Check Docker services are running +2. Compare CLAUDE.md files and sync if needed +3. Review CURRENT_WORKS.md for context +4. Check Git status in all repositories +5. Verify database migration status + +#### During Work +1. Update CURRENT_WORKS.md regularly +2. Commit frequently with descriptive messages +3. Run tests before committing +4. Keep CLAUDE.md local copy updated with new insights + +#### Session End +1. Final CURRENT_WORKS.md update +2. Commit all pending changes +3. Push critical changes to remote (if needed) +4. Sync CLAUDE.md files +5. Clean up temporary files + +### Database Migration Management +```bash +# Check current status +php artisan migrate:status + +# Run pending migrations +php artisan migrate + +# Rollback specific steps (for debugging) +php artisan migrate:rollback --step=N + +# Reset to specific commit state +# 1. First rollback migrations to target state +# 2. Then git reset to target commit +# 3. Finally run migrations up to target state +``` + ## Important Notes - The system uses Laravel 12 with PHP 8.2+ @@ -337,4 +447,6 @@ ## Important Notes - TailwindCSS for styling with Vite for asset building - Sanctum for API authentication - Multi-tenant architecture requires proper tenant context in all operations -- **Follow SAM API Development Rules strictly when working on API-related tasks** \ No newline at end of file +- **Follow SAM API Development Rules strictly when working on API-related tasks** +- **Always maintain CURRENT_WORKS.md for project continuity** +- **Sync CLAUDE.md files between sessions for consistency** \ No newline at end of file