@srobroek/pi-design 0.0.0 → 0.11.1

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 (59) hide show
  1. package/CHANGELOG.md +174 -0
  2. package/LICENSE +202 -0
  3. package/README.md +438 -2
  4. package/_kit/prereqs.json +41 -0
  5. package/_kit/prereqs.ts +374 -0
  6. package/agents/a11y-auditor.md +107 -0
  7. package/agents/council-user.md +25 -0
  8. package/agents/council-ux.md +25 -0
  9. package/agents/design-critic.md +80 -0
  10. package/agents/ui-implementer.md +75 -0
  11. package/agents/ui-ux-specialist.md +133 -0
  12. package/commands/council-product.md +26 -0
  13. package/commands/design-review.md +17 -0
  14. package/extensions/design.js +438 -0
  15. package/formulas/design-surface.formula.toml +344 -0
  16. package/formulas/design-system.formula.toml +509 -0
  17. package/formulas/design-touch.formula.toml +188 -0
  18. package/formulas/mol-design-a11y.formula.toml +128 -0
  19. package/formulas/mol-design-component.formula.toml +122 -0
  20. package/formulas/mol-design-iterate.formula.toml +187 -0
  21. package/formulas/mol-design-motion.formula.toml +138 -0
  22. package/formulas/mol-design-responsive.formula.toml +135 -0
  23. package/formulas/mol-design-tokens.formula.toml +165 -0
  24. package/mcp-servers.ts +49 -0
  25. package/package.json +61 -4
  26. package/skills/accessibility-audit/SKILL.md +92 -0
  27. package/skills/accessibility-audit/references/upstream.md +78 -0
  28. package/skills/design-component-truth/SKILL.md +41 -0
  29. package/skills/design-evidence/SKILL.md +21 -0
  30. package/skills/design-guide/SKILL.md +26 -0
  31. package/skills/design-md/LICENSE +21 -0
  32. package/skills/design-md/NOTICE +31 -0
  33. package/skills/design-md/SKILL.md +79 -0
  34. package/skills/design-md/references/create-design-md.md +254 -0
  35. package/skills/design-md/references/upstream.md +60 -0
  36. package/skills/design-no-slop/SKILL.md +32 -0
  37. package/skills/design-prototype/SKILL.md +84 -0
  38. package/skills/design-prototype/references/in-app-variants.md +47 -0
  39. package/skills/design-prototype/references/upstream.md +43 -0
  40. package/skills/design-system-audit/SKILL.md +62 -0
  41. package/skills/design-system-audit/references/token-carriers.md +106 -0
  42. package/skills/design-system-audit/references/token-pipeline.md +115 -0
  43. package/skills/design-system-audit/references/upstream.md +52 -0
  44. package/skills/design-token-discipline/SKILL.md +24 -0
  45. package/skills/design-upstream-preflight/SKILL.md +60 -0
  46. package/skills/motion-design/SKILL.md +60 -0
  47. package/skills/ui-microcopy/LICENSE +212 -0
  48. package/skills/ui-microcopy/NOTICE +28 -0
  49. package/skills/ui-microcopy/SKILL.md +50 -0
  50. package/skills/ui-microcopy/references/copy-guidance.md +86 -0
  51. package/skills/ui-microcopy/references/upstream.md +11 -0
  52. package/skills/ui-review/SKILL.md +92 -0
  53. package/skills/ui-review/references/probes.md +446 -0
  54. package/skills/ui-review/references/storybook.md +217 -0
  55. package/skills/ui-review/references/tools.md +269 -0
  56. package/skills/ui-review/references/viewport-checks.md +184 -0
  57. package/skills/wireloom/LICENSE +21 -0
  58. package/skills/wireloom/NOTICE +30 -0
  59. package/skills/wireloom/SKILL.md +95 -0
package/README.md CHANGED
@@ -1,3 +1,439 @@
1
- # @srobroek/pi-design
1
+ # design
2
2
 
3
- Placeholder release that reserves this name so CI can publish it. The real package comes from srobroek/harness-plugins PR #188; install a version later than 0.0.0.
3
+ UI and UX design for OpenCode: eight workflow skills, five design rules as skills,
4
+ four design subagents, nine beads formulas with a `design_setup` tool that installs
5
+ them, a `design_impeccable_scan` tool that runs impeccable's detector, and optional
6
+ accessibility, wireframing and Storybook MCP integrations.
7
+
8
+ The pi package `@srobroek/pi-design` ships the same skills and agents. It adds a
9
+ Playwright browser, a `/design-review` prompt and a `/council-product` prompt.
10
+ See [pi](#pi).
11
+
12
+ ## Skills
13
+
14
+ Only `design-guide` is listed to the model in OpenCode: it is a router whose body maps each
15
+ situation to every skill below, which set `opencode/autoinvoke: false` and load by id. One listing
16
+ entry instead of one per skill keeps the per-request skills listing short. Claude Code ignores that metadata, so there every skill is listed and triggers directly.
17
+
18
+ | Skill | Phase | When |
19
+ | --- | --- | --- |
20
+ | `design-system-audit` | GROUND | Inventory existing tokens, scales and primitives before UI work |
21
+ | `design-md` | SPECIFY | Write or update `DESIGN.md` from the audit, then lint it |
22
+ | `design-prototype` | SPECIFY | Route a wireframe, mockup, prototype or deck request to the right producer |
23
+ | `wireloom` | SPECIFY | A wireframe as a fenced `wireloom` block rendered to SVG (vendored) |
24
+ | `motion-design` | BUILD | Durations, easings and reduced-motion branches from the project scale |
25
+ | `ui-microcopy` | BUILD | Errors, empty states, CTAs, confirmations and onboarding copy (vendored guidance) |
26
+ | `ui-review` | VERIFY | Drive the rendered surface: ARIA snapshot, computed styles, keyboard walk, three widths |
27
+ | `accessibility-audit` | CRITIQUE | WCAG 2.2 AA with measured values |
28
+
29
+ On omp these five were rules; here they are skills the workflow skills and agents
30
+ load by name:
31
+
32
+ | Skill | When |
33
+ | --- | --- |
34
+ | `design-token-discipline` | Styling a component or editing tokens: named tokens only, approval for new scales |
35
+ | `design-no-slop` | Critiquing or building a rendered UI: generated-UI tells and missing states |
36
+ | `design-component-truth` | Passing component props or writing stories: verify every prop against its docs |
37
+ | `design-evidence` | Any claim about a rendered surface: ARIA, computed style or screenshot, plus the width |
38
+ | `design-upstream-preflight` | Before routing to an upstream skill or CLI: install and probe only what the route needs |
39
+
40
+ ## Agents
41
+
42
+ | Agent | Role | Permissions |
43
+ | --- | --- | --- |
44
+ | `ui-ux-specialist` (steps 150) | Leads multi-component UI work through GROUND, GATE INTENT, SPECIFY, BUILD, VERIFY, CRITIQUE, RECONCILE, GATE ACCEPT | may spawn only `design-critic`, `a11y-auditor`, `explore` and `general` |
45
+ | `ui-implementer` (steps 150) | Builds one UI unit on existing tokens and components, verified at 1440, 768 and 375 px; escalates anything bigger | no web search or fetch, no subagents |
46
+ | `design-critic` (steps 60) | Read-only critique for hierarchy, rhythm and generated-UI tells | no edit, shell or subagents |
47
+ | `a11y-auditor` (steps 60) | Read-only WCAG 2.2 AA audit with measured values | no edit or subagents; shell only for preflight probes and the axe CLI fallback, by prompt |
48
+
49
+ All four are `subagent` agents converted with `scripts/convert-agent.ts`.
50
+ `design-critic` and `a11y-auditor` are composed by `bun run build` from
51
+ `agents.src/<id>.md` and the shared review core (`plugins/lib/src/review-core.md`,
52
+ see [agent-reviewer](../agent-reviewer/README.md)); `ui-implementer` is composed the
53
+ same way and includes the `standards` part of the shared coding core
54
+ (`plugins/lib/src/coding-core.md`): research first and compare with the
55
+ `lang-<language>-libraries` standards before writing your own code. Edit the source, not `agents/`. Their
56
+ first line is `VERDICT: PASS|MINOR|MAJOR`. Their
57
+ permissions are tool allowlists (a deny on every action, then allows), so a tool an
58
+ agent does not need is left out of its requests: each gets read, grep, glob, Code
59
+ Mode, the `lsp_*` tools, the `browser` tools and the `design_*` tools, plus the edit,
60
+ shell and web access its row allows. Skills are allowed by family: `design-*` and
61
+ `ui-*` for all four, plus `accessibility-audit` and the upstream `accessibility` skill
62
+ for `a11y-auditor`, the rest of the design skills (`accessibility-audit`,
63
+ `motion-design`, `wireloom`) and the coding families (`lang-*`, `quality-*`,
64
+ `toolchain-*`) for `ui-implementer`, and every design skill and the
65
+ upstream skills `design-upstream-preflight` routes to for `ui-ux-specialist`. Rules are added after any you
66
+ configure for an agent with the same id. `ui-ux-specialist`
67
+ spawning children while it runs as a subagent needs `experimental.subagent_depth`
68
+ of 2 or more. `ui-ux-specialist` runs at most 150 steps. The agents pin no model;
69
+ each declares a model tier through the `x-opencode-model-role` request header, so
70
+ with the model-roles plugin that tier picks its model, and without it the agent
71
+ inherits the caller's model:
72
+
73
+ | Agent | Model tier |
74
+ | --- | --- |
75
+ | `ui-ux-specialist` | `strong` |
76
+ | `ui-implementer` | `strong` |
77
+ | `design-critic` | `reviewer` |
78
+ | `a11y-auditor` | `reviewer` |
79
+
80
+ The browser steps need a browser the agent can drive: the OpenCode desktop browser
81
+ tools, a browser MCP server, or Playwright through the shell. The `ui-review` skill's
82
+ `references/tools.md` maps each step to both.
83
+
84
+ ## Tools
85
+
86
+ | Tool | What it does |
87
+ | --- | --- |
88
+ | `design_setup` | Copies the nine formulas into a beads workspace's `.beads/formulas/`. Identical copies stay; a divergent copy is refused unless `force=true`; a symlinked `.beads` or formulas path is refused. The workspace needs `.beads/` already (`bd init`). |
89
+ | `design_impeccable_scan` | Runs `npx --yes impeccable detect --json` over files, directories or a URL (optional `viewport`, `noConfig`, `timeoutSeconds`) and returns the JSON. Exit 0 is clean, 2 is findings, 1 is a target it could not scan. |
90
+
91
+ Both tools run under your permission rules: an allowed call runs without a prompt, and a
92
+ deny or ask rule always wins. `design_impeccable_scan` runs npx, which may download
93
+ impeccable and its engine. To prompt before every run even when a rule allows it, set the
94
+ plugin option `confirmScan` to `true` (default `false`):
95
+
96
+ ```jsonc
97
+ {
98
+ "plugins": [{
99
+ "package": "github:srobroek/harness-plugins::path:plugins/design/opencode",
100
+ "options": { "confirmScan": true }
101
+ }]
102
+ }
103
+ ```
104
+
105
+ Detector findings are a coarse corroborating signal: HTML-engine findings can carry
106
+ `"line": 0`, so the critique confirms each one on the rendered surface.
107
+
108
+ ## Formulas
109
+
110
+ Install them with the `design_setup` tool, or copy `formulas/*.formula.toml` into
111
+ `<repo>/.beads/formulas/` (or `~/.beads/formulas/`) yourself; `bd formula list` then
112
+ shows them. They need bd 1.3 and the beads plugin.
113
+
114
+ Three tiers are poured, one molecule per piece of work:
115
+
116
+ ```sh
117
+ bd mol pour design-touch --var surface=<route> --var scope=<paths> # 8 steps, 1 human gate
118
+ bd mol pour design-surface --var surface=<route> --var scope=<paths> # 15 steps, 3 human gates
119
+ bd mol pour design-system --var surface=<route> --var scope=<paths> # 22 steps, 3 human gates
120
+ ```
121
+
122
+ Optional vars: `platform` (default `web`), `want_design_md` (default `false`), and on
123
+ `design-system` `themes` and `density`.
124
+
125
+ Six sub-processes are bonded onto the step whose result called for them:
126
+
127
+ | Formula | Bond it when | Extra vars |
128
+ | --- | --- | --- |
129
+ | `mol-design-a11y` | an accessibility audit returned MAJOR | `round` |
130
+ | `mol-design-component` | a primitive needs its own isolated build | `component` |
131
+ | `mol-design-iterate` | the user wants another round of visual intent | `round` |
132
+ | `mol-design-motion` | motion or reduced-motion needs a pass | |
133
+ | `mol-design-responsive` | reflow or target size failed | |
134
+ | `mol-design-tokens` | the system audit returned ABSENT or PARTIAL | |
135
+
136
+ ```sh
137
+ bd mol bond mol-design-iterate <step-id> --var surface=<route> --var node=<step-id> --var round=2
138
+ ```
139
+
140
+ Every var of a `mol-` formula is required: `bd mol bond` does not apply var defaults.
141
+ The critique and audit steps carry `execution_agent_type` `design-critic` or
142
+ `a11y-auditor` with `execution_mode` `subagent`, so the beads plugin's routing gate
143
+ admits a spawn of that agent and blocks a spawn of any other.
144
+
145
+ ## MCP servers
146
+
147
+ The plugin ships the pinned accessibility and wireframe servers in [`.mcp.json`](.mcp.json).
148
+ In OpenCode they are off by default; enable only the integrations a frontend project
149
+ uses. The optional `storybook` server is OpenCode-only and off by default.
150
+
151
+ | Server | Default | Command | Used by |
152
+ | --- | --- | --- | --- |
153
+ | `accessibility-scanner` | off | `npx -y accessibility-scanner-mcp@0.3.1` | Automated measurement route of `accessibility-audit` and `a11y-auditor`; needs a local Google Chrome or `CHROME_PATH` |
154
+ | `wire-dsl` | off | `npx -y @wire-dsl/mcp-server@0.1.3` | Vector wireframes for `design-prototype` |
155
+ | `storybook` | off | remote `http://localhost:6006/mcp` | Component documentation for `design-component-truth` and `ui-review`, served while `storybook dev` runs with `@storybook/addon-mcp` |
156
+
157
+ `storybook` is off because it answers only while Storybook runs; turn it on with
158
+ `mcpServers` in a project that runs it. OpenCode connects without OAuth. It is
159
+ OpenCode-only and not in `.mcp.json`.
160
+
161
+ `mcp: "auto"` (default) adds enabled servers only in frontend projects; `"always"`
162
+ adds them in any project and `"off"` disables all plugin servers. Each server is
163
+ independently controlled by `mcpServers`; opt in by name:
164
+
165
+ ```jsonc
166
+ {
167
+ "plugins": [{
168
+ "package": "github:srobroek/harness-plugins::path:plugins/design/opencode",
169
+ "options": {
170
+ "mcp": "auto", // "auto" (default), "always", or "off" for all plugin servers
171
+ "mcpServers": { "accessibility-scanner": true, "wire-dsl": true, "storybook": true }
172
+ }
173
+ }]
174
+ }
175
+ ```
176
+ Claude Code gets the same `.mcp.json` from the marketplace. Those servers start in
177
+ every project in that harness unless disabled in its MCP settings; enable them only
178
+ for projects that use them. Add `storybook` there yourself.
179
+
180
+ ## pi
181
+
182
+ Install the package in each frontend project:
183
+
184
+ ```sh
185
+ pi install -l npm:@srobroek/pi-design
186
+ ```
187
+
188
+ `-l` writes the project's `.pi/settings.json`. Every session that loads the package
189
+ starts its MCP servers, so install it per project.
190
+
191
+ ### Prerequisites
192
+
193
+ At session start, the package looks for these tools on `PATH` and names each missing tool:
194
+
195
+ | Tool | Used for | Install |
196
+ | --- | --- | --- |
197
+ | `impeccable` 4.10.0 or later | `design_impeccable_scan` and the upstream impeccable skill pack | `mise use -g npm:impeccable` |
198
+ | `npx` | the Playwright, `accessibility-scanner` and `wire-dsl` MCP servers | `mise use -g node` |
199
+
200
+ The impeccable skill pack is a separate install. This command writes it to
201
+ `.pi/skills/impeccable/`:
202
+
203
+ ```sh
204
+ impeccable install -y --providers=pi --scope=project --no-hooks
205
+ ```
206
+
207
+ The Playwright server drives Google Chrome where it is installed. On a host without it, such
208
+ as a Linux ARM server, it drives Playwright's Chromium. Install that Chromium once for the
209
+ pinned Playwright:
210
+
211
+ ```sh
212
+ npx -y playwright-core@1.66.0-alpha-2026-11-23 install chromium chromium-headless-shell
213
+ ```
214
+
215
+ ### Scan tool
216
+
217
+ `design_impeccable_scan` runs the `impeccable` on `PATH` without a prompt. When
218
+ impeccable is not on `PATH`, the tool asks you to approve the npx download. A session
219
+ that cannot ask, such as a subagent or `pi -p`, gets a refusal and the command that
220
+ installs impeccable. The timeout and the output limit are the same as in OpenCode.
221
+
222
+ ### Browser
223
+
224
+ The extension registers a `playwright` MCP server. It runs Playwright MCP with an in-memory
225
+ profile. At session start the extension picks the browser:
226
+
227
+ - `PLAYWRIGHT_MCP_BROWSER` names it, for example `chromium` or `msedge`.
228
+ - With no such setting, it is `chrome` when Google Chrome is installed, else `chromium`.
229
+
230
+ Then the extension picks the mode:
231
+
232
+ 1. `PLAYWRIGHT_MCP_HEADLESS=1` (or `true`) makes it headless, and `0` (or `false`) makes it
233
+ headed. The extension ignores other values.
234
+ 2. With no such setting, a Mac gets a headed browser. Linux gets one when `DISPLAY` or
235
+ `WAYLAND_DISPLAY` has a value.
236
+ 3. Otherwise it is headless, because a headed Chrome cannot start on a host with no display.
237
+
238
+ A headed `/design-review` opens two windows, one for each reviewer. The extension hides
239
+ three tools:
240
+
241
+ - `browser_run_code_unsafe` runs code in the server's Node process.
242
+ - `browser_file_upload` hands local files to the page.
243
+ - `browser_drop` drops local files onto the page.
244
+
245
+ The server runs in a new temporary directory for each session, and that directory is its
246
+ only workspace root. Snapshots, screenshots and the other files the tools save go there.
247
+ The extension deletes the directory when the session ends, so copy a file you want to keep.
248
+ A write outside that root fails with "File access denied", and the server blocks `file:` URLs.
249
+
250
+ `pi-src/playwright-tools.json` records the 25 tools the pinned release offers. After a
251
+ version bump, record it again with `bun scripts/record-playwright-tools.ts`.
252
+ The design tests check each recorded tool that takes a file, a path or code.
253
+
254
+ A `playwright` server in your `mcp.json` replaces this one. Pi gives a server that an
255
+ extension registers only to background subagents. So the four design agents set
256
+ `async: true`, and `/design-review` and `ui-ux-specialist` start them in the background.
257
+ A foreground run of a design agent fails unless your own `mcp.json` has the server.
258
+
259
+ To add it, put this entry in `~/.pi/agent/mcp.json`, or in a trusted project's
260
+ `.pi/mcp.json`, and create the `cwd` directory first. Your own entry follows the
261
+ Playwright MCP rule instead: headless on Linux without `DISPLAY`, unless its `env` sets
262
+ `PLAYWRIGHT_MCP_HEADLESS`.
263
+
264
+ ```json
265
+ {
266
+ "mcpServers": {
267
+ "playwright": {
268
+ "command": "npx",
269
+ "args": ["-y", "@playwright/mcp@0.0.86", "--isolated", "--browser", "chrome", "--viewport-size", "1440x900", "--ignore-roots", "--file-paths", "absolute"],
270
+ "cwd": "~/.cache/pi-design-playwright",
271
+ "toolExposure": { "browser_run_code_unsafe": "hidden", "browser_file_upload": "hidden", "browser_drop": "hidden" }
272
+ }
273
+ }
274
+ }
275
+ ```
276
+
277
+ ### Using your own browser
278
+
279
+ The design agents always use the isolated browser above. To let your own pi session work
280
+ in the Chrome where you sign in, add a second server yourself. The package does not
281
+ register it.
282
+
283
+ 1. In Chrome, install the "Playwright Extension" from the Chrome Web Store. Use a Chrome
284
+ profile that you keep for the agent, and sign in there only to the sites it needs.
285
+ 2. Add the server to `~/.pi/agent/mcp.json`, disabled, and create its `cwd` directory:
286
+
287
+ ```json
288
+ {
289
+ "mcpServers": {
290
+ "playwright-mine": {
291
+ "command": "npx",
292
+ "args": ["-y", "@playwright/mcp@0.0.86", "--extension", "--session-name", "pi", "--session-color", "red", "--ignore-roots", "--file-paths", "absolute", "--redact-url-params", "access_token,code,state,id_token"],
293
+ "cwd": "~/.cache/pi-playwright-mine",
294
+ "env": { "npm_config_registry": "https://registry.npmjs.org/" },
295
+ "enabled": false,
296
+ "exposure": "deferred",
297
+ "description": "My Chrome through the Playwright Extension: only the tabs I share at the connect prompt.",
298
+ "toolExposure": { "browser_run_code_unsafe": "hidden", "browser_file_upload": "hidden", "browser_drop": "hidden", "browser_evaluate": "hidden" }
299
+ }
300
+ }
301
+ }
302
+ ```
303
+
304
+ 3. Turn it on only in a trusted project. Put
305
+ `{"mcpServers":{"playwright-mine":{"enabled":true}}}` in that project's `.pi/mcp.json`,
306
+ or use `/mcp` and choose "Enable in this project".
307
+
308
+ At each connection, Chrome opens an approval page where you pick the tabs to share. The
309
+ session reaches only those tabs and the tabs it opens itself. It works only where your
310
+ Chrome runs, so it needs a display and `PLAYWRIGHT_MCP_HEADLESS` does not apply.
311
+
312
+ Rules for this server:
313
+
314
+ - Never name it `playwright`. That name replaces the isolated browser for every design agent.
315
+ - Never add `mcp:playwright-mine` to a design agent. The design agents run in the background,
316
+ and nobody watches what they do in your browser.
317
+ - Do not set `PLAYWRIGHT_MCP_EXTENSION_TOKEN`, so that every connection needs your approval.
318
+ - Do not add `--caps`.
319
+ - For read-only use, also hide the tools that act on the page:
320
+ - `browser_click`, `browser_type` and `browser_fill_form`
321
+ - `browser_press_key` and `browser_select_option`
322
+ - `browser_drag` and `browser_handle_dialog`
323
+
324
+ `browser_navigate` can still send data out in a URL.
325
+ - A page where you sign in can carry prompt injection, and what the session reads goes
326
+ into its transcript.
327
+
328
+ ### Agents on pi
329
+
330
+ The four agents keep their contracts and list their pi tools explicitly:
331
+
332
+ | Agent | Tools |
333
+ | --- | --- |
334
+ | `ui-ux-specialist` | read, edit, write, bash, `subagent`, `contact_supervisor`, `design_impeccable_scan`, web tools, Playwright |
335
+ | `ui-implementer` | read, edit, write, bash, `design_impeccable_scan`, Playwright |
336
+ | `design-critic` | read, `design_impeccable_scan`, web tools, Playwright |
337
+ | `a11y-auditor` | read, bash for probes and the axe CLI, `design_impeccable_scan`, web tools, Playwright |
338
+
339
+ Each agent loads the package extension, and pi-web-access when it has web tools, through
340
+ `subagentOnlyExtensions`. `ui-ux-specialist` may start only `design-critic`,
341
+ `a11y-auditor`, `scout` and `worker`. It asks its intent questions through
342
+ `contact_supervisor` and continues with the answers. The agents pin no model. Set one with
343
+ `subagents.agentOverrides.<name>.model` in pi's settings.
344
+
345
+ ### Prompts
346
+
347
+ - `/design-review <url> [paths]` runs the scan once, then `design-critic` and
348
+ `a11y-auditor` in parallel in the background. It merges their findings and keeps the
349
+ two verdicts apart.
350
+ - `/council-product <question>` runs the pi-subagents council protocol for a product or
351
+ UI decision, with three passes at most.
352
+
353
+ The `/council-product` roster has four advisors:
354
+
355
+ | Advisor | Lens | From |
356
+ | --- | --- | --- |
357
+ | `council-ux` | The view of the design lead | this package |
358
+ | `council-user` | The view of the people who use the product, task by task | this package |
359
+ | `council-advocate` | The strongest case for the proposal | `@srobroek/pi-debate` |
360
+ | `council-skeptic` | The strongest case against the proposal | `@srobroek/pi-debate` |
361
+
362
+ All four advisors only read files.
363
+
364
+ `council-ux` and `council-user` are new in this package.
365
+
366
+ ### Not on pi
367
+
368
+ - `design_setup`: copy `formulas/*.formula.toml` into `.beads/formulas/` yourself.
369
+ - The `confirmScan`, `mcp` and `mcpServers` options, and the Storybook server.
370
+ - Frontend detection: `accessibility-scanner` and `wire-dsl` connect in every session
371
+ that loads the package.
372
+
373
+ ## Changes from omp
374
+
375
+ - Rules became skills, and `skill://` and `rule://` references name the skill or use
376
+ a relative path.
377
+ - Browser steps no longer use the omp `browser`/`computer` helpers through `eval`
378
+ (`tab.ariaSnapshot()`, `tab.emulate`, `tab.diffScreenshot`, Tern and relay modes).
379
+ They name what each step measures; `ui-review/references/tools.md` maps each step to
380
+ the OpenCode desktop browser tools and to Playwright, and the console and viewport
381
+ probes use Playwright's API. Native surfaces use a desktop accessibility inspector.
382
+ - Dev servers run as background shell processes instead of omp's named `bash`
383
+ services and `proc://` listing.
384
+ - The accessibility scanner is an MCP tool call instead of an `xd://` device write;
385
+ image generation and `inspect_image` are described as harness tools when present.
386
+ - `design-upstream-preflight` installs an upstream skill through Claude Code
387
+ (`claude plugin install`) or, for OpenCode, a clone added to the `skills` config,
388
+ instead of `omp plugin install`. `a11y-auditor` reports a missing upstream instead
389
+ of installing it.
390
+ - The agents' `autoloadSkills` became a "load these skills" line; `scout` became
391
+ `explore`; the delivery `researcher` and `operator` children became a web search and
392
+ the built-in `general` agent.
393
+ - The beads formulas name skills instead of `skill://` and `rule://` URIs, the browser
394
+ tools or a desktop accessibility inspector instead of `browser` and `computer`, an
395
+ LSP rename instead of the `lsp` tool, and Playwright's `page.emulateMedia` instead of
396
+ `tab.emulate`. Their critique steps run `design_impeccable_scan` instead of npx.
397
+ - `mol-design-a11y` and `mol-design-iterate` make `round` required: it had a default,
398
+ and `bd mol bond` fails on a var it was not passed even when the formula declares a
399
+ default.
400
+ - The impeccable `PostToolUse` hook became the `design_impeccable_scan` tool. The hook
401
+ ran impeccable's launcher after every UI file write, which fetches the engine from
402
+ the network unasked; impeccable itself tells a harness without its hook to run
403
+ `detect` once the changed UI is finished, which is where the formulas and
404
+ `ui-ux-specialist` run the tool. The launcher-path note for
405
+ `impeccable-asset-producer` is dropped with it: that agent is not registered here.
406
+
407
+ ## Attribution
408
+
409
+ `design-md`, `ui-microcopy` and `wireloom` carry vendored upstream material; each
410
+ skill directory has its LICENSE and NOTICE. The other upstream skills the workflow
411
+ routes to are installed from their authors, never bundled; see
412
+ `design-upstream-preflight`.
413
+
414
+ ## Install
415
+
416
+ ```sh
417
+ opencode plugin add 'github:srobroek/harness-plugins::path:plugins/design/opencode'
418
+ ```
419
+
420
+ Claude Code install the skills and MCP servers, not the agents, from this
421
+ repository's marketplace:
422
+
423
+ ```sh
424
+ claude plugin marketplace add srobroek/harness-plugins
425
+ claude plugin install design@harness-plugins
426
+
427
+ ```
428
+
429
+ For pi, see [pi](#pi).
430
+
431
+ ## Works with
432
+
433
+ This package works with these pi packages. Install them next to it.
434
+
435
+ | Package | Required | For | Install |
436
+ | --- | --- | --- | --- |
437
+ | `pi-subagents` | yes | the design agents, /design-review and /council-product | `pi install npm:pi-subagents` |
438
+ | `pi-web-access` | yes | web search and fetch in ui-ux-specialist, design-critic and a11y-auditor | `pi install npm:pi-web-access` |
439
+ | `@srobroek/pi-debate` | yes | council-advocate and council-skeptic in /council-product | `pi install npm:@srobroek/pi-debate` |
@@ -0,0 +1,41 @@
1
+ {
2
+ "plugin": "design",
3
+ "prerequisites": [
4
+ {
5
+ "bin": "impeccable",
6
+ "for": "design_impeccable_scan and the upstream impeccable skill pack",
7
+ "required": true,
8
+ "install": {
9
+ "mise": "npm:impeccable",
10
+ "url": "https://github.com/pbakaus/impeccable#readme"
11
+ },
12
+ "version": ">=4.10.0"
13
+ },
14
+ {
15
+ "bin": "npx",
16
+ "for": "the Playwright, accessibility-scanner and wire-dsl MCP servers",
17
+ "required": true,
18
+ "install": {
19
+ "mise": "node",
20
+ "url": "https://nodejs.org/en/download"
21
+ }
22
+ }
23
+ ],
24
+ "companions": [
25
+ {
26
+ "package": "pi-subagents",
27
+ "for": "the design agents, /design-review and /council-product",
28
+ "required": true
29
+ },
30
+ {
31
+ "package": "pi-web-access",
32
+ "for": "web search and fetch in ui-ux-specialist, design-critic and a11y-auditor",
33
+ "required": true
34
+ },
35
+ {
36
+ "package": "@srobroek/pi-debate",
37
+ "for": "council-advocate and council-skeptic in /council-product",
38
+ "required": true
39
+ }
40
+ ]
41
+ }