@codepress/design-kit 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +51 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -19,6 +19,56 @@ It runs on Node 20 or later. Playwright is a peer dependency, so the capture
19
19
  drives the Playwright and Chromium your project already has. The `kit`
20
20
  commands need neither.
21
21
 
22
+ ## Set it up with your agent
23
+
24
+ The quickest way in is to let your coding agent do the whole setup. Paste this
25
+ into Claude Code, Codex, Cursor or any agent that can run commands in your
26
+ repository:
27
+
28
+ ```text
29
+ Set up a design kit in this repository. Run
30
+ `npx --yes @codepress/design-kit setup-guide` and follow what it prints.
31
+ Open one pull request and don't merge it.
32
+ ```
33
+
34
+ `setup-guide` prints the setup skill that ships in this package, so the agent
35
+ needs nothing installed beforehand. Following it, the agent:
36
+
37
+ 1. Runs `init`, which detects your stack and writes the config, the daily
38
+ workflow and the agent skill (see [Set up in your repository](#set-up-in-your-repository)).
39
+ 2. Fills in the pages to capture: the command that starts your app, and three
40
+ to eight main screens, each with a selector that shows when it has loaded.
41
+ 3. Decides between Storybook stories and real pages. With Storybook, it
42
+ captures every story. Without it, it asks you whether to add Storybook,
43
+ capture your real pages, or both. When nobody answers, it captures pages and
44
+ writes stories for the components several screens share.
45
+ 4. Wires sign-in, when your pages need one, through a seeded test user and the
46
+ repository secrets `DESIGN_KIT_USERNAME` and `DESIGN_KIT_PASSWORD`. It never
47
+ writes a credential; the pull request says which secrets to add.
48
+ 5. Builds the kit once, checks what it captured, and opens the pull request
49
+ with the counts, any gaps and a screenshot of one composed screen.
50
+
51
+ No Storybook yet and you want one? Add a line to the prompt:
52
+
53
+ ```text
54
+ We don't have Storybook. Add it, with stories for our shared components
55
+ covering their default, empty, loading, error and long-text states.
56
+ ```
57
+
58
+ New stories are written for React. On another stack the agent captures your
59
+ real pages and says so in the pull request.
60
+
61
+ Once the pull request merges, the daily workflow uploads the kit, and the
62
+ `design-kit` skill it installed tells your agents to use it. Ask for a mockup
63
+ the way you would ask a designer:
64
+
65
+ ```text
66
+ Mock up a Billing tab on our settings page, using the design kit.
67
+ ```
68
+
69
+ The agent fetches the newest kit, composes the screen from your real frame and
70
+ components, and draws only what is new.
71
+
22
72
  ## Set up in your repository
23
73
 
24
74
  `design-kit init` sets a kit up as one reviewable change. Run it in the
@@ -178,7 +228,7 @@ design-kit setup-guide
178
228
  that has none, as one reviewable pull request: run `init`, decide between
179
229
  Storybook stories and page capture, wire sign-in through repository secrets,
180
230
  build the kit once and report what it captured. An agent without the skill
181
- installed can run `npx --yes @codepress/design-kit@0.1.3 setup-guide` and
231
+ installed can run `npx --yes @codepress/design-kit setup-guide` and
182
232
  follow what it prints.
183
233
 
184
234
  `--only` re-captures just those stories (Storybook ids, with or without the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codepress/design-kit",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Capture your Storybook and real app pages as a static design kit, and compose self-contained mockups from it",
5
5
  "type": "module",
6
6
  "bin": {