dsforge-harness 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -14
- package/package.json +1 -1
- package/plugins/dsforge/.claude-plugin/plugin.json +1 -1
- package/plugins/dsforge/skills/dsforge/SKILL.md +9 -11
- package/plugins/dsforge/skills/dsforge/references/00-portable-kit-and-runbook.md +7 -7
- package/plugins/dsforge/skills/dsforge/references/01-harness-design-and-validation-plan.md +3 -3
- package/plugins/dsforge/skills/dsforge/references/03-verifier-generalization-spec.md +10 -10
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/README.md +2 -3
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/validators/projects/smoke.json +1 -1
- package/plugins/dsforge/skills/dsforge/validators/check2.js +4 -4
- package/plugins/dsforge/skills/dsforge/validators/check3.js +1 -1
- package/plugins/dsforge/skills/dsforge/validators/extract-tokens.js +1 -1
- package/plugins/dsforge/skills/dsforge/validators/projects/_TEMPLATE.json +1 -1
- package/plugins/dsforge/skills/dsforge/validators/test/check-layout.test.js +4 -4
- package/plugins/dsforge/skills/dsforge/validators/verify.js +3 -2
- package/templates/CLAUDE.md +4 -4
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/DatasetManagement.tsx +0 -48
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/ModelCreateEdit.tsx +0 -93
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/DataTable.tsx +0 -64
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/controls.tsx +0 -97
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/forms.tsx +0 -41
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/icons.tsx +0 -57
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/shell.tsx +0 -83
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/ezp.css +0 -118
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/tokens.css +0 -106
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/tokens.ts +0 -94
- package/plugins/dsforge/skills/dsforge/references/examples/code-stage-instruction-dataset-management.md +0 -36
- package/plugins/dsforge/skills/dsforge/references/examples/ezp-states-elevation-augmentation-spec.md +0 -35
- package/plugins/dsforge/skills/dsforge/references/examples/run1-dataset-management-list-spec.md +0 -58
- package/plugins/dsforge/skills/dsforge/references/examples/run2-model-create-edit-spec.md +0 -38
- package/plugins/dsforge/skills/dsforge/validators/out/ezp-tokens.json +0 -7
- package/plugins/dsforge/skills/dsforge/validators/projects/ezp.json +0 -71
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ Run the dsforge harness for this project. Inputs:
|
|
|
68
68
|
- Design-system Figma file key: <DS_FILE_KEY> (or: "no DS yet — propose mockups first, then derive the DS")
|
|
69
69
|
- Functional spec: <paste the spec, or a path/link>
|
|
70
70
|
- Working Figma file key (for mockups): <WORK_FILE_KEY>
|
|
71
|
-
- Screens to build: <e.g.
|
|
71
|
+
- Screens to build: <e.g. a list screen; a create/edit form>
|
|
72
72
|
- Mockup options per screen: <default 2-3>
|
|
73
73
|
|
|
74
74
|
Follow the dsforge skill's pipeline exactly. First confirm whether a real DS exists
|
|
@@ -109,16 +109,14 @@ dsforge/
|
|
|
109
109
|
│ ├── .claude-plugin/plugin.json
|
|
110
110
|
│ └── skills/dsforge/
|
|
111
111
|
│ ├── SKILL.md # 하네스 skill (트리거 + 워크플로)
|
|
112
|
-
│ ├── validators/ # 검증기 + 토큰 추출기 (+ projects/_TEMPLATE.json
|
|
113
|
-
│
|
|
114
|
-
│ └── assets/code-scaffold-reference-ezp/ # 참조 React 구현 (드롭인 아님, 패턴)
|
|
112
|
+
│ ├── validators/ # 검증기 + 토큰 추출기 (+ projects/_TEMPLATE.json)
|
|
113
|
+
│ └── references/ # 방법론, 런북, smoke 예시 (examples/smoke-fixture)
|
|
115
114
|
├── templates/CLAUDE.md # `dsforge init`가 프로젝트에 써줌
|
|
116
115
|
├── bin/dsforge.js # npm CLI (init / verify / check3)
|
|
117
116
|
└── package.json
|
|
118
117
|
```
|
|
119
|
-
제네릭·재사용: `validators/`(DS를 입력으로) 와 `references/`(방법).
|
|
120
|
-
`
|
|
121
|
-
하네스의 일부가 아닙니다.
|
|
118
|
+
제네릭·재사용: `validators/`(DS를 입력으로) 와 `references/`(방법). 예시:
|
|
119
|
+
`references/examples/smoke-fixture/` — Figma 없이 Node 검사를 돌려 보는 작은 예시일 뿐, 하네스의 일부가 아닙니다.
|
|
122
120
|
|
|
123
121
|
## 한계
|
|
124
122
|
**DS 조합형 화면**(리스트 / 폼 / 상세)에서 증명됨. **캔버스 / 그래프 에디터형 화면은 미검증.** 검사는 기계적
|
|
@@ -188,7 +186,7 @@ Run the dsforge harness for this project. Inputs:
|
|
|
188
186
|
- Design-system Figma file key: <DS_FILE_KEY> (or: "no DS yet — propose mockups first, then derive the DS")
|
|
189
187
|
- Functional spec: <paste the spec, or a path/link>
|
|
190
188
|
- Working Figma file key (for mockups): <WORK_FILE_KEY>
|
|
191
|
-
- Screens to build: <e.g.
|
|
189
|
+
- Screens to build: <e.g. a list screen; a create/edit form>
|
|
192
190
|
- Mockup options per screen: <default 2-3>
|
|
193
191
|
|
|
194
192
|
Follow the dsforge skill's pipeline exactly. First confirm whether a real DS exists
|
|
@@ -231,16 +229,15 @@ dsforge/
|
|
|
231
229
|
│ ├── .claude-plugin/plugin.json
|
|
232
230
|
│ └── skills/dsforge/
|
|
233
231
|
│ ├── SKILL.md # the harness skill (triggers + workflow)
|
|
234
|
-
│ ├── validators/ # verifier + token extractor (+ projects/_TEMPLATE.json
|
|
235
|
-
│
|
|
236
|
-
│ └── assets/code-scaffold-reference-ezp/ # reference React impl (a pattern, not drop-in)
|
|
232
|
+
│ ├── validators/ # verifier + token extractor (+ projects/_TEMPLATE.json)
|
|
233
|
+
│ └── references/ # methodology, runbook, smoke example (examples/smoke-fixture)
|
|
237
234
|
├── templates/CLAUDE.md # written into a project by `dsforge init`
|
|
238
235
|
├── bin/dsforge.js # the npm CLI (init / verify / check3)
|
|
239
236
|
└── package.json
|
|
240
237
|
```
|
|
241
|
-
Generic & reusable: `validators/` (DS-as-input) and `references/` (method).
|
|
242
|
-
`
|
|
243
|
-
|
|
238
|
+
Generic & reusable: `validators/` (DS-as-input) and `references/` (method). Example:
|
|
239
|
+
`references/examples/smoke-fixture/` — just a tiny fixture for running the Node checks without Figma, not part
|
|
240
|
+
of the harness.
|
|
244
241
|
|
|
245
242
|
## Limits
|
|
246
243
|
Proven for **DS-composition screens** (list / form / detail). **Canvas / graph-editor screens are
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsforge-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Verified design→design-system→code harness: a functional spec becomes Figma mockups, a token-bound design system, and token-faithful code, with automated check gates and two human review gates. Ships as a Claude Code plugin/skill.",
|
|
5
5
|
"bin": { "dsforge": "bin/dsforge.js" },
|
|
6
6
|
"scripts": { "test": "node plugins/dsforge/skills/dsforge/validators/test/run-all.js" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsforge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Verified design→design-system→code harness: a functional spec becomes Figma mockups, a token-bound design system, and token-faithful code, with automated check gates (DS audit, mockup-vs-spec, code-vs-DS) and two human review gates.",
|
|
5
5
|
"author": { "name": "jsiksn" },
|
|
6
6
|
"homepage": "https://github.com/jsiksn/dsforge",
|
|
@@ -24,7 +24,7 @@ make the judgment calls.
|
|
|
24
24
|
## When this triggers, first do this
|
|
25
25
|
1. **Read `references/00-portable-kit-and-runbook.md` fully** — the whole picture, runbook, and limits.
|
|
26
26
|
Pull in `references/02-…` (checks), `references/03-…` (generalizing the verifier), and
|
|
27
|
-
`references/examples/` (
|
|
27
|
+
`references/examples/smoke-fixture/` (a runnable Node-side example) as needed.
|
|
28
28
|
2. **Confirm prerequisites:** the Figma MCP is connected to the *target* Figma · Node.js is available ·
|
|
29
29
|
a reviewer (human, or a second Claude acting as reviewer) is available for the two human gates.
|
|
30
30
|
3. **Get three inputs from the user:** ① target design-system Figma file key (or "no DS yet")
|
|
@@ -50,16 +50,15 @@ appear *verbatim*) before building any mockup.
|
|
|
50
50
|
ask the user which way to go:**
|
|
51
51
|
ⓐ **augment the DS** first, then build on the augmented DS, or
|
|
52
52
|
ⓑ **leave the DS as-is** and mark the missing pieces "(제안)/(proposed)" in the mockup.
|
|
53
|
-
(
|
|
54
|
-
is done when check1 flips to PASS.)
|
|
53
|
+
(An augmented DS is done when check1 flips to PASS.)
|
|
55
54
|
2. **Extract tokens.** Run `validators/extract-tokens.js` via `use_figma` on the DS → save the returned
|
|
56
55
|
JSON to `validators/out/<project>-tokens.json` (this is the tokenRef). Generate the code tokens
|
|
57
|
-
(`tokens.css` / `tokens.ts`) from it, using `
|
|
58
|
-
*pattern* (rename to your DS — the
|
|
56
|
+
(`tokens.css` / `tokens.ts`) from it, using `references/examples/smoke-fixture/app/tokens.css` as the
|
|
57
|
+
*pattern* (rename to your DS — the smoke fixture is just a tiny runnable example).
|
|
59
58
|
3. **Write the project descriptor.** Copy `validators/projects/_TEMPLATE.json` to
|
|
60
59
|
`validators/projects/<project>.json` and fill it: DS file key, tokenRef path, naming map, shell
|
|
61
60
|
(viewport + shell component names), `structuralPxAllow`, per-screen anchors.
|
|
62
|
-
(`validators/projects/
|
|
61
|
+
(`references/examples/smoke-fixture/validators/projects/smoke.json` is a small filled example.)
|
|
63
62
|
4. **Per screen:**
|
|
64
63
|
- Build **2–3 mockup options** (the count from step 4) with `use_figma` — each a **full viewport +
|
|
65
64
|
app shell**, composed from DS component instances, **auto-layout/aligned/filling the viewport with
|
|
@@ -214,8 +213,7 @@ who independently re-derives the numbers. Don't collapse the two.
|
|
|
214
213
|
|
|
215
214
|
## Bundled resources
|
|
216
215
|
- `validators/` — the verifier + token extractor (`extract-tokens, check1, check2, check-layout, check3,
|
|
217
|
-
check-recall, verify`), plus `projects/_TEMPLATE.json` (fill per project)
|
|
218
|
-
|
|
219
|
-
- `references/` — methodology & runbook (`00`–`03`) and `examples/` (
|
|
220
|
-
|
|
221
|
-
+ two screens). A *pattern* to regenerate for your DS, not a drop-in. The `ezp` name is the test DS.
|
|
216
|
+
check-recall, verify`), plus `projects/_TEMPLATE.json` (fill per project) and `test/` (node regression
|
|
217
|
+
tests, run via `npm test`).
|
|
218
|
+
- `references/` — methodology & runbook (`00`–`03`) and `examples/smoke-fixture/` (a runnable Node-side
|
|
219
|
+
example, incl. a small filled descriptor `smoke.json`).
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
**전제:** Claude Code + Figma MCP(대상 Figma에 인증) · Node.js · 리뷰어(Claude 또는 사람) · 기능명세.
|
|
29
29
|
1. **대상 DS를 가리킨다**(Figma 파일키). `Check 1`로 진짜/완성 DS인지 판정 → 미달/없음이면 **빌드·보강 경로**(토큰·바인딩·상태·elevation 채우기; Check 1이 FAIL→PASS로 flip하면 완료).
|
|
30
30
|
2. **`extract-tokens.js`를 그 DS에 돌려** tokenRef(+코드 토큰 `tokens.css`/`tokens.ts`) 생성.
|
|
31
|
-
3. **`projects/<proj>.json` 작성** — `
|
|
31
|
+
3. **`projects/<proj>.json` 작성** — `_TEMPLATE.json`을 템플릿으로(파일키·네이밍맵·셸·structuralPxAllow·화면 앵커).
|
|
32
32
|
4. **화면마다:** 명세에서 앵커 뽑아 시안 빌드 → `Check 2` + 시안 확정(사람) → 코드 → `Check 3`.
|
|
33
33
|
5. **처음 세팅 시** 검사기 자가검증을 손검증과 한 번 대조해 도구를 신뢰한 뒤, 이후 자동 게이트로 사용.
|
|
34
34
|
|
|
35
35
|
## 4. 증거 (검증된 실행 — 모든 수치 리뷰어가 노드/코드로 독립 확인)
|
|
36
|
-
- **Run1 —
|
|
37
|
-
- **Run2 —
|
|
36
|
+
- **Run1 — 목록 화면 (리스트 · 첫 검증 프로젝트):** Check1 PASS · Check2 PASS(앵커 25/25 · 날조 0 · 화면작성 raw 0 · 1920×1080+셸) · Check3 PASS(토큰 72/72 · hex 0 · 행 액션 9/9 verbatim).
|
|
37
|
+
- **Run2 — 등록/수정 화면 (폼 · 첫 검증 프로젝트의 다른 도메인):** Check2 PASS(앵커 11/11 · 날조 0 · 화면작성 raw 0 · 셸 · **focus/disabled 실사용**) · Check3 PASS(72/72 · hex 0 · 앵커 7/7 verbatim).
|
|
38
38
|
- **일반화 재현:** 두 런을 제네릭 검사기 입력으로 그대로 재현, 자가검증 10/10.
|
|
39
39
|
- 과정에서 검사기 버그 2건을 게이트가 스스로 잡아 고침: **인스턴스 내부 미traversal**(raw 누락) · **px allowlist 누락**(둘 다 "도구가 손검증/자기와 어긋남 → 도구 수정"으로 해소).
|
|
40
40
|
|
|
41
|
-
## 5. DS 상태 (
|
|
41
|
+
## 5. DS 상태 (첫 검증 프로젝트의 DS)
|
|
42
42
|
색 44 + 숫자 21(간격9·radius5·size7) + 텍스트 7 + elevation 1 · 바인딩 100%(컴포넌트 raw 0, 인스턴스 내부 포함) · 인터랙티브 17셋 focus/disabled 17/17. Check 1 PASS(완성 DS).
|
|
43
43
|
|
|
44
44
|
## 6. 한계 & 백로그 (정직하게)
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
- 메뉴 hover/active 등 일부 상태는 정적/자리만(디자인 디테일은 사람이 다듬는 영역).
|
|
50
50
|
|
|
51
51
|
## 7. 키트 구성 (무엇을 가져가나)
|
|
52
|
-
- **`validators/`** — `extract-tokens.js` · `check1.js` · `check2.js` · `check3.js` · `verify.js` · `projects/<proj>.json`(템플릿 = `
|
|
53
|
-
- **블루프린트 문서** — 이 문서 + 검증 자동화 명세 + 검사기 일반화
|
|
54
|
-
- **코드
|
|
52
|
+
- **`validators/`** — `extract-tokens.js` · `check1.js` · `check2.js` · `check3.js` · `verify.js` · `projects/<proj>.json`(템플릿 = `_TEMPLATE.json`) · `out/`(결과). (구 하드코딩판은 이력으로만 보존, 제네릭판이 표준.)
|
|
53
|
+
- **블루프린트 문서** — 이 문서 + 검증 자동화 명세 + 검사기 일반화 명세.
|
|
54
|
+
- **코드 예시** — `examples/smoke-fixture/app/`(tokens.css + 토큰만 쓰는 화면 1개). 새 프로젝트는 자기 DS의 tokenRef로 토큰을 재생성해 갈아끼운다.
|
|
55
55
|
|
|
56
56
|
---
|
|
57
57
|
|
|
@@ -96,11 +96,11 @@
|
|
|
96
96
|
---
|
|
97
97
|
|
|
98
98
|
## 현황 (Phase 0 완료 — 전제 정정)
|
|
99
|
-
- **Phase 0 / Gate F 완료. 채택 DS =
|
|
100
|
-
-
|
|
99
|
+
- **Phase 0 / Gate F 완료. 채택 DS = 첫 검증 프로젝트의 DS.** (앞 판의 "색 변수 0 = 없음 → 2-2"는 초기 레퍼런스/우리 빌드 기준의 *오기* — **정정: 이 DS는 색 변수 44개 보유.**)
|
|
100
|
+
- **첫 검증 프로젝트 DS의 Gate F = FAIL(near-pass) = "수리 가능한 실재 DS".**
|
|
101
101
|
- PASS: 색 44 · 타이포 7 · 간격 16 · radius 5 · manifest · 바인딩 99.2%.
|
|
102
102
|
- strict FAIL 3: 컴포넌트 내부 하드코딩 raw 51 / elevation 토큰 0 / focus·disabled(및 form류 hover·active) variant 부재.
|
|
103
|
-
- **경로 확정 = 2-1 (기존 DS
|
|
103
|
+
- **경로 확정 = 2-1 (기존 DS=첫 검증 프로젝트의 DS + 확정 보완).** Run1·v2가 이미 이 DS로 빌드·검증됨(풀스크린+셸, D1·D2 통과).
|
|
104
104
|
- **Stage 2 보완 백로그 (노드 실증 — Gate S1/S2/S3 대상):**
|
|
105
105
|
- B1 내부 raw 51 → 변수 바인딩 · B2 focus/disabled(+form hover/active) variant 추가 · B3 elevation 토큰 신설(v2 팝오버 raw shadow 원인) · B4(권고) semantic 색 레이어 · B5(필요시) light/dark 모드.
|
|
106
106
|
- **다음:** Stage 2에서 B1~B3(필수) 적용 → Gate F 재실행으로 §2 전부 pass 확인 → Phase 1(명세→시안): §7 규율(1920×1080+셸) + 시그니처 화면 ≥1(§6).
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# 검사기 일반화 명세 — "대상 DS를 입력으로"
|
|
2
2
|
|
|
3
3
|
## 목적
|
|
4
|
-
검사기 3종 + verify.js에서
|
|
4
|
+
검사기 3종 + verify.js에서 **첫 검증 프로젝트 하드코딩을 제거**하고, **대상 디자인시스템(DS)을 입력**으로 받게 한다. 그래야 다른 프로젝트에 그대로 겨눌 수 있다. 지금까지 검증한 것(인스턴스 내부 traversal·bound-vs-authored 분류·자가검증 5종)은 **그대로 보존**하고, 첫 검증 프로젝트 고유 상수만 뺀다.
|
|
5
5
|
|
|
6
|
-
## 1. 입력 계약 — "DS 디스크립터" (
|
|
6
|
+
## 1. 입력 계약 — "DS 디스크립터" (첫 검증 프로젝트 하드코딩을 대체)
|
|
7
7
|
한 프로젝트는 아래 한 묶음으로 기술된다(예: `project.config.json`):
|
|
8
|
-
- `dsFileKey` — DS Figma 파일 키 (지금
|
|
9
|
-
- `tokenRef` — 토큰 레퍼런스 JSON 경로 (아래 추출기가 생성; 지금
|
|
10
|
-
- `shell` — 시안 규율 설정: 뷰포트(기본 1920×1080), 셸 컴포넌트 이름들(예: side-nav·gnb-wrap — 지금
|
|
8
|
+
- `dsFileKey` — DS Figma 파일 키 (지금 첫 검증 프로젝트의 키 하드코딩 → 입력)
|
|
9
|
+
- `tokenRef` — 토큰 레퍼런스 JSON 경로 (아래 추출기가 생성; 지금 첫 검증 프로젝트의 토큰 JSON 하드코딩 → 생성물)
|
|
10
|
+
- `shell` — 시안 규율 설정: 뷰포트(기본 1920×1080), 셸 컴포넌트 이름들(예: side-nav·gnb-wrap — 지금 첫 검증 프로젝트의 셸 이름 하드코딩 → 설정)
|
|
11
11
|
- `structuralPxAllow` — 토큰 없는 구조 수치 예외 목록(예: 보더 1px·포커스 링 2px·컨트롤 글리프 치수). size 토큰에서 유도되는 값은 자동, 나머지는 이 목록(지금 숫자 하드코딩 → 설정)
|
|
12
12
|
- 화면별: `screenSpec`(앵커 목록)·`mockupFileKey`+`frameId`·`codePath`
|
|
13
13
|
|
|
@@ -21,22 +21,22 @@
|
|
|
21
21
|
## 3. 검사별 변경 (하드코딩 제거)
|
|
22
22
|
- **Check 1 (진짜 DS인가):** 파일 키 → 입력. "인터랙티브 컴포넌트/필요 상태"의 그 17개 → **DS에서 탐지**(상태 variant 축을 가진 컴포넌트 세트를 찾음; 못 찾으면 설정으로 보완). 토큰 타입 존재·바인딩%·elevation·raw 분류 로직은 그대로.
|
|
23
23
|
- **Check 2 (시안 vs 명세·DS):** 토큰 레퍼런스 → 디스크립터에서 로드(하드코딩 ref 제거). 셸/뷰포트 기대 → `shell` 설정. 앵커 → `screenSpec`(이미 입력). bound-vs-authored 분류·인스턴스 내부 traversal 보존.
|
|
24
|
-
- **Check 3 (코드 vs DS·시안):** 토큰 값 → 디스크립터 ref와 대조(
|
|
24
|
+
- **Check 3 (코드 vs DS·시안):** 토큰 값 → 디스크립터 ref와 대조(첫 검증 프로젝트 값 하드코딩 제거). px 예외 → size 토큰에서 유도 + `structuralPxAllow`(숫자 하드코딩 제거). 앵커 → `screenSpec`.
|
|
25
25
|
- **verify.js:** 프로젝트 설정 하나를 받아 3검사 + 자가검증을 오케스트레이션.
|
|
26
26
|
|
|
27
27
|
## 4. 반드시 보존 (일반화하다 잃지 말 것)
|
|
28
28
|
- 인스턴스 **내부까지 전체 traversal** + node-id 디듀프 (그 버그 다시 만들지 말 것).
|
|
29
29
|
- raw를 **bound vs (인스턴스 내부 / 화면-작성)** 으로 분류 — 화면-작성분만 위반.
|
|
30
|
-
- 자가검증 5종(토큰 일치·화면작성 하드코딩 0·앵커 verbatim·날조 0·dsRawMatchesIndependent[raw==독립 스캔 AND 인스턴스내부>0]). 단, "known-good 기준값"은 **해당 프로젝트의 검증된 런**을 가리키게(
|
|
30
|
+
- 자가검증 5종(토큰 일치·화면작성 하드코딩 0·앵커 verbatim·날조 0·dsRawMatchesIndependent[raw==독립 스캔 AND 인스턴스내부>0]). 단, "known-good 기준값"은 **해당 프로젝트의 검증된 런**을 가리키게(첫 검증 프로젝트의 DS·Run1·Run2 고정값이 아니라 설정에서).
|
|
31
31
|
|
|
32
32
|
## 5. 일반화 자체의 검증 (필수 — 안 깨졌는지)
|
|
33
|
-
일반화 후
|
|
34
|
-
- Check 1(
|
|
33
|
+
일반화 후 **첫 검증 프로젝트의 DS·Run1·Run2를 "그냥 한 프로젝트 입력"으로 넣어** 돌렸을 때, 이미 손·검사기로 확정한 숫자를 **그대로 재현**해야 한다:
|
|
34
|
+
- Check 1(첫 검증 프로젝트의 DS) PASS: 상태 17/17 · elevation 1 · 컴포넌트 raw 0 · 인스턴스내부 16,603 스캔
|
|
35
35
|
- Run1 Check 2/3 PASS, Run2 Check 2/3 PASS (토큰 72/72 · hex 0 · 앵커 · 날조 0 · 화면작성 raw 0)
|
|
36
36
|
재현되면 일반화가 기존 동작을 안 깬 것. 다르면 일반화 버그 → 고친다. (리뷰어가 이 재현을 확인.)
|
|
37
37
|
|
|
38
38
|
## 6. 범위 밖 (gold-plating 금지)
|
|
39
|
-
- 비-Figma DS, 다중 토큰 포맷, CLI 미화 등은 안 함. "
|
|
39
|
+
- 비-Figma DS, 다중 토큰 포맷, CLI 미화 등은 안 함. "첫 검증 프로젝트의 DS 같은 Figma DS를 입력으로" 받는 최소 일반화까지만.
|
|
40
40
|
- 캔버스/그래프형 화면 검사는 별도(명세·빌드 모델 필요) — 이번 범위 아님.
|
|
41
41
|
|
|
42
42
|
## 끝나면
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# smoke-fixture — runnable Node-plumbing check
|
|
2
2
|
|
|
3
3
|
A tiny, self-contained project that exercises the **Node** side of dsforge (`check3` and `verify`)
|
|
4
|
-
**without Figma**.
|
|
5
|
-
|
|
6
|
-
so the checks actually run. Use it to confirm the harness's plumbing works after install.
|
|
4
|
+
**without Figma**. Every path in this fixture resolves inside this folder, so the checks actually run.
|
|
5
|
+
Use it to confirm the harness's plumbing works after install.
|
|
7
6
|
|
|
8
7
|
## Layout
|
|
9
8
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_note": "Self-contained smoke fixture.
|
|
2
|
+
"_note": "Self-contained smoke fixture. Every path here resolves inside this folder, so the Node checks actually run. From this folder: `npx dsforge check3 smoke main` and `npx dsforge verify smoke`.",
|
|
3
3
|
"project": "smoke",
|
|
4
4
|
"ds": { "fileKey": "SMOKE", "name": "Smoke Fixture DS" },
|
|
5
5
|
"tokenRef": "validators/out/smoke-tokens.json",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
const CFG = {
|
|
10
10
|
screenFrameId: '315:170',
|
|
11
11
|
anchors: {
|
|
12
|
-
breadcrumb: ['
|
|
13
|
-
toolbar: ['
|
|
14
|
-
menu: ['
|
|
15
|
-
pagination: ['
|
|
12
|
+
breadcrumb: ['<breadcrumb item>'], title: ['<page title>'], caption: ['제안'],
|
|
13
|
+
toolbar: ['<toolbar label>'], columns: ['<column header>'],
|
|
14
|
+
menu: ['<row action>'],
|
|
15
|
+
pagination: ['<pagination label>'],
|
|
16
16
|
},
|
|
17
17
|
menuNodePrefix: 'row-action-menu', menuAnchorGroup: 'menu',
|
|
18
18
|
shellComponentNames: ['side-nav', 'gnb'], viewport: { w: 1920, h: 1080 },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Check 3 — code audit (generic, config-driven). Node.
|
|
3
|
-
* node validators/check3.js <project> <screen> (cwd = Poc/) e.g.
|
|
3
|
+
* node validators/check3.js <project> <screen> (cwd = Poc/) e.g. smoke main
|
|
4
4
|
* Reads validators/projects/<project>.json (DS descriptor). No project constants here.
|
|
5
5
|
* - Token compare: code token CSS vs generated tokenRef (color/float/text) via naming map
|
|
6
6
|
* - Hardcode scan: screen code files for hex / px not via token
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* use_figma({ fileKey: <dsFileKey>, skillNames: "figma-use", code: <this body> })
|
|
4
4
|
* Reads local Variables(COLOR/FLOAT) + Text Styles + Effect Styles → tokenRef JSON.
|
|
5
5
|
* No project constants — works on any Figma DS. Save the return value to the path
|
|
6
|
-
* named by the project descriptor's `tokenRef`. (Replaces hardcoded
|
|
6
|
+
* named by the project descriptor's `tokenRef`. (Replaces the first validation project's hardcoded tokens JSON.)
|
|
7
7
|
*/
|
|
8
8
|
const H = (x) => Math.round(Math.max(0, Math.min(1, x)) * 255).toString(16).padStart(2, '0');
|
|
9
9
|
const vars = await figma.variables.getLocalVariablesAsync();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_README": "Copy this to validators/projects/<project>.json and fill in. <...> are placeholders.
|
|
2
|
+
"_README": "Copy this to validators/projects/<project>.json and fill in. <...> are placeholders. references/examples/smoke-fixture/validators/projects/smoke.json is a small filled example.",
|
|
3
3
|
"project": "<PROJECT_NAME>",
|
|
4
4
|
"ds": { "fileKey": "<TARGET_DS_FIGMA_FILE_KEY>", "name": "<DS display name>" },
|
|
5
5
|
"tokenRef": "validators/out/<project>-tokens.json",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* FIXTURE A — the bug being fixed: a DS-component instance parks hidden internal layers OFF the frame
|
|
10
10
|
* (side-nav collapsed panel, pagination overflow). They are invisible and not rendered. Pre-fix the
|
|
11
11
|
* pass ran with skipInvisibleInstanceChildren=false and had no inInstance/hidden guard, so each such
|
|
12
|
-
* layer became a false outOfFrame (
|
|
12
|
+
* layer became a false outOfFrame (a test screen's A/B frames each produced ~70 of these).
|
|
13
13
|
* Post-fix: hardFails MUST be 0.
|
|
14
14
|
* FIXTURE B — guards against over-correction: real visible breakage is still caught (an authored clipped
|
|
15
15
|
* title + a clipped VISIBLE label inside an instance), while a VISIBLE non-text interior layer that
|
|
@@ -96,9 +96,9 @@ async function runCheckLayout(figma) {
|
|
|
96
96
|
// ---- fixtures --------------------------------------------------------------
|
|
97
97
|
// Screen id MUST be '0:0' (CFG.screenFrameId in check-layout.js).
|
|
98
98
|
const fixtureA = {
|
|
99
|
-
id: '0:0', name: '
|
|
99
|
+
id: '0:0', name: 'A-screen', type: 'FRAME', layoutMode: 'VERTICAL', bbox: { x: 0, y: 0, width: 1440, height: 900 },
|
|
100
100
|
children: [
|
|
101
|
-
{ id: 'A:nav', name: '
|
|
101
|
+
{ id: 'A:nav', name: 'A-screen/side-nav', type: 'INSTANCE', bbox: { x: 0, y: 0, width: 240, height: 900 },
|
|
102
102
|
children: [
|
|
103
103
|
{ id: 'A:navitems', name: 'nav-items', type: 'FRAME', layoutMode: 'VERTICAL', bbox: { x: 0, y: 0, width: 240, height: 400 },
|
|
104
104
|
children: [
|
|
@@ -112,7 +112,7 @@ const fixtureA = {
|
|
|
112
112
|
// INSIDE content (not a screen-level sibling), with its hidden overflow row parked off-frame.
|
|
113
113
|
{ id: 'A:content', name: 'content', type: 'FRAME', layoutMode: 'VERTICAL', bbox: { x: 240, y: 0, width: 1200, height: 900 },
|
|
114
114
|
children: [
|
|
115
|
-
{ id: 'A:title', name: '
|
|
115
|
+
{ id: 'A:title', name: 'A-screen', type: 'TEXT', bbox: { x: 272, y: 24, width: 300, height: 28 }, characters: 'A-screen' },
|
|
116
116
|
{ id: 'A:pag', name: 'pagination-wrap', type: 'INSTANCE', bbox: { x: 264, y: 852, width: 1152, height: 32 },
|
|
117
117
|
children: [ { id: 'A:overflow', name: 'overflow-pages', type: 'FRAME', visible: false, layoutMode: 'HORIZONTAL', bbox: { x: 2200, y: 860, width: 300, height: 40 }, children: [] } ] },
|
|
118
118
|
] },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* verify.js — generic harness aggregator (config-driven). Node.
|
|
3
|
-
* node validators/verify.js <project> (cwd = Poc/) e.g.
|
|
3
|
+
* node validators/verify.js <project> (cwd = Poc/) e.g. smoke
|
|
4
4
|
* Reads validators/projects/<project>.json. Orchestrates: Check 1 (DS) + Check 2 (per screen,
|
|
5
5
|
* from out/check2-<screen>.json produced by the use_figma run) + Check 3 (per screen, run here),
|
|
6
6
|
* then self-verifies the result reproduces the project's confirmed baseline.
|
|
@@ -12,7 +12,8 @@ const fs = require('fs');
|
|
|
12
12
|
const path = require('path');
|
|
13
13
|
const cp = require('child_process');
|
|
14
14
|
const ROOT = process.cwd();
|
|
15
|
-
const project = process.argv[2]
|
|
15
|
+
const project = process.argv[2];
|
|
16
|
+
if (!project) { console.error('usage: node validators/verify.js <project>'); process.exit(1); }
|
|
16
17
|
const cfg = JSON.parse(fs.readFileSync(path.join(ROOT, 'validators/projects', project + '.json'), 'utf8'));
|
|
17
18
|
const load = (f) => JSON.parse(fs.readFileSync(path.join(ROOT, 'validators/out', f), 'utf8'));
|
|
18
19
|
const loadOpt = (f) => { try { return load(f); } catch (e) { return null; } };
|
package/templates/CLAUDE.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
기능명세 → 시안 → 디자인시스템(DS) → 코드를, 자동 검사 게이트 + 사람 게이트 2곳으로 굴리는 파이프라인. 엔진은 너(+검증하는 리뷰어). 검사기(`validators/`)는 *검사*만 자동화한다 — 시안·코드 빌드와 판단은 네가 한다.
|
|
7
7
|
|
|
8
8
|
## 먼저 할 일
|
|
9
|
-
1. **`docs/00-portable-kit-and-runbook.md`를 끝까지 읽어라.** (전체 그림·런북·한계.) 이어서 필요시 `docs/02`(검사기), `docs/03`(일반화), `docs/examples/`(
|
|
9
|
+
1. **`docs/00-portable-kit-and-runbook.md`를 끝까지 읽어라.** (전체 그림·런북·한계.) 이어서 필요시 `docs/02`(검사기), `docs/03`(일반화), `docs/examples/smoke-fixture/`(Figma 없이 도는 Node 검사 예시).
|
|
10
10
|
2. **전제 확인:** Figma MCP가 *대상 프로젝트 Figma*에 연결돼 있나 · Node.js 있나 · 2개 사람 게이트(시안 확정·최종 확인)를 볼 리뷰어(사람 또는 다른 Claude)가 있나.
|
|
11
11
|
3. **사용자에게 받을 것:** ① 대상 DS의 Figma 파일 키(없으면 "DS 없음") · ② 기능명세 · ③ 시안 빌드할 작업 Figma 파일 키.
|
|
12
12
|
4. **분기 확정 + 질문 2개**(게이트 아님 — 사람 게이트는 그대로 **2개**): ⓐ 진짜 DS 파일이 이미 있나? → **분기 A**(있음) / **분기 B**(없음). ⓑ 화면당 시안 **옵션 몇 개**? (**기본 2–3**.)
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
### 분기 A — 진짜 DS가 이미 있음
|
|
18
18
|
1. **DS 검증.** `validators/check1.js`를 대상 DS에 돌려(`use_figma`로 본문 실행) "진짜/완성 DS인지" 판정(로컬 변수·바인딩%·raw 분류[인스턴스 내부 traverse]·상태 variant[focus/disabled]·elevation).
|
|
19
|
-
- 부족분(Status variant·focus·disabled·elevation 누락)이 나오면 **자동 보강하지 말고 사용자에게 질문:** ⓐ DS를 **보완**한 뒤 그 위에서 시안, 또는 ⓑ DS는 **그대로** 두고 부족분은 시안에 "(제안)"으로 표기. (
|
|
20
|
-
2. **토큰 추출.** `validators/extract-tokens.js`를 `use_figma`로 대상 DS에 실행 → 반환 JSON을 `validators/out/<proj>-tokens.json`(= tokenRef)에 저장. 이걸로 코드 토큰(`tokens.css`/`tokens.ts`) 생성 — 패턴은 `
|
|
21
|
-
3. **디스크립터 작성.** `validators/projects/_TEMPLATE.json` 복사 → `<proj>.json`: DS 파일키·tokenRef·네이밍맵·shell·structuralPxAllow·화면별 앵커. (`projects/
|
|
19
|
+
- 부족분(Status variant·focus·disabled·elevation 누락)이 나오면 **자동 보강하지 말고 사용자에게 질문:** ⓐ DS를 **보완**한 뒤 그 위에서 시안, 또는 ⓑ DS는 **그대로** 두고 부족분은 시안에 "(제안)"으로 표기. (보완은 check1이 PASS로 flip하면 완료.)
|
|
20
|
+
2. **토큰 추출.** `validators/extract-tokens.js`를 `use_figma`로 대상 DS에 실행 → 반환 JSON을 `validators/out/<proj>-tokens.json`(= tokenRef)에 저장. 이걸로 코드 토큰(`tokens.css`/`tokens.ts`) 생성 — 패턴은 `docs/examples/smoke-fixture/app/tokens.css`를 *네 DS 이름으로* 갈아끼운다.
|
|
21
|
+
3. **디스크립터 작성.** `validators/projects/_TEMPLATE.json` 복사 → `<proj>.json`: DS 파일키·tokenRef·네이밍맵·shell·structuralPxAllow·화면별 앵커. (`docs/examples/smoke-fixture/validators/projects/smoke.json`이 채워진 작은 예시.)
|
|
22
22
|
4. **화면마다:**
|
|
23
23
|
a. **시안 옵션 2–3개** 빌드(`use_figma`) — 각각 **전체 뷰포트 + 앱 셸**, DS 인스턴스로. 명세에 없는 건 "(제안)"(날조 금지).
|
|
24
24
|
b. `validators/check2.js`(Figma MCP) → 앵커 커버리지·날조·화면작성 raw·뷰포트+셸.
|
package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/DatasetManagement.tsx
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Dataset Management (list) — code build of validated 시안 (Figma frame 315:170).
|
|
3
|
-
* 1920×1080 + EZP app shell. Tokens only (EZP -> tokens.css). No self-judgment.
|
|
4
|
-
* Layout/content mirror the 시안: shell (sidebar + topbar) -> content surface with
|
|
5
|
-
* breadcrumb(in topbar) · title · "제안" caption · toolbar · table(6 col/5 row) ·
|
|
6
|
-
* open 9-action menu · pagination. Content verbatim; 날조/누락 0.
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import './tokens.css';
|
|
10
|
-
import './ezp.css';
|
|
11
|
-
import { Sidebar, Topbar } from './components/shell';
|
|
12
|
-
import { DataTable } from './components/DataTable';
|
|
13
|
-
import { SearchInput, FilterSelect, CreateButton, Pagination } from './components/controls';
|
|
14
|
-
|
|
15
|
-
export function DatasetManagement() {
|
|
16
|
-
return (
|
|
17
|
-
<div className="ezp-screen">
|
|
18
|
-
<Sidebar />
|
|
19
|
-
<div className="ezp-main">
|
|
20
|
-
<Topbar />
|
|
21
|
-
<div className="ezp-content">
|
|
22
|
-
<div className="ezp-surface">
|
|
23
|
-
<div className="ezp-header">
|
|
24
|
-
<h1 className="ezp-title ezp-text-page-title">Management</h1>
|
|
25
|
-
<p className="ezp-caption ezp-text-caption">
|
|
26
|
-
※ 표시 열(이름·버전·상태·태그·수정일·액션)과 상태값은 제안입니다 — 스펙에 열/필드 정의 없음,
|
|
27
|
-
사람 게이트①에서 확정. 행 데이터는 placeholder.
|
|
28
|
-
</p>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div className="ezp-toolbar">
|
|
32
|
-
<div className="ezp-toolbar-left">
|
|
33
|
-
<SearchInput placeholder="데이터셋 검색" />
|
|
34
|
-
<FilterSelect label="상태: 전체" />
|
|
35
|
-
<FilterSelect label="태그: 전체" />
|
|
36
|
-
</div>
|
|
37
|
-
<CreateButton label="생성" />
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<DataTable />
|
|
41
|
-
|
|
42
|
-
<Pagination />
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
}
|
package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/ModelCreateEdit.tsx
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Model 등록/수정 (AI Orchestration) — code build of confirmed 시안 (frame 330:260).
|
|
3
|
-
* 1920×1080 + EZP shell. Tokens only (EZP -> tokens.css). No self-judgment.
|
|
4
|
-
* Anchors verbatim (시안 일치): breadcrumb AI Orchestration>Management>Model ·
|
|
5
|
-
* Default/Custom Model · Source Code Repository/File · Create/Modify Model info · 취소.
|
|
6
|
-
* Proposed fields labeled "(제안)" + placeholder (날조 0).
|
|
7
|
-
* States: Model Name = focus (logo-blue ring) · 저장 = disabled.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import './tokens.css';
|
|
11
|
-
import './ezp.css';
|
|
12
|
-
import { Sidebar, Topbar } from './components/shell';
|
|
13
|
-
import { TextInput, TextArea, Select, Radio, Button } from './components/forms';
|
|
14
|
-
|
|
15
|
-
export function ModelCreateEdit() {
|
|
16
|
-
return (
|
|
17
|
-
<div className="ezp-screen">
|
|
18
|
-
<Sidebar
|
|
19
|
-
section="AI Orchestration"
|
|
20
|
-
navGroups={[{
|
|
21
|
-
label: 'AI Orch',
|
|
22
|
-
items: [
|
|
23
|
-
{ label: 'Management', active: true },
|
|
24
|
-
{ label: 'Model', active: true },
|
|
25
|
-
{ label: 'Default Model' },
|
|
26
|
-
{ label: 'Custom Model' },
|
|
27
|
-
],
|
|
28
|
-
}]}
|
|
29
|
-
/>
|
|
30
|
-
<div className="ezp-main">
|
|
31
|
-
<Topbar breadcrumb={['AI Orchestration', 'Management', 'Model']} />
|
|
32
|
-
<div className="ezp-content">
|
|
33
|
-
<div className="ezp-surface">
|
|
34
|
-
<div className="ezp-header">
|
|
35
|
-
<h1 className="ezp-title ezp-text-page-title">Model</h1>
|
|
36
|
-
<p className="ezp-text-body" style={{ color: 'var(--ezp-light-600)' }}>Create Model info (신규) · Modify Model info (수정)</p>
|
|
37
|
-
<p className="ezp-caption ezp-text-caption">※ 필드/배치는 제안 — 명세에 정의 없음, 사람 확정 대상. 값은 placeholder.</p>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div className="ezp-form">
|
|
41
|
-
<div className="ezp-field">
|
|
42
|
-
<span className="ezp-field-label ezp-text-body-small-bold">모델 타입 (제안)</span>
|
|
43
|
-
<div className="ezp-radio-row">
|
|
44
|
-
<Radio label="Default Model" checked />
|
|
45
|
-
<Radio label="Custom Model" />
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div className="ezp-field">
|
|
50
|
-
<span className="ezp-field-label ezp-text-body-small-bold">업로드 방식</span>
|
|
51
|
-
<div className="ezp-radio-row">
|
|
52
|
-
<Radio label="Source Code Repository" checked />
|
|
53
|
-
<Radio label="File" />
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div className="ezp-field">
|
|
58
|
-
<span className="ezp-field-label ezp-text-body-small-bold">Repository URL (제안 · 선택된 방식: Source Code Repository)</span>
|
|
59
|
-
<TextInput placeholder="https://git.example.com/org/model-repo" />
|
|
60
|
-
<span className="ezp-switch-note ezp-text-caption">※ 'File' 선택 시 파일 업로드 영역으로 전환 (제안)</span>
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
<div className="ezp-field">
|
|
64
|
-
<span className="ezp-field-label ezp-text-body-small-bold">모델 이름 (제안 · 포커스 상태)</span>
|
|
65
|
-
<TextInput placeholder="dataset-model-001" focus />
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<div className="ezp-field">
|
|
69
|
-
<span className="ezp-field-label ezp-text-body-small-bold">설명 (제안)</span>
|
|
70
|
-
<TextArea placeholder="모델 설명 placeholder" />
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div className="ezp-field">
|
|
74
|
-
<span className="ezp-field-label ezp-text-body-small-bold">프레임워크 / 알고리즘 (제안)</span>
|
|
75
|
-
<Select label="PyTorch" />
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div className="ezp-field">
|
|
79
|
-
<span className="ezp-field-label ezp-text-body-small-bold">태그 (제안)</span>
|
|
80
|
-
<TextInput placeholder="tag-a, tag-b" />
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div className="ezp-action-bar">
|
|
85
|
-
<Button label="취소" variant="secondary" />
|
|
86
|
-
<Button label="저장" variant="primary" disabled />
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
}
|
package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/DataTable.tsx
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Data table (code counterpart of the 시안's token-bound grid).
|
|
3
|
-
* 6 columns (이름·버전·상태·태그·수정일·액션) — all "제안" per §3.
|
|
4
|
-
* 5 placeholder rows (no fabricated real data). Tokens only.
|
|
5
|
-
* Row 1 shows the open action menu (affordance for the 9 §1 row actions).
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { StatusBadge, Tag, RowActionButton, ActionMenu } from './controls';
|
|
9
|
-
|
|
10
|
-
/* §1 row actions — verbatim, 9 items */
|
|
11
|
-
export const ROW_ACTIONS = [
|
|
12
|
-
'Information 수정',
|
|
13
|
-
'Tagging',
|
|
14
|
-
'Deprecate',
|
|
15
|
-
'버전 생성',
|
|
16
|
-
'버전관리 옵션 변경',
|
|
17
|
-
'포맷 변환 (Export 요청)',
|
|
18
|
-
'Embedding 요청',
|
|
19
|
-
'Inference 요청',
|
|
20
|
-
'Action History 조회',
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
type Row = { name: string; version: string; status: { label: string; tone: 'done' | 'inuse' | 'todo' | 'deprecated' }; tag: string; updated: string };
|
|
24
|
-
|
|
25
|
-
const ROWS: Row[] = [
|
|
26
|
-
{ name: 'dataset-001', version: 'v1.0', status: { label: '완료', tone: 'done' }, tag: 'tag-a', updated: '2026-06-10' },
|
|
27
|
-
{ name: 'dataset-002', version: 'v2.3', status: { label: '사용중', tone: 'inuse' }, tag: 'tag-b', updated: '2026-06-11' },
|
|
28
|
-
{ name: 'dataset-003', version: 'v1.1', status: { label: '대기', tone: 'todo' }, tag: 'tag-a', updated: '2026-06-12' },
|
|
29
|
-
{ name: 'dataset-004', version: 'v3.0', status: { label: '지원중단', tone: 'deprecated' }, tag: 'tag-c', updated: '2026-06-13' },
|
|
30
|
-
{ name: 'dataset-005', version: 'v1.0', status: { label: '완료', tone: 'done' }, tag: 'tag-b', updated: '2026-06-14' },
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const COLS = ['이름', '버전', '상태', '태그', '수정일', '액션'];
|
|
34
|
-
|
|
35
|
-
export function DataTable() {
|
|
36
|
-
return (
|
|
37
|
-
<div className="ezp-table-wrap">
|
|
38
|
-
<table className="ezp-table">
|
|
39
|
-
<thead>
|
|
40
|
-
<tr>
|
|
41
|
-
{COLS.map((c, i) => (
|
|
42
|
-
<th key={c} className={'ezp-th ezp-text-body-small-bold' + (i === 5 ? ' ezp-cell-action' : '')}>{c}</th>
|
|
43
|
-
))}
|
|
44
|
-
</tr>
|
|
45
|
-
</thead>
|
|
46
|
-
<tbody>
|
|
47
|
-
{ROWS.map((r, idx) => (
|
|
48
|
-
<tr key={r.name} className="ezp-tr">
|
|
49
|
-
<td className="ezp-td"><span className="ezp-cell-name ezp-text-body">{r.name}</span></td>
|
|
50
|
-
<td className="ezp-td ezp-text-body">{r.version}</td>
|
|
51
|
-
<td className="ezp-td"><StatusBadge label={r.status.label} tone={r.status.tone} /></td>
|
|
52
|
-
<td className="ezp-td"><Tag label={r.tag} /></td>
|
|
53
|
-
<td className="ezp-td ezp-text-body">{r.updated}</td>
|
|
54
|
-
<td className="ezp-td ezp-cell-action" style={{ position: 'relative' }}>
|
|
55
|
-
<RowActionButton />
|
|
56
|
-
{idx === 0 && <ActionMenu items={ROW_ACTIONS} />}
|
|
57
|
-
</td>
|
|
58
|
-
</tr>
|
|
59
|
-
))}
|
|
60
|
-
</tbody>
|
|
61
|
-
</table>
|
|
62
|
-
</div>
|
|
63
|
-
);
|
|
64
|
-
}
|