figma_to_html_agent 추가 + MCP/Claude 설정
figma_to_html_agent/: - Figma MCP 기반 블록 추출 에이전트 (CLAUDE.md, PLAN.md, PROCESS.md 등) - block-tests/: Figma→HTML 변환 결과물 (bim-3roles-cards 등) - templates_staging/: Jinja2 템플릿 + meta.yaml + example.yaml - figma-analysis/, figma-assets/: Figma 분석 데이터 + 에셋 - scripts/: gradient_math.py 등 유틸리티 설정: - .mcp.json: Figma MCP 서버 연결 설정 - .claude/settings.json: Claude Code 프로젝트 설정 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BIN
figma_to_html_agent/block-tests/assets/bg_bottom_image.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
figma_to_html_agent/block-tests/assets/bracket_1377.png
Normal file
|
After Width: | Height: | Size: 676 B |
BIN
figma_to_html_agent/block-tests/assets/bracket_1378.png
Normal file
|
After Width: | Height: | Size: 731 B |
10
figma_to_html_agent/block-tests/assets/ellipse_597.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg width="101" height="212" viewBox="0 0 101 212" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M-1.36179e-05 210.5C54.6762 210.5 99 163.714 99 106C99 48.2862 54.6762 1.5 -4.48227e-06 1.5" stroke="url(#paint0_linear_17_1348)" stroke-opacity="0.7" stroke-width="3" stroke-dasharray="5 5"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17_1348" x1="-157.3" y1="87.4222" x2="85.8287" y2="95.2389" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#CC5201"/>
|
||||
<stop offset="0.5" stop-color="#286852"/>
|
||||
<stop offset="1" stop-color="#5C4E31"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 579 B |
10
figma_to_html_agent/block-tests/assets/ellipse_599.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg width="212" height="101" viewBox="0 0 212 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.5 -4.22083e-06C1.5 54.6762 48.2862 99 106 99C163.714 99 210.5 54.6762 210.5 -1.72853e-06" stroke="url(#paint0_linear_17_1347)" stroke-opacity="0.7" stroke-width="3" stroke-dasharray="5 5"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17_1347" x1="124.578" y1="-157.3" x2="116.761" y2="85.8287" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#5C4E31"/>
|
||||
<stop offset="0.5" stop-color="#286852"/>
|
||||
<stop offset="1" stop-color="#CC5201"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 579 B |
10
figma_to_html_agent/block-tests/assets/ellipse_600.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg width="101" height="212" viewBox="0 0 101 212" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M100.5 1.5C45.8238 1.5 1.50001 48.2862 1.5 106C1.5 163.714 45.8238 210.5 100.5 210.5" stroke="url(#paint0_linear_17_1357)" stroke-opacity="0.7" stroke-width="3" stroke-dasharray="5 5"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17_1357" x1="257.8" y1="124.578" x2="14.6713" y2="116.761" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#CC5201"/>
|
||||
<stop offset="0.5" stop-color="#286852"/>
|
||||
<stop offset="1" stop-color="#5C4E31"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 571 B |
BIN
figma_to_html_agent/block-tests/assets/ellipse_outer_comm.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 92 KiB |
BIN
figma_to_html_agent/block-tests/assets/ellipse_outer_safety.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 122 KiB |
BIN
figma_to_html_agent/block-tests/assets/icon_asset.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
figma_to_html_agent/block-tests/assets/label_tech_group.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
figma_to_html_agent/block-tests/assets/rect_42333.png
Normal file
|
After Width: | Height: | Size: 328 KiB |
BIN
figma_to_html_agent/block-tests/assets/rect_42334.png
Normal file
|
After Width: | Height: | Size: 235 KiB |
BIN
figma_to_html_agent/block-tests/assets/rect_42335.png
Normal file
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 22.4 16.8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Vector" d="M21.4629 0.5L11.1191 15.8984L0.930664 0.5H21.4629Z" fill="var(--fill-0, black)" stroke="var(--stroke-0, white)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 316 B |
|
After Width: | Height: | Size: 531 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 485 KiB |
@@ -0,0 +1,9 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 1080 119.144" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Rectangle 42421" d="M0 50C0 22.3858 22.3858 1.3574e-10 50 1.3202e-10L1030 0C1057.61 0 1080 22.3858 1080 50V69.1436C1080 96.7578 1057.61 119.144 1030 119.144H50C22.3858 119.144 0 96.7578 0 69.1436V59.5718V50Z" fill="url(#paint0_linear_102_194)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_102_194" x1="1370.18" y1="59.5718" x2="290.181" y2="59.5718" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A5A196" stop-opacity="0.5"/>
|
||||
<stop offset="1" stop-color="#39321E"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 688 B |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,9 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 1080 118.047" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Rectangle 42422" d="M0 50C0 22.3858 22.3858 -1.00084e-07 50 0L1030 3.55188e-06C1057.61 3.65196e-06 1080 22.3858 1080 50V68.0473C1080 95.6616 1057.61 118.047 1030 118.047L50 118.047C22.3858 118.047 0 95.6616 0 68.0474V50Z" fill="url(#paint0_linear_102_198)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_102_198" x1="1080" y1="59.0233" x2="1.03314e-06" y2="59.0233" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#296B55" stop-opacity="0.5"/>
|
||||
<stop offset="1" stop-color="#032118"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 702 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,9 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 1080 119.144" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Rectangle 42421" d="M0 50C0 22.3858 22.3858 1.3574e-10 50 1.3202e-10L1030 0C1057.61 0 1080 22.3858 1080 50V69.1436C1080 96.7578 1057.61 119.144 1030 119.144H50C22.3858 119.144 0 96.7578 0 69.1436V59.5718V50Z" fill="url(#paint0_linear_102_196)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_102_196" x1="1370.18" y1="59.5718" x2="290.181" y2="59.5718" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A5A196" stop-opacity="0.5"/>
|
||||
<stop offset="1" stop-color="#39321E"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 688 B |
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,5 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 1214 170" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="Rectangle 42631">
|
||||
<path d="M0 0H1214V170H0V0Z" fill="var(--fill-0, #FAEDCB)" style="mix-blend-mode:multiply"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 303 B |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 455 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
51
figma_to_html_agent/block-tests/assets/shared/README.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# shared/ — 해시 기반 공통 자산 캐시
|
||||
|
||||
여러 프레임에서 등장하는 자산(배경 텍스처, 아이콘, 아크 등)을 **해시 파일명**으로 한 번만 저장한다.
|
||||
|
||||
## 파일명 규칙
|
||||
|
||||
Figma MCP 가 자산 URL을 다음 형식으로 제공:
|
||||
```
|
||||
http://localhost:3845/assets/849658071be46a26936e8666e3722b2dd548aee7.png
|
||||
```
|
||||
|
||||
URL 끝의 hash (`849658071be46a26936e8666e3722b2dd548aee7`) 그대로 파일명 사용:
|
||||
```
|
||||
shared/849658071be46a26936e8666e3722b2dd548aee7.png
|
||||
```
|
||||
|
||||
## dedup 작동 원리
|
||||
|
||||
Figma는 같은 자산을 다른 노드에서 사용해도 동일 hash로 서빙한다. 따라서:
|
||||
|
||||
```
|
||||
프레임 A: bg_texture (hash: 849658...) → 다운로드 → shared/849658....png
|
||||
프레임 B: bg_texture (hash: 849658...) → 이미 있음 → 다운로드 스킵
|
||||
프레임 C: 새 아이콘 (hash: f05ebf...) → 다운로드 → shared/f05ebf....png
|
||||
```
|
||||
|
||||
매 변환마다 다운로드 전 `[ -f "shared/${hash}.${ext}" ]` 체크.
|
||||
|
||||
## 의미 매핑
|
||||
|
||||
해시 파일명은 사람이 못 읽으므로 의미 라벨을 따로 관리:
|
||||
|
||||
1. **블록별 매핑**: `block-tests/{slug}_assets.txt`
|
||||
```
|
||||
849658071be46a26936e8666e3722b2dd548aee7.png bg_texture
|
||||
f05ebf15a1125b6c5809f9ffa35b4e4e750687d3.png arc_top
|
||||
```
|
||||
|
||||
2. **전체 카탈로그**: `blocks_index.md` 의 "발견된 공통 자산" 표
|
||||
|
||||
## HTML 참조
|
||||
|
||||
블록 HTML은 `block-tests/{slug}.html` 위치이므로 상대 경로:
|
||||
|
||||
```html
|
||||
<img src="assets/shared/849658071be46a26936e8666e3722b2dd548aee7.png">
|
||||
```
|
||||
|
||||
## legacy 자산
|
||||
|
||||
이전 변환물 ([bim-goals-3circles](../../bim-goals-3circles.html)) 의 자산은 `block-tests/assets/frame_1171281211/` 에 그대로 두었음. 새 변환부터는 shared/ 만 사용.
|
||||
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 195 2" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Vector 934" d="M195 1H0" stroke="var(--stroke-0, #60A451)" stroke-width="2" stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 288 B |
|
After Width: | Height: | Size: 62 KiB |
@@ -0,0 +1,9 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 192 169" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Vector" d="M192 169L179.022 154.254C168.646 142.474 159.023 133.381 145.754 127.296C133.472 121.666 118.062 118.732 97.6292 118.185V165.326L0 82.663L97.6292 0V47.3981C131.266 48.7758 156.328 59.8343 172.195 80.3485C185.335 97.3587 192 120.867 192 150.291V169Z" fill="url(#paint0_linear_101_190)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_101_190" x1="0" y1="84.5" x2="192" y2="84.5" gradientUnits="userSpaceOnUse">
|
||||
<stop/>
|
||||
<stop offset="1" stop-opacity="0.3"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 677 B |
@@ -0,0 +1,9 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 1080 118.047" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Rectangle 42422" d="M0 50C0 22.3858 22.3858 -1.00084e-07 50 0L1030 3.55188e-06C1057.61 3.65196e-06 1080 22.3858 1080 50V68.0473C1080 95.6616 1057.61 118.047 1030 118.047L50 118.047C22.3858 118.047 0 95.6616 0 68.0474V50Z" fill="url(#paint0_linear_102_200)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_102_200" x1="1080" y1="59.0233" x2="1.03314e-06" y2="59.0233" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#296B55" stop-opacity="0.5"/>
|
||||
<stop offset="1" stop-color="#032118"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 702 B |
|
After Width: | Height: | Size: 534 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,30 @@
|
||||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 210.699 489.919" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="Mask group" filter="url(#filter0_d_106_321)">
|
||||
<mask id="mask0_106_321" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="201" height="475">
|
||||
<path id="Intersect" d="M0 58.1721C0 62.7691 3.14483 66.7452 7.5533 68.0482C80.6773 89.662 134.036 157.329 134.036 237.46C134.036 317.59 80.677 385.255 7.55332 406.868C3.14484 408.171 0 412.148 0 416.745V465.118C0 471.337 5.62415 476.059 11.6872 474.677C119.925 450.01 200.699 353.169 200.699 237.46C200.699 121.751 119.925 24.9083 11.6872 0.241745C5.62413 -1.13998 0 3.58191 0 9.80042V58.1721Z" fill="url(#paint0_linear_106_321)"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_106_321)">
|
||||
<rect id="Rectangle 43991" y="-0.00117085" width="270" height="95" fill="var(--fill-0, #FD9164)" fill-opacity="0.8"/>
|
||||
<rect id="Rectangle 43992" y="94.9988" width="270" height="95" fill="var(--fill-0, #F29700)" fill-opacity="0.8"/>
|
||||
<rect id="Rectangle 43993" x="-54" y="189.999" width="270" height="95" fill="var(--fill-0, #FCC948)" fill-opacity="0.8"/>
|
||||
<rect id="Rectangle 43994" y="284.999" width="270" height="95" fill="var(--fill-0, #C3D601)" fill-opacity="0.8"/>
|
||||
<rect id="Rectangle 43995" y="379.999" width="270" height="95" fill="var(--fill-0, #65C6C4)" fill-opacity="0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_d_106_321" x="0" y="0" width="210.699" height="489.919" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="5" dy="10"/>
|
||||
<feGaussianBlur stdDeviation="2.5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_106_321"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_106_321" result="shape"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_106_321" x1="121.177" y1="-3.68723" x2="22.5301" y2="487.856" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#6FD6D8"/>
|
||||
<stop offset="1" stop-color="#14706E"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |