@cychien/ezdesign 0.8.1 → 0.9.2

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/dist/vite.mjs CHANGED
@@ -10,11 +10,17 @@ var APP_NAME = "ezdesign";
10
10
  var ENV_PREFIX = APP_NAME.toUpperCase();
11
11
  var DATA_DIR = process.env[`${ENV_PREFIX}_DATA_DIR`] ?? join(homedir(), `.${APP_NAME}`);
12
12
  var SESSIONS_DIR = join(DATA_DIR, "sessions");
13
+ var LEGACY_SESSIONS_DIR = join(DATA_DIR, "sessions-legacy");
13
14
  var REGISTRY_FILE = join(DATA_DIR, "daemon.json");
14
15
  var DAEMON_LOG = join(DATA_DIR, "daemon.log");
16
+ var ACP_NPM_PREFIX = join(DATA_DIR, "acp");
15
17
  var VERSIONS_DIR = join(DATA_DIR, "versions");
16
18
  var UPDATE_CHECK_FILE = join(DATA_DIR, "update-check.json");
19
+ var LIBRARY_HOME_ENV = `${ENV_PREFIX}_LIBRARY_HOME`;
17
20
  var NO_UPDATE_CHECK_ENV = `${ENV_PREFIX}_NO_UPDATE_CHECK`;
21
+ var DESIGN_HARNESS_ENV = `${ENV_PREFIX}_DESIGN_HARNESS`;
22
+ var API_URL_ENV = `${ENV_PREFIX}_API_URL`;
23
+ var NO_IDLE_STOP_ENV = `${ENV_PREFIX}_NO_IDLE_STOP`;
18
24
  var CONTROL_PORT_ENV = `${ENV_PREFIX}_CONTROL_PORT`;
19
25
  var MAX_ATTACHMENT_BYTES = 8 * 1024 * 1024;
20
26
  var ATTACHMENT_GRACE_MS = 24 * 60 * 6e4;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cychien/ezdesign",
3
- "version": "0.8.1",
3
+ "version": "0.9.2",
4
4
  "description": "Annotate your live dev app in the browser; feedback flows to your local coding agent, which edits the source. Review, iterate, repeat.",
5
5
  "type": "module",
6
6
  "author": "Justin Chien",
@@ -32,9 +32,10 @@
32
32
  "dev": "node scripts/dev.mjs",
33
33
  "dev:agent": "node scripts/dev-agent.mjs",
34
34
  "dev:cli": "node scripts/dev-cli.mjs",
35
+ "brand": "node scripts/brand-wordmark.mjs && node --import tsx scripts/brand-assets.mjs",
35
36
  "check": "npm run build && npm run typecheck && npm test",
36
- "typecheck": "tsc --noEmit && tsc -p fixtures/playground --noEmit",
37
- "test": "node --import tsx --test \"test/**/*.test.ts\"",
37
+ "typecheck": "tsc --noEmit && tsc -p src/extension --noEmit && tsc -p fixtures/playground --noEmit",
38
+ "test": "node scripts/test.mjs",
38
39
  "version": "node scripts/sync-skill-version.mjs && git add skills/ezdesign/SKILL.md",
39
40
  "prepublishOnly": "npm run check"
40
41
  },
@@ -42,7 +43,7 @@
42
43
  "access": "public"
43
44
  },
44
45
  "engines": {
45
- "node": ">=20"
46
+ "node": ">=22.13"
46
47
  },
47
48
  "keywords": [
48
49
  "agent",
@@ -57,7 +58,7 @@
57
58
  "dependencies": {
58
59
  "@agentclientprotocol/sdk": "^1.4.0",
59
60
  "@babel/parser": "^7.26.0",
60
- "@hugeicons/core-free-icons": "^4.2.3",
61
+ "@hugeicons/core-free-icons": "^4.3.5",
61
62
  "@modelcontextprotocol/sdk": "^1.30.0",
62
63
  "express": "^5.1.0",
63
64
  "http-proxy-middleware": "^3.0.3",
@@ -66,12 +67,14 @@
66
67
  "zod": "^4.5.4"
67
68
  },
68
69
  "devDependencies": {
70
+ "@fontsource/geist-sans": "5.3.0",
69
71
  "@types/express": "^5.0.0",
70
72
  "@types/node": "^22.10.0",
71
73
  "@types/react": "^19.2.18",
72
74
  "@types/react-dom": "^19.2.5",
73
75
  "@vitejs/plugin-react": "^4.7.0",
74
76
  "esbuild": "^0.25.0",
77
+ "opentype.js": "1.3.4",
75
78
  "react": "^19.2.8",
76
79
  "react-dom": "^19.2.8",
77
80
  "tsx": "^4.23.11",
@@ -1,78 +1,35 @@
1
1
  ---
2
2
  name: ezdesign
3
- description: A design harness for a web project (增強設計), and the way into an ezdesign review session. Five steps - product, stack, design, components, make - that build UI which belongs to the product and its visual system rather than to a template. Use the harness only when the user explicitly asks for 增強設計 or the design harness, never for an ordinary UI request; use the review part when the user asks to review or annotate a running page.
3
+ description: Open an ezdesign review session on a running web page. The user annotates the page in the browser, and each batch reaches the coding agent with exact source locations. Use when the user invokes /ezdesign, or asks to review, annotate or give visual feedback on a running page, or to explore designs on a canvas.
4
4
  metadata:
5
- version: 0.8.1
5
+ version: 0.9.2
6
6
  ---
7
7
 
8
8
  # ezdesign
9
9
 
10
- A design harness for a web project. It runs in Claude Code, Codex, Gemini CLI or any agent that
11
- can read this file, and it needs no ezdesign session, daemon or UI: the project is the evidence,
12
- the browser tool is whatever the agent has, and the two files at the project root are the
13
- configuration. When an ezdesign review session *is* open, its daemon points each turn at the step's
14
- file directly and this file is not on the path.
15
-
16
- ## The harness
17
-
18
- | Step | File | Runs when | Produces |
19
- | --- | --- | --- | --- |
20
- | 1 product | [reference/product.md](reference/product.md) | no `PRODUCT.md` | `PRODUCT.md` |
21
- | 2 stack | [reference/stack.md](reference/stack.md) | `.ezdesign/config.json` is missing, stale, or names no browser tool | `.ezdesign/config.json`: the stack, the design system and component library in use, the browser tool |
22
- | 3 design | [reference/design.md](reference/design.md) | no `DESIGN.md` | `DESIGN.md`: the visual language in broad strokes, a direction rather than a spec, no components |
23
- | 4 components | [reference/components.md](reference/components.md) | `.ezdesign/config.json` records no `components.primitives` | `DESIGN.md`'s language made concrete in the design system, and the component set written in the project's own library |
24
- | 5 make | [reference/make.md](reference/make.md) | a request to change or build UI, or an explore round asking for variants | the change, or the variants |
25
-
26
- Steps 1 to 4 configure the project; 5 is the work, and it ends by having an independent reviewer
27
- judge what it made ([reference/critique.md](reference/critique.md)) and letting `PRODUCT.md`,
28
- `DESIGN.md` and this user's taste, `.ezdesign/taste.md` - which the work is built to and judged by -
29
- learn from the request. Each
30
- step reads what the ones before it produced, and a step never rewrites another step's file. A step
31
- whose file is not there yet says so in one line and is skipped.
32
-
33
- ## When the harness applies
34
-
35
- Only in a turn that explicitly turns it on, never by default. Inside an ezdesign review session,
36
- that is a prompt saying `增強設計 (the design harness) is on for this turn.` Outside a session, it
37
- is a request in which the user asks for 增強設計 or the design harness by name.
38
-
39
- Any other turn is handled as if this skill had never been read, even later in a conversation where
40
- the harness was on: no harness steps, no designing by `PRODUCT.md` or `DESIGN.md`, no review by
41
- its rules, and no edits to `PRODUCT.md`, `DESIGN.md` or `.ezdesign/config.json` unless the request
42
- asks for one.
43
-
44
- When it applies, talk to the user in the language they write in and in their words - 增強設計,
45
- 設計規範, 靈感 - never the harness's own: harness, step or file names, precedent, inspire, or the
46
- review and its scores, which are the agent's business and not theirs.
47
-
48
- - **Both files exist: in the harness.** Read `PRODUCT.md` and `DESIGN.md` before any visual change.
49
- Keep to `PRODUCT.md`; take `DESIGN.md` as a direction to start from, not a rule to obey. An
50
- ordinary change edits code only; the two
51
- files change only as step 5 says. Run step 5 for the request. When `.ezdesign/config.json` is
52
- missing or stale, run step 2 first; when it records no `components.primitives`, run step 4
53
- first.
54
- - **Either is missing: ask before anything else**, because the harness cannot run without it. Ask
55
- the user, word for word, naming only the file that is missing when one exists:
56
-
57
- > 啟用增強設計:增強設計會建立 PRODUCT.md 與 DESIGN.md,是否繼續?
58
-
59
- with two options in this order: 「繼續」 and 「取消」. Use your question tool if you have
60
- one; otherwise ask in your reply and end the turn.
61
- - **Yes:** walk steps 1 to 4 in order, starting at the first one whose output is missing, then
62
- do the work through step 5.
63
- - **No:** the harness cannot be used. Do the work as you would without this skill.
64
-
65
- ## Opening an ezdesign review
66
-
67
- When the user wants to annotate a running page in the browser and have the feedback come back as
68
- exact source locations, open a review session: [reference/start.md](reference/start.md). This is
69
- the one part of the skill that needs ezdesign installed.
10
+ Open a review: [reference/start.md](reference/start.md). A bare `/ezdesign`, with nothing after
11
+ it, is that request: open a review on the project's running dev server.
70
12
 
71
13
  ## Inside a review session
72
14
 
73
15
  The daemon has done the routing: its prompt says whether the turn is a feedback batch or an
74
- explore round, and names the file to read. Do not route again. A batch adds what a bare request
75
- cannot: the page's `url`, the annotated `items` with their `anchor` (source `file:line`, selector,
76
- viewport), `references`, and `attachments`. An explore adds one element's capture - its markup,
77
- computed styles, slot and the page's tokens - and takes each variant back through a tool, editing
78
- no file. The making step says where each of those is used.
16
+ explore round, and what to do with it. Do not route again. A batch carries the page's `url`, the
17
+ annotated `items` with their `anchor` (source `file:line`, selector, viewport), `references`, and
18
+ `attachments`. An explore adds one element's capture - its markup, computed styles, slot and the
19
+ page's tokens - and takes each variant back through a tool, editing no file.
20
+
21
+ ## Canvases
22
+
23
+ An ACP review session also gives you the `ezdesign-canvas` tools. Each turn's prompt says which tab
24
+ the user sent the batch from and which canvases exist.
25
+
26
+ - When the user wants to explore directions, compare options or see a design before it is built,
27
+ put each one in a frame on a canvas: one `add_frame` per design, as soon as each is ready, on the
28
+ canvas the turn's prompt names. Call `create_canvas` only when no canvas is open or the user asks
29
+ for a new one. Leave `position` out; frames are placed for you.
30
+ - A frame is a complete HTML document with its own `<head>` and styles, at a real viewport width
31
+ (390 phone, 768 tablet, 1280 desktop). Nothing is shared between frames.
32
+ - An item whose `anchor.frame` is set was made inside a frame: `anchor.source` is a line of that
33
+ frame's file under `.ezdesign/canvases/`. Change a frame with `update_frame` (pass the
34
+ `expectedHash` you last read) or by editing its file.
35
+ - Never edit `canvas.json` or `layout.json` by hand. Where a frame sits and its size are the user's.
@@ -28,7 +28,9 @@ the user did not provide an ACP command, ask them which ACP agent to use.
28
28
 
29
29
  ## Workflow
30
30
 
31
- 1. Make sure the dev server is running. Never start a second instance when one is already up.
31
+ 1. Make sure the dev server is running. Never start a second instance when one is already up. If
32
+ the user only wants to explore designs on a canvas, there may be no dev server: run the command
33
+ below without the url and the review opens on the project's canvases.
32
34
  2. From the project root, run:
33
35
 
34
36
  ```sh