@reqvire-org/ads 0.3.1 → 0.3.3
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/dist/bootstrap-ds/ADS.md +29 -0
- package/dist/bootstrap-ds/design-system/tokens/base.css +4 -1
- package/dist/bootstrap-ds/design-system/tokens/colors.css +2 -2
- package/dist/boundaries.mjs +21 -23
- package/dist/check.mjs +45 -15
- package/dist/cli.mjs +1 -0
- package/dist/contracts/foundation.json +211 -0
- package/dist/foundation.mjs +114 -0
- package/dist/mcp/build-status.mjs +22 -9
- package/dist/mcp/mutations.mjs +1 -1
- package/dist/mcp/preview-watch.mjs +35 -12
- package/dist/mcp/prompts.mjs +1 -1
- package/dist/mcp/server.mjs +6 -6
- package/dist/oxlint.mjs +1 -1
- package/dist/scenarios-compiler.mjs +86 -43
- package/dist/skills/ads-assimilate/SKILL.md +43 -2
- package/dist/skills/ads-assimilate/references/cli.md +3 -2
- package/dist/skills/ads-assimilate/references/native-implementation.md +16 -0
- package/dist/skills/ads-break-ui/SKILL.md +43 -2
- package/dist/skills/ads-designer/SKILL.md +43 -2
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +29 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/base.css +4 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/colors.css +2 -2
- package/dist/skills/ads-designer/references/cli.md +3 -2
- package/dist/skills/ads-import/SKILL.md +43 -2
- package/dist/skills/ads-import/references/cli.md +3 -2
- package/dist/skills/ads-motion/SKILL.md +43 -2
- package/dist/style-boundaries.mjs +59 -0
- package/dist/units.mjs +37 -1
- package/docs/ADS.md +34 -1
- package/docs/ARCHITECTURE.md +38 -6
- package/docs/CHANGELOG.md +28 -0
- package/docs/GUIDE.md +18 -1
- package/docs/MCP.md +48 -7
- package/package.json +2 -1
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -191,6 +191,29 @@ and the UI rendered inside Apps belong to the project. This keeps the tool usefu
|
|
|
191
191
|
with an empty ADS while making every implementation addressable once its scenario
|
|
192
192
|
exists.
|
|
193
193
|
|
|
194
|
+
### The foundation has a narrow styling role
|
|
195
|
+
|
|
196
|
+
Shared token sheets define values on the document root and its themes. The
|
|
197
|
+
import-only entry loads them in canonical order. `fonts.css` declares font faces;
|
|
198
|
+
`base.css` establishes shared native defaults and normalization. Components and
|
|
199
|
+
patterns own their layout, skin, states and animations in Linaria.
|
|
200
|
+
|
|
201
|
+
`base.css` has a closed contract with three roles: root/body typography, canvas
|
|
202
|
+
colors and theme behavior; limited native normalization; and global accessibility
|
|
203
|
+
through focus indicators and reduced-motion rules. Selector, property and value
|
|
204
|
+
checks reject component skins and layout even when they use native selectors and
|
|
205
|
+
valid tokens. A `button` background or `body` grid belongs to a Linaria owner.
|
|
206
|
+
Document defaults also cover shared text selection and document scrollbars;
|
|
207
|
+
local control/scroll-container styling stays with its owner.
|
|
208
|
+
|
|
209
|
+
Foundation CSS passes the ordinary token-reference and visual-value checks too.
|
|
210
|
+
Parsed selectors reject component hooks, local shared-token overrides and
|
|
211
|
+
contextual selectors, including hooks concealed in `:where()` or `:is()`. The
|
|
212
|
+
policy describes CSS roles and normalization keywords, with no project classes,
|
|
213
|
+
token catalogue or sample templates. Lower specificity cannot bypass ownership.
|
|
214
|
+
Static gates establish this source contract; browser review still checks its
|
|
215
|
+
actual effects and accessibility.
|
|
216
|
+
|
|
194
217
|
### A preview scenario is the unit of review
|
|
195
218
|
|
|
196
219
|
A component export alone may need inputs, parent context, local state or callbacks
|
|
@@ -199,10 +222,13 @@ real public implementation. It mounts independently, without opening a showcase
|
|
|
199
222
|
page or initializing the application's router, store or services first.
|
|
200
223
|
|
|
201
224
|
Scenarios and their fixtures live beside the tokens, component or pattern they exercise.
|
|
225
|
+
Demo framing belongs to public review/layout patterns; component props describe
|
|
226
|
+
intentional product behavior and visual variants.
|
|
202
227
|
Token scenarios choose real token names and sample inputs; a project-owned
|
|
203
228
|
review pattern applies the foundation variables. The tool contains no project
|
|
204
|
-
token list, sample templates or assumed visual identity.
|
|
205
|
-
scenario
|
|
229
|
+
token list, sample templates or assumed visual identity. Even an initial token
|
|
230
|
+
scenario uses a public project-owned review pattern to apply its declared samples;
|
|
231
|
+
a definitions-only inspector does not establish preview coverage.
|
|
206
232
|
Larger scenarios live under `composition/`. They use the same public screen
|
|
207
233
|
patterns as production: application adapters supply live data and effects;
|
|
208
234
|
scenario adapters supply fixture data, local state and simulated services.
|
|
@@ -222,7 +248,12 @@ After source changes, validation and compilation must both succeed before a new
|
|
|
222
248
|
graph becomes current. MCP announces build/resource updates. The built-in client
|
|
223
249
|
refreshes discovery and sends the current selection to the existing App, whose
|
|
224
250
|
loader mounts the new module graph. Failed builds retain the previous view with
|
|
225
|
-
visible stale diagnostics.
|
|
251
|
+
visible stale diagnostics. Invalid scenario metadata at startup and later source
|
|
252
|
+
failures stay in the watcher's recoverable diagnostic path. Fixing source triggers validation again.
|
|
253
|
+
If the compiler process exits, the next preview request starts one fresh child;
|
|
254
|
+
MCP inspection remains available. Each child generation has its own status report,
|
|
255
|
+
so independent MCP clients do not overwrite each other's build state.
|
|
256
|
+
Compilation remains necessary for TSX and Linaria;
|
|
226
257
|
there is one preview pipeline with automatic updates.
|
|
227
258
|
|
|
228
259
|
Scenario entries, adapters and fixtures are development source even when
|
|
@@ -274,9 +305,10 @@ remain in place for source changes made through other editors; preview review re
|
|
|
274
305
|
necessary after either editing path.
|
|
275
306
|
|
|
276
307
|
Required shared-entry bookkeeping can accompany its owner: component/pattern
|
|
277
|
-
re-exports
|
|
278
|
-
|
|
279
|
-
|
|
308
|
+
re-exports, canonical foundation imports for token files created or deleted, and
|
|
309
|
+
only that owner’s style-boundary entries in project configuration in the same
|
|
310
|
+
patch. ADS restricts these companion edits and validates the complete candidate
|
|
311
|
+
before writing, so coupled changes do not need a guard bypass.
|
|
280
312
|
|
|
281
313
|
The architecture makes that inspection practical. A public export has an owning
|
|
282
314
|
source and addressable preview coverage. Token definitions expose its visual
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
- Reject unused inline-style permissions and imperative property permissions.
|
|
6
|
+
Allow only the edited owner's boundary entries to accompany its source patch
|
|
7
|
+
atomically; preserve other settings and peer permissions.
|
|
8
|
+
- Keep directory unit ownership stable when removing an optional standalone
|
|
9
|
+
scenario; require actual coverage from remaining entries.
|
|
10
|
+
- Expose nonblocking pointer-capture cleanup advisories in CLI, MCP checks and
|
|
11
|
+
accepted mutations. Keep delegated cleanup and runtime correctness under review.
|
|
12
|
+
- Clarify demo framing, intentional product APIs and local asset fixtures in
|
|
13
|
+
diagnostics and skills; preserve component capabilities without demo-only props.
|
|
14
|
+
|
|
15
|
+
## 0.3.2
|
|
16
|
+
|
|
17
|
+
- Enforce foundation CSS roles, parsed selector boundaries, root-only shared token
|
|
18
|
+
assignments, token references and visual values. Keep native defaults in
|
|
19
|
+
`base.css`, definitions in value sheets and font-face metadata in `fonts.css`;
|
|
20
|
+
reject hidden owner styling, extra imports and animation/scoping escapes.
|
|
21
|
+
Close `base.css` to document defaults, limited normalization and global
|
|
22
|
+
accessibility; native selectors and valid tokens cannot hide component skins
|
|
23
|
+
or layout. Move the demo link hover styling into its TextLink owner.
|
|
24
|
+
- Keep scenario discovery and build failures recoverable in the watcher, including
|
|
25
|
+
invalid metadata at startup. Reattach replaced source-directory watches.
|
|
26
|
+
- Retry exited builders on the next preview request without reconnecting MCP;
|
|
27
|
+
reload changed compiler code through a fresh child and preserve inspection.
|
|
28
|
+
Isolate status reports per child session across concurrent MCP clients.
|
|
29
|
+
- Align the starter, example foundation and skills with the enforced boundaries.
|
|
30
|
+
|
|
3
31
|
## 0.3.1
|
|
4
32
|
|
|
5
33
|
- Stop generating redundant empty public exports. Allow an owning unit's public
|
package/docs/GUIDE.md
CHANGED
|
@@ -302,7 +302,7 @@ For iterative development, use the linking workflow above. From the repository r
|
|
|
302
302
|
npm install
|
|
303
303
|
npm run build
|
|
304
304
|
npm run pack:tool
|
|
305
|
-
ads_tool_package="$PWD/output/npm/reqvire-org-ads-0.3.
|
|
305
|
+
ads_tool_package="$PWD/output/npm/reqvire-org-ads-0.3.2.tgz"
|
|
306
306
|
```
|
|
307
307
|
|
|
308
308
|
Then change into an existing test project containing `package.json`:
|
|
@@ -497,6 +497,14 @@ import-only: fonts (when present), colors, typography, spacing, elevation, base.
|
|
|
497
497
|
Fixed artwork colors and geometry are permitted inside SVG assets; they do not
|
|
498
498
|
permit raw visual values in component or pattern styles.
|
|
499
499
|
|
|
500
|
+
Foundation sheets are checked source. Keep root token definitions in value sheets,
|
|
501
|
+
font faces in `fonts.css`, and closed-role defaults in `base.css` (document
|
|
502
|
+
typography/canvas/theme, limited native resets, global focus/reduced motion).
|
|
503
|
+
Owner hooks, contextual UI selectors, keyframes, extra CSS imports, raw visual
|
|
504
|
+
values and missing token references fail checks there too. Move component-specific
|
|
505
|
+
repairs into their Linaria owner; see the [foundation contract](ADS.md#shared-token-contract).
|
|
506
|
+
|
|
507
|
+
|
|
500
508
|
Select one SVG master with an ADS-relative path:
|
|
501
509
|
|
|
502
510
|
```json
|
|
@@ -681,6 +689,15 @@ Registered project configuration and build helpers may import one another;
|
|
|
681
689
|
this boundary is derived when lint configuration is generated. It does not
|
|
682
690
|
allow application code to import private ADS modules or build helpers to import
|
|
683
691
|
private UI implementation.
|
|
692
|
+
|
|
693
|
+
Unused `inlineStyleFiles` entries and `styleWrites` properties fail the core
|
|
694
|
+
`stale-style-boundary` check. Inline permissions recognize JSX, imported UI
|
|
695
|
+
factories and UI `CSSProperties` use; property permissions require an exact write
|
|
696
|
+
or removal, not a read. For MCP migrations, include the owner's source and only
|
|
697
|
+
its own exception entries through its `ds.config.json` companion. Preserve peer
|
|
698
|
+
permissions and other settings. A future filename can be valid configuration,
|
|
699
|
+
but the complete checked candidate must contain the matching use.
|
|
700
|
+
|
|
684
701
|
`inlineStyleFiles` should name only documented geometry/renderer boundaries,
|
|
685
702
|
not broad styling exceptions. Ignore `.ds/`; generated paths refer to the project
|
|
686
703
|
and its locally installed tool.
|
package/docs/MCP.md
CHANGED
|
@@ -209,6 +209,22 @@ imports for canonical files created/deleted in that patch. Preserve other import
|
|
|
209
209
|
and comments, retain the foundation entry, and follow the required import order.
|
|
210
210
|
Both files pass the same candidate checks before either is written.
|
|
211
211
|
|
|
212
|
+
Runtime owner manifests also list `ds.config.json` in `companionFiles`. An owner's
|
|
213
|
+
patch may update only its own `inlineStyleFiles` and `boundaries.styleWrites`
|
|
214
|
+
entries together with its source. All other settings and peer permissions must
|
|
215
|
+
remain unchanged. This supports atomic JSX-to-imperative geometry migrations,
|
|
216
|
+
new boundaries and removal of obsolete permissions without bypassing the gate.
|
|
217
|
+
Unused inline exceptions and properties never written fail `stale-style-boundary`;
|
|
218
|
+
configuration-first registration of an unused boundary therefore fails validation.
|
|
219
|
+
General policy, component customization hooks and compiler changes still use the
|
|
220
|
+
`configuration` unit.
|
|
221
|
+
|
|
222
|
+
A directory owner's runtime entry (`index` or a source file matching its directory
|
|
223
|
+
name) or colocated fixture keeps ownership stable without `Scenario.tsx`.
|
|
224
|
+
A redundant standalone scenario can be removed when other registered scenarios
|
|
225
|
+
still declare and actually render its public exports. Coverage requirements remain
|
|
226
|
+
in force; there is no metadata waiver for uncovered UI.
|
|
227
|
+
|
|
212
228
|
The same discovery covers the rest of the project ADS:
|
|
213
229
|
|
|
214
230
|
| Unit | Scope |
|
|
@@ -262,6 +278,13 @@ not an edit to live ADS source. Binary `ads_read_file` results return the digest
|
|
|
262
278
|
byte count without encoded content. Git verifies the original binary blob and
|
|
263
279
|
reconstructs the result inside the validation copy.
|
|
264
280
|
|
|
281
|
+
Resolve ownership diagnostics by preserving the required capability in its proper
|
|
282
|
+
layer. Demo-only sizing, borders and framing belong in a public review/layout
|
|
283
|
+
pattern; a component API addition needs a runtime use case. Measured imperative
|
|
284
|
+
geometry uses exact `styleWrites` properties. After migrating JSX inline geometry,
|
|
285
|
+
replace its own boundary entries in the same owner patch and check the final state.
|
|
286
|
+
After the gates pass, verify the behavior in a browser.
|
|
287
|
+
|
|
265
288
|
A small change needs only its hunk. A complete new component may include its
|
|
266
289
|
implementation, public re-export, scenario and fixture in the same unit patch,
|
|
267
290
|
so coverage is checked against a complete candidate. New units use a new
|
|
@@ -378,6 +401,13 @@ and unchanged styles/fonts are reused. External hosts may create a fresh App for
|
|
|
378
401
|
each tool call. Each fresh App loads independently through the same contract.
|
|
379
402
|
There is no special local direct-artifact rendering path.
|
|
380
403
|
|
|
404
|
+
`ads_check` returns blocking `diagnostics` separately from bounded nonblocking
|
|
405
|
+
`advisories`, with `advisoryCount`. The checks resource contains the full result.
|
|
406
|
+
For example, `pointer-capture-review` reports capture without a locally visible
|
|
407
|
+
capture-loss handler. Cleanup can be delegated; inspect it and test cancellation,
|
|
408
|
+
capture loss and teardown. A local handler suppresses that advisory but does not
|
|
409
|
+
prove correct behavior. Accepted mutations also return bounded advisories.
|
|
410
|
+
|
|
381
411
|
### Host boundary and compatibility
|
|
382
412
|
|
|
383
413
|
The showcase's packaged shell retains its own minimal CSS and navigation. It
|
|
@@ -498,11 +528,17 @@ success cache is republished in the new watcher session without recompilation;
|
|
|
498
528
|
merely finding an older HTML file is insufficient. A timeout leaves the watcher running: inspect the
|
|
499
529
|
logs and invoke the preview again. `ads_status` distinguishes watcher process
|
|
500
530
|
state from reported build state. Token inspection and other ordinary tools
|
|
501
|
-
remain available after a build failure.
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
531
|
+
remain available after a build failure. Invalid scenario metadata at startup and
|
|
532
|
+
later source/validation failures remain reported while the compiler watches for
|
|
533
|
+
repairs. A successful edit recovers without reconnecting MCP. If the child process
|
|
534
|
+
exits, fix the builder and invoke the preview again: concurrent requests share one
|
|
535
|
+
fresh child and session. ADS does not run an unattended crash/restart loop.
|
|
536
|
+
|
|
537
|
+
Changes to loaded compiler code or dependencies produce `ADS_PREVIEW_RESTART`;
|
|
538
|
+
the next preview invocation restarts only the builder and validates current inputs.
|
|
539
|
+
Managed configuration changes replace the compiler through the same supervisor.
|
|
540
|
+
Updating ADS server code itself still requires reconnecting the MCP client to load
|
|
541
|
+
the new package. Normal component, fixture and style edits remain automatic.
|
|
506
542
|
|
|
507
543
|
ADS stops the managed watcher and its compiler subprocesses when stdin closes or
|
|
508
544
|
it receives SIGINT/SIGTERM. The project must keep its watcher in the foreground,
|
|
@@ -529,7 +565,10 @@ No ADS package release or skill reinstall is needed for project component change
|
|
|
529
565
|
### When code or styles break
|
|
530
566
|
|
|
531
567
|
A preview publisher reports `building`, `ready` or `error` to
|
|
532
|
-
`.ds/build-status.json
|
|
568
|
+
`.ds/build-status.json` for standalone builds. A managed compiler receives its own
|
|
569
|
+
`.ds/build-status-<session>.json` through `ADS_MCP_BUILD_STATUS`; publishers must
|
|
570
|
+
honor that path and `ADS_MCP_BUILD_SESSION`. Independent MCP clients therefore do
|
|
571
|
+
not clobber each other's reports. `ads_status.build` and the `ads://project/build` resource
|
|
533
572
|
expose those states, each preview's build revision, last successful revision,
|
|
534
573
|
availability, freshness and diagnostics. Diagnostic positions are one-based.
|
|
535
574
|
Tool summaries include the first three diagnostics per preview, capped at 1,000
|
|
@@ -553,7 +592,9 @@ failed build even when older output remains on disk. The reusable bootstrap and
|
|
|
553
592
|
retained immutable assets stay readable so an existing App can report freshness;
|
|
554
593
|
readability alone does not establish a current preview. After a successful rebuild the same
|
|
555
594
|
tool works again without restarting MCP. If the watcher itself exits, its
|
|
556
|
-
failure is reported
|
|
595
|
+
failure is reported; after fixing the command, invoke the preview again to start
|
|
596
|
+
a fresh builder. Partial or empty scenario discovery also exposes project-level
|
|
597
|
+
diagnostics through `ads://project/build`.
|
|
557
598
|
|
|
558
599
|
Already-mounted Apps show rebuilding, failure or a newer available revision
|
|
559
600
|
when the host permits server resource reads. They check build status every two
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A design system your agent can see and shape. Your components. Your look. Your code.",
|
|
6
6
|
"repository": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@modelcontextprotocol/server": "2.3.1",
|
|
53
53
|
"postcss": "^8.5.30",
|
|
54
|
+
"postcss-selector-parser": "^7.1.6",
|
|
54
55
|
"postcss-value-parser": "^4.2.0",
|
|
55
56
|
"sharp": "^0.35.5",
|
|
56
57
|
"typescript": "^5.9.3",
|