@reqvire-org/ads 0.3.26 → 0.3.28
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 +21 -10
- package/dist/bootstrap-ds/README.md +7 -5
- package/dist/bootstrap-ds/ds.config.json +1 -1
- package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +7 -8
- package/dist/capture.mjs +1 -1
- package/dist/development-runtime.mjs +17 -0
- package/dist/index.mjs +1 -1
- package/dist/init.mjs +14 -12
- package/dist/mcp/apps.mjs +1 -1
- package/dist/mcp/context.mjs +5 -4
- package/dist/mcp/mutations.mjs +3 -2
- package/dist/mcp/preview-watch.mjs +2 -1
- package/dist/mcp/preview-widget.bundle.js +6 -6
- package/dist/mcp/project-widget.bundle.js +13 -13
- package/dist/mcp/resource-loader.js +10 -1
- package/dist/mcp/server.mjs +11 -4
- package/dist/mcp/widget.bundle.js +1 -1
- package/dist/preview-builder.mjs +108 -0
- package/dist/preview-files.mjs +33 -0
- package/dist/preview-inputs.mjs +14 -6
- package/dist/scenario-groups.mjs +47 -0
- package/dist/scenarios-compiler.mjs +10 -9
- package/dist/scenarios-vite.mjs +13 -5
- package/dist/scenarios.mjs +4 -1
- package/dist/showcase/client.bundle.js +21 -21
- package/dist/showcase/navigation.js +13 -0
- package/dist/showcase/sandbox.bundle.js +1 -1
- package/dist/showcase/style.css +1 -0
- package/dist/skills/README.md +7 -1
- package/dist/skills/ads-break-ui/SKILL.md +7 -3
- package/dist/skills/ads-break-ui/references/behaviors.md +6 -3
- package/dist/skills/ads-break-ui/references/layers.md +16 -0
- package/dist/skills/ads-break-ui/references/runtimes.md +127 -0
- package/dist/skills/ads-break-ui/references/scenarios.md +19 -0
- package/dist/skills/ads-designer/README.md +6 -0
- package/dist/skills/ads-designer/SKILL.md +11 -6
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +7 -5
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +7 -8
- package/dist/skills/ads-designer/references/behaviors.md +6 -3
- package/dist/skills/ads-designer/references/cli.md +10 -7
- package/dist/skills/ads-designer/references/design-craft.md +31 -0
- package/dist/skills/ads-designer/references/layers.md +16 -0
- package/dist/skills/ads-designer/references/runtimes.md +127 -0
- package/dist/skills/ads-designer/references/scenarios.md +19 -0
- package/dist/skills/ads-import/SKILL.md +24 -4
- package/dist/skills/ads-import/agents/openai.yaml +2 -2
- package/dist/skills/ads-import/references/behaviors.md +6 -3
- package/dist/skills/ads-import/references/cli.md +10 -7
- package/dist/skills/ads-import/references/compatibility.md +113 -0
- package/dist/skills/ads-import/references/implementation.md +6 -0
- package/dist/skills/ads-import/references/layers.md +16 -0
- package/dist/skills/ads-import/references/runtimes.md +127 -0
- package/dist/skills/ads-import/references/scenarios.md +19 -0
- package/dist/skills/ads-motion/SKILL.md +7 -3
- package/dist/skills/ads-motion/references/behaviors.md +6 -3
- package/dist/skills/ads-motion/references/layers.md +16 -0
- package/dist/skills/ads-motion/references/runtimes.md +127 -0
- package/dist/skills/ads-motion/references/scenarios.md +19 -0
- package/dist/skills/ads-port/SKILL.md +7 -3
- package/dist/skills/ads-port/references/behaviors.md +6 -3
- package/dist/skills/ads-port/references/cli.md +10 -7
- package/dist/skills/ads-port/references/layers.md +16 -0
- package/dist/skills/ads-port/references/runtimes.md +127 -0
- package/dist/skills/ads-port/references/scenarios.md +19 -0
- package/dist/verification.mjs +4 -3
- package/docs/ADS.md +29 -2
- package/docs/ARCHITECTURE.md +85 -3
- package/docs/BEHAVIORS.md +13 -3
- package/docs/CHANGELOG.md +38 -1
- package/docs/COMPARISON.md +63 -0
- package/docs/GUIDE.md +51 -10
- package/docs/MCP.md +104 -14
- package/package.json +5 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Missing groups retain the original flat navigation, without a default heading. */
|
|
2
|
+
export function navigationGroups(entries) {
|
|
3
|
+
const ungrouped = [], named = new Map();
|
|
4
|
+
for (const entry of entries) {
|
|
5
|
+
if (!entry.group) { ungrouped.push(entry); continue; }
|
|
6
|
+
if (!named.has(entry.group)) named.set(entry.group, []);
|
|
7
|
+
named.get(entry.group).push(entry);
|
|
8
|
+
}
|
|
9
|
+
return [
|
|
10
|
+
...(ungrouped.length ? [{ label: null, entries: ungrouped }] : []),
|
|
11
|
+
...[...named].sort(([left], [right]) => left.localeCompare(right)).map(([label, entries]) => ({ label, entries })),
|
|
12
|
+
];
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function c(e,t){let
|
|
1
|
+
function c(e,t){let n=new DOMParser().parseFromString(e,"text/html"),s=n.createElement("meta");if(s.httpEquiv="Content-Security-Policy",s.content=t,n.head.prepend(s),!n.querySelector("base[href]")){let i=n.querySelector("base")??n.createElement("base");i.setAttribute("href","about:srcdoc"),s.after(i)}return"<!doctype html>"+n.documentElement.outerHTML}var a=new URL(location.href).searchParams.get("parent"),o;function r(e=[]){return e.filter(t=>/^(?:https?:\/\/[a-z0-9.*:[\]-]+(?::\d+)?|data:|blob:|about:)$/i.test(t)).join(" ")}function d(e={}){let t=r(e.resourceDomains);return`default-src 'none';script-src 'unsafe-inline' 'wasm-unsafe-eval' ${t};style-src 'unsafe-inline' ${t};img-src data: ${t};font-src ${t||"'none'"};media-src ${t||"'none'"};worker-src ${t||"'none'"};connect-src ${r(e.connectDomains)||"'none'"};frame-src ${r(e.frameDomains)||"'none'"};base-uri about: ${r(e.baseUriDomains)};object-src 'none';form-action 'none'`}window.addEventListener("message",e=>{if(e.source===parent&&e.origin===a){let t=e.data;if(t?.method==="ui/notifications/sandbox-resource-ready"){let{html:n,csp:s}=t.params??{};if(typeof n!="string")return;o?.remove(),o=window.document.createElement("iframe"),o.title="Design-system App",o.setAttribute("sandbox","allow-scripts allow-forms"),window.document.body.append(o),o.srcdoc=c(n,d(s))}else t?.jsonrpc==="2.0"&&!t.method?.startsWith("ui/notifications/sandbox-")&&o?.contentWindow.postMessage(t,"*")}else e.source===o?.contentWindow&&e.data?.jsonrpc==="2.0"&&!e.data.method?.startsWith("ui/notifications/sandbox-")&&parent.postMessage(e.data,a)});parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-ready",params:{}},a);
|
package/dist/showcase/style.css
CHANGED
|
@@ -6,4 +6,5 @@ header{height:52px;display:flex;flex:none;border-bottom:1px solid var(--frame-li
|
|
|
6
6
|
main{flex:1;min-height:0;display:flex}#sidebar{width:var(--pane-width);flex:none;border-right:1px solid var(--frame-line);overflow-y:auto;background:var(--frame-bg)}#entries{display:flex;flex-direction:column;gap:4px;padding:8px}#entries a{flex:none;padding:8px;border:1px solid transparent;border-radius:4px;text-decoration:none;overflow-wrap:anywhere}#entries a:hover,#entries a[aria-current="page"]{border-color:var(--frame-line)}#entries a[aria-current="page"]{font-weight:600}
|
|
7
7
|
#preview{position:relative;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}#frame-slot{flex:1;min-height:0;min-width:0}iframe{display:block;width:100%;height:100%;border:0}#status{position:absolute;z-index:1;inset:12px 12px auto;margin:0;padding:12px 16px;border:1px solid var(--frame-line);border-radius:4px;background:var(--frame-bg);white-space:pre-wrap;overflow-wrap:anywhere;max-height:30vh;overflow:auto}#status[data-error="true"]{color:CanvasText;background:Canvas;border-color:GrayText}#loader{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--frame-bg)}.spinner{width:24px;height:24px;border:2px solid var(--frame-line);border-top-color:var(--frame-ink);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}}[hidden],.collapsed #sidebar{display:none!important}@media(max-width:760px){#title{display:none}}
|
|
8
8
|
/* The capture host keeps the same MCP client/bridge and gives the App the exact requested viewport. */
|
|
9
|
+
.entry-group{min-width:0}.entry-group summary{cursor:pointer;padding:8px;font-weight:600;overflow-wrap:anywhere}.entry-group summary:focus-visible{outline:2px solid var(--frame-ink);outline-offset:-2px}.entry-group>div{display:flex;flex-direction:column;gap:4px;padding-inline-start:8px}
|
|
9
10
|
:root[data-capture="true"] #header,:root[data-capture="true"] #sidebar{display:none!important}
|
package/dist/skills/README.md
CHANGED
|
@@ -17,6 +17,12 @@ includes an empty bootstrap scaffold, so starting from zero needs no example
|
|
|
17
17
|
repository. Skills operate on a project's local ADS; they do not install a UI
|
|
18
18
|
catalogue or replace the project's theme values.
|
|
19
19
|
|
|
20
|
+
Build and adapt UI through the same public APIs for websites and MCP Apps.
|
|
21
|
+
Application adapters own routing, stores, MCP communication, tool-result mapping,
|
|
22
|
+
mounting and serving. Use the real ADS showcase and relevant application checks;
|
|
23
|
+
reuse existing verification and add targeted checks for uncovered behavior.
|
|
24
|
+
Report the states and environments actually verified.
|
|
25
|
+
|
|
20
26
|
The [stdio MCP server](../docs/MCP.md#skills) also serves these skills and supporting
|
|
21
27
|
files from the npm distribution. Native Skills discovery is available on the
|
|
22
28
|
newer protocol; ordinary tools/resources provide explicit access on older
|
|
@@ -35,7 +41,7 @@ the browser, and provides a running URL or exact command for review. See the
|
|
|
35
41
|
| Skill | Use | Example |
|
|
36
42
|
|-------|-----|---------|
|
|
37
43
|
| [ads-designer](ads-designer/SKILL.md) | Bootstrap or build UI using the local ADS, with craft/mobile guidance | `$ads-designer build a settings page using this project's ADS` |
|
|
38
|
-
| [ads-import](ads-import/SKILL.md) |
|
|
44
|
+
| [ads-import](ads-import/SKILL.md) | Check destination compatibility, then integrate selected ADS source, artwork or theme values | `$ads-import /path/to/source-repo component Toast` |
|
|
39
45
|
| [ads-port](ads-port/SKILL.md) | Port library capabilities into a coherent ADS using shared tokens and primitives | `$ads-port https://github.com/emilkowalski/sonner` |
|
|
40
46
|
| [ads-break-ui](ads-break-ui/SKILL.md) | Stress-test real components/patterns; optionally fix demonstrated failures | `$ads-break-ui AppShell +fix` |
|
|
41
47
|
| [ads-motion](ads-motion/SKILL.md) | Implement, review, audit, or profile motion | `$ads-motion review Toast` |
|
|
@@ -3,6 +3,9 @@ name: ads-break-ui
|
|
|
3
3
|
description: Stress-test a project's local design-system components or patterns with extreme realistic content, empty and failure states, narrow containers, and accessibility settings. Build development fixtures, report layout failures, and fix them when requested.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
For Node/Bun setup, MCP launch and compiler workers, read
|
|
7
|
+
[runtimes.md](references/runtimes.md).
|
|
8
|
+
|
|
6
9
|
Exercise the real component through its public API. Accept an item name, screen,
|
|
7
10
|
file, or local project path; discover the relevant exports and usage when the
|
|
8
11
|
request already identifies the target.
|
|
@@ -67,12 +70,13 @@ renderers, build aliases or `review-import` / `review-contract` diagnostics, rea
|
|
|
67
70
|
|
|
68
71
|
A component provides one cohesive UI capability; a pattern arranges capabilities
|
|
69
72
|
into reusable structures or workflows. Components may compose components/controllers;
|
|
70
|
-
layout patterns may arrange slots. Do not classify by component count. For
|
|
71
|
-
|
|
73
|
+
layout patterns may arrange slots. Do not classify by component count. For shared
|
|
74
|
+
website/MCP App use, owner selection, or `component-dependency`,
|
|
75
|
+
`component-contract` or `component-style` diagnostics, read
|
|
72
76
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
73
77
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
74
78
|
|
|
75
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
79
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
76
80
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
77
81
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
78
82
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -142,8 +142,8 @@ command. For a project with an installed Playwright test runner:
|
|
|
142
142
|
"behaviorProfiles": {
|
|
143
143
|
"widget": {
|
|
144
144
|
"runner": "playwright",
|
|
145
|
-
"command": "
|
|
146
|
-
"args": ["
|
|
145
|
+
"command": "runtime",
|
|
146
|
+
"args": ["node_modules/@playwright/test/cli.js", "test"],
|
|
147
147
|
"mode": "browser",
|
|
148
148
|
"timeoutMs": 60000
|
|
149
149
|
}
|
|
@@ -152,7 +152,10 @@ command. For a project with an installed Playwright test runner:
|
|
|
152
152
|
}
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
Here `
|
|
155
|
+
Here `runtime` uses the Node or Bun interpreter that launched ADS, and the
|
|
156
|
+
project supplies the installed Playwright entry. Explicit executable commands
|
|
157
|
+
retain their meaning. A Bun package-script profile can use `command: "bun"`
|
|
158
|
+
with `args: ["--bun", "run", "test:behavior", "--"]`. The Playwright
|
|
156
159
|
configuration must discover colocated spec files. Configure browser installation
|
|
157
160
|
and any required test setup in that project. The ADS tooling host gains no
|
|
158
161
|
framework or browser dependency from a profile.
|
|
@@ -30,6 +30,22 @@ Do not classify by import count, JSX element count, names or file length. Review
|
|
|
30
30
|
the capability and its consumer contract. Preserve valid APIs when tracing is
|
|
31
31
|
inconclusive; do not make an export private or add a product prop just to pass.
|
|
32
32
|
|
|
33
|
+
## Share UI across websites and MCP Apps
|
|
34
|
+
|
|
35
|
+
Build and adapt UI through the project's public design-system APIs. Websites
|
|
36
|
+
and MCP Apps use the same components, patterns, controllers, tokens and styles.
|
|
37
|
+
Application adapters supply data and actions and own mounting, routing, stores,
|
|
38
|
+
MCP communication, tool-result mapping and serving. Keep those integrations out
|
|
39
|
+
of reusable UI implementations. ADS's own MCP server supports design-system
|
|
40
|
+
development, inspection and rendered review.
|
|
41
|
+
|
|
42
|
+
The ADS showcase renders the real public implementation inside an MCP App.
|
|
43
|
+
Its previews and registered checks provide evidence for the exercised states,
|
|
44
|
+
themes, sizes and environment. Relevant application checks verify website
|
|
45
|
+
integration. Reuse existing verification; add targeted checks when a change
|
|
46
|
+
exposes an uncovered requirement. Record what was actually verified, including
|
|
47
|
+
any remaining host or integration assumptions.
|
|
48
|
+
|
|
33
49
|
## Demonstrate the production implementation
|
|
34
50
|
|
|
35
51
|
Product patterns are reusable application UI, not showcase replicas. A scenario
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Node and Bun development runtimes
|
|
2
|
+
|
|
3
|
+
ADS supports Node 22.12+ and Bun 1.3.13+. A Bun project does not need Node or npm.
|
|
4
|
+
The launcher selects the interpreter; package manager and UI framework are
|
|
5
|
+
separate concerns. Preserve the target project's choices.
|
|
6
|
+
|
|
7
|
+
For a Node/npm project, run inside its package root:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx @reqvire-org/ads init --framework react
|
|
11
|
+
npm install
|
|
12
|
+
npm run build
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For Bun:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
bunx --bun @reqvire-org/ads init --framework react
|
|
19
|
+
bun install
|
|
20
|
+
bun --bun run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use `--framework preact` for native Preact. Init detects an existing package
|
|
24
|
+
manager or infers Bun from its launcher when no project choice exists. Use
|
|
25
|
+
`--package-manager bun` only for an explicit override; existing project metadata
|
|
26
|
+
and lockfiles take precedence over the launcher.
|
|
27
|
+
Use the installed/pinned ADS version. Never substitute an unrelated bare package.
|
|
28
|
+
|
|
29
|
+
`--bun` is essential to an explicit Bun runtime choice: many JavaScript tools
|
|
30
|
+
have a `#!/usr/bin/env node` shebang. Bun can otherwise launch Node when it is
|
|
31
|
+
available. Generated ADS scripts force Bun, including Oxlint and its JavaScript
|
|
32
|
+
plugins. Existing application scripts and lockfiles are preserved; translate
|
|
33
|
+
nested `npm` commands when intentionally converting an application to Bun.
|
|
34
|
+
Dependency packages and custom build commands must support the chosen runtime.
|
|
35
|
+
|
|
36
|
+
For ordinary `bun run build` commands to always select Bun, the project may
|
|
37
|
+
set its own `bunfig.toml`:
|
|
38
|
+
|
|
39
|
+
```toml
|
|
40
|
+
[run]
|
|
41
|
+
bun = true
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This is equivalent to passing `--bun` for script execution. ADS does not replace
|
|
45
|
+
an existing Bun configuration. Keep the explicit flag in MCP launch settings.
|
|
46
|
+
|
|
47
|
+
## MCP connection
|
|
48
|
+
|
|
49
|
+
For Bun, use these values in Claude's `.mcp.json` or Codex's MCP configuration:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"command": "bunx",
|
|
54
|
+
"args": ["--bun", "@reqvire-org/ads", "mcp"]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Add `--mutations` to enable guarded source changes and `--port 4191` when the
|
|
59
|
+
project pins its showcase port. Append a project directory when the client
|
|
60
|
+
does not launch in the package root. For a local installed tool, use the
|
|
61
|
+
generated `ads-mcp` or `ads-read-mcp` package script. Keep stdout for JSON-RPC.
|
|
62
|
+
|
|
63
|
+
## Compiler and browser workers
|
|
64
|
+
|
|
65
|
+
Use the portable command in `ds.config.json`:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcp": {
|
|
70
|
+
"previewWatch": {
|
|
71
|
+
"command": "runtime",
|
|
72
|
+
"args": ["scripts/build-mcp-previews.mjs", "--watch"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`runtime` means the interpreter that launched ADS, including its absolute
|
|
79
|
+
executable when available through an environment manager. It also works in
|
|
80
|
+
registered behavior profiles, with the project's installed runner entry file in
|
|
81
|
+
`args`. Explicit `node`, `bun` and custom executable commands retain their meaning;
|
|
82
|
+
ADS never silently substitutes another interpreter for them. Node-specific
|
|
83
|
+
commands still need Node, even in a Bun-managed package.
|
|
84
|
+
|
|
85
|
+
Mandatory architecture/Oxlint validation, ownership guards and screenshot workers
|
|
86
|
+
inherit ADS's interpreter. Browser tests remain project-owned Playwright specs;
|
|
87
|
+
Chromium/WebKit is a separate browser dependency, not a Node requirement. Runtime
|
|
88
|
+
identity participates in behavior evidence freshness.
|
|
89
|
+
|
|
90
|
+
For diagnosis, inspect `ads_status.project.runtime`: `name`, `version`,
|
|
91
|
+
`executable` and `binDir`. `project.commands` contains the discovered package
|
|
92
|
+
commands with the appropriate Bun flags. The MCP process and agent shell may
|
|
93
|
+
have different PATHs; use these reported values instead of scanning the machine
|
|
94
|
+
or installing another runtime without evidence.
|
|
95
|
+
|
|
96
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
113
|
+
Preview watching excludes standard output trees by default, including nested
|
|
114
|
+
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
115
|
+
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
116
|
+
custom outputs in `assets.generatedPaths`; do not copy the default list into a
|
|
117
|
+
new project's config. `ENOSPC` from `fs.watch` can mean the OS watch limit rather
|
|
118
|
+
than disk space: inspect the failing path and generated-tree traversal before
|
|
119
|
+
raising system limits or deleting files. Generated churn must not mark previews
|
|
120
|
+
stale; actual source changes must still rebuild.
|
|
121
|
+
|
|
122
|
+
Bundled binary renderers may load their forwarded `blob:` resources. ADS's
|
|
123
|
+
showcase/explorer permits WebAssembly compilation while keeping JavaScript eval
|
|
124
|
+
and undeclared network requests blocked. External MCP hosts control their CSP.
|
|
125
|
+
Test the actual renderer inside the App; a successful website build does not
|
|
126
|
+
establish binary-resource or WebAssembly support. Keep transport and resource
|
|
127
|
+
loading in explicit injected adapters or declared renderer dependencies.
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
|
@@ -13,6 +13,12 @@ The adaptations preserve project-owned token values and styles, public APIs,
|
|
|
13
13
|
component/pattern ownership, and application responsibility for document-level
|
|
14
14
|
setup. They do not impose upstream numeric/brand defaults or native app tooling.
|
|
15
15
|
|
|
16
|
+
The design-intent, information hierarchy, interface wording, and visual critique
|
|
17
|
+
guidance also draws on ideas in
|
|
18
|
+
[Anthropic's frontend-design skill](https://github.com/anthropics/skills/blob/main/skills/frontend-design/SKILL.md).
|
|
19
|
+
This ADS-specific guidance follows the project's shared tokens, ownership
|
|
20
|
+
boundaries, and design brief.
|
|
21
|
+
|
|
16
22
|
[LICENSE.upstream](LICENSE.upstream) retains the complete MIT license and
|
|
17
23
|
Copyright (c) 2026 Emil Kowalski for copied/adapted upstream guidance. Retain it
|
|
18
24
|
on redistribution of that material. It does not declare a license for unrelated
|
|
@@ -3,6 +3,9 @@ name: ads-designer
|
|
|
3
3
|
description: Bootstrap an empty local React design system from bundled scaffolding, or build UI using a project's existing design system. Covers shared token contracts, local ownership, public APIs, external source integration, showcase inspection, and validation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
For Node/Bun setup, MCP launch and compiler workers, read
|
|
7
|
+
[runtimes.md](references/runtimes.md).
|
|
8
|
+
|
|
6
9
|
Inspect the target before editing. Read its `README.md`, `docs/ARCHITECTURE.md`
|
|
7
10
|
and `docs/ADS.md` when present (or existing project guides), public exports, and relevant
|
|
8
11
|
component guides. Preserve its
|
|
@@ -98,12 +101,13 @@ renderers, build aliases or `review-import` / `review-contract` diagnostics, rea
|
|
|
98
101
|
|
|
99
102
|
A component provides one cohesive UI capability; a pattern arranges capabilities
|
|
100
103
|
into reusable structures or workflows. Components may compose components/controllers;
|
|
101
|
-
layout patterns may arrange slots. Do not classify by component count. For
|
|
102
|
-
|
|
104
|
+
layout patterns may arrange slots. Do not classify by component count. For shared
|
|
105
|
+
website/MCP App use, owner selection, or `component-dependency`,
|
|
106
|
+
`component-contract` or `component-style` diagnostics, read
|
|
103
107
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
104
108
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
105
109
|
|
|
106
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
110
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
107
111
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
108
112
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
109
113
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -275,9 +279,10 @@ artwork replacement and token-value adoption are explicit selections.
|
|
|
275
279
|
|
|
276
280
|
## Design craft and mobile behavior
|
|
277
281
|
|
|
278
|
-
For
|
|
279
|
-
|
|
280
|
-
|
|
282
|
+
For design direction, content/layout decisions, interface wording, component
|
|
283
|
+
polish, or visual review, read
|
|
284
|
+
[references/design-craft.md](references/design-craft.md). For touch, small
|
|
285
|
+
screens, browser chrome, safe areas, or mobile forms, read
|
|
281
286
|
[references/mobile.md](references/mobile.md). Load these when relevant rather
|
|
282
287
|
than imposing mobile application setup on every component task.
|
|
283
288
|
|
|
@@ -12,8 +12,8 @@ Read the local [contract](ADS.md) and the
|
|
|
12
12
|
|
|
13
13
|
Copy the contents of `bootstrap-ds/`, including dotfiles, into a new project.
|
|
14
14
|
The installed `ads-designer` skill contains the same files in
|
|
15
|
-
`assets/bootstrap-ds/`. Set the project name in `package.json`. Use Node 22.12
|
|
16
|
-
|
|
15
|
+
`assets/bootstrap-ds/`. Set the project name in `package.json`. Use Node 22.12+
|
|
16
|
+
or Bun 1.3.13+ with a current ADS release.
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
19
|
npx @reqvire-org/ads init --framework react
|
|
@@ -32,10 +32,12 @@ npm run build
|
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
For a new Bun workspace, declare Bun in `packageManager`, omit the copied npm
|
|
35
|
-
lockfile and translate nested npm scripts to `bun run`.
|
|
35
|
+
lockfile and translate nested npm scripts to `bun --bun run`. Initialize with
|
|
36
|
+
`bunx --bun @reqvire-org/ads init`. Init detects existing
|
|
36
37
|
Bun projects and preserves their scripts/lockfiles. Use `bun install` and
|
|
37
|
-
`bun run build`/`bun run dev:showcase`.
|
|
38
|
-
|
|
38
|
+
`bun --bun run build`/`bun --bun run dev:showcase`. Node is unnecessary with Bun
|
|
39
|
+
1.3.13+. The supplied preview watcher's `command: "runtime"` inherits the
|
|
40
|
+
interpreter that launched ADS and runs the project's installed checks.
|
|
39
41
|
|
|
40
42
|
For an existing application, merge only the ADS source and required extraction,
|
|
41
43
|
aliases and preview adapter. Preserve its framework, entry points and build.
|
|
@@ -7,7 +7,7 @@ import wyw from "@wyw-in-js/vite";
|
|
|
7
7
|
import { linariaTagResolver } from "@reqvire-org/ads/linaria";
|
|
8
8
|
import react from "@vitejs/plugin-react";
|
|
9
9
|
import { runScenarioCompiler } from "@reqvire-org/ads/scenarios/compiler";
|
|
10
|
-
import {
|
|
10
|
+
import { createVitePreviewBuilder, previewEntriesPlugin } from "@reqvire-org/ads/scenarios/vite";
|
|
11
11
|
|
|
12
12
|
const root = path.resolve(import.meta.dirname, "..");
|
|
13
13
|
const runScript = promisify(execFile);
|
|
@@ -17,18 +17,17 @@ await runScenarioCompiler(root, {
|
|
|
17
17
|
watched: process.argv.includes("--watch"),
|
|
18
18
|
compilerFiles: [import.meta.filename],
|
|
19
19
|
async validate() {
|
|
20
|
-
try { await runScript(manager, ["run", "lint"], { cwd: root }); }
|
|
20
|
+
try { await runScript(manager, [...(manager === "bun" ? ["--bun"] : []), "run", "lint"], { cwd: root }); }
|
|
21
21
|
catch (error) { throw new Error([error.stdout, error.stderr].map(value => value?.toString() ?? "").join("\n") || error.message); }
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
buildGraph: createVitePreviewBuilder({ build, configure(entries, options) {
|
|
24
24
|
const mount = path.join(options.dsRoot, "showcase/mcp/main.tsx");
|
|
25
|
-
|
|
26
|
-
plugins: [previewEntriesPlugin(entries.map(entry => ({ ...entry, root })), mount), wyw({ tagResolver: linariaTagResolver, include: ["**/*.{ts,tsx}"], exclude: ["**/node_modules/**"] }), react()
|
|
25
|
+
return { configFile: false, root, base: "./", publicDir: false,
|
|
26
|
+
plugins: [previewEntriesPlugin(entries.map(entry => ({ ...entry, root })), mount), wyw({ tagResolver: linariaTagResolver, include: ["**/*.{ts,tsx}"], exclude: ["**/node_modules/**"] }), react()],
|
|
27
27
|
resolve: { alias: { "@ds": path.join(options.dsRoot, options.config.publicEntry) } },
|
|
28
28
|
worker: { format: "iife" },
|
|
29
29
|
build: { write: false, cssCodeSplit: true, assetsInlineLimit: 0, modulePreload: false,
|
|
30
30
|
rollupOptions: { preserveEntrySignatures: "strict", input: Object.fromEntries(entries.map((_entry, index) => [`scenario-${index}`, `ads-preview-entry:${index}`])) } },
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
},
|
|
31
|
+
};
|
|
32
|
+
} }),
|
|
34
33
|
});
|
|
@@ -142,8 +142,8 @@ command. For a project with an installed Playwright test runner:
|
|
|
142
142
|
"behaviorProfiles": {
|
|
143
143
|
"widget": {
|
|
144
144
|
"runner": "playwright",
|
|
145
|
-
"command": "
|
|
146
|
-
"args": ["
|
|
145
|
+
"command": "runtime",
|
|
146
|
+
"args": ["node_modules/@playwright/test/cli.js", "test"],
|
|
147
147
|
"mode": "browser",
|
|
148
148
|
"timeoutMs": 60000
|
|
149
149
|
}
|
|
@@ -152,7 +152,10 @@ command. For a project with an installed Playwright test runner:
|
|
|
152
152
|
}
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
Here `
|
|
155
|
+
Here `runtime` uses the Node or Bun interpreter that launched ADS, and the
|
|
156
|
+
project supplies the installed Playwright entry. Explicit executable commands
|
|
157
|
+
retain their meaning. A Bun package-script profile can use `command: "bun"`
|
|
158
|
+
with `args: ["--bun", "run", "test:behavior", "--"]`. The Playwright
|
|
156
159
|
configuration must discover colocated spec files. Configure browser installation
|
|
157
160
|
and any required test setup in that project. The ADS tooling host gains no
|
|
158
161
|
framework or browser dependency from a profile.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Run ADS tooling
|
|
1
|
+
# Run ADS tooling with Node or Bun
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use the project's runtime for setup or ad hoc checks alongside this skill's research,
|
|
4
4
|
implementation, documentation, and verification workflow. ADS must be a project
|
|
5
5
|
development dependency, and its checks must run before the project's build.
|
|
6
6
|
Routine builds use the local CLI.
|
|
@@ -27,11 +27,14 @@ Use `--framework preact` for native Preact. A saved `framework` in
|
|
|
27
27
|
required, including for an older config. Init preserves existing framework
|
|
28
28
|
tooling and rejects conflicting saved/JSX settings instead of converting it.
|
|
29
29
|
|
|
30
|
-
Use the confirmed package name/version if different. For
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
Use the confirmed package name/version if different. For a Bun project, use
|
|
31
|
+
`bunx --bun @reqvire-org/ads init --framework react`, `bun install` and
|
|
32
|
+
`bun --bun run build`. Bun 1.3.13+ suffices; Node is unnecessary. Init detects
|
|
33
|
+
`packageManager` or `bun.lock`/`bun.lockb`, then defaults to Bun when launched
|
|
34
|
+
with Bun. See [runtimes.md](runtimes.md)
|
|
35
|
+
for MCP configuration and portable compiler/behavior commands.
|
|
36
|
+
Use `--package-manager bun` only for an explicit override. Preserve the project's
|
|
37
|
+
existing package-manager policy and lockfile.
|
|
35
38
|
|
|
36
39
|
`init` accepts no directory argument and requires an existing `package.json`.
|
|
37
40
|
For starting from zero, copy the bundled `ads-designer` application scaffold
|
|
@@ -5,6 +5,19 @@ Preserve the project's typography, density, spacing, icon vocabulary, and themes
|
|
|
5
5
|
The upstream advice is a craft reference, not authorization to replace brand
|
|
6
6
|
values or add a new UI library.
|
|
7
7
|
|
|
8
|
+
## Establish the design intent
|
|
9
|
+
|
|
10
|
+
Identify who uses the screen, what they need to accomplish, and which action or
|
|
11
|
+
decision matters most. Let that purpose guide hierarchy, density, imagery, and
|
|
12
|
+
tone. Use the product's real subject matter and representative content to choose
|
|
13
|
+
the structure. For a substantial new screen or redesign, a few sentences of
|
|
14
|
+
design intent are enough to make those choices reviewable.
|
|
15
|
+
|
|
16
|
+
In an established ADS, express that intent through its shared roles and owned
|
|
17
|
+
APIs. When starting a new ADS, establish a coherent vocabulary in shared tokens
|
|
18
|
+
and carry it across consumers. Respect the brief's visual choices; deliberate
|
|
19
|
+
restraint and expressive styling can both serve the right product.
|
|
20
|
+
|
|
8
21
|
## Shape the interaction
|
|
9
22
|
|
|
10
23
|
Make the primary action and current state legible. Components should expose
|
|
@@ -35,6 +48,11 @@ button labels, truncation, contrast, and focus treatment consistent with the
|
|
|
35
48
|
owner. Stabilize a loading control's dimensions where content replacement would
|
|
36
49
|
otherwise cause distracting layout changes.
|
|
37
50
|
|
|
51
|
+
Give visual boundaries a purpose: group related content, separate decisions, or
|
|
52
|
+
show hierarchy. Number items when their order matters. Choose cards, dividers,
|
|
53
|
+
labels, and emphasis according to the information they communicate. Typography
|
|
54
|
+
should distinguish reading roles through the project's shared scale.
|
|
55
|
+
|
|
38
56
|
Check realistic long names, translated labels, unbroken identifiers, absent
|
|
39
57
|
descriptions, and empty/single/many states when they matter to the component.
|
|
40
58
|
Choose wrapping/truncation based on what users need to read or retrieve. Preserve
|
|
@@ -52,6 +70,14 @@ exit cleanup, and reduced motion. Established component-specific durations and
|
|
|
52
70
|
measured geometry can be deliberate choices; diagnose their effect before
|
|
53
71
|
changing them to a generic default.
|
|
54
72
|
|
|
73
|
+
## Write for the next action
|
|
74
|
+
|
|
75
|
+
Use the user's vocabulary and name actions precisely: "Save changes" tells more
|
|
76
|
+
than "Submit". Keep the action's name consistent through progress, confirmation,
|
|
77
|
+
and recovery. Explain what went wrong and how to proceed; give empty states a
|
|
78
|
+
useful next step. Fit wording to the audience and task, including concise labels
|
|
79
|
+
for repeated work and enough explanation for unfamiliar decisions.
|
|
80
|
+
|
|
55
81
|
## Document and verify
|
|
56
82
|
|
|
57
83
|
Keep typed props, examples, state behavior, token hooks, and important tradeoffs
|
|
@@ -61,5 +87,10 @@ adapted implementation as independent solely because it uses native primitives.
|
|
|
61
87
|
|
|
62
88
|
Run the actual project's checks after changes and inspect the real consumer
|
|
63
89
|
showcase. Verify keyboard/focus and supported themes alongside visual states.
|
|
90
|
+
Review the rendered result against the design intent: is the main task obvious,
|
|
91
|
+
does the hierarchy survive realistic content and smaller containers, and does
|
|
92
|
+
each visual treatment help understanding? Use current/candidate captures when
|
|
93
|
+
comparing a change; inspect interactions separately. Resolve visual mismatches
|
|
94
|
+
in their owning tokens, styles, or APIs. Keep review framing development-only.
|
|
64
95
|
Only introduce component-local lint for a demonstrated, statically provable
|
|
65
96
|
misuse; token and ownership checks remain general tooling concerns.
|
|
@@ -30,6 +30,22 @@ Do not classify by import count, JSX element count, names or file length. Review
|
|
|
30
30
|
the capability and its consumer contract. Preserve valid APIs when tracing is
|
|
31
31
|
inconclusive; do not make an export private or add a product prop just to pass.
|
|
32
32
|
|
|
33
|
+
## Share UI across websites and MCP Apps
|
|
34
|
+
|
|
35
|
+
Build and adapt UI through the project's public design-system APIs. Websites
|
|
36
|
+
and MCP Apps use the same components, patterns, controllers, tokens and styles.
|
|
37
|
+
Application adapters supply data and actions and own mounting, routing, stores,
|
|
38
|
+
MCP communication, tool-result mapping and serving. Keep those integrations out
|
|
39
|
+
of reusable UI implementations. ADS's own MCP server supports design-system
|
|
40
|
+
development, inspection and rendered review.
|
|
41
|
+
|
|
42
|
+
The ADS showcase renders the real public implementation inside an MCP App.
|
|
43
|
+
Its previews and registered checks provide evidence for the exercised states,
|
|
44
|
+
themes, sizes and environment. Relevant application checks verify website
|
|
45
|
+
integration. Reuse existing verification; add targeted checks when a change
|
|
46
|
+
exposes an uncovered requirement. Record what was actually verified, including
|
|
47
|
+
any remaining host or integration assumptions.
|
|
48
|
+
|
|
33
49
|
## Demonstrate the production implementation
|
|
34
50
|
|
|
35
51
|
Product patterns are reusable application UI, not showcase replicas. A scenario
|