Skip to content

Commit b660772

Browse files
Hyun Parkclaude
andcommitted
fix: CI 통과를 위한 포맷팅 및 테스트 수정
## 수정 사항 ### 포맷팅 - cargo fmt --all 실행으로 전체 워크스페이스 포맷팅 통일 - 170+ 파일 포맷팅 적용 ### 테스트 수정 - trader-collector/utils.rs: to_screaming_snake_case 함수 개선 - 이미 전부 대문자인 문자열("REST")을 올바르게 처리 - "REST" → "REST" (기존: "R_E_S_T" 잘못 변환) - 이전 문자가 소문자인 경우에만 _ 추가 ### 테스트 결과 - trader-analytics: 252 passed ✅ - trader-api: 253 passed ✅ - trader-cli: 20 passed ✅ - trader-collector: 8 passed ✅ - trader-core: 171 passed ✅ - trader-data: 16 passed ✅ - trader-execution: 109 passed ✅ - trader-exchange: 60 passed ✅ Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f018004 commit b660772

191 files changed

Lines changed: 6318 additions & 3071 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/lead.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ CHANGELOG.md의 [Unreleased] 섹션에 이번 작업 내용을 추가하세요.
128128
5. **CHANGELOG 필수**: 검증 통과 후 CHANGELOG.md 업데이트 → 커밋
129129
6. **문서 싱크**: CHANGELOG 후 문서 싱크 체크리스트 대조, 해당 시 추가 지시
130130
7. **컨텍스트 전달**: 팀원에게 작업 지시 시 관련 파일 경로와 타입 정보를 구체적으로 포함
131+
8. **소량 분배**: rust-impl에게는 1회에 1~3개 에러/작업만 할당. 한 번에 많이 주지 않기
132+
133+
## 팀원 작업 검증 프로토콜
134+
135+
1. **독립 검증 필수**: 팀원이 "완료"를 보고해도 반드시 validator로 독립 검증
136+
2. **3회 실패 규칙**: 같은 작업을 3회 이상 동일 방식으로 실패하면 → 직접 구현으로 전환
137+
3. **구현 vs 검증 구분**: rust-impl에게 구현을 지시하면 Edit 도구 사용 여부를 확인. cargo clippy만 실행했으면 미완료 취급
131138

132139
## 팀원 지시 시 포함할 정보
133140

.claude/agents/rust-impl.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ ZeroQuant 프로젝트의 Rust 코드를 구현합니다.
3232
- 빌드 검증은 **validator**가 전담. 직접 `cargo check/clippy` 실행하지 않는다.
3333
- 컴파일 에러가 의심되면 `cargo check -p <package>` 1회만 실행하여 확인.
3434

35+
## 금지 패턴 (위반 시 작업 실패 취급)
36+
37+
- ❌ 구현 지시를 받고 `cargo clippy`로 "확인"만 하는 행위
38+
- ❌ "에러가 없습니다"라고 보고하고 실제 코드 수정 없이 종료
39+
- ❌ 여러 번 재시도 후에도 같은 방식으로 접근
40+
- ❌ 검증 결과를 구현 결과로 둘러대기
41+
42+
## 필수 작업 흐름
43+
44+
"파일 X의 Y번째 라인 수정" 같은 명확한 지시를 받으면:
45+
1. 해당 파일 `Read`
46+
2. `Edit` 도구로 **실제 코드 수정**
47+
3. 수정 내용 보고. 검증은 validator가 수행.
48+
3549
## 프로젝트 구조 참조
3650

3751
- 도메인 타입: `crates/trader-core/src/domain/`

.claude/agents/validator.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ cargo test --workspace
3838
cargo fmt --check
3939
```
4040

41+
### ⚠️ Clippy 결과 파싱 규칙
42+
43+
**ts-rs 경고는 clippy 에러가 아님!** 반드시 필터링:
44+
```bash
45+
cargo clippy --workspace -- -D warnings 2>&1 \
46+
| grep -E "^(error|warning)\[" \
47+
| grep -v "failed to parse serde attribute" \
48+
| grep -v "ts-rs failed to parse"
49+
```
50+
51+
에러 카운트 방법:
52+
1. 위 필터링된 출력에서 **고유한 파일:라인 조합**만 카운트
53+
2. `Finished` 메시지만 나오면 0개
54+
3. 동일 에러가 여러 crate에서 반복되면 **각각 카운트**
55+
4156
### Frontend 검증
4257
```bash
4358
cd frontend

.claude/rules/11-code-review-checklist.md

Lines changed: 0 additions & 51 deletions
This file was deleted.
File renamed without changes.

.claude/rules/12-strategy-checklist.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

.claude/skills/add-migration/SKILL.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: add-migration
3-
description: 번호가 매겨진 SQL 마이그레이션 파일 생성. 테이블/인덱스/뷰 추가 워크플로우.
3+
description: Generates numbered SQL migration files for tables, indexes, and views. Use when adding or modifying database schema.
44
disable-model-invocation: true
55
user-invocable: true
66
argument-hint: "<설명_snake_case> [테이블명|기능명]"
@@ -71,6 +71,11 @@ podman exec trader-timescaledb psql -U trader -d trader -c "\dt <테이블명>"
7171
podman exec trader-timescaledb psql -U trader -d trader -c "\d <테이블명>"
7272
```
7373

74+
### 검증 실패 시
75+
1. 에러 메시지에서 원인 파악 (syntax error, duplicate, constraint 등)
76+
2. 마이그레이션 `.sql` 파일 수정
77+
3. `DROP TABLE IF EXISTS` 후 재적용하여 검증 반복
78+
7479
---
7580

7681
## 4단계: Rust 모델 연동 (필요시)

.claude/skills/crawl-api-spec/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: crawl-api-spec
3-
description: 거래소 API 문서 크롤링 → 구조화된 명세서(markdown) 생성.
3+
description: Crawls exchange API documentation and generates structured markdown specs. Use when integrating a new exchange or updating API specifications.
44
disable-model-invocation: true
55
user-invocable: true
66
argument-hint: "<서비스명> <문서URL> [출력파일경로]"

.claude/skills/diagnose/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
name: diagnose
3-
description: 에러 진단 워크플로우. 빌드/런타임/DB/API/프론트엔드 에러 체계적 분류 및 수정.
3+
description: Systematically diagnoses build, runtime, DB, API, and frontend errors with classification and fix workflow. Use when encountering errors or test failures.
4+
disable-model-invocation: true
45
user-invocable: true
56
argument-hint: "[에러 메시지 또는 증상 설명]"
67
allowed-tools: Read, Grep, Edit, Bash(cargo *), Bash(npm *), Bash(podman *), Bash(git *), Bash(curl *)
78
context: fork
8-
agent: debugger
9+
agent: debugger
910
---
1011

1112
# 체계적 에러 진단
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
name: ship
3-
description: 커밋 워크플로우. CHANGELOG/설계 문서 자동 업데이트 후 커밋.
2+
name: shipping-code
3+
description: Commits code changes with automated CHANGELOG and design document updates. Runs build/lint verification before commit. Use after completing a feature, bug fix, or refactoring.
44
disable-model-invocation: true
55
user-invocable: true
66
argument-hint: "[커밋 메시지] [--dry-run | --docs-only]"
@@ -252,8 +252,3 @@ git commit -m "<type>: <version> - <subject>" -m "<body>" -m "Co-Authored-By: Cl
252252
- **푸시는 수동 요청 시에만** — 자동 푸시 없음
253253
- **문서 업데이트 전 기존 내용 읽기** — 덮어쓰기 방지
254254
- **마이그레이션 변경 시 verify 필수** — 검증 없이 통합 금지
255-
256-
---
257-
258-
**최종 업데이트**: 2026-02-10
259-
**버전**: 3.0.0

0 commit comments

Comments
 (0)