Phase U: 하드코딩 10건 제거 — 범용 프롬프트 시스템

제거:
- _get_popup_data() 함수 삭제 (DX/BIM 비교표 하드코딩)
- "📊 DX와 BIM의 상세 비교" 팝업 링크 → Claude 자율 판단
- "BIM ≠ DX" 예시 → core_message 변수만
- "상위개념/하위기술/포함관계" 금지어 → 범용 "임의 라벨 금지"
- fallback 키워드 ["혼용","사례"], ["관계","핵심기술","DX"] → source_hint 동적 추출
- "사례 카드" → "토픽" 범용화
- "BIM (Building Information Modeling)" 예시 → 제거

추가:
- _extract_keywords_from_hints(): source_hint에서 섹션명 키워드 동적 추출
- 팝업: 원본에 비교 구조 있으면 Claude가 자체 판단, 없으면 팝업 없음
- content_verifier: body_bg overflow 패턴 OR 수정, popup-link 필수 해제

회귀 테스트: 기존 MDX 전체 PASS (1차 시도)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 10:44:45 +09:00
parent 83f589ca52
commit 24eb1bc5ad
2 changed files with 43 additions and 31 deletions

View File

@@ -284,7 +284,7 @@ def detect_invented_text(
"""
# 허용 예외 (구조적 라벨)
allowed_labels = {
"용어 정의", "핵심 메시지", "상세 비교", "DX와 BIM의 상세 비교",
"용어 정의", "핵심 메시지", "상세 비교",
}
html_texts = extract_text_from_html(generated_html)
@@ -377,12 +377,10 @@ def verify_no_forbidden_content(
# ═══════════════════════════════════════════════════════════
REQUIRED_PATTERNS: dict[str, list[str]] = {
"body_bg": ["overflow:hidden", "overflow: hidden"],
"body_bg": ["overflow:hidden|overflow: hidden"],
"body_core": [
"overflow:hidden|overflow: hidden",
"float:right|float: right",
"key-msg",
"popup-link",
],
"sidebar": [
"overflow:hidden|overflow: hidden",