Figma-to-HTML 에이전트 초기 커밋

- 10단계 변환 프로세스 (PROCESS.md)
- 수학 공식 레퍼런스 (MATH.md, gradient_math.py)
- CSS 보정 규칙 R1~R16 (RULES.md)
- 작업 규율 7개 규칙 (PROCESS-CONTROL.md)
- 8개 Figma 프레임 1:1 HTML 변환물 (block-tests/)
- 8개 Jinja2 템플릿 staging (templates_staging/)
- 변환 완료 도서관 + 디자인 인사이트 (blocks_index.md)
- 사용법 가이드 (README.md)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 11:16:33 +09:00
commit beb5fd0c61
205 changed files with 19164 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
# 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번째 등장 후)