# 대용량 파일 TOP 20 (토큰 소모 위험)

> 생성일: 2026-04-04

## 기준
- 대상: `/home/jay/workspace/` 하위 `.py`/`.js`/`.md`/`.json` 파일
- 제외: `node_modules`, `.worktrees`, `venv`, `__pycache__`, `package-lock.json`
- 크기: 10KB 이상의 파일만 분석

## TOP 20

| 순위 | 파일명 | 경로 | KB | 추정토큰 | 줄수 | 위험도 |
|---|---|---|---|---|---|---|
| 1 | task-timers.json | `/home/jay/workspace/memory/task-timers.json` | 676.3 | 277,020 | 19,914 | LOW |
| 2 | token-ledger.json | `/home/jay/workspace/memory/token-ledger.json` | 383.1 | 156,939 | 12,174 | LOW |
| 3 | .parse_cache JSON | `/home/jay/workspace/libs/.parse_cache/9f22771974b6fecb5bc4084dbea03196a04f3ea4e4044f87e2cc369a65968e3b.json` | 287.8 | 117,903 | 0 | LOW |
| 4 | server.py | `/home/jay/workspace/dashboard/server.py` | 225.2 | 92,257 | 5,271 | HIGH |
| 5 | 09-chapter9.md | `/home/jay/workspace/memory/research/sources/claude-code-mastering/09-chapter9.md` | 139.9 | 57,342 | 3,943 | LOW |
| 6 | design-direction-9set.md | `/home/jay/workspace/output/google-ads/design-direction-9set.md` | 125.1 | 51,254 | 1,845 | LOW |
| 7 | test_dispatch.py | `/home/jay/workspace/tests/test_dispatch.py` | 124.2 | 50,876 | 2,872 | HIGH |
| 8 | crisis-scenarios.md | `/home/jay/workspace/memory/plans/recruiting-marketing/exec/crisis-scenarios.md` | 109.6 | 44,911 | 2,285 | LOW |
| 9 | test_group_chat.py | `/home/jay/workspace/tests/test_group_chat.py` | 99.6 | 40,808 | 2,503 | HIGH |
| 10 | kpi-tracking.md | `/home/jay/workspace/memory/plans/recruiting-marketing/exec/kpi-tracking.md` | 95.3 | 39,045 | 2,379 | LOW |
| 11 | test_conversation_memory.py | `/home/jay/workspace/services/multimodel-bot/tests/test_conversation_memory.py` | 92.7 | 38,008 | 2,339 | HIGH |
| 12 | 10-chapter10.md | `/home/jay/workspace/memory/research/sources/claude-code-mastering/10-chapter10.md` | 92.6 | 37,938 | 2,755 | LOW |
| 13 | CampaignView.js | `/home/jay/workspace/dashboard/components/CampaignView.js` | 87.1 | 35,697 | 1,265 | HIGH |
| 14 | BannerEditorView.js | `/home/jay/workspace/dashboard/components/BannerEditorView.js` | 87.5 | 35,843 | 1,613 | HIGH |
| 15 | blog-12-detail.md | `/home/jay/workspace/memory/plans/recruiting-marketing/exec/blog-12-detail.md` | 83.8 | 34,349 | 1,901 | LOW |
| 16 | 11-chapter11.md | `/home/jay/workspace/memory/research/sources/claude-code-mastering/11-chapter11.md` | 82.7 | 33,907 | 2,532 | LOW |
| 17 | 12-chapter12.md | `/home/jay/workspace/memory/research/sources/claude-code-mastering/12-chapter12.md` | 76.8 | 31,460 | 2,284 | LOW |
| 18 | blog-content.md | `/home/jay/workspace/memory/plans/recruiting-marketing/blog-content.md` | 64.3 | 26,354 | 1,422 | LOW |
| 19 | test_output_review.py | `/home/jay/workspace/scripts/tests/test_output_review.py` | 63.4 | 25,988 | 1,587 | HIGH |
| 20 | test_server.py | `/home/jay/workspace/dashboard/test_server.py` | 62.9 | 25,780 | 1,569 | HIGH |

## 위험도 기준

- **HIGH (높음)**: 50KB 이상 + 에이전트가 자주 읽는 파일 (코드 파일 .py, .js)
  - 직접 로드되어 토큰을 빠르게 소모
  - 권장: 모듈화 또는 핵심 부분만 추출

- **MED (중간)**: 25-50KB 또는 자주 안 읽히는 대용량 파일
  - 상황에 따라 토큰 소모 수준 변동

- **LOW (낮음)**: 데이터 파일 (JSON, 마크다운)
  - 에이전트가 직접 로드하지 않음 (필요시에만 참조)
  - 메모리/참고 파일로 분류

## 주요 발견

### 즉시 개선 필요 파일 (HIGH 위험도)

1. **server.py** (225KB, 5,271줄)
   - 대시보드 서버의 메인 파일
   - 토큰 소모: 92,257개
   - 권장: 라우팅/유틸 분리, 점진적 리팩토링

2. **test_dispatch.py** (124KB, 2,872줄)
   - 테스트 통합 파일
   - 토큰 소모: 50,876개
   - 권장: 테스트 케이스별 파일 분리

3. **test_group_chat.py** (99.6KB, 2,503줄)
   - 그룹 채팅 테스트
   - 토큰 소모: 40,808개

### JavaScript 컴포넌트 (HIGH 위험도)

- **CampaignView.js** (87.1KB, 1,265줄)
- **BannerEditorView.js** (87.5KB, 1,613줄)
- 권장: React 컴포넌트 분할, 상태 관리 분리

### 메모리/데이터 파일 (LOW 위험도 - 직접 로드 금지)

- **task-timers.json** (677KB): 작업 타이머 로그, 캐시로 분류
- **token-ledger.json** (383KB): 토큰 사용 기록, 아카이빙 검토
- **.parse_cache JSON** (288KB): 파싱 캐시, 정기적 정리 필요

## 권장 액션 아이템

### 즉시 (Priority 1)
- [ ] server.py를 3-4개 모듈로 분리 (API, 비즈니스로직, 유틸)
- [ ] test_dispatch.py를 기능별 테스트 파일로 분할

### 단기 (Priority 2)
- [ ] CampaignView.js, BannerEditorView.js 컴포넌트 분리
- [ ] task-timers.json, token-ledger.json 아카이빙/정리 전략 수립

### 중기 (Priority 3)
- [ ] .parse_cache 정기적 정리 스크립트 작성
- [ ] 10KB 이상 마크다운 문서 인덱싱/링크 최적화
