dsforge-harness 0.1.0
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/LICENSE +21 -0
- package/README.md +123 -0
- package/bin/dsforge.js +70 -0
- package/package.json +12 -0
- package/plugins/dsforge/.claude-plugin/plugin.json +9 -0
- package/plugins/dsforge/skills/dsforge/SKILL.md +184 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/DatasetManagement.tsx +48 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/ModelCreateEdit.tsx +93 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/DataTable.tsx +64 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/controls.tsx +97 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/forms.tsx +41 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/components/shell.tsx +81 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/ezp.css +115 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/tokens.css +106 -0
- package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/tokens.ts +94 -0
- package/plugins/dsforge/skills/dsforge/references/00-portable-kit-and-runbook.md +59 -0
- package/plugins/dsforge/skills/dsforge/references/01-harness-design-and-validation-plan.md +106 -0
- package/plugins/dsforge/skills/dsforge/references/02-verification-automation-spec.md +45 -0
- package/plugins/dsforge/skills/dsforge/references/03-verifier-generalization-spec.md +43 -0
- package/plugins/dsforge/skills/dsforge/references/examples/code-stage-instruction-dataset-management.md +36 -0
- package/plugins/dsforge/skills/dsforge/references/examples/ezp-states-elevation-augmentation-spec.md +35 -0
- package/plugins/dsforge/skills/dsforge/references/examples/run1-dataset-management-list-spec.md +58 -0
- package/plugins/dsforge/skills/dsforge/references/examples/run2-model-create-edit-spec.md +38 -0
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/README.md +32 -0
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/app/app.tsx +20 -0
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/app/tokens.css +8 -0
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/validators/out/check1.json +6 -0
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/validators/out/check2-main.json +8 -0
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/validators/out/smoke-tokens.json +14 -0
- package/plugins/dsforge/skills/dsforge/references/examples/smoke-fixture/validators/projects/smoke.json +27 -0
- package/plugins/dsforge/skills/dsforge/validators/check-layout.js +74 -0
- package/plugins/dsforge/skills/dsforge/validators/check1.js +53 -0
- package/plugins/dsforge/skills/dsforge/validators/check2.js +48 -0
- package/plugins/dsforge/skills/dsforge/validators/check3.js +64 -0
- package/plugins/dsforge/skills/dsforge/validators/extract-tokens.js +24 -0
- package/plugins/dsforge/skills/dsforge/validators/out/ezp-tokens.json +7 -0
- package/plugins/dsforge/skills/dsforge/validators/projects/_TEMPLATE.json +50 -0
- package/plugins/dsforge/skills/dsforge/validators/projects/ezp.json +63 -0
- package/plugins/dsforge/skills/dsforge/validators/verify.js +81 -0
- package/templates/CLAUDE.md +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jsiksn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# dsforge
|
|
2
|
+
|
|
3
|
+
A verified **design → design-system → code** harness for Claude Code.
|
|
4
|
+
|
|
5
|
+
Give it a functional spec and a Figma design system, and it drives the whole pipeline — Figma mockups,
|
|
6
|
+
token-bound design system, token-faithful front-end code — with **automated check gates** (DS audit,
|
|
7
|
+
mockup-vs-spec, code-vs-DS) and **two human review gates**. Its rule is *measure, don't estimate*:
|
|
8
|
+
every step is verified by reading Figma nodes and code, not by trusting a build report. Validated
|
|
9
|
+
end-to-end on two screens (a list and a form) across two domains — and on **Branch B**, where it derives
|
|
10
|
+
a brand-new token-bound design system from scratch when no DS exists.
|
|
11
|
+
|
|
12
|
+
> The engine is Claude (it builds the mockups and code; a reviewer verifies). The bundled scripts
|
|
13
|
+
> automate only the **checking** — dsforge is not a static generator that emits screens on its own.
|
|
14
|
+
|
|
15
|
+
## Install / use
|
|
16
|
+
|
|
17
|
+
**How it runs (operating model):** installing dsforge — `npx dsforge-harness init` or the plugin path below — is the
|
|
18
|
+
only step you run at a shell. It just places the skill and a `CLAUDE.md` entry point. Everything after that
|
|
19
|
+
happens **inside a Claude Code session**: Claude builds the Figma mockups and the code, runs the Figma-MCP
|
|
20
|
+
checks (Check 1/2) and the Node checks (Check 3 / `verify`), and stops at the two human gates for your
|
|
21
|
+
sign-off. dsforge is **not a standalone generator you invoke from the terminal** — it is a harness that
|
|
22
|
+
Claude Code follows. The `npx dsforge-harness verify/check3` commands only re-run the Node-side checks; they do not
|
|
23
|
+
build screens.
|
|
24
|
+
|
|
25
|
+
**A — Per project via npm (public default):**
|
|
26
|
+
```
|
|
27
|
+
npx dsforge-harness init
|
|
28
|
+
```
|
|
29
|
+
Installs the skill to `.claude/skills/dsforge/` and writes a `CLAUDE.md` entry point into the current
|
|
30
|
+
project. Open Claude Code in that folder → it reads them and starts. This is the "drop the harness into one
|
|
31
|
+
repo and go" path, and it works for anyone — the npm package is public. (You can also
|
|
32
|
+
`npx dsforge-harness verify <project> <screen>` to run the verifier.)
|
|
33
|
+
> The npm package is **`dsforge-harness`**, but the CLI command it installs is **`dsforge`** — so after a
|
|
34
|
+
> global install (`npm i -g dsforge-harness`) you run `dsforge init` / `dsforge verify …`. The Claude Code
|
|
35
|
+
> plugin, the `dsforge` skill, the repo `jsiksn/dsforge`, and the kickoff prompt are all unchanged.
|
|
36
|
+
|
|
37
|
+
**B — As a Claude Code plugin (available in every project):**
|
|
38
|
+
```
|
|
39
|
+
/plugin marketplace add jsiksn/dsforge # this GitHub repo
|
|
40
|
+
/plugin install dsforge@dsforge
|
|
41
|
+
```
|
|
42
|
+
Then start any project: open Claude Code, and because the `dsforge` skill is installed, asking it to
|
|
43
|
+
build screens from a spec triggers the harness. Update later with `/plugin marketplace update`.
|
|
44
|
+
> **Note — the GitHub repo is currently private.** The marketplace path (B) works only for the repo owner
|
|
45
|
+
> (or accounts granted access). Until the repo is made public, use the **npm path (A)** above — it's the
|
|
46
|
+
> public default.
|
|
47
|
+
|
|
48
|
+
**C — Manual:** copy `plugins/dsforge/skills/dsforge/` into your `~/.claude/skills/` (all projects) or a
|
|
49
|
+
repo's `.claude/skills/` (that project).
|
|
50
|
+
|
|
51
|
+
**After installing, paste this into Claude Code to kick off the harness:**
|
|
52
|
+
```
|
|
53
|
+
Run the dsforge harness for this project. Inputs:
|
|
54
|
+
- Design-system Figma file key: <DS_FILE_KEY> (or: "no DS yet — propose mockups first, then derive the DS")
|
|
55
|
+
- Functional spec: <paste the spec, or a path/link>
|
|
56
|
+
- Working Figma file key (for mockups): <WORK_FILE_KEY>
|
|
57
|
+
- Screens to build: <e.g. dataset list; model create/edit>
|
|
58
|
+
- Mockup options per screen: <default 2-3>
|
|
59
|
+
|
|
60
|
+
Follow the dsforge skill's pipeline exactly. First confirm whether a real DS exists
|
|
61
|
+
and how many mockup options per screen, then take the branch:
|
|
62
|
+
- Branch A (DS exists): audit the DS -> if it has gaps, ASK me augment-vs-mark-"(proposed)"
|
|
63
|
+
-> extract tokens -> per screen [ build 2-3 mockup OPTIONS -> run checks ->
|
|
64
|
+
STOP for my pick (GATE 1) -> build code -> run checks -> STOP for final review (GATE 2) ].
|
|
65
|
+
- Branch B (no DS): per screen build 2-3 mockup OPTIONS first -> STOP for my pick (GATE 1)
|
|
66
|
+
-> author a new token-bound DS in a new Figma file (variables, focus/disabled variants,
|
|
67
|
+
elevation) until check1 PASSes -> extract tokens -> build code -> run checks ->
|
|
68
|
+
STOP for final review (GATE 2).
|
|
69
|
+
Rules: tokens only (no hardcoded hex/px) once a DS exists; never fabricate spec content
|
|
70
|
+
(mark proposals "(제안)"/"(proposed)"); measure by reading Figma nodes and code, don't
|
|
71
|
+
trust build reports; hold at both human gates (exactly two) until I approve.
|
|
72
|
+
Craft: author every component with auto-layout (no clipped labels, no floating/detached
|
|
73
|
+
nodes, correctly-sized badges); keep the DS and the screens on SEPARATE pages
|
|
74
|
+
("Design System" / "Screens"); and render + self-critique each screen to a clean image
|
|
75
|
+
BEFORE running the mechanical checks — GATE 1 is the visual judgment point, and a green
|
|
76
|
+
check is a floor, not the quality bar.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## What it asks for
|
|
80
|
+
Once triggered, Claude Code first confirms **whether a real DS already exists** (Branch A) or not
|
|
81
|
+
(Branch B) and **how many mockup options per screen** (default 2–3), then collects ① the target
|
|
82
|
+
**design-system Figma file key** (Branch A) ② the **functional spec** ③ a **working Figma file key**
|
|
83
|
+
for mockups. Then it runs one of:
|
|
84
|
+
- **Branch A (DS exists):** DS audit (if it has gaps, it asks you *augment vs. mark "(proposed)"*) →
|
|
85
|
+
token extract → per screen [2–3 mockup options → check → *you pick one* → code → check → *final review*].
|
|
86
|
+
- **Branch B (no DS):** per screen [2–3 mockup options → *you pick one*] → author a token-bound DS in a
|
|
87
|
+
new Figma file (variables, focus/disabled variants, elevation) until the DS audit passes → token
|
|
88
|
+
extract → code → check → *final review*.
|
|
89
|
+
|
|
90
|
+
Either way there are exactly **two** human gates.
|
|
91
|
+
|
|
92
|
+
## Structure
|
|
93
|
+
```
|
|
94
|
+
dsforge/
|
|
95
|
+
├── .claude-plugin/marketplace.json # this repo is a CC plugin marketplace
|
|
96
|
+
├── plugins/dsforge/
|
|
97
|
+
│ ├── .claude-plugin/plugin.json
|
|
98
|
+
│ └── skills/dsforge/
|
|
99
|
+
│ ├── SKILL.md # the harness skill (triggers + workflow)
|
|
100
|
+
│ ├── validators/ # verifier + token extractor (+ projects/_TEMPLATE.json, ezp.json)
|
|
101
|
+
│ ├── references/ # methodology, runbook, real-run examples
|
|
102
|
+
│ └── assets/code-scaffold-reference-ezp/ # reference React impl (a pattern, not drop-in)
|
|
103
|
+
├── templates/CLAUDE.md # written into a project by `dsforge init`
|
|
104
|
+
├── bin/dsforge.js # the npm CLI (init / verify / check3)
|
|
105
|
+
└── package.json
|
|
106
|
+
```
|
|
107
|
+
Generic & reusable: `validators/` (DS-as-input) and `references/` (method). Project-specific examples:
|
|
108
|
+
`code-scaffold-reference-ezp/` and `validators/projects/ezp.json` — `ezp` is just the design system dsforge
|
|
109
|
+
was validated on, not part of the harness.
|
|
110
|
+
|
|
111
|
+
## Limits
|
|
112
|
+
Proven for **DS-composition screens** (list / form / detail). **Canvas / graph-editor screens are
|
|
113
|
+
unproven.** The checks verify mechanical token/content/structure fidelity; visual judgment and design
|
|
114
|
+
intent are what the human gates are for. Prerequisites: Claude Code + Figma MCP (authed to your Figma),
|
|
115
|
+
Node.js ≥ 18, and a reviewer.
|
|
116
|
+
|
|
117
|
+
## Notes for forking / rebranding
|
|
118
|
+
- The name `dsforge` is used throughout (package, plugin, skill, marketplace). To rebrand, change it in
|
|
119
|
+
`package.json`, `.claude-plugin/marketplace.json`, `plugins/dsforge/.claude-plugin/plugin.json`, and
|
|
120
|
+
rename `plugins/dsforge/` + `plugins/dsforge/skills/dsforge/`.
|
|
121
|
+
- Check npm name availability before `npm publish` — if taken, scope it (`@<you>/dsforge`).
|
|
122
|
+
|
|
123
|
+
License: MIT.
|
package/bin/dsforge.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { spawnSync } = require('child_process');
|
|
6
|
+
|
|
7
|
+
const PKG_ROOT = path.resolve(__dirname, '..');
|
|
8
|
+
const SKILL_SRC = path.join(PKG_ROOT, 'plugins', 'dsforge', 'skills', 'dsforge');
|
|
9
|
+
const CLAUDE_TEMPLATE = path.join(PKG_ROOT, 'templates', 'CLAUDE.md');
|
|
10
|
+
const VALIDATORS = path.join(SKILL_SRC, 'validators');
|
|
11
|
+
|
|
12
|
+
const cwd = process.cwd();
|
|
13
|
+
const [cmd, ...rest] = process.argv.slice(2);
|
|
14
|
+
|
|
15
|
+
function log(s) { process.stdout.write(s + '\n'); }
|
|
16
|
+
|
|
17
|
+
function init() {
|
|
18
|
+
const skillDest = path.join(cwd, '.claude', 'skills', 'dsforge');
|
|
19
|
+
fs.mkdirSync(path.dirname(skillDest), { recursive: true });
|
|
20
|
+
fs.cpSync(SKILL_SRC, skillDest, { recursive: true });
|
|
21
|
+
log('✓ installed skill → .claude/skills/dsforge/');
|
|
22
|
+
|
|
23
|
+
const claudeDest = path.join(cwd, 'CLAUDE.md');
|
|
24
|
+
if (fs.existsSync(claudeDest)) {
|
|
25
|
+
const alt = path.join(cwd, 'CLAUDE.dsforge.md');
|
|
26
|
+
fs.copyFileSync(CLAUDE_TEMPLATE, alt);
|
|
27
|
+
log('• CLAUDE.md already exists — wrote CLAUDE.dsforge.md instead (merge what you want)');
|
|
28
|
+
} else {
|
|
29
|
+
fs.copyFileSync(CLAUDE_TEMPLATE, claudeDest);
|
|
30
|
+
log('✓ wrote project entry → CLAUDE.md');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
log('');
|
|
34
|
+
log('Done. Next:');
|
|
35
|
+
log(' 1) open Claude Code in this folder');
|
|
36
|
+
log(' 2) it reads CLAUDE.md / the dsforge skill and asks for: DS Figma key, functional spec, working Figma key');
|
|
37
|
+
log(' 3) the harness starts.');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function runScript(file, args) {
|
|
41
|
+
const target = path.join(VALIDATORS, file);
|
|
42
|
+
if (!fs.existsSync(target)) { log('script not found: ' + file); process.exit(1); }
|
|
43
|
+
// Run with the user's project as cwd so descriptor/out paths resolve there.
|
|
44
|
+
const r = spawnSync('node', [target, ...args], { stdio: 'inherit', cwd });
|
|
45
|
+
process.exit(r.status == null ? 1 : r.status);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function help() {
|
|
49
|
+
log(`dsforge — verified design→code harness (Claude Code skill + validators)
|
|
50
|
+
|
|
51
|
+
Usage:
|
|
52
|
+
npx dsforge-harness init Install the dsforge skill + CLAUDE.md into this project
|
|
53
|
+
npx dsforge-harness verify <proj> <scr> Run the full verifier (node) for a project/screen
|
|
54
|
+
npx dsforge-harness check3 <proj> <scr> Run only the code-vs-DS check (node)
|
|
55
|
+
npx dsforge-harness help This message
|
|
56
|
+
|
|
57
|
+
check1 / check2 / extract-tokens run inside Claude Code via the Figma MCP (see the skill).
|
|
58
|
+
Install as a Claude Code plugin instead: /plugin marketplace add jsiksn/dsforge then /plugin install dsforge@dsforge`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
switch (cmd) {
|
|
62
|
+
case 'init': init(); break;
|
|
63
|
+
case 'verify': runScript('verify.js', rest); break;
|
|
64
|
+
case 'check3': runScript('check3.js', rest); break;
|
|
65
|
+
case undefined:
|
|
66
|
+
case 'help':
|
|
67
|
+
case '-h':
|
|
68
|
+
case '--help': help(); break;
|
|
69
|
+
default: log('unknown command: ' + cmd + '\n'); help(); process.exit(1);
|
|
70
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsforge-harness",
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
+
"bin": { "dsforge": "bin/dsforge.js" },
|
|
6
|
+
"files": ["bin/", "plugins/", "templates/", "README.md"],
|
|
7
|
+
"keywords": ["design-to-code", "design-system", "figma", "design-tokens", "verification", "claude-code", "claude", "skill"],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"engines": { "node": ">=18" },
|
|
10
|
+
"author": "jsiksn",
|
|
11
|
+
"repository": { "type": "git", "url": "https://github.com/jsiksn/dsforge.git" }
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsforge",
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
+
"author": { "name": "jsiksn" },
|
|
6
|
+
"homepage": "https://github.com/jsiksn/dsforge",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"keywords": ["design-to-code", "design-system", "figma", "design-tokens", "verification", "claude-code"]
|
|
9
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dsforge
|
|
3
|
+
description: >-
|
|
4
|
+
dsforge runs a verified design→design-system→code pipeline. It turns a functional/PRD spec
|
|
5
|
+
into Figma mockups, audits or builds a token-bound design system, and generates
|
|
6
|
+
token-faithful front-end code — with automated check gates (DS audit, mockup-vs-spec,
|
|
7
|
+
code-vs-DS) and exactly two human review gates, so nothing is hardcoded or fabricated.
|
|
8
|
+
Use this whenever the user is starting UI/screen work from a functional spec or PRD,
|
|
9
|
+
wants to build screens from a Figma design system via the Figma MCP, needs design tokens
|
|
10
|
+
mapped 1:1 into code, wants to verify that a mockup or code matches the design system
|
|
11
|
+
(no hardcoded hex/px, no invented content, spec anchors present verbatim), or is auditing
|
|
12
|
+
whether a Figma file is a "real" design system (local variables + interactive state
|
|
13
|
+
variants + elevation). Trigger this even if the user never says "dsforge" — any
|
|
14
|
+
spec→screen, Figma-to-code, token-binding, or design-system-fidelity task qualifies.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# dsforge — verified design→code harness
|
|
18
|
+
|
|
19
|
+
A pipeline that takes a functional spec all the way to token-faithful code, **measuring at every
|
|
20
|
+
step instead of trusting self-reports**. The engine is you (the executor) plus a reviewer who
|
|
21
|
+
verifies. The bundled scripts automate only the *checking*; you build the mockups and code and
|
|
22
|
+
make the judgment calls.
|
|
23
|
+
|
|
24
|
+
## When this triggers, first do this
|
|
25
|
+
1. **Read `references/00-portable-kit-and-runbook.md` fully** — the whole picture, runbook, and limits.
|
|
26
|
+
Pull in `references/02-…` (checks), `references/03-…` (generalizing the verifier), and
|
|
27
|
+
`references/examples/` (real screen specs Run1/Run2, DS-augment) as needed.
|
|
28
|
+
2. **Confirm prerequisites:** the Figma MCP is connected to the *target* Figma · Node.js is available ·
|
|
29
|
+
a reviewer (human, or a second Claude acting as reviewer) is available for the two human gates.
|
|
30
|
+
3. **Get three inputs from the user:** ① target design-system Figma file key (or "no DS yet")
|
|
31
|
+
② the functional spec ③ a working Figma file key for mockups.
|
|
32
|
+
4. **Confirm the branch, then ask two short questions** (these are *questions*, not gates — the pipeline
|
|
33
|
+
still has exactly **two** human gates):
|
|
34
|
+
- Does a real design-system Figma file already exist? → **Branch A** (yes) or **Branch B** (no DS).
|
|
35
|
+
- How many mockup **options** to explore per screen? (**default 2–3**.)
|
|
36
|
+
|
|
37
|
+
## Pipeline
|
|
38
|
+
|
|
39
|
+
Take the branch chosen in step 4. **Both branches keep exactly two human gates** — mockup sign-off
|
|
40
|
+
(GATE 1) and final screen review (GATE 2). The only additions are the two step-4 questions and, in
|
|
41
|
+
Branch A, a possible DS-augment question. Always pull the spec **anchors** (content/labels that must
|
|
42
|
+
appear *verbatim*) before building any mockup.
|
|
43
|
+
|
|
44
|
+
### Branch A — a real DS already exists
|
|
45
|
+
1. **Audit the DS.** Run `validators/check1.js` against the DS via the Figma MCP (`use_figma`, paste the
|
|
46
|
+
script body). It decides whether this is a *real, complete* design system: local token variables,
|
|
47
|
+
binding %, raw-fill classification (traverse instance interiors), interactive state variants
|
|
48
|
+
(focus/disabled), elevation.
|
|
49
|
+
- If it reports gaps (missing Status variants / focus / disabled / elevation), **do not auto-augment —
|
|
50
|
+
ask the user which way to go:**
|
|
51
|
+
ⓐ **augment the DS** first, then build on the augmented DS, or
|
|
52
|
+
ⓑ **leave the DS as-is** and mark the missing pieces "(제안)/(proposed)" in the mockup.
|
|
53
|
+
(Augment reference: `references/examples/ezp-states-elevation-augmentation-spec.md`; an augmented DS
|
|
54
|
+
is done when check1 flips to PASS.)
|
|
55
|
+
2. **Extract tokens.** Run `validators/extract-tokens.js` via `use_figma` on the DS → save the returned
|
|
56
|
+
JSON to `validators/out/<project>-tokens.json` (this is the tokenRef). Generate the code tokens
|
|
57
|
+
(`tokens.css` / `tokens.ts`) from it, using `assets/code-scaffold-reference-ezp/tokens.css` as the
|
|
58
|
+
*pattern* (rename to your DS — the `ezp` example is just the project dsforge was validated on).
|
|
59
|
+
3. **Write the project descriptor.** Copy `validators/projects/_TEMPLATE.json` to
|
|
60
|
+
`validators/projects/<project>.json` and fill it: DS file key, tokenRef path, naming map, shell
|
|
61
|
+
(viewport + shell component names), `structuralPxAllow`, per-screen anchors.
|
|
62
|
+
(`validators/projects/ezp.json` is a fully-filled real example.)
|
|
63
|
+
4. **Per screen:**
|
|
64
|
+
- Build **2–3 mockup options** (the count from step 4) with `use_figma` — each a **full viewport +
|
|
65
|
+
app shell**, composed from DS component instances, **auto-layout/aligned/filling the viewport with
|
|
66
|
+
realistic density and no floating nodes** (*Craft & the visual loop*). Anything not defined by the
|
|
67
|
+
spec is marked "(제안)/(proposed)" — never fabricate. **Render and self-critique to a clean image
|
|
68
|
+
before GATE 1.**
|
|
69
|
+
- Run `validators/check2.js` (Figma MCP) on the option(s): anchor coverage · fabrication ·
|
|
70
|
+
authored-vs-DS-internal raw · viewport+shell.
|
|
71
|
+
- **[HUMAN GATE 1] mockup sign-off — the reviewer picks ONE option.** If the user chose ⓐ above, do
|
|
72
|
+
the DS augmentation alongside finalizing the chosen mockup (re-run check1 to PASS).
|
|
73
|
+
- Build the code for the chosen option (React + CSS variables, tokens 1:1, same content as the mockup).
|
|
74
|
+
- Run `node validators/check3.js <project> <screen>` (cwd = app root): token-value match · hardcoded
|
|
75
|
+
hex/px scan · anchors verbatim · fabrication.
|
|
76
|
+
- **[HUMAN GATE 2] final screen review.**
|
|
77
|
+
|
|
78
|
+
### Branch B — no DS yet (order reversed: mockups → DS → code)
|
|
79
|
+
1. **Skip the audit** — there is no DS to audit. Go straight from the spec to visual proposals.
|
|
80
|
+
2. **Per screen, build 2–3 mockup options** (the count from step 4) with `use_figma` — each a **full
|
|
81
|
+
viewport + app shell**, **auto-layout, aligned, filling the viewport, realistic density, no floating
|
|
82
|
+
nodes** (*Craft & the visual loop*). With no DS yet these are *visual proposals*: raw values are
|
|
83
|
+
unavoidable here, but every option must carry the spec anchors verbatim, and anything the spec does not
|
|
84
|
+
define is marked "(제안)/(proposed)" — never fabricate content. **Render and self-critique to a clean
|
|
85
|
+
image before GATE 1.**
|
|
86
|
+
3. **[HUMAN GATE 1] mockup sign-off — the reviewer picks ONE option per screen.**
|
|
87
|
+
4. **Author a new design system** from the chosen mockup(s), into a **new Figma file**, with the DS on its
|
|
88
|
+
own **`Design System`** page (never mixed with the screens):
|
|
89
|
+
- Variables for **color, spacing, size, radius, and typography (including font weight)** — as detailed
|
|
90
|
+
as the chosen design needs.
|
|
91
|
+
- Interactive components as **variant sets** carrying **focus** and **disabled** states (plus
|
|
92
|
+
default/active as needed). **Author every component with auto-layout so labels hug/fill and never
|
|
93
|
+
clip** (see *Craft & the visual loop*).
|
|
94
|
+
- **Elevation** (shadow effect styles / variables). **Bind every fill, stroke, and effect to a
|
|
95
|
+
variable — no raw values** in the DS.
|
|
96
|
+
- Run `validators/check1.js` on the new DS and iterate until it **PASSes**: tokens present ·
|
|
97
|
+
raw-binding 0 · every interactive set has focus/disabled · instance-interior traverse > 0 · elevation
|
|
98
|
+
present.
|
|
99
|
+
5. **Extract tokens.** Run `validators/extract-tokens.js` on the new DS → `validators/out/<project>-tokens.json`
|
|
100
|
+
(tokenRef). Generate the code tokens (`tokens.css` / `tokens.ts`) from it.
|
|
101
|
+
6. **Write the descriptor.** Copy `_TEMPLATE.json`; set `tokenRef`, `tokenCssNaming`, `structuralPxAllow`,
|
|
102
|
+
and `selfVerify` to **this new DS's own measured values** — never copied from another project.
|
|
103
|
+
7. **Per screen (on a separate `Screens` page):** recompose the chosen mockup from the new DS's component
|
|
104
|
+
instances — auto-layout, aligned, filling the viewport, no floating/detached nodes, realistic density.
|
|
105
|
+
**Run the visual loop to a clean render first** (*Craft & the visual loop*), then run
|
|
106
|
+
`validators/check2.js` (anchors 100% · fabrication 0 · viewport+shell ok); then build the code
|
|
107
|
+
(tokens 1:1, same content) and run `node validators/check3.js <project> <screen>`.
|
|
108
|
+
8. **[HUMAN GATE 2] final screen review.**
|
|
109
|
+
|
|
110
|
+
### Craft & the visual loop (REQUIRED — runs *before* the mechanical checks)
|
|
111
|
+
Mechanical checks (check2/check3) verify tokens/content/structure, **not visual quality**. A build that
|
|
112
|
+
passes them can still be unusable — clipped labels, oversized badges, floating menus, a 2-row table
|
|
113
|
+
stranded in an empty canvas. So in **both branches**, every screen goes through a visual loop *before*
|
|
114
|
+
GATE 1 and *before* any mechanical check:
|
|
115
|
+
|
|
116
|
+
The loop has a **mechanical floor** (automated) then a **human ceiling** (judgment):
|
|
117
|
+
1. **build → run `validators/check-layout.js` via the Figma MCP → fix until `hardFails` is 0 → re-run.**
|
|
118
|
+
It auto-detects the objective breakage in the checklist below (clipped labels, overlap, out-of-frame,
|
|
119
|
+
missing auto-layout, junk frames) and returns `{ hardFails, advisories }`. **`hardFails: 0` is the
|
|
120
|
+
precondition for the visual gate** — do not render for sign-off until it is clean; also review `advisories`.
|
|
121
|
+
2. **then render (`get_screenshot` / `node.screenshot()`) → self-critique the *aesthetics* → fix → repeat.**
|
|
122
|
+
|
|
123
|
+
The checklist (1 = what check-layout enforces as the floor; the rest stays human judgment):
|
|
124
|
+
- **No clipped/truncated labels.** Author *every* component with **auto-layout**; buttons/menus/inputs/
|
|
125
|
+
badges **hug or fill** their content — never a fixed width that crops text.
|
|
126
|
+
- **Correctly-sized status badges/chips** — a padded pill that fits its text, not a bunched circle.
|
|
127
|
+
- **Variants visually distinct** — default vs focus vs disabled read differently and correctly.
|
|
128
|
+
- **No floating/detached nodes.** Compose with auto-layout so shell, table, and form align and **fill the
|
|
129
|
+
viewport**. A row-action menu is **anchored to its row or shown as an overlay directly above that row** —
|
|
130
|
+
never parked in empty space.
|
|
131
|
+
- **Realistic data density** — enough rows/fields that the screen reads like a real product; no near-empty
|
|
132
|
+
canvas, no giant blank areas.
|
|
133
|
+
- **Balanced, aligned layout** that fills the viewport.
|
|
134
|
+
|
|
135
|
+
**[HUMAN GATE 1] is the visual judgment point:** first get `check-layout` to **hardFails 0** (the
|
|
136
|
+
mechanical floor), *then* render every screen and hand the renders to the reviewer (a human if available).
|
|
137
|
+
Iterate until the verdict is *"usable — polish, not restart."* Only **after** visual sign-off do you run the
|
|
138
|
+
fidelity checks (check2/check3). Order: **check-layout (0) → human visual sign-off → check2/check3.** Passing
|
|
139
|
+
the mechanical checks is **necessary, not sufficient** — they are a floor, not the quality bar.
|
|
140
|
+
|
|
141
|
+
### File structure (both branches)
|
|
142
|
+
Keep the **DS on its own page** (`Design System`: variables · styles · components) and **screen mockups on a
|
|
143
|
+
separate page** (`Screens`). Never pile the DS and the screens onto one page.
|
|
144
|
+
|
|
145
|
+
### Both branches
|
|
146
|
+
- On the first run, **self-validate the verifier** once (`npx dsforge verify <project>`) against a hand
|
|
147
|
+
check before trusting it. Here `reproduced=true` means *this run is internally reproducible against its
|
|
148
|
+
own descriptor baseline* — not that it matches any other project. Each script's header comment has its
|
|
149
|
+
exact invocation.
|
|
150
|
+
|
|
151
|
+
## How the validators run
|
|
152
|
+
- `check3.js`, `verify.js` → **Node** (run via `npx dsforge check3 <project> <screen>` / `npx dsforge verify <project>`, or `node validators/check3.js <project> <screen>` from the app root).
|
|
153
|
+
- `check1.js`, `check2.js`, `check-layout.js`, `extract-tokens.js` → **Figma MCP `use_figma`** (paste the
|
|
154
|
+
script body, pass the descriptor as config). See each file's top comment. `check-layout.js` is the visual
|
|
155
|
+
floor — run it (hardFails 0) before GATE 1.
|
|
156
|
+
|
|
157
|
+
## Disciplines (non-negotiable)
|
|
158
|
+
- **Tokens only** — no hand-entered hex/px except the structural exceptions declared in the descriptor
|
|
159
|
+
(`structuralPxAllow`: 1px hairlines, focus-ring width, etc.).
|
|
160
|
+
- **Zero fabrication** — anything not in the spec is marked "(제안)/(proposed)" with placeholder values.
|
|
161
|
+
- **Measure, don't estimate** — verify by reading nodes/code, never by trusting a build report.
|
|
162
|
+
Traverse **inside** component instances.
|
|
163
|
+
- **Craft before checks** — author every component with **auto-layout** (hug/fill, no clipped labels, no
|
|
164
|
+
floating/detached nodes, correctly-sized badges); keep the **DS and Screens on separate pages**; and pass
|
|
165
|
+
the **visual loop** (render → self-critique → fix) *before* any mechanical check. A green check2/check3 is
|
|
166
|
+
a floor, not the quality bar.
|
|
167
|
+
- **Keep both human gates** — mockup sign-off (the visual judgment point) and final screen review.
|
|
168
|
+
|
|
169
|
+
## Roles
|
|
170
|
+
You (the executor: Figma builds, code, running scripts) and a **reviewer** (human or a second Claude)
|
|
171
|
+
who independently re-derives the numbers. Don't collapse the two.
|
|
172
|
+
|
|
173
|
+
## Limits (don't overstate)
|
|
174
|
+
- Proven for **DS-composition screens** (list / form / detail). **Canvas / graph-editor screens are
|
|
175
|
+
unproven** — the build model and most specs can't support them without fabrication. Say so.
|
|
176
|
+
- The checks verify mechanical token/content/structure fidelity only. Visual judgment, IA, and design
|
|
177
|
+
intent are what the human gates are for.
|
|
178
|
+
|
|
179
|
+
## Bundled resources
|
|
180
|
+
- `validators/` — the verifier + token extractor (`extract-tokens, check1, check2, check-layout, check3, verify`),
|
|
181
|
+
plus `projects/_TEMPLATE.json` (fill per project) and `projects/ezp.json` (filled example).
|
|
182
|
+
- `references/` — methodology & runbook (`00`–`03`) and `examples/` (real runs).
|
|
183
|
+
- `assets/code-scaffold-reference-ezp/` — reference React implementation (token-bound shell/forms/table
|
|
184
|
+
+ two screens). A *pattern* to regenerate for your DS, not a drop-in. The `ezp` name is the test DS.
|
package/plugins/dsforge/skills/dsforge/assets/code-scaffold-reference-ezp/DatasetManagement.tsx
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
}
|