# templates_staging/ **Stage 2 — Jinja2 추상화 staging 영역** 블록이 2번째로 등장한 순간 여기에 Jinja2 템플릿으로 추출된다. 사용자가 직접 검수한 뒤 design_agent 본체로 프로모션한다. ## 파일 구조 ``` templates_staging/ ├── README.md ← 이 파일 ├── {pattern_id}.html.j2 ← Jinja2 템플릿 본체 └── {pattern_id}.meta.yaml ← when/slots/min_size_px 초안 ``` ## meta.yaml 형식 (초안) ```yaml pattern_id: cycle-3way-intersect category: visuals when: relation_type: [hierarchy, cycle] min_circles: 2 max_circles: 5 not_for: - linear_process - simple_list slots: - name: circles type: list min: 2 max: 5 item: label: string gradient_from: color gradient_to: color accents: list - name: side_labels type: list min: 0 max: 20 min_size_px: width: 1024 height: 480 provenance: source_frames: - 66:310 (Frame 1171281211) - {2번째 등장 frame ID} reference_html: block-tests/bim-goals-3circles.html ``` ## 흐름 ``` 1. block-tests/{slug_a}.html ← 1번째 등장 ↓ 2. block-tests/{slug_b}.html ← 2번째 등장 (같은 패턴 발견) ↓ 3. templates_staging/{pattern_id}.html.j2 ← Jinja2 추출 (NOW) templates_staging/{pattern_id}.meta.yaml ↓ 4. 🚧 사용자 검수 게이트 🚧 - 다양한 파라미터로 렌더 테스트 - 시각 충실도 확인 - meta.yaml 정밀화 ↓ 5. design_agent/templates/blocks/{category}/{pattern_id}.html.j2 (사용자 직접) design_agent/templates/catalog.yaml 등록 (사용자 직접) ↓ 6. blocks_index.md 상태 → "promoted" ``` ## 금지 - 에이전트가 4단계 이후를 자동 수행하는 것 - meta.yaml 없이 .html.j2 만 작성하는 것 - 1개 등장만 보고 미리 templates_staging 작성 (반드시 2번째 등장 후)