# task-694.1: 카드뉴스 ContentGeneratorV2 통합 + 재생성 업로드

## 목표
CLI `pipeline` 커맨드에서 카드뉴스 생성 시 ContentGeneratorV2를 사용하도록 수정하고,
카드뉴스 1건을 재생성하여 carousel로 업로드한다.

## 배경
- 현재 CLI `pipeline` 커맨드는 v1 `ContentGenerator`를 사용 → 부실한 "body" 타입 슬라이드만 생성
- `run_full_pipeline.py`에는 이미 ContentGeneratorV2 → CardNewsRenderer 파이프라인이 작동함
- 제이회장님 지시: ContentGeneratorV2 + prompts_v2.py 로직을 카드뉴스 업로드 프로세스에 적용

## 핵심 파일

### 수정 대상
- `/home/jay/projects/ThreadAuto/cli.py` — `pipeline` 커맨드 (line ~574)
  - 현재: `ContentGenerator` (v1) 사용
  - 변경: 카드뉴스 타입일 때 `ContentGeneratorV2` 사용하도록 분기
- `/home/jay/projects/ThreadAuto/pipeline/orchestrator.py` — `generate_content()` 메서드
  - 현재: `ContentGenerator.generate()` 호출
  - 변경: 카드뉴스 타입일 때 `ContentGeneratorV2.generate()` 사용

### 참조 (읽기만)
- `/home/jay/projects/ThreadAuto/run_full_pipeline.py` — 이미 작동하는 V2 파이프라인 참고
- `/home/jay/projects/ThreadAuto/content/content_generator_v2.py` — V2 생성기 (Claude CLI 기반)
- `/home/jay/projects/ThreadAuto/content/prompts_v2.py` — 카테고리별 시스템 프롬프트
- `/home/jay/projects/ThreadAuto/renderer/cardnews.py` — CardNewsRenderer (render_from_slides)
- `/home/jay/projects/ThreadAuto/publisher/threads_publisher.py` — publish_cardnews()

## 작업 단계

### Phase 1: CLI pipeline 커맨드에 ContentGeneratorV2 통합
1. `pipeline/orchestrator.py`의 `generate_content()` 메서드 수정:
   - 카드뉴스 타입(TypeA~E 또는 cardnews 판별)일 때 ContentGeneratorV2 사용
   - 텍스트형은 기존 v1 유지
2. CLI `pipeline` 커맨드에서 카드뉴스 실행 시 ContentGeneratorV2 → CardNewsRenderer → 업로드 플로우 적용
3. `run_full_pipeline.py`의 로직 참고하되, CLI 통합 형태로 구현

### Phase 2: 카드뉴스 1건 재생성 + carousel 업로드
1. 화이트리스트 토픽 중 1건 선택 (eg-202 등)
2. ContentGeneratorV2로 콘텐츠 생성
3. CardNewsRenderer로 이미지 렌더링 (랜덤 테마)
4. `post-carousel` CLI 커맨드 또는 ThreadsPublisher로 carousel 업로드
5. 업로드 결과(post_id, 이미지 수, URL) 보고

## 제약사항
- ContentGeneratorV2의 슬라이드 구조 검증 (`_validate_structure`) 반드시 통과해야 함
  - slides 5~7장, 첫 번째=cover, 마지막=cta, 중간=card_list/detail/body
  - "1슬라이드 1항목 구조는 금지", description 40자 이상
- 기존 텍스트형(empathy/insight) 파이프라인은 건드리지 말 것
- 기존 부실 게시물(Post ID: 18075263858417259)은 삭제하지 말 것 (제이회장님 확인 후 처리)

## 검증 방법
1. CLI `pipeline --type cardnews --count 1` 등의 커맨드로 실행 가능해야 함
2. 생성된 이미지의 슬라이드 2~5가 card_list/detail 타입으로, 항목 2개 이상, 설명 40자+ 확인
3. Threads에 carousel(5~7장)로 정상 업로드 확인

## 산출물
- 수정된 파일 목록 + diff 요약
- 업로드된 Threads post ID
- 생성된 이미지 경로 목록