런타임 품질 개선: Kei JSON 파싱 + 높이 예산 강제 + conclusion 강제 + FAISS 프리로드

1. kei_client.py: Kei API가 마크다운 리스트(- ) 접두사로 JSON 응답 시 전처리하여 파싱
2. image_utils.py: base_path+상대경로 이중 시 파일명 rglob 재탐색
3. design_director.py:
   - conclusion 꼭지 → footer zone + conclusion-accent-bar 코드 레벨 강제
   - _validate_height_budget(): zone별 height_cost 합산 검증, 초과 시 큰 블록 자동 교체
   - Opus 추천 프롬프트에 zone 배정 규칙 명시 (conclusion→footer 등)
4. main.py: 서버 startup 시 FAISS 인덱스 + bge-m3 모델 미리 로드

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 19:15:28 +09:00
parent fb67f221f4
commit 7ac9eea21a
25 changed files with 741 additions and 1896 deletions

View File

@@ -1,74 +0,0 @@
<!-- 세로 타임라인: 좌측 선 + 원형 마커 + 우측 내용 (SVG 마커) -->
<!--
📋 timeline-vertical
─────────────────
용도: 연혁, 정책 시행 일정, 로드맵, 연도별 사건
슬롯: events[] (각 이벤트에 year, title, description, color)
Figma 참고: 정책 로드맵, 건설 정책 추진현황
-->
<div class="block-timeline-v">
{% for event in events %}
<div class="tv-event">
<div class="tv-marker-col">
<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="10" fill="{{ event.color | default('#2563eb') }}" />
<circle cx="12" cy="12" r="5" fill="white" />
</svg>
{% if not loop.last %}<div class="tv-line" style="background: {{ event.color | default('#2563eb') }}"></div>{% endif %}
</div>
<div class="tv-content">
<div class="tv-year" style="color: {{ event.color | default('#2563eb') }}">{{ event.year }}</div>
<div class="tv-title">{{ event.title }}</div>
{% if event.description %}<div class="tv-desc">{{ event.description }}</div>{% endif %}
</div>
</div>
{% endfor %}
</div>
<style>
.block-timeline-v {
display: flex;
flex-direction: column;
gap: 0;
padding: 10px 0;
}
.tv-event {
display: flex;
gap: 14px;
}
.tv-marker-col {
display: flex;
flex-direction: column;
align-items: center;
flex-shrink: 0;
width: 24px;
}
.tv-line {
width: 2px;
flex: 1;
min-height: 20px;
opacity: 0.3;
border-radius: 1px;
}
.tv-content {
padding-bottom: 20px;
flex: 1;
}
.tv-year {
font-size: 13px;
font-weight: 800;
margin-bottom: 2px;
}
.tv-title {
font-size: 15px;
font-weight: 700;
color: #1e293b;
margin-bottom: 4px;
}
.tv-desc {
font-size: 13px;
color: #475569;
line-height: 1.7;
white-space: pre-line;
}
</style>