From 20f4412241c43c4bb3407a943ee796944f4ab172 Mon Sep 17 00:00:00 2001 From: Claude-51124 Date: Sat, 22 Nov 2025 13:54:12 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EC=B5=9C=EA=B7=BC=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20=EC=82=AC=ED=95=AD=20=EB=AC=B8=EC=84=9C=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - calendar_mixed_time_format_parsing: JSON 블록 제거 내용 추가 - naverworks_briefing_2stage: config 제거 및 설정 관리 원칙 추가 --- .../251013_naverworks_briefing_2stage.md | 19 +++++++++++++++++++ ...1122_calendar_mixed_time_format_parsing.md | 9 +++++++++ 2 files changed, 28 insertions(+) diff --git a/journey/troubleshooting/251013_naverworks_briefing_2stage.md b/journey/troubleshooting/251013_naverworks_briefing_2stage.md index 53186c3..a0ed577 100644 --- a/journey/troubleshooting/251013_naverworks_briefing_2stage.md +++ b/journey/troubleshooting/251013_naverworks_briefing_2stage.md @@ -81,6 +81,20 @@ --- +## 추가 수정 (2025-11-22) + +### config.py 사용 금지 적용 +**파일**: `rb8001/app/skills/naverworks_briefing.py:237` + +**변경 내용**: +- `settings.DEFAULT_LLM_MODEL` → `os.getenv("DEFAULT_LLM_MODEL", "gemini-2.5-flash-lite")` +- `app.core.config.settings` import 제거 +- `.env`에서 직접 환경변수 읽기로 변경 + +**이유**: AGENTS.md 규칙에 따라 config.py 사용 금지, `.env`와 DB 직접 사용 원칙 준수 + +--- + ## 교훈 ### 설계 단계에서 명확한 요구사항 정의 필요 @@ -102,3 +116,8 @@ - 제안 반영 시 추가 10-20줄 증가로 320줄 예상 - 포맷팅 로직(`_format_slack_message`)을 별도 모듈 분리 검토 필요 - 또는 요약 생성 로직을 서비스 계층 모듈로 분리 고려 + +### 설정 관리 원칙 +- config.py 중간 레이어는 불필요한 추상화 +- `.env`와 DB를 직접 사용하여 일관성 유지 +- 환경변수 기본값은 실제 사용 모델과 일치시켜야 함 diff --git a/journey/troubleshooting/251122_calendar_mixed_time_format_parsing.md b/journey/troubleshooting/251122_calendar_mixed_time_format_parsing.md index 0cf9199..94533ff 100644 --- a/journey/troubleshooting/251122_calendar_mixed_time_format_parsing.md +++ b/journey/troubleshooting/251122_calendar_mixed_time_format_parsing.md @@ -72,6 +72,14 @@ mixed_pattern = r"(\d{1,2}):(\d{2})\s*[~-]\s*(약)?\s*(\d{1,2})시\s*(반|(\d{1, 2. 구조화된 필드 (기존) 3. 자연어 파싱 (기존) +### 5. LLM 응답에서 JSON 블록 제거 +**파일**: `rb8001/app/router/router.py:821-830` + +사용자에게는 자연어 메시지만 표시: +- ```json { ... } ``` 패턴 제거 +- { ... } 패턴 제거 +- JSON은 파싱용으로만 사용, 사용자 응답에는 포함하지 않음 + --- ## 구현 완료 (2025-11-22) @@ -79,6 +87,7 @@ mixed_pattern = r"(\d{1,2}):(\d{2})\s*[~-]\s*(약)?\s*(\d{1,2})시\s*(반|(\d{1, ### 수정된 파일 - `rb8001/app/router/calendar_handler.py`: 혼합 시간 형식 파싱, JSON 파싱 로직 추가 - `rb8001/app/llm/llm_service.py`: 구조화된 JSON 응답 요구 프롬프트 수정 +- `rb8001/app/router/router.py`: calendar_confirm 응답에서 JSON 블록 제거 - `rb8001/tests/test_calendar_mixed_time_format_parsing.py`: TDD 테스트 작성 ### 검증 방법