design-pact 0.2.2 → 0.3.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/README.md +16 -0
- package/SKILL.md +12 -0
- package/dist/cli.js +701 -22
- package/package.json +1 -1
- package/web/404.html +1 -1
- package/web/__next.__PAGE__.txt +4 -4
- package/web/__next._full.txt +11 -11
- package/web/__next._head.txt +4 -4
- package/web/__next._index.txt +4 -4
- package/web/__next._tree.txt +2 -2
- package/web/_next/static/chunks/06~f4cvc3b8e~.js +5 -0
- package/web/_next/static/chunks/0dbhjjzl8qfwv.js +1 -0
- package/web/_next/static/chunks/{0si4eubpj00yw.js → 0ge~kyq7lzl~5.js} +2 -2
- package/web/_next/static/chunks/0ht900cau6_ur.js +31 -0
- package/web/_next/static/chunks/0nn9jq1cov9ax.css +3 -0
- package/web/_next/static/chunks/0pe3f11zk1rcv.js +1 -0
- package/web/_next/static/chunks/{turbopack-0y3s-y83i3.06.js → turbopack-0jm8qs4dffmjl.js} +1 -1
- package/web/_not-found/__next._full.txt +9 -9
- package/web/_not-found/__next._head.txt +4 -4
- package/web/_not-found/__next._index.txt +4 -4
- package/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/web/_not-found/__next._not-found.txt +3 -3
- package/web/_not-found/__next._tree.txt +2 -2
- package/web/_not-found.html +1 -1
- package/web/_not-found.txt +9 -9
- package/web/index.html +1 -1
- package/web/index.txt +11 -11
- package/web/_next/static/chunks/0-l9p_pd2v836.js +0 -5
- package/web/_next/static/chunks/0rp7qr3afex.u.js +0 -31
- package/web/_next/static/chunks/0uyeui9y_zv_0.css +0 -3
- package/web/_next/static/chunks/0x72peuimhbw-.js +0 -1
- package/web/_next/static/chunks/15356_01bt_3u.js +0 -1
- /package/web/_next/static/{sZ0sIOnTEk-ANZHZKcMr8 → tIX_HvPOULd9j1yucL1Pb}/_buildManifest.js +0 -0
- /package/web/_next/static/{sZ0sIOnTEk-ANZHZKcMr8 → tIX_HvPOULd9j1yucL1Pb}/_clientMiddlewareManifest.js +0 -0
- /package/web/_next/static/{sZ0sIOnTEk-ANZHZKcMr8 → tIX_HvPOULd9j1yucL1Pb}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -38,6 +38,9 @@ npx design-pact inspect design.md
|
|
|
38
38
|
|
|
39
39
|
# Audit source files: find color literals outside the contract
|
|
40
40
|
npx design-pact check design.md src/ app/
|
|
41
|
+
|
|
42
|
+
# Derive a draft design.md from an existing codebase
|
|
43
|
+
npx design-pact import src/ [--out design.md] [--force]
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
### `check` — enforce the contract
|
|
@@ -49,6 +52,19 @@ into CI or an agent loop: the agent generates UI against `design.md`, runs
|
|
|
49
52
|
`check`, and fixes anything flagged. `node_modules` / build output are skipped
|
|
50
53
|
automatically; whitelist intentional exceptions with `--allow "#hex,#hex"`.
|
|
51
54
|
|
|
55
|
+
### `import` — adopt design-pact in an existing project
|
|
56
|
+
|
|
57
|
+
`import` scans tailwind configs, CSS custom properties, and raw color usage,
|
|
58
|
+
then assigns the six roles: colors from variables literally named
|
|
59
|
+
background/primary/border/… win outright; the rest are filled by OKLCH
|
|
60
|
+
heuristics (lightness, chroma, hue distance, contrast) and every assignment is
|
|
61
|
+
labeled `named` / `heuristic` / `derived` in the summary so you know what to
|
|
62
|
+
review. Radius, spacing, body font, and base size are detected when declared.
|
|
63
|
+
The output is a complete design.md — dark face and status colors derived the
|
|
64
|
+
same way the studio does it — and the command prints a studio URL to eyeball
|
|
65
|
+
the palette before you commit to it. A dark codebase is handled correctly: it
|
|
66
|
+
becomes the `@media (prefers-color-scheme: dark)` face.
|
|
67
|
+
|
|
52
68
|
Outputs:
|
|
53
69
|
|
|
54
70
|
| Format | File | Source |
|
package/SKILL.md
CHANGED
|
@@ -41,6 +41,18 @@ Then branch:
|
|
|
41
41
|
|
|
42
42
|
## Create — no design.md yet
|
|
43
43
|
|
|
44
|
+
**If the project already has real styling** (a tailwind config, CSS custom
|
|
45
|
+
properties, an established look), offer to derive the draft from it instead of
|
|
46
|
+
inventing palettes:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx design-pact import <src-dirs> --out design.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Show the user the printed summary + studio link to confirm the mapping, then
|
|
53
|
+
continue to **Apply**. Only fall through to palette proposal when the project
|
|
54
|
+
is greenfield or the user wants a fresh direction.
|
|
55
|
+
|
|
44
56
|
There's no design system yet. The division of labor: **you (the agent) do the
|
|
45
57
|
creative part — clarify direction and propose 2–3 palettes; the web app does
|
|
46
58
|
the deterministic part — render each palette so the user picks one visually,
|