@reqvire-org/ads 0.0.0-stage → 0.2.9

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 (145) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +284 -2
  3. package/dist/assets.mjs +52 -0
  4. package/dist/bootstrap-ds/ADS.md +203 -0
  5. package/dist/bootstrap-ds/README.md +98 -0
  6. package/dist/bootstrap-ds/biome.css.json +21 -0
  7. package/dist/bootstrap-ds/design-system/assets/brand/README.md +28 -0
  8. package/dist/bootstrap-ds/design-system/assets/fonts/.gitkeep +0 -0
  9. package/dist/bootstrap-ds/design-system/components/.gitkeep +0 -0
  10. package/dist/bootstrap-ds/design-system/composition/.gitkeep +0 -0
  11. package/dist/bootstrap-ds/design-system/index.ts +5 -0
  12. package/dist/bootstrap-ds/design-system/patterns/.gitkeep +0 -0
  13. package/dist/bootstrap-ds/design-system/showcase/mcp/index.html +1 -0
  14. package/dist/bootstrap-ds/design-system/showcase/mcp/main.tsx +8 -0
  15. package/dist/bootstrap-ds/design-system/styles.css +5 -0
  16. package/dist/bootstrap-ds/design-system/tokens/Foundation.fixture.ts +47 -0
  17. package/dist/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +14 -0
  18. package/dist/bootstrap-ds/design-system/tokens/base.css +27 -0
  19. package/dist/bootstrap-ds/design-system/tokens/colors.css +29 -0
  20. package/dist/bootstrap-ds/design-system/tokens/elevation.css +15 -0
  21. package/dist/bootstrap-ds/design-system/tokens/spacing.css +15 -0
  22. package/dist/bootstrap-ds/design-system/tokens/typography.css +13 -0
  23. package/dist/bootstrap-ds/ds.config.json +13 -0
  24. package/dist/bootstrap-ds/gitignore.template +8 -0
  25. package/dist/bootstrap-ds/package-lock.json +4660 -0
  26. package/dist/bootstrap-ds/package.json +41 -0
  27. package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +33 -0
  28. package/dist/bootstrap-ds/src/vite-env.d.ts +7 -0
  29. package/dist/bootstrap-ds/tsconfig.build.json +12 -0
  30. package/dist/bootstrap-ds/tsconfig.json +20 -0
  31. package/dist/bootstrap-ds/vite.config.ts +21 -0
  32. package/dist/boundaries.mjs +130 -0
  33. package/dist/brand-assets.mjs +82 -0
  34. package/dist/check.mjs +222 -0
  35. package/dist/cli.mjs +106 -0
  36. package/dist/config.mjs +181 -0
  37. package/dist/contracts/tokens.json +52 -0
  38. package/dist/html.mjs +30 -0
  39. package/dist/index.mjs +9 -0
  40. package/dist/init.mjs +194 -0
  41. package/dist/lint-config.mjs +40 -0
  42. package/dist/mcp/THIRD_PARTY_NOTICES.md +786 -0
  43. package/dist/mcp/apps.mjs +53 -0
  44. package/dist/mcp/build-status.mjs +164 -0
  45. package/dist/mcp/catalog.mjs +65 -0
  46. package/dist/mcp/context.mjs +69 -0
  47. package/dist/mcp/mutations.mjs +301 -0
  48. package/dist/mcp/patch.mjs +114 -0
  49. package/dist/mcp/preview-watch.mjs +169 -0
  50. package/dist/mcp/preview-widget.bundle.js +113 -0
  51. package/dist/mcp/project-widget.bundle.js +113 -0
  52. package/dist/mcp/prompts.mjs +28 -0
  53. package/dist/mcp/resource-loader.js +138 -0
  54. package/dist/mcp/sandbox-host.mjs +22 -0
  55. package/dist/mcp/server.mjs +377 -0
  56. package/dist/mcp/showcase-host.mjs +68 -0
  57. package/dist/mcp/skills.mjs +77 -0
  58. package/dist/mcp/widget.bundle.js +150 -0
  59. package/dist/oxlint.mjs +81 -0
  60. package/dist/preview-resources.mjs +198 -0
  61. package/dist/project-documents.mjs +27 -0
  62. package/dist/public-props.mjs +74 -0
  63. package/dist/scenarios-compiler.mjs +287 -0
  64. package/dist/scenarios-vite.d.mts +3 -0
  65. package/dist/scenarios-vite.mjs +71 -0
  66. package/dist/scenarios.mjs +212 -0
  67. package/dist/showcase/client.bundle.js +127 -0
  68. package/dist/showcase/index.html +17 -0
  69. package/dist/showcase/sandbox.js +30 -0
  70. package/dist/showcase/style.css +7 -0
  71. package/dist/showcase-coverage.mjs +118 -0
  72. package/dist/showcase.mjs +77 -0
  73. package/dist/skills/README.md +68 -0
  74. package/dist/skills/ads-assimilate/SKILL.md +292 -0
  75. package/dist/skills/ads-assimilate/agents/openai.yaml +4 -0
  76. package/dist/skills/ads-assimilate/references/cli.md +111 -0
  77. package/dist/skills/ads-assimilate/references/lint-and-docs.md +87 -0
  78. package/dist/skills/ads-assimilate/references/native-implementation.md +98 -0
  79. package/dist/skills/ads-assimilate/references/testing.md +107 -0
  80. package/dist/skills/ads-break-ui/LICENSE.upstream +21 -0
  81. package/dist/skills/ads-break-ui/README.md +16 -0
  82. package/dist/skills/ads-break-ui/SKILL.md +235 -0
  83. package/dist/skills/ads-break-ui/agents/openai.yaml +4 -0
  84. package/dist/skills/ads-break-ui/references/catalog.md +135 -0
  85. package/dist/skills/ads-break-ui/references/verification.md +48 -0
  86. package/dist/skills/ads-designer/LICENSE.upstream +21 -0
  87. package/dist/skills/ads-designer/README.md +19 -0
  88. package/dist/skills/ads-designer/SKILL.md +400 -0
  89. package/dist/skills/ads-designer/agents/openai.yaml +4 -0
  90. package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +203 -0
  91. package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +98 -0
  92. package/dist/skills/ads-designer/assets/bootstrap-ds/biome.css.json +21 -0
  93. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/README.md +28 -0
  94. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/fonts/.gitkeep +0 -0
  95. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/.gitkeep +0 -0
  96. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/composition/.gitkeep +0 -0
  97. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/index.ts +5 -0
  98. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/.gitkeep +0 -0
  99. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/index.html +1 -0
  100. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/main.tsx +8 -0
  101. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/styles.css +5 -0
  102. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Foundation.fixture.ts +47 -0
  103. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +14 -0
  104. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/base.css +27 -0
  105. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/colors.css +29 -0
  106. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/elevation.css +15 -0
  107. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/spacing.css +15 -0
  108. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/typography.css +13 -0
  109. package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +13 -0
  110. package/dist/skills/ads-designer/assets/bootstrap-ds/gitignore.template +8 -0
  111. package/dist/skills/ads-designer/assets/bootstrap-ds/package-lock.json +4660 -0
  112. package/dist/skills/ads-designer/assets/bootstrap-ds/package.json +41 -0
  113. package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +33 -0
  114. package/dist/skills/ads-designer/assets/bootstrap-ds/src/vite-env.d.ts +7 -0
  115. package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.build.json +12 -0
  116. package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.json +20 -0
  117. package/dist/skills/ads-designer/assets/bootstrap-ds/vite.config.ts +21 -0
  118. package/dist/skills/ads-designer/references/cli.md +111 -0
  119. package/dist/skills/ads-designer/references/design-craft.md +65 -0
  120. package/dist/skills/ads-designer/references/mobile.md +73 -0
  121. package/dist/skills/ads-import/SKILL.md +335 -0
  122. package/dist/skills/ads-import/agents/openai.yaml +4 -0
  123. package/dist/skills/ads-import/references/branding.md +44 -0
  124. package/dist/skills/ads-import/references/cli.md +111 -0
  125. package/dist/skills/ads-import/references/implementation.md +111 -0
  126. package/dist/skills/ads-import/references/tokens.md +96 -0
  127. package/dist/skills/ads-motion/LICENSE.upstream +21 -0
  128. package/dist/skills/ads-motion/README.md +22 -0
  129. package/dist/skills/ads-motion/SKILL.md +217 -0
  130. package/dist/skills/ads-motion/agents/openai.yaml +4 -0
  131. package/dist/skills/ads-motion/references/audit.md +44 -0
  132. package/dist/skills/ads-motion/references/build.md +81 -0
  133. package/dist/skills/ads-motion/references/performance.md +55 -0
  134. package/dist/skills/ads-motion/references/review.md +35 -0
  135. package/dist/skills/ads-motion/references/verification.md +39 -0
  136. package/dist/token-policy.mjs +10 -0
  137. package/dist/tokens.mjs +142 -0
  138. package/dist/ui-framework.mjs +59 -0
  139. package/dist/units.mjs +168 -0
  140. package/docs/ADS.md +310 -0
  141. package/docs/ARCHITECTURE.md +311 -0
  142. package/docs/CHANGELOG.md +106 -0
  143. package/docs/GUIDE.md +722 -0
  144. package/docs/MCP.md +690 -0
  145. package/package.json +107 -4
@@ -0,0 +1,335 @@
1
+ ---
2
+ name: ads-import
3
+ description: "Import selected components, patterns, styles, or brand artwork into a project's design system using ADS's fixed token names and ownership. Use tokens mode to adopt compatible source theme values. Preserves behavior, credits, and license notices."
4
+ ---
5
+
6
+ # ADS Import
7
+
8
+ When ADS MCP is connected, use `ads_status`/`ads_catalog` to inspect the destination
9
+ and discover its addressable scenarios; `ads_tokens` inspects its current
10
+ values. Render imported public implementations in real project fixtures, using
11
+ the normal showcase when Apps are unavailable. MCP does not perform the import
12
+ or replace source inspection. Resolve served skill references relative to this
13
+ `SKILL.md` URI and load them lazily; a read does not itself activate the skill.
14
+ Use the returned `projectRoot` and `project.commands`; the connected ADS may be
15
+ inside a different or nested repository. Inspect the selected public API, owning
16
+ source/available guides and relevant tokens, then mount its discovered scenario.
17
+ Metadata and source reads do not prove rendered behavior.
18
+
19
+ When `ads_status.mutations.enabled`, discover the owner with `ads_units`, read
20
+ relevant ranges with `ads_read_file` and send only a Git unified diff through
21
+ `ads_apply_patch({ unit, patch, dryRun })`. A unit includes its own implementation,
22
+ scenarios and fixtures; imported peers remain separate. `tokens` is the token
23
+ foundation unit. Unit discovery and file ownership are distinct from preview IDs.
24
+ Include only that owner's required re-exports in the public entry. Use
25
+ `dryRun: true` to inspect validation; applying re-runs the gates. Fix rejected
26
+ patches in their owner. Shared styles/helpers use `foundation`, root guides use
27
+ `documentation`, and branding/fonts use their discovered `assets/*` unit.
28
+ Intentional configuration, rule exceptions, registered guard code and compiler
29
+ changes use `configuration`; validate the proposed settings and keep mandatory
30
+ ADS gates. For binary/large assets, generate `git diff --binary --full-index` into
31
+ `.ds/patches/<name>.patch` and send `patchFile` instead of inline `patch`, so bytes
32
+ stay out of model context. Binary changes require Git. When editing is disabled,
33
+ use the client's normal source-editing tools.
34
+
35
+ Before trusting a preview after edits, check `ads_status.build` or
36
+ `ads://project/build`. Fix build diagnostics in owned source; an older view or
37
+ unreported freshness is not evidence of current code. Notifications may not
38
+ reach the agent.
39
+
40
+ Transfer existing ADS implementation into the target design system. Use the
41
+ source's real files and documented contracts, integrating them with the target's
42
+ structure, exports, and build. Preserve the selected item's interaction and
43
+ motion mechanics. Its visual values follow the destination theme unless the
44
+ user also requests source token values.
45
+
46
+ React and native Preact are supported. Preserve the target runtime in both
47
+ production and scenario builds; never alias React to Preact just to shrink a
48
+ preview. Native Preact uses its own JSX transform, hooks and DOM events (live
49
+ text updates use `onInput`). Native SVG uses DOM names such as `stroke-width`,
50
+ not React presentation aliases. Keep Linaria extraction and the same public APIs.
51
+ The shipped empty starter uses React; the tool repository's working example
52
+ uses Preact. Neither is a component dependency of the receiving project.
53
+
54
+ ADS is tooling only. Components, patterns, themes and scenarios live in
55
+ external sources, not a built-in or optional tool catalogue. Import the selected
56
+ external source into the destination's
57
+ local ADS folder; the project owns the resulting code and theme values, and the
58
+ app uses its local public barrel. Do not install the source ADS as a UI runtime
59
+ dependency. Later source updates require explicit imports or merges that preserve
60
+ local customizations.
61
+
62
+ ## Input and selection
63
+
64
+ ```text
65
+ $ads-import <repository-url-or-local-path> [component|pattern|style|brand <names...>|tokens]
66
+ $ads-import /path/to/source-repo component Toast
67
+ $ads-import /path/to/source-repo pattern AppShell
68
+ $ads-import /path/to/source-repo style dense-controls
69
+ $ads-import /path/to/source-repo tokens
70
+ $ads-import /path/to/source-repo brand
71
+ ```
72
+
73
+ Accept plural forms such as `components`, `patterns`, `styles`, and `brands`, and multiple
74
+ names. A repository URL can identify a branch, commit, or ADS subdirectory; honor
75
+ that reference. The user can also specify the ADS path or revision in prose.
76
+ Use the current repository's design system as the destination unless named otherwise.
77
+
78
+ Read [references/cli.md](references/cli.md) and invoke supported ADS CLI commands
79
+ through `npx` using the actual published version or a local tarball. The current
80
+ CLI performs setup/checks; this skill performs the source import and integration.
81
+
82
+ If the source is missing, ask for its URL or local path. Inspect its catalogue
83
+ before asking which item to import:
84
+
85
+ - With only a source, ask which component, pattern, style, or brand artwork to import, offering
86
+ actual discovered names and a **token-values-only** option.
87
+ - With a category but no names, ask which items in that category to import.
88
+ - With explicit names, resolve them from the source catalogue without asking
89
+ again. Infer the category for a unique bare name; clarify ambiguous names.
90
+ - With `tokens`, import all source token values without asking for component,
91
+ pattern, or individual token selection. This explicitly requests a theme-value
92
+ import. The user can request item imports and token values together.
93
+ - With `brand`, inspect original artwork and usage guides, then resolve named
94
+ assets or ask which variants to import. Read [branding.md](references/branding.md).
95
+ Brand selection imports artwork and guidance; theme-value changes require
96
+ `tokens` or an explicit values request.
97
+
98
+ Do not select an arbitrary item or import the entire component catalogue when
99
+ the selection is missing. Continue source/destination research while awaiting
100
+ the answer; wait for the selection before changing the destination. Necessary
101
+ dependencies of a selected item are included in its import scope.
102
+
103
+ ## Discover both systems
104
+
105
+ Read repository instructions, `README.md`, `docs/ARCHITECTURE.md` and `docs/ADS.md`
106
+ when present or equivalent guides, public exports, relevant local READMEs, style entries, and build/lint
107
+ configuration in both repositories. Locate the actual ADS folder: it may be
108
+ `design-system/`, an existing nested ADS folder, or a workspace package. Inspect its token,
109
+ component, and pattern structure rather than assuming a folder name proves it
110
+ is a reusable ADS. Clarify genuinely ambiguous source or destination folders.
111
+
112
+ For a remote source, use available repository tools or an isolated checkout.
113
+ Record the resolved commit/revision and ADS path; keep the source read-only and
114
+ copy source files rather than generated bundles. Do not overwrite the target's
115
+ repository metadata or project configuration with the source checkout.
116
+
117
+ The destination's component and pattern styling uses required Linaria extraction.
118
+ Adapt source styles to colocated `@linaria/atomic` blocks while preserving the
119
+ selected interaction contract. Verify extraction in app and preview builds;
120
+ `ads init` does not install or configure Linaria. Preserve the destination framework.
121
+
122
+ Build a working import inventory: selected items, their transitive runtime/style
123
+ dependencies, assets, external packages, source guides, and relevant tests/rules.
124
+ Use source exports and dependency edges to distinguish public items from helpers.
125
+
126
+ ## Shared token contract and theme values
127
+
128
+ Read [tokens.md](references/tokens.md). Shared token names, meanings, and value
129
+ types form the contract; concrete values and theme overrides can differ between
130
+ projects. Different values for the same compatible token are expected.
131
+
132
+ ADS fixes token names and namespaces. The destination uses the architecture's
133
+ shared names, `--ds-*` for components, and `--ux-*` for patterns, including the
134
+ owned review layouts. Fixtures define no custom styling. Do not add configurable prefixes, source-prefixed
135
+ aliases, or a parallel vocabulary. Normalize selected nonconforming source to
136
+ the ADS architecture as part of the import; report unresolved semantic mappings
137
+ before writing them. This does not add foreign-prefix support to ADS tooling.
138
+
139
+ | Import mode | Token handling |
140
+ |-------------|----------------|
141
+ | Component, pattern, or style | Reuse destination token names and values; add missing shared definitions with initial values |
142
+ | `tokens`, or items plus an explicit values request | Import all source-provided token values and theme variants; add missing definitions |
143
+
144
+ Inspect the complete source/target contract for additions and compatibility.
145
+ Preserve existing destination values during item imports, including starter
146
+ values. Synchronize missing shared definitions and needed aliases/types without
147
+ replacing existing registries, helpers, stylesheets, or themes wholesale. A truly
148
+ empty destination needs initial definitions and values before an item can render.
149
+
150
+ In `tokens` mode, apply the source values for compatible token names. Preserve
151
+ target-only tokens and theme variants the source does not define. Bring assets
152
+ needed by imported values, such as fonts. This mode already authorizes the value
153
+ changes; do not ask again merely because source and target values differ.
154
+
155
+ If names, meanings, or types are incompatible, resolve a semantic mapping or
156
+ contract migration before writing it. Keep one shared contract; do not create
157
+ source-prefixed duplicates. Document any necessary migration between canonical
158
+ ADS names and any user-requested adaptation.
159
+
160
+ ## Import the selected implementation
161
+
162
+ Read [implementation.md](references/implementation.md) for dependency closure,
163
+ style ownership, documentation, and verification. Copy selected items and needed
164
+ helpers/styles/assets into the matching target layers. Reuse target dependencies
165
+ only after checking compatible APIs and behavior. Merge only necessary external
166
+ dependencies and build support; keep the target's framework and unrelated scripts.
167
+
168
+ Preserve interaction, accessibility, lifecycle, gestures, and animation mechanics.
169
+ Rewrite paths, token references, and exports as required by the integration. A different
170
+ styling engine may require equivalent source-to-source conversion; document any
171
+ material API or UX change. Keep product routes, data, and example scaffolding
172
+ outside reusable ADS runtime code.
173
+
174
+ Register imported component-specific lint through the target's central tooling
175
+ when applicable. Keep tooling out of runtime exports. Do not automatically copy
176
+ the source's whole lint/configuration stack or create rules for every component.
177
+
178
+ ## Document, verify, and deliver
179
+
180
+ Discover the target's showcase and run/build commands. It is the shared design
181
+ review surface for agents and humans. Add/update examples for imported components
182
+ and patterns; token-value/style/brand imports update and inspect existing examples
183
+ across relevant themes and sizes. Examples and composition scenarios import the same
184
+ public ADS source and foundation styles as the application. Keep isolated sample
185
+ data, state and callback adapters beside their scenario; larger entries belong
186
+ under `composition/`, rather than inside browsing pages. Production-screen structure
187
+ and reusable controls/patterns must live in the ADS.
188
+ Do not copy a source mock's private implementation or keep a demo-only replica.
189
+ Reusable scenario review layouts are public ADS entities with defined APIs.
190
+ The outer minimal shell belongs to the MCP client. Showcase/scenario files define no CSS, custom classes, or widget markup.
191
+ Use the target's owned review layouts; change their ADS pattern if a new layout
192
+ is needed inside a scenario. The outer showcase shell belongs to the tool.
193
+
194
+ If no showcase is running, start the built-in client with `ads showcase`.
195
+ Run shared ADS/project guards before both showcase and app builds; inspect the
196
+ rendered examples and relevant interactions. Fix shared UI in its owner and
197
+ give a full running URL or exact run command for human review.
198
+
199
+ The showcase is a minimal shell plus an MCP client and Apps host, supplied by ADS
200
+ tooling. It discovers Tokens/Components/Patterns/Composition entries through MCP
201
+ tools and renders their scenarios in the preview App. Navigation, theme and
202
+ pane/header visibility belong to the tool client. Do not create page files,
203
+ copy its shell into the project or assemble a second catalogue/rendering pipeline.
204
+
205
+ When MCP is connected, open the running URL from `ads_status`. Otherwise run the
206
+ installed `ads showcase` or the project's `dev:showcase` script. Do not launch a
207
+ second runtime/compiler for the same connected project. A configured project
208
+ preview watcher publishes a shared graph on first demand and after source
209
+ changes. The built-in client refreshes discovery and the active scenario in the
210
+ same App after a successful build. Shared runtime, foundation CSS, fonts and
211
+ selected scenario modules load through MCP
212
+ resources inside the sandboxed App. Never inject project styles/runtime into
213
+ the outer host. Keep the configured framework, compiler and mount/unmount adapter
214
+ consistent; scenario teardown must release owned timers, portals and workers.
215
+ The host shows errors and marks retained output as stale. Other hosts may need an
216
+ explicit preview-tool invocation. Compilation remains project-owned and required
217
+ for TSX/Linaria; it is automatic, not eliminated.
218
+
219
+ Reusable review layouts belong in public project ADS patterns, while scenario
220
+ files define no CSS, custom classes or widget replicas. Keep real presentation in
221
+ its component/pattern owner. The tooling shell's CSS is outside that project
222
+ contract. Legacy custom showcase pages may be retained during migration; new
223
+ projects require no TokensPage/ComponentsPage/PatternsPage/CompositionPage files.
224
+
225
+ Colocate `Scenario.tsx` and `fixture.ts` with tokens and each component/pattern; flat owners
226
+ may use `<Owner>.scenario.tsx` and `<Owner>.fixture.ts`. Put larger entries under
227
+ `composition/<Name>/Scenario.tsx` with their own `fixture.ts`. Export a default
228
+ zero-input mountable view and literal metadata, for example
229
+ `export const scenario = { title: "Button states", covers: ["Button"] };`.
230
+ Import the real UI from the public ADS alias. Keep fixture inputs, simulated
231
+ services and initial state/callback adapters beside the scenario. Empty fixtures
232
+ are valid for an entry with no inputs. Extra development helpers use a
233
+ `scenario/` or `fixtures/` subfolder, or `<Owner>.scenario-adapter.ts`, so guards
234
+ recognize their role even beside runtime code. Never require a page, router or store to
235
+ initialize the entry. Several contextual public parts may share one scenario.
236
+
237
+ IDs derive from ADS-relative filenames: both `components/core/Button/Scenario.tsx`
238
+ and `components/core/Button.scenario.tsx` identify `components/core/Button`.
239
+ Use one form, no duplicate IDs or hand-maintained registry. Renames change IDs.
240
+ The showcase and external hosts mount the same discovered entry. The Vite
241
+ adapter uses `previewEntriesPlugin` and `createPreviewResources` with
242
+ `runScenarioCompiler` to publish the shared graph. Its framework mount adapter
243
+ returns cleanup; the project owns rendering and Linaria extraction. The older
244
+ `scenarioRegistryPlugin` is only for retained legacy browsers. MCP discovers
245
+ metadata without importing executable TSX. Existing apps need an explicitly
246
+ integrated compiler; init alone adds no compiler or extraction setup.
247
+ Use `ads_scenarios` (query/kind/limit) and `ads_show_scenario({id})` to open an exact
248
+ entry. Check its build freshness; HTML delivery is not browser verification.
249
+ If Apps or resource forwarding are unavailable, open that scenario in the real
250
+ showcase, using the tool result's URL. Do not build a preview-only replica.
251
+
252
+ For a production screen, find and render the application's public screen pattern.
253
+ Its owner supplies structure, controls, layout and presentation. Scenario fixtures
254
+ supply data/state/callbacks. Move shared presentation into a pattern if needed,
255
+ preserving existing behavior and lazy imports, workers, caching and cancellation.
256
+ Do not reassemble an alternative screen or substitute placeholder content.
257
+ Screen reuse remains skill guidance, not a dedicated screen-parity lint.
258
+
259
+ Resolve `scenario-contract`, `scenario-render` and `scenario-coverage` findings
260
+ with meaningful entries. Every public renderable component and pattern needs an
261
+ addressable scenario, including unused exports; types/constants/utilities do not.
262
+ Only public render references reachable from the default entry count. Tests and
263
+ unused imports/functions do not. Static reachability does not prove successful
264
+ mounting, correct content, every branch/state or visual parity: open each affected
265
+ entry independently and verify real behavior at narrow/wide sizes in both themes.
266
+ The older `showcase-coverage` policy separately checks application references.
267
+
268
+ Token previews use that same scenario pipeline. Colocate a token scenario and
269
+ fixture under the configured token directory. Use static metadata
270
+ `{ title: "Typography", covers: ["TokenSamples"], tokens: fixture.tokens }` with
271
+ literal const fixture fields; names/sample text are fixture data, values come
272
+ from the real foundation CSS. Reuse a public project review pattern for styled
273
+ samples. The minimal starter's foundation value scenario can have `covers: []`.
274
+ Every declared token needs reachable scenario coverage; adding/removing a token
275
+ requires fixture updates. Fix `token-scenario-reference`, `token-scenario-render`
276
+ and `token-scenario-coverage` findings. Metadata and unused fixture fields do not
277
+ count. Discover exact token IDs with `ads_scenarios({kind:"tokens"})`; mount them
278
+ with `ads_show_scenario({id})` or `ads_show_tokens({category:id})`. With the shared
279
+ resource compiler, omitting category opens the first project token scenario.
280
+ Legacy compilers retain the generic definition inspector. Use `ads_tokens` for
281
+ source definitions and values; inspecting definitions does not prove UI parity.
282
+ The tool keeps the shared naming contract; sample templates and their token
283
+ lists belong to the project.
284
+
285
+ Scenarios, colocated fixtures and helpers are development-only. Never export them
286
+ from the runtime barrel or import them in production, including through aliases,
287
+ re-exports or dynamic imports. They may not import application stores, routers,
288
+ providers or HTTP clients. Live business data is application-owned; UI uses typed
289
+ inputs or injected services/callbacks. Direct global fetch/XHR/WebSocket/EventSource
290
+ is rejected; custom clients and computed access require review/project guards.
291
+ Use local simulated services in fixtures. Tests may import fixtures; load real
292
+ foundation CSS rather than assigning shared token values in JavaScript. Keep
293
+ full-app integration harnesses and workflow coverage in application test support.
294
+
295
+
296
+
297
+ Register component/project Oxlint plugins and rules in `ds.config.json`. Use
298
+ scoped `oxlint.overrides` for justified file-specific settings; never edit
299
+ `.ds/oxlintrc.json`. These overrides configure Oxlint, not the independent
300
+ architecture checks in `ads check`. Measured renderer properties and documented
301
+ non-state hooks use explicit `boundaries`; shared token writes and primitive
302
+ state overrides cannot be allowlisted. Add generic architectural protections to
303
+ ADS core and keep domain/component-specific rules registered in project setup.
304
+
305
+ Write or update the imported item's local README with public usage, required
306
+ setup, token hooks, behavior, tests, and any integration differences. Include
307
+ source repository/file links, revision, authors, and concrete provenance. Carry
308
+ forward existing upstream credits and preserve applicable license/copyright
309
+ notices for code, tokens, fonts, icons, and other assets actually imported.
310
+ Record token-contract additions, value-import provenance, and theme policy in
311
+ the receiving project's ADS guide. Keep its item catalogue and implementation
312
+ docs outside the core tool's documentation.
313
+
314
+ Verify contract compatibility, missing-token additions, entry/asset resolution,
315
+ public exports, and the actual showcase/consumer path. Run the target's relevant lint, type checking,
316
+ build, and meaningful imported component/rule tests. Compare source/imported
317
+ behavior and motion where the item needs it; a successful build or screenshot
318
+ alone does not establish parity. Account for intentional destination-theme
319
+ differences. Token-value imports also need consumer checks for existing theme,
320
+ typography, spacing, and motion behavior.
321
+
322
+ Follow [references/cli.md](references/cli.md) to integrate the tool as a
323
+ development dependency in the target's actual lint/build pipeline. Register
324
+ imported component rules through its project-owned plugin adapter and
325
+ `ds.config.json` Oxlint plugins/rules, then run the normal project build; its lint
326
+ step refreshes configuration and runs ADS/core/project rules automatically.
327
+ Use npx for bootstrap or ad hoc checks. Preserve unrelated existing lint setup;
328
+ do not add catalogue imports to core tooling. CLI checks complement the project
329
+ build and behavior tests.
330
+
331
+ Report selected imports and included dependencies, contract additions, whether
332
+ destination values were retained or source values imported, source revision/path,
333
+ retained notices, checks run, and any unresolved integration limits. Give actual
334
+ demo URLs only when running; clean up
335
+ temporary comparison servers when finished unless the user requested they remain.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "ADS Import"
3
+ short_description: "Import ADS items, brand artwork, or theme values"
4
+ default_prompt: "Use $ads-import with a source repository to import selected ADS items, brand artwork, or token values using the fixed ADS architecture."
@@ -0,0 +1,44 @@
1
+ # Import project branding
2
+
3
+ Use this reference for explicit `brand` selection. Components, patterns, and
4
+ styles retain the destination's identity; `tokens` separately adopts compatible
5
+ theme values. Brand import brings selected original artwork and its guidance,
6
+ not generated platform exports or an entire source build configuration.
7
+
8
+ Inspect the source's real originals, variants, README, license/credits, and any
9
+ icon-source setting. Resolve named assets, or ask which discovered variants to
10
+ import when selection is missing. Preserve the receiving project's artwork and
11
+ icon source unless replacing them is part of the request.
12
+
13
+ Copy selected masters into `design-system/assets/brand/`. Update its local README
14
+ with usage, suitable backgrounds, source repository/file links and revision,
15
+ authors, credits, and applicable license notices. Keep fixed colors and geometry
16
+ in original SVG artwork. Licensed fonts needed by an explicit theme import live
17
+ in `assets/fonts/`; declarations use `tokens/fonts.css`.
18
+
19
+ UI branding uses existing ADS token names such as `--accent` and `--font-sans`.
20
+ Component variables use `--ds-*`, patterns `--ux-*`, and owned scenario review layouts
21
+ `--ux-*` (`--showcase-*` is reserved, not permission for fixture CSS). These prefixes are fixed; do not introduce a brand namespace or
22
+ assign component state variables in token files. Source artwork is not a reason
23
+ to change destination token values during an asset-only import.
24
+
25
+ When the selected artwork should supply the app icon, set only
26
+ `assets.iconSource` in the target's `ds.config.json` to its ADS-relative path,
27
+ for example `assets/brand/app-icon.svg`. The source must be an SVG inside
28
+ `assets/brand/`. Use the real installed tool's `ads assets` command to generate
29
+ favicon SVG/ICO, an Apple touch icon, and 192/512px icons in ignored `.ds/assets/`.
30
+ No cache, manifest, theme adapter, or extra export-target configuration is needed.
31
+
32
+ Integrate that generated directory into the target's existing asset mount/copy
33
+ step without replacing unrelated public assets. Duplicate final output paths
34
+ must fail. Keep application manifest metadata and custom platform exports in
35
+ the project. A configured SVG background is retained; otherwise rendering keeps
36
+ transparent padding and the artwork's aspect ratio.
37
+
38
+ Follow [cli.md](cli.md) to integrate local tooling into the normal npm/Bun build:
39
+ ADS checks and registered Oxlint rules run before asset generation and the
40
+ existing build steps. Run the normal build, inspect actual icon dimensions and
41
+ transparency, and verify the real consumer URLs and selected artwork variants.
42
+ Confirm token values, unselected artwork, configuration, and unrelated build
43
+ steps were preserved. Report source provenance, selected originals, icon-source
44
+ changes, generated outputs, mount integration, and checks.
@@ -0,0 +1,111 @@
1
+ # Run ADS tooling through npx
2
+
3
+ Use npx for setup or ad hoc checks alongside this skill's research,
4
+ implementation, documentation, and verification workflow. ADS must be a project
5
+ development dependency, and its checks must run before the project's build.
6
+ Routine builds use the local CLI.
7
+
8
+ Select an actual published package/version or a real local tarball supplied by
9
+ the user or built from the tool checkout. Respect the project's installed
10
+ version. Confirm the selected published version supports the required features; use a
11
+ local tarball for unreleased changes. Never resolve an unrelated package with
12
+ bare `npx ds`. Read the actual version/help and use only supported commands.
13
+
14
+ ## Published setup
15
+
16
+ Run **inside the receiving project**, where
17
+ `package.json` lives:
18
+
19
+ ```sh
20
+ npx @reqvire-org/ads init --framework react
21
+ npm install
22
+ npm run build
23
+ ```
24
+
25
+ Use `--framework preact` for native Preact. A saved `framework` in
26
+ `ds.config.json` lets later init runs omit the flag; otherwise the choice is
27
+ required, including for an older config. Init preserves existing framework
28
+ tooling and rejects conflicting saved/JSX settings instead of converting it.
29
+
30
+ Use the confirmed package name/version if different. For an existing Bun
31
+ project, the same init command detects `packageManager` or `bun.lock`/`bun.lockb`;
32
+ then use `bun install` and `bun run build`. Node 22.12 or newer remains required.
33
+ Only use `--package-manager bun` when the project has no Bun marker yet or needs
34
+ an explicit override. Preserve its existing package-manager policy and lockfile.
35
+
36
+ `init` accepts no directory argument and requires an existing `package.json`.
37
+ For starting from zero, copy the bundled `ads-designer` application scaffold
38
+ first, then run init inside it. For an existing app, init preserves app files,
39
+ framework configuration, lockfiles, and build scripts. It adds only missing ADS
40
+ foundation files, config, development dependencies, and build checks. Existing
41
+ ADS values are reused; incomplete contracts need an explicit migration.
42
+
43
+ Init adds `lint:ds` and `assets:ds`, and runs checks then brand generation before
44
+ the existing `prebuild` hook without replacing the actual build command or
45
+ unrelated checks. It rejects conflicting custom scripts before writing.
46
+ It does not configure framework aliases, style
47
+ extraction, or application entry points; integrate these using the target's
48
+ framework and ADS contracts. Install dependencies, review the changes, and
49
+ commit the updated lockfile.
50
+
51
+ ## Local checkout testing
52
+
53
+ If no published distribution exists, build and pack the tooling checkout with
54
+ `npm run build` and `npm run pack:tool`. Resolve its tarball to an absolute path.
55
+ From inside an existing test project:
56
+
57
+ ```sh
58
+ ads_tool_package="/absolute/path/to/reqvire-org-ads-0.3.0.tgz"
59
+ npx --yes --package "$ads_tool_package" ads --help
60
+ npx --yes --package "$ads_tool_package" ads init --framework react --tool-package "$ads_tool_package"
61
+ npm install
62
+ npm run build
63
+ ```
64
+
65
+ Use Bun's install/build commands for Bun projects. Keep npx options before
66
+ `ds`. `--tool-package` is optional local-testing/version-override support;
67
+ registry users do not need an archive. A `file:` dependency must remain
68
+ available wherever dependencies are installed. A published pinned version is
69
+ portable between machines.
70
+
71
+ ## Checks and rules
72
+
73
+ For an initialized project, from its root:
74
+
75
+ ```sh
76
+ npx @reqvire-org/ads check
77
+ npx @reqvire-org/ads tokens --json
78
+ npx @reqvire-org/ads assets
79
+ ```
80
+
81
+ Use the selected real distribution; for a local tarball, invoke
82
+ `npx --yes --package "$ads_tool_package" ads check` instead. Other inspection
83
+ commands accept a directory; init deliberately does not.
84
+
85
+ Every normal build refreshes `.ds/oxlintrc.json`, runs `ads check`, executes
86
+ core/project Oxlint rules, then generates configured standard brand icons in
87
+ `.ds/assets/`. Set `assets.iconSource` to an SVG inside the ADS's `assets/brand/`,
88
+ relative to the ADS folder; no source means generation is a no-op. Integrate that
89
+ directory through the app's existing asset mount. Fixed token names and prefixes
90
+ are required; project values and artwork remain project-owned. Its paths reference the project and local tool;
91
+ builds do not depend on the initializing npx cache. Ignore `.ds/`. Register
92
+ component rules through the project's plugin adapter and `ds.config.json`, then
93
+ run its actual build. Use `lint-config` directly for custom pipeline integration
94
+ or debugging, not as a separate routine setup step.
95
+
96
+ Use ADS 0.3 or later for the shared-resource preview compiler. `mcp` starts stdio
97
+ plus its local website; `showcase` starts the browser-only MCP runtime. Open the existing runtime URL from `ads_status` when
98
+ connected; otherwise use `npm run dev:showcase` or the installed `ads showcase`.
99
+ The tool client discovers entries and renders MCP Apps. Init adds the launch
100
+ script but does not install the project preview compiler. Integrate its graph
101
+ compiler/mount adapter and configure `mcp.previewManifest` plus `mcp.previewWatch`;
102
+ then use the same foundation and Linaria extraction as the application. Source discovery,
103
+ selected component/pattern/style/brand imports, explicit theme-value imports, and
104
+ assimilation are agent workflows. There is no CLI `import` command. Core checks
105
+ do not copy source, import values, or establish behavior/motion parity; continue
106
+ project type checking, meaningful tests, and browser comparisons.
107
+
108
+ If no CLI distribution is available, continue with the target's existing
109
+ checks. `ads-designer` includes an empty scaffold for offline bootstrapping.
110
+ Install skills separately with `npx skills`; the tool does not install skills
111
+ or fetch an external UI catalogue.
@@ -0,0 +1,111 @@
1
+ # Selected implementation import
2
+
3
+ ## Follow the real dependency closure
4
+
5
+ Start at each selected public export and inspect its imports, re-exports, side
6
+ effects, styles, hooks, providers, state stores, helpers, types, and assets.
7
+ Include transitive prerequisites even when the user selected only one component.
8
+ Copy into the destination's local ADS source, which the project owns. Configure
9
+ its local public alias (such as `@ds`) rather than installing the source ADS as
10
+ an application dependency.
11
+ A pattern may depend on several primitives; explain those additions as required
12
+ dependencies rather than importing the whole catalogue.
13
+
14
+ Check source contracts before replacing a dependency with a target equivalent.
15
+ A similarly named Button, Icon, or hook can have different props, dimensions,
16
+ focus behavior, or semantics. Prefer an existing equivalent when it preserves
17
+ the selected item's contract. Otherwise import the required dependency or make
18
+ a documented compatible adapter in the appropriate target layer.
19
+
20
+ Inspect external package imports and source dependency versions. Add only what
21
+ the closure needs, compatible with the target's peer/framework versions. Merge
22
+ package changes through the target's dependency manager and lockfile. Integrate
23
+ essential CSS extraction, assets, or code generation without replacing the
24
+ whole build configuration. External runtime dependencies of the copied code
25
+ remain real dependencies;
26
+ do not disguise a wrapper as a fully native independent implementation.
27
+
28
+ Do not copy real product data, routes, network services, or application imports
29
+ into reusable primitives/patterns. Use documented slots, props, and callbacks
30
+ to separate those concerns. If a required service or provider cannot be integrated
31
+ within the request, identify that concrete limit instead of adding a silent stub.
32
+
33
+ ## Keep styles in their owning layers
34
+
35
+ Copy colocated component/pattern styles with their implementation. Import style
36
+ helpers or presets into the owning ADS layer and document their public setup.
37
+ If a requested style is only used through specific markup, include or adapt the
38
+ needed contract rather than presenting an inert stylesheet as a working import.
39
+
40
+ Follow ADS styling and namespace ownership. The default layout is:
41
+
42
+ - Primitives live under `design-system/components/` and own `ads-*` classes.
43
+ - Reusable layouts live under `patterns/` and own `ux-*` classes.
44
+ - Linaria blocks use `@linaria/atomic`; public foundation CSS is import-only.
45
+ - Public scenario review layouts are patterns with `ux-*` classes; fixtures define
46
+ no CSS or custom classes and consume public ADS entities.
47
+ - Runtime measured geometry stays narrow; visual constants stay in tokens.
48
+
49
+ Source implementations may use another styling engine or framework. Adapt
50
+ styles to the destination's required Linaria pipeline and ownership boundaries,
51
+ retaining state mechanics, layout relationships, and motion choreography. Token-backed dimensions, easing, and durations follow
52
+ the chosen value policy; record resulting theme differences. Do not implement
53
+ imported visual policy as consumer overrides targeting
54
+ internal classes or as new app-level CSS.
55
+
56
+ Export the selected API and required public types through the target barrel.
57
+ Resolve export-name collisions explicitly; do not silently replace an unrelated
58
+ target component. Update assets and internal imports for their new locations.
59
+ Demonstrate the actual imported item through public exports in the target showcase.
60
+
61
+ ## Documentation, provenance, and lint
62
+
63
+ Keep detailed usage/API/setup, lifecycle, interactions, token hooks, and validation
64
+ in the component or pattern's local README. For styles, document supported
65
+ selectors/markup, theme scope, and application through the public entry.
66
+ Describe material target integration differences alongside the source contract.
67
+
68
+ Include source repository/file links, resolved revision and ADS path, authors,
69
+ and what was copied or adapted. Preserve the source item's own inspiration and
70
+ upstream credits. Keep applicable license/copyright notices for copied code and
71
+ assets in accessible local files and reference them from the guide. Do not call
72
+ copied/adapted source an independently authored reproduction. Shared ADS docs own
73
+ the shared token contract, value-import policy, and links to item guides.
74
+
75
+ Inspect source component-local lint rules and their tests when present. Import
76
+ applicable rules into tooling-only ownership and register them through the
77
+ target's maintained configuration/generator. Adjust real public import names,
78
+ aliases, root-file configuration, and plugin registration. Keep rule modules and
79
+ test harness dependencies outside runtime exports.
80
+
81
+ Do not assume the source's global lint configuration applies to the destination.
82
+ Add a new rule only for concrete, statically provable misuse not already covered
83
+ by existing checks. Test accepted and rejected consumer cases and false-positive
84
+ boundaries when rules are changed or adopted.
85
+
86
+ ## Verification and evidence
87
+
88
+ Run the destination's lint/typecheck/build and meaningful selected-item tests.
89
+ Adapt source tests to the target public API and test environment without dropping
90
+ behavioral assertions just to pass. Verify asset resolution, declarations, public
91
+ imports, setup/providers, and scope/mounting across routes where relevant.
92
+
93
+ Compare the imported component or pattern with the actual source implementation
94
+ at the recorded revision. Align content, configuration, themes, viewport, and
95
+ input modality. For implementation comparisons, use matching token values when
96
+ possible; also verify the item under its actual destination theme. For
97
+ stateful/motion-heavy items, check lifecycle, focus, keyboard,
98
+ pointer and touch, natural dimensions, transitions, interruption, reduced motion,
99
+ and cleanup as relevant. Separate token/font differences from implementation
100
+ drift. Build success does not establish gesture or animation parity.
101
+
102
+ Use isolated browser pages/contexts and temporary comparison projects. Do not
103
+ resize or navigate the user's existing tabs for tests. Rebuild `dist`-based
104
+ fixtures after source changes. Stop comparison servers after verification unless
105
+ the user asked to keep them; preserve requested demos until asked to stop them.
106
+
107
+ Report the selected items, added prerequisites, token-contract additions and
108
+ value policy, source revision, documented adaptations, notices, and checks
109
+ actually run. Distinguish observed parity from source inference and untested
110
+ states. Token-values-only mode has
111
+ no selected runtime items, but still needs token and existing-consumer validation.