# 세션 모니터링 임계값 단일소스 통일

## 작업 개요
세션 모니터링 수치(70%/85%/90%)가 3곳에 각각 하드코딩되어 있다.
constants.json에 단일소스를 만들고, 모든 참조 지점에서 읽도록 통일한다.

## 현재 문제 (하드코딩 3곳)

### 1. team_prompts.py:270-276 (프롬프트 텍스트)
```python
f"- **70% 도달**: `/compact` 실행하여 컨텍스트 압축\n"
f"- **85% 도달**: 즉시 중간 체크포인트 저장 후 `/compact` 실행\n"
f"- **90% 초과**: 세션 요약 파일 저장 → 새 세션에서 이어서 작업\n"
```

### 2. session_monitor.py:39-41 (코드 상수)
```python
_DEFAULT_CONTEXT_LIMIT = 200_000
_DEFAULT_WARNING_PCT = 0.70
_DEFAULT_CRITICAL_PCT = 0.85
```

### 3. settings.json:4 (환경변수)
```json
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "70"
```

## 해결 방안

### 1. constants.json에 session_monitoring 섹션 추가
```json
"session_monitoring": {
  "context_limit": 200000,
  "warning_pct": 70,
  "critical_pct": 85,
  "resume_pct": 90,
  "autocompact_pct": 70,
  "tool_call_compact_threshold": 50,
  "time_compact_minutes": 30,
  "description": "세션 모니터링 임계값. team_prompts.py와 session_monitor.py에서 참조."
}
```

### 2. session_monitor.py 수정
- `_DEFAULT_*` 상수를 constants.json에서 로드
- ConfigManager 또는 직접 json.load 사용
- 로드 실패 시 현재 값을 fallback으로 유지

### 3. team_prompts.py 수정
- `_build_session_monitoring_section()`에서 constants.json 읽어서 수치 삽입
- 하드코딩 문자열 → f-string 변수로 교체

### 4. settings.json AUTOCOMPACT 값 정합성
- constants.json의 autocompact_pct와 settings.json의 AUTOCOMPACT_PCT_OVERRIDE가 일치하는지 검증
- 불일치 시 경고 로그 출력하는 검증 함수 추가 (optional)

## 파일 목록
- `/home/jay/workspace/config/constants.json` — session_monitoring 섹션 추가
- `/home/jay/workspace/prompts/team_prompts.py` — 하드코딩 → constants 참조
- `/home/jay/workspace/utils/session_monitor.py` — 하드코딩 → constants 참조
- `/home/jay/.claude/settings.json` — 참고 (AUTOCOMPACT 값)
- `/home/jay/workspace/tests/test_session_auto_compress.py` — 테스트 업데이트
- `/home/jay/workspace/utils/tests/test_context_compressor.py` — 회귀 확인

## 완료 기준
- constants.json 단일소스에서 모든 임계값 관리
- team_prompts.py, session_monitor.py 하드코딩 제거
- 기존 테스트 회귀 없음
- constants.json 값 변경 시 프롬프트와 코드 모두 자동 반영 확인
