Commit Graph

18 Commits

Author SHA1 Message Date
030367da6c feat(saju-lab): monthly_flow.py — 12개월 운세 흐름 (4 tests)
월간(月干)과 월지(月支)의 일간 관계를 이용한 12개월 운세 점수 계산:
- 월간 상생(生) 관계: +5~10점
- 월간 상극(剋) 관계: -8점
- 월지 육합(六合) 관계: +10점
- 월지 육충(六衝) 관계: -12점
- 월지 상생/상극: ±4점

점수 범위 0~100, 5단계 레이블 (정체/도전/변동/안정/성장)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 08:02:35 +09:00
429e3448e5 feat(saju-lab): lucky.py — 럭키 컬러/숫자/방향 + 행운/위험 알림 (6 tests) 2026-05-26 08:00:37 +09:00
579e7387be feat(saju-lab): fortune_scores.py — 4 카테고리 점수 + overall (6 tests) 2026-05-26 07:58:02 +09:00
8ec3abb800 feat(saju-lab): main.py + routers (saju 6 + compat 5) + route tests
Phase 2 백엔드 마지막 task — FastAPI app · 11 endpoint · 10 route tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 20:28:08 +09:00
6d752acbe1 feat(saju-lab): interpret/pipeline.py — Claude 호출 + reroll 1회 (8 tests) 2026-05-25 20:23:38 +09:00
f995f8739f feat(saju-lab): interpret/prompt + schema — 12항목 + 궁합 SYSTEM_PROMPT (8 tests) 2026-05-25 20:21:07 +09:00
cad65dc869 feat(saju-lab): config + Pydantic 모델 + db.py CRUD (saju + compat) — 10 tests 2026-05-25 20:18:19 +09:00
f4f518fc80 feat(saju-lab): compatibility.py — 두 사주 궁합 점수 + breakdown
- saju-web/app/compatibility/result/page.tsx의 calculateCompatibility() 1:1 매핑
- 알고리즘: base 50 ± (일간 오행 same/produce/overcome) ± (일지 6합/3합/충), clamp [0,100]
- breakdown: day_master_element + branch_interaction (delta + relation/flags + description)
- 17 unit tests passed (헬퍼 9개 + 통합 8개), 438/438 total

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 20:14:47 +09:00
db1f69c7a5 feat(saju-lab): daeun.py — 대운 8개 계산 (30/30 reference) 2026-05-25 20:09:46 +09:00
ebfade655a feat(saju-lab): analysis.py — 오행/신강신약/용신/세운 (30/30 reference)
- calculate_detailed_element_balance: 가중치 오행 점수 (천간 1.0, 본기 1.0, 중기 0.5, 여기 0.3)
- calculate_element_score: 오행 비율 (%) — JS Math.round 호환
- analyze_day_master_strength: 신강/신약/중화 + score + reasons
  (월령 득령/실령, 통근, 투출, 오행 비율 4단계 평가)
- estimate_yongshin: 용신/희신/기신 + explanation
  (신강 → 식상/재성/관살 중 약한 2개, 신약 → 인성/비겁 중 약한 것, 중화 → 5행 중 약한 2개)
- calculate_seun: 올해 세운 + 4주 지지와 충/합 매핑
- perform_full_analysis: 위 5종 + branch_interactions + shinsal + gongmang + hidden_stems 통합

saju-web/lib/ai-interpretation.ts 와 1:1 매핑, 30 reference fixture 모두 통과 (180/180).
전체 saju-lab 테스트 389/389 passed.

JS Math.round 와 Python round() 의 banker-rounding 차이 보정을 위해 _js_round 헬퍼 추가.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 20:00:36 +09:00
234ccfe857 feat(saju-lab): shinsal.py — 지장간/신살/공망/지지 상호작용 2026-05-25 19:54:21 +09:00
3f0b7bcd74 feat(saju-lab): core.py — 60갑자 + 십성 + 십이운성 + calculate_saju (30/30 reference pass) 2026-05-25 19:48:28 +09:00
f91a74237b feat(saju-lab): lunar.py — 음력↔양력 변환 (sxtwl) 2026-05-25 19:39:06 +09:00
95243a7f1f fix(saju-lab): reference fixture 재생성 (solarlunar gzMonth 기반 + xfail 제거)
이전 fixture는 saju-web `getCurrentSolarTerm` 루프 버그로 30 케이스 모두 month branch='丑'으로 고정되어 검증 불가했음. saju-web을 임시 패치(solarlunar.gzMonth 직접 사용)하여 재생성한 뒤 패치는 되돌렸음. 결과: 12개 unique month branch + sxtwl과 49 테스트 전부 PASS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 19:35:49 +09:00
07b5c32f2f feat(saju-lab): solar_terms.py — sxtwl 기반 24절기 + 月支 매핑 2026-05-25 19:28:33 +09:00
4ddcd75453 feat(saju-lab): calculator/constants.py — 천간/지지/오행/지장간 상수 2026-05-25 19:20:34 +09:00
018459db88 feat(saju-lab): reference fixture 30 케이스 (TS 엔진 결과 추출) 2026-05-25 19:18:22 +09:00
42182014f0 feat(saju-lab): 스캐폴딩 — Dockerfile + requirements + 디렉토리 구조 2026-05-25 18:58:41 +09:00