Phase I 실행 완료 + 프로세스 재설계 (Stage 2.5 → Stage 5)

Phase I: 전수 정합성 복구 + 넘침 처리 패러다임 전환 (14개 항목)
- I-14: SSE 유틸 공통 추출 (src/sse_utils.py 신규, 3개 파일 중복 제거)
- I-13: dead code 3건 삭제 (_call_anthropic_direct, _extract_sse_text x2) + import anthropic 제거
- I-1: STEP_B_PROMPT purpose 가이드 미존재 블록 3개 → 실존 블록 교체
- I-2: catalog.yaml not_for 13건 미존재 블록 참조 교체/제거
- I-12: BLOCK_SLOTS 주석 개수 수정 (cards 9, visuals 6, emphasis 10)
- I-10: INDEX.md 38개 동기화 (삭제된 8개 블록 행 제거)
- I-11: README.md 38개 동기화 (_legacy 제거, 트리/개수 정리)
- I-3: PURPOSE_FALLBACK 상수 + purpose 기반 미등록 블록 교체
- I-7: compare-pill-pair 단독 사용 금지 검증
- I-4: 38개 블록 전체에 slot_desc 추가
- I-5: 편집자 프롬프트에 slot_desc 전달 로직
- I-6: 제목 유사도 70% 초과 시 자동 교정
- I-9: 넘침 판단 Kei API 호출 (KEI_OVERFLOW_PROMPT, call_kei_overflow_judgment)
- I-8: 대형 콘텐츠 정보 Kei overflow 프롬프트에 포함

프로세스 재설계:
- Stage 2.5 제거 → Stage 5에서 Sonnet 감지 + Kei 판단 통합
- _review_balance() 확장: zone 예산 + overflow_detected action 추가
- Stage 5 루프에 Kei 넘침 판단 호출 통합
- _apply_adjustments()에 kei_trim/kei_restructure action 추가
- _build_overflow_context(), _convert_kei_judgment() 헬퍼 함수 추가
- DOWNGRADE_MAP은 Kei API 실패 시 비상용으로만 잔존

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 13:06:21 +09:00
parent 1c65255f04
commit ffad1ba82a
11 changed files with 1982 additions and 535 deletions

View File

@@ -99,7 +99,7 @@ blocks:
이미지가 핵심인 경우.
'
not_for: '이미지 없이 텍스트만 → card-text-grid 사용. 키워드+짧은 설명만 강조 → card-dark-overlay 사용.
not_for: '이미지 없이 텍스트만 → card-icon-desc 사용. 키워드+짧은 설명만 강조 → card-dark-overlay 사용.
2개 비교 → compare-pill-pair + comparison-table 조합 사용.
'
@@ -116,7 +116,7 @@ blocks:
나열.
'
not_for: '긴 설명(3줄 이상) → card-text-grid 사용. 이미지가 핵심(크게 보여야 함) → card-image-3col 사용.
not_for: '긴 설명(3줄 이상) → card-icon-desc 사용. 이미지가 핵심(크게 보여야 함) → card-image-3col 사용.
'
slots:
@@ -131,7 +131,7 @@ blocks:
when: '카테고리별 분류가 핵심일 때. 태그로 구분. 예: 제조업(파란) / 건축(초록) / 인프라·토목(빨간)
'
not_for: '태그 불필요 → card-image-3col 사용. 이미지 없음 → card-text-grid 사용.
not_for: '태그 불필요 → card-image-3col 사용. 이미지 없음 → card-icon-desc 사용.
'
slots:
@@ -207,7 +207,7 @@ blocks:
when: 'KPI, 성과 수치, 목표 달성률, 비용 절감율. 예: 30% 절감 / 40% 감소 / 220명+ 인력
'
not_for: '숫자가 아닌 텍스트 → card-text-grid 사용.
not_for: '숫자가 아닌 텍스트 → card-icon-desc 사용.
'
slots:
@@ -223,7 +223,7 @@ blocks:
4.교육
'
not_for: '순서 없음 → card-text-grid 사용. 이미지 포함 단계 → card-step-vertical 사용. 가로 흐름 →
not_for: '순서 없음 → card-icon-desc 사용. 이미지 포함 단계 → card-step-vertical 사용. 가로 흐름 →
process-horizontal 사용.
'
@@ -308,7 +308,7 @@ blocks:
when: '섹션 전환점 키워드 강조. 아래에 카드/표 올 때 주제 선언.
'
not_for: '본문 텍스트 → topic-header 계열. 결론 → conclusion-accent-bar.
not_for: '본문 텍스트 → topic-header 계열. 결론 → banner-gradient.
'
slots:
@@ -342,7 +342,7 @@ blocks:
when: '논리적 순서를 가로로 (1→2→3→4). 프로세스 흐름.
'
not_for: '시간 기반(연도) → timeline 사용. 세로 나열 → card-numbered 사용.
not_for: '시간 기반(연도) → process-horizontal 사용. 세로 나열 → card-numbered 사용.
'
slots:
@@ -373,7 +373,7 @@ blocks:
+ M(Model)
'
not_for: '아이콘+설명 → card-icon-desc 사용. 용어 정의 → card-text-grid 사용.
not_for: '아이콘+설명 → card-icon-desc 사용. 용어 정의 → card-icon-desc 사용.
'
slots:
@@ -388,7 +388,7 @@ blocks:
when: '임팩트 있는 문제 제기. 시각적으로 인용임을 명확히.
'
not_for: '짧은 인용 → quote-left-border. 질문 → quote-question.
not_for: '짧은 인용(1~2줄) → quote-question. 질문 형태 → quote-question.
'
slots:
@@ -404,7 +404,7 @@ blocks:
when: '독자에게 질문. 문제 인식 유도, 전환점. 예: ''지금의 방식으로도 가능할까?''
'
not_for: '인용(출처) → quote-left-border. 결론 → conclusion-accent-bar.
not_for: '인용(출처) → quote-big-mark. 결론 → banner-gradient.
'
slots:
@@ -440,7 +440,7 @@ blocks:
when: '섹션 구분, 핵심 선언, 강조 문구.
'
not_for: '하단 결론 → conclusion-accent-bar. 인용 → quote 계열.
not_for: '하단 결론 → banner-gradient. 인용 → quote 계열.
'
slots:
@@ -456,7 +456,7 @@ blocks:
when: '핵심 포인트를 짙은 배경 위에 강조. 시각적 무게감.
'
not_for: '밝은 배경 → card-text-grid 또는 card-numbered.
not_for: '밝은 배경 → card-icon-desc 또는 card-numbered.
'
slots:
@@ -537,7 +537,7 @@ blocks:
when: '섹션 구분, 주제 전환점에 가벼운 구분. 예: ── 핵심 요약 ──
'
not_for: '강한 구분 → section-header-bar. 결론 → conclusion-accent-bar.
not_for: '강한 구분 → section-header-bar. 결론 → banner-gradient.
'
slots: