---
name: magazine-ppt-ko
description: "IDS Phase 2 매거진/덱 PPT 생성기. HTML/CSS 템플릿 → 단일 PPTX. 한글 100% 정확(Pretendard/Noto Sans KR 강제). Use when: '매거진 PPT', '발표 덱', '슬라이드 일괄 생성', 'HTML to PPTX'."
---

# 매거진 PPT(한국어) 스킬 — IDS Phase 2

Insuro Design Studio Phase 2의 PPT/덱 생성기. HTML/CSS 슬라이드를 1920x1080 16:9 규격으로 일괄 빌드하고 `python-pptx`로 단일 PPTX로 묶습니다. 한글 100% 정확, 외부 API 직접 호출 0건.

## 스펙
- **규격**: 1920x1080 (16:9 PPT 표준)
- **폰트**: `'Pretendard', 'Noto Sans KR', sans-serif` 고정 (fallback chain 변경 금지)
- **그리드**: 16px 베이스
- **출력**: 슬라이드별 HTML + 단일 .pptx + manifest.json (한글 검증용)
- **외부 호출**: 0건 (IDS §0.5 — openai/anthropic/google generative API URL/SDK 임포트 금지)
- **한글**: 100% string-match 보장 (IDS §0.1)

## 레이아웃 10종

### 매거진 (`templates/magazine/`)
1. `executive` — 임원 보고용 KPI 헤드라인 + 본문 + 푸터 메타
2. `pitch` — 피치 덱 (큰 헤드라인 + 서브카피 + accent badge)
3. `retro` — 회고 (3컬럼: Keep/Problem/Try)
4. `status` — 상태 보고 (KPI 카드 4개 그리드 + 코멘트)
5. `plan` — 일정/플랜 (좌측 타이틀 + 우측 타임라인)

### 덱 (`templates/deck/`)
1. `intro` — 표지 (타이틀 + 서브타이틀 + 발표자/날짜)
2. `agenda` — 목차 (좌측 인덱스 + 우측 카피)
3. `content` — 일반 콘텐츠 (제목 + 본문 + 우측 시각 영역)
4. `summary` — 요약 (3 핵심 포인트 + 다음 액션)
5. `qa` — Q&A 마무리 (큰 카피 + 연락처)

## 디자인 토큰 주입 (Phase 1 재사용)

`satori-cardnews` 스킬의 `design_md_loader`를 import하여 `resources/design-md/{brand}/DESIGN.md`에서 디자인 토큰을 읽습니다.

```python
import sys
sys.path.insert(0, "/home/jay/workspace/skills/satori-cardnews")
from design_md_loader import load_design_md, fallback_tokens

try:
    tokens = load_design_md("supabase")
except (FileNotFoundError, ValueError):
    tokens = fallback_tokens()  # 잘못된 brand 입력 시 graceful fallback
```

토큰은 HTML `<style>` 블록에 CSS 변수로 주입됩니다. 단, **font-family는 항상 `'Pretendard', 'Noto Sans KR', sans-serif`로 강제**되어 fallback이 차단됩니다.

## 사용법

```python
from build_deck import build

result = build(
    layout_names=["executive", "pitch", "intro", "agenda"],
    variables_list=[
        {"title": "2026 Q2 실적", "kpi_headline": "매출 320억 달성", ...},
        {"headline": "보험을 다시 쓰다", "subcopy": "InsuRo의 비전", ...},
        ...
    ],
    brand="supabase",
    output_dir="/tmp/build_001",
)
# result.html_paths: list[Path] — 슬라이드별 HTML
# result.manifest_path: Path — 한글 검증용 manifest.json

from html_to_pptx import compile_pptx
pptx_path = compile_pptx(result.output_dir, result.manifest_path, "/tmp/build_001/deck.pptx")
```

## 한글 보장 정책 (IDS §0.1)

1. 모든 사용자 가시 텍스트 슬롯은 한글 입력 가능
2. HTML 렌더링 → 한글 텍스트는 그대로 DOM에 삽입 (이미지화 X)
3. `verify_korean.py`로 manifest의 모든 한글 문자열이 HTML/PPTX에 string-match로 존재하는지 검증
4. PPTX 텍스트박스는 `font.name = "Pretendard"` 고정 (없을 경우 `Noto Sans KR`)

## 외부 API 차단 정책 (IDS §0.5)

이 스킬의 어떤 모듈도 다음을 임포트/호출하지 않습니다:
- `openai`, `anthropic`, `google.generativeai`
- 직접 URL 호출: `api.openai.com`, `api.anthropic.com`, `generativelanguage.googleapis.com`
- `urlopen`, `requests`, `httpx` 등 HTTP 클라이언트

검증은 `tests/design-team/test_ids_phase2_ppt_deck.py`의 정적 검사로 수행됩니다.

## 의존성

- Python 3.10+ (type hints 필수)
- `python-pptx` (PPTX 빌드 시; 미설치 시 명확한 ImportError + 테스트 skip)
- 표준 라이브러리 외 추가 의존성 0

## 출력 디렉토리 구조

```
output_dir/
├── 01_executive.html
├── 02_pitch.html
├── 03_intro.html
├── ...
├── manifest.json     # {"slides": [{"file": "01_executive.html", "korean_strings": [...]}, ...]}
└── deck.pptx         # html_to_pptx 호출 후 생성
```

## 절대 변경 금지 영역

- `skills/satori-cardnews/**` (Phase 1, read-only — import만 가능)
- `resources/design-md/**` (Phase 4, read-only)

## 참고

- IDS Phase 1: `/home/jay/workspace/skills/satori-cardnews/`
- 디자인 토큰: `/home/jay/workspace/resources/design-md/{brand}/DESIGN.md`
- 회귀 테스트: `/home/jay/workspace/tests/design-team/test_ids_phase2_ppt_deck.py`
