@reqvire-org/ads 0.3.3 → 0.3.6
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 +17 -5
- package/dist/behaviors.mjs +157 -0
- package/dist/bootstrap-ds/ADS.md +16 -3
- package/dist/bootstrap-ds/README.md +10 -0
- package/dist/bootstrap-ds/design-system/controllers/.gitkeep +0 -0
- package/dist/boundaries.mjs +3 -0
- package/dist/check.mjs +20 -2
- package/dist/cli.mjs +17 -0
- package/dist/config.mjs +23 -3
- package/dist/css-values.mjs +26 -0
- package/dist/index.mjs +2 -0
- package/dist/init.mjs +1 -1
- package/dist/mcp/build-status.mjs +17 -7
- package/dist/mcp/catalog.mjs +11 -8
- package/dist/mcp/context.mjs +3 -3
- package/dist/mcp/edit-preparation.mjs +111 -0
- package/dist/mcp/mutations.mjs +64 -38
- package/dist/mcp/preview-owner-guard.mjs +29 -0
- package/dist/mcp/preview-watch.mjs +38 -8
- package/dist/mcp/preview-widget.bundle.js +2 -2
- package/dist/mcp/prompts.mjs +2 -2
- package/dist/mcp/server.mjs +88 -41
- package/dist/mcp/showcase-host.mjs +9 -5
- package/dist/mcp/text-diff.mjs +19 -0
- package/dist/preview-resources.mjs +45 -8
- package/dist/preview-scope.mjs +30 -0
- package/dist/public-api.mjs +39 -0
- package/dist/scenarios-compiler.mjs +41 -19
- package/dist/scenarios.mjs +72 -42
- package/dist/scoped-tokens.mjs +57 -0
- package/dist/skills/README.md +3 -3
- package/dist/skills/ads-break-ui/SKILL.md +26 -2
- package/dist/skills/ads-break-ui/references/guarded-editing.md +44 -0
- package/dist/skills/ads-break-ui/references/verification.md +6 -0
- package/dist/skills/ads-designer/SKILL.md +27 -3
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +16 -3
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +10 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/controllers/.gitkeep +0 -0
- package/dist/skills/ads-designer/references/cli.md +1 -1
- package/dist/skills/ads-designer/references/design-craft.md +1 -1
- package/dist/skills/ads-designer/references/guarded-editing.md +44 -0
- package/dist/skills/ads-import/SKILL.md +26 -2
- package/dist/skills/ads-import/references/cli.md +1 -1
- package/dist/skills/ads-import/references/guarded-editing.md +44 -0
- package/dist/skills/ads-import/references/tokens.md +4 -2
- package/dist/skills/{ads-assimilate → ads-migrate}/SKILL.md +32 -8
- package/dist/skills/ads-migrate/agents/openai.yaml +4 -0
- package/dist/skills/{ads-assimilate → ads-migrate}/references/cli.md +1 -1
- package/dist/skills/ads-migrate/references/guarded-editing.md +44 -0
- package/dist/skills/{ads-assimilate → ads-migrate}/references/native-implementation.md +11 -0
- package/dist/skills/ads-motion/SKILL.md +26 -2
- package/dist/skills/ads-motion/references/guarded-editing.md +44 -0
- package/dist/token-fixtures.mjs +30 -0
- package/dist/tokens.mjs +11 -4
- package/dist/units.mjs +35 -9
- package/dist/verification/browser.mjs +27 -0
- package/dist/verification/playwright-reporter.cjs +20 -0
- package/dist/verification.mjs +214 -0
- package/docs/ADS.md +72 -4
- package/docs/ARCHITECTURE.md +60 -1
- package/docs/BEHAVIORS.md +241 -0
- package/docs/CHANGELOG.md +56 -0
- package/docs/GUIDE.md +24 -4
- package/docs/MCP.md +106 -12
- package/package.json +4 -2
- package/dist/skills/ads-assimilate/agents/openai.yaml +0 -4
- /package/dist/skills/{ads-assimilate → ads-migrate}/references/lint-and-docs.md +0 -0
- /package/dist/skills/{ads-assimilate → ads-migrate}/references/testing.md +0 -0
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -149,6 +149,33 @@ preserving compatible consumer APIs. Markup, accessibility, events, layout, and
|
|
|
149
149
|
motion still need verification when an implementation changes. Imported or
|
|
150
150
|
adapted source carries its credits and applicable notices in its local guide.
|
|
151
151
|
|
|
152
|
+
## Controllers own reusable behavior
|
|
153
|
+
|
|
154
|
+
A private controller stays beside its component or pattern. Shared behavior uses
|
|
155
|
+
`controllers/<Name>/` as an independent edit owner. Controllers may be plain
|
|
156
|
+
functions/classes, framework hooks or context providers; sharing code does not
|
|
157
|
+
implicitly share instances. Use the configured framework and declared project
|
|
158
|
+
dependencies, with no runtime supplied by the MCP host. Shared controllers do not
|
|
159
|
+
import styled consumers or introduce another skin layer. Existing measurement and
|
|
160
|
+
style-write boundaries still apply.
|
|
161
|
+
|
|
162
|
+
Optional owner-local `behavior.json` contracts identify public APIs or private
|
|
163
|
+
source/symbols, named guarantees and registered execution checks. Scenario
|
|
164
|
+
`exercises` links public behavior APIs to reachable demonstrations; `covers`
|
|
165
|
+
continues to describe rendered public UI. Controllers need no artificial standalone
|
|
166
|
+
visual scenario. Static registration is separate from current passing evidence.
|
|
167
|
+
|
|
168
|
+
Manifests, checks, scenarios and fixtures are development inputs; production
|
|
169
|
+
imports only actual components/controllers and their styles. Browser checks can
|
|
170
|
+
exercise the real MCP App. React development StrictMode uses a project development
|
|
171
|
+
harness, since production previews do not replay those effects. The
|
|
172
|
+
[behavior contract](BEHAVIORS.md) defines profiles, execution and evidence freshness.
|
|
173
|
+
|
|
174
|
+
The normal compiled import graph delivers controller dependencies through MCP
|
|
175
|
+
resources. There is no eager global controller registry. ESM splitting and selected
|
|
176
|
+
asset loading remain in place; tree shaking depends on actual imports, exports and
|
|
177
|
+
side effects, rather than the controller directory name.
|
|
178
|
+
|
|
152
179
|
## The showcase is the shared design workspace
|
|
153
180
|
|
|
154
181
|
Humans and coding agents inspect the same project through MCP. The showcase is
|
|
@@ -178,6 +205,13 @@ scenarios unmounts the previous view while keeping unchanged dependencies cached
|
|
|
178
205
|
Persistence is a host lifecycle choice; a new external widget loads the same
|
|
179
206
|
resources independently. Resource sharing is scoped to an App instance.
|
|
180
207
|
|
|
208
|
+
Managed graph builders publish into a private session directory beside the
|
|
209
|
+
configured manifest. Logical scenario IDs and resource URIs stay unchanged;
|
|
210
|
+
standalone builds retain the configured output and cannot overwrite a live
|
|
211
|
+
session's success record. Verified compiled snapshots form a bounded shared
|
|
212
|
+
warm-start cache. Source, compiler, dependency and output hashes still gate reuse.
|
|
213
|
+
Ordinary shutdown removes owned session output while retaining that cache.
|
|
214
|
+
|
|
181
215
|
```mermaid
|
|
182
216
|
flowchart LR
|
|
183
217
|
Host[Minimal host: navigation and MCP client] --> Proxy[Separate-origin sandbox proxy]
|
|
@@ -289,11 +323,22 @@ Bounded tools establish what exists; explicit resource reads provide detail.
|
|
|
289
323
|
Prompts and packaged skills explain how to reason through Data, UX and Skin and
|
|
290
324
|
how to inspect the real implementation before changing it.
|
|
291
325
|
|
|
326
|
+
The MCP runtime owns its browser hosts and preview builder lifetime. Closing the
|
|
327
|
+
client connection releases them together; a separate ownership guard can stop
|
|
328
|
+
detached builders after abrupt owner death. A preview process must not outlive
|
|
329
|
+
its owner and continue publishing stale output.
|
|
330
|
+
Build reports expose queued, validation, compilation and publication progress.
|
|
331
|
+
A timed-out preview request marks the builder stalled; the next explicit request
|
|
332
|
+
restarts it within the same MCP session. A running process alone is not freshness.
|
|
333
|
+
|
|
292
334
|
Opt-in MCP editing makes validation part of the write operation. The agent sends
|
|
293
335
|
a Git unified diff for one logical ADS unit: its implementation and owned preview
|
|
294
336
|
context, or the shared token foundation. ADS resolves file ownership, reconstructs
|
|
295
337
|
candidate files locally and validates a temporary project copy with architecture
|
|
296
|
-
checks, registered lint rules and project validation scripts.
|
|
338
|
+
checks, registered lint rules and project validation scripts. Affected registered
|
|
339
|
+
behavior checks, including consumers of a changed shared controller, also run in
|
|
340
|
+
the isolated candidate project. Passing checks describe
|
|
341
|
+
their registered assertions, not every natural-language claim. This keeps edits
|
|
297
342
|
focused without requiring entire file bodies in model context. Peer units and
|
|
298
343
|
unrelated owners remain outside the selected unit's edit boundary. Shared foundation,
|
|
299
344
|
branding and guides have their own units. Project configuration, registered guards
|
|
@@ -304,6 +349,13 @@ replace the managed process while retaining the MCP connection. Normal build gat
|
|
|
304
349
|
remain in place for source changes made through other editors; preview review remains
|
|
305
350
|
necessary after either editing path.
|
|
306
351
|
|
|
352
|
+
For genuinely coupled changes, a bounded transaction accepts one Git patch per
|
|
353
|
+
distinct owner and validates a single complete candidate before publication.
|
|
354
|
+
Each patch retains its ownership and companion rules. Local owner drafts remove
|
|
355
|
+
the need for a separate project mirror; token-sample reconciliation preserves
|
|
356
|
+
project bindings and reports unresolved mappings. Neither preparation changes live
|
|
357
|
+
source or substitutes for guarded application and rendered review.
|
|
358
|
+
|
|
307
359
|
Required shared-entry bookkeeping can accompany its owner: component/pattern
|
|
308
360
|
re-exports, canonical foundation imports for token files created or deleted, and
|
|
309
361
|
only that owner’s style-boundary entries in project configuration in the same
|
|
@@ -353,3 +405,10 @@ review pattern. The App then verifies rendered samples in the actual browser by
|
|
|
353
405
|
probing those bindings and restoring them. The tool supplies no token/property
|
|
354
406
|
classification or visual sample palette. A source build alone is not a rendered
|
|
355
407
|
verification, and the browser check does not judge design quality.
|
|
408
|
+
|
|
409
|
+
An optional owner-local token namespace keeps component/pattern constants beside
|
|
410
|
+
their consumer. Its definition-only stylesheet contains root/theme custom
|
|
411
|
+
properties and is imported by the runtime owner; UI styling remains in Linaria.
|
|
412
|
+
Namespaces, aliases, ownership and actual colocated sample coverage are checked.
|
|
413
|
+
The shared foundation remains the cross-owner vocabulary. See the
|
|
414
|
+
[owner-token contract](ADS.md#owner-local-tokens).
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Controllers and behavioral verification
|
|
2
|
+
|
|
3
|
+
Controllers own reusable UI behavior: state, subscriptions, DOM measurements and
|
|
4
|
+
lifecycle coordination. A controller may be a class, function, hook, state
|
|
5
|
+
machine or context provider. Linaria and tokens own its consumers' visual design.
|
|
6
|
+
|
|
7
|
+
Private controllers stay inside their component/pattern mutation unit. Shared
|
|
8
|
+
controllers use `design-system/controllers/<Name>/` with an `index` entry or a
|
|
9
|
+
runtime file matching the directory name. The unit ID is `controllers/<Name>`.
|
|
10
|
+
Its implementation, tests and guides can change together, including only its own
|
|
11
|
+
required public re-exports. A shared controller needs no artificial visual preview.
|
|
12
|
+
Consumers normally create separate instances; sharing implementation does not
|
|
13
|
+
implicitly share state.
|
|
14
|
+
|
|
15
|
+
Use the project's `framework` from `ds.config.json` for framework-specific APIs.
|
|
16
|
+
Plain TypeScript, browser APIs and local behavior helpers remain supported.
|
|
17
|
+
Declare external dependencies in the project package. ADS does not install them
|
|
18
|
+
or assume a renderer/library supplied by an MCP host. The framework field selects
|
|
19
|
+
compilation/mounting; controller checks also validate runtime imports. Type-only
|
|
20
|
+
UI references are allowed, but shared controllers cannot import component/pattern
|
|
21
|
+
runtime implementations. Keep business data in application adapters. Measured
|
|
22
|
+
style writes retain exact `boundaries.styleWrites` properties; they do not allow
|
|
23
|
+
shared-token overrides or an extra styling layer.
|
|
24
|
+
These gates inspect supported direct imports, markup and style boundaries.
|
|
25
|
+
External package internals and delegated DOM behavior still require source,
|
|
26
|
+
build and browser review; declaring a dependency does not prove it is headless.
|
|
27
|
+
|
|
28
|
+
## Development boundary
|
|
29
|
+
|
|
30
|
+
Production includes real components, controllers, tokens and compiled styles.
|
|
31
|
+
Scenarios and fixtures are included only in previews. Behavior manifests and test
|
|
32
|
+
files are development/tooling inputs. Runtime imports and public re-exports of
|
|
33
|
+
those inputs are rejected, including dynamic imports and aliases.
|
|
34
|
+
|
|
35
|
+
## Register guarantees
|
|
36
|
+
|
|
37
|
+
An optional `behavior.json` belongs to one directory unit. Flat units use
|
|
38
|
+
`<Owner>.behavior.json`. Existing projects without manifests remain valid and have
|
|
39
|
+
no implied behavioral verification. A manifest is declarative and contains no
|
|
40
|
+
executable command:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"schemaVersion": 1,
|
|
45
|
+
"subjects": {
|
|
46
|
+
"controller": { "source": "./scroller-controller.ts", "symbol": "ScrollerController" },
|
|
47
|
+
"scroll-api": { "api": "useMessageScroller" }
|
|
48
|
+
},
|
|
49
|
+
"guarantees": [
|
|
50
|
+
{
|
|
51
|
+
"id": "prepend-anchor",
|
|
52
|
+
"description": "Prepending history preserves the visible anchor after layout settles.",
|
|
53
|
+
"subjects": ["controller", "scroll-api"],
|
|
54
|
+
"checks": ["prepend-anchor"]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"checks": {
|
|
58
|
+
"prepend-anchor": {
|
|
59
|
+
"file": "./behavior.spec.ts",
|
|
60
|
+
"case": "prepend-anchor",
|
|
61
|
+
"scenario": "components/MessageScroller",
|
|
62
|
+
"profile": "widget"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Names above are illustrative project choices. A subject identifies a public export
|
|
69
|
+
through `api`, or an owner-local implementation `source` with an optional top-level
|
|
70
|
+
`symbol`. Private subjects do not become public API. A guarantee references known
|
|
71
|
+
subjects and checks. Each check names an owner-local test/spec file, stable case
|
|
72
|
+
ID, registered profile and optional discovered scenario. Several guarantees may
|
|
73
|
+
reference one check. Repeated execution identities use the same check ID.
|
|
74
|
+
|
|
75
|
+
Static validation establishes registration and ownership, not that the guarantee
|
|
76
|
+
is true. README prose is not automatically certified. Link specific guarantees
|
|
77
|
+
when describing the evidence available for a behavior.
|
|
78
|
+
|
|
79
|
+
## Link a public API to a demonstration
|
|
80
|
+
|
|
81
|
+
Scenario `covers` retains its existing render-reference contract. Optional
|
|
82
|
+
`exercises` identifies public behavioral APIs:
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
export const scenario = {
|
|
86
|
+
title: "Message scrolling",
|
|
87
|
+
covers: ["MessageScroller", "MessageScrollerViewport"],
|
|
88
|
+
exercises: ["useMessageScroller", "useMessageScrollerScrollable"],
|
|
89
|
+
};
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Call hooks in a rendered local scenario adapter. Calls/construction are matched by
|
|
93
|
+
resolved symbol, not a `use*` naming convention. An unused import, dead adapter or
|
|
94
|
+
metadata string does not count. Dynamically passed behavior references produce a
|
|
95
|
+
review advisory when a direct call cannot be established; verify those through
|
|
96
|
+
registered execution checks rather than changing the API for the analyzer.
|
|
97
|
+
|
|
98
|
+
Public APIs appear in `ads_catalog` with `apiKind: "ui"` or `"behavior"` and their
|
|
99
|
+
scenario links. `ads_behaviors` joins contracts to demonstrations and evidence.
|
|
100
|
+
A demonstrated API is not automatically a verified guarantee.
|
|
101
|
+
|
|
102
|
+
## Register execution profiles
|
|
103
|
+
|
|
104
|
+
Profiles are explicit trusted development commands in `ds.config.json`. They use
|
|
105
|
+
literal executable/argument arrays, no shell interpolation or model-supplied
|
|
106
|
+
command. For a project with an installed Playwright test runner:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"mcp": {
|
|
111
|
+
"behaviorProfiles": {
|
|
112
|
+
"widget": {
|
|
113
|
+
"runner": "playwright",
|
|
114
|
+
"command": "npm",
|
|
115
|
+
"args": ["run", "test:behavior", "--"],
|
|
116
|
+
"mode": "browser",
|
|
117
|
+
"timeoutMs": 60000
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Here `test:behavior` invokes the project's local `playwright test`. Its Playwright
|
|
125
|
+
configuration must discover colocated spec files. Configure browser installation
|
|
126
|
+
and any required test setup in that project. The ADS tooling host gains no
|
|
127
|
+
framework or browser dependency from a profile.
|
|
128
|
+
|
|
129
|
+
The Playwright adapter appends selected file paths, its reporter and a generated
|
|
130
|
+
artifact directory. Use native test tags for stable case identity:
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
import { test, expect } from "@playwright/test";
|
|
134
|
+
import { openBehaviorScenario } from "@reqvire-org/ads/verification";
|
|
135
|
+
|
|
136
|
+
test("history preserves the visible anchor", { tag: "@ads:prepend-anchor" }, async ({ page }) => {
|
|
137
|
+
const frame = await openBehaviorScenario(page, "prepend-anchor");
|
|
138
|
+
// Perform real interactions and assert the project's guarantee here.
|
|
139
|
+
await expect(frame.getByRole("region", { name: "Messages" })).toBeVisible();
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The shown assertion is only a harness example; it does not establish anchoring.
|
|
144
|
+
Write meaningful assertions for the registered guarantee. The helper waits for
|
|
145
|
+
the current selected scenario inside the real sandboxed MCP App. It uses `load`
|
|
146
|
+
and explicit readiness, not `networkidle`: MCP keeps event connections open.
|
|
147
|
+
|
|
148
|
+
Compare reference and candidate under equivalent framing. In a reported Chrome
|
|
149
|
+
comparison, `content-visibility` initially used placeholder geometry inside a
|
|
150
|
+
cross-origin App iframe for both ADS and the upstream reference; the same content
|
|
151
|
+
measured differently as a top-level page. This is an observed browser/layout
|
|
152
|
+
condition, not evidence of an ADS defect. App readiness does not imply that every
|
|
153
|
+
off-screen item has rendered. For geometry assertions, bring the relevant content
|
|
154
|
+
into view and wait for its measured layout to settle. Record the framing and
|
|
155
|
+
visibility state; test initial placeholder behavior separately when it matters to
|
|
156
|
+
the guarantee. Wait for focus and positioning readiness before normal keyboard
|
|
157
|
+
comparisons, and test rapid input separately rather than hiding it behind delays.
|
|
158
|
+
|
|
159
|
+
`mode: "browser"` starts an isolated managed showcase on an automatic port. Test
|
|
160
|
+
requests contain its scenario URLs, and cleanup closes its host/compiler tree.
|
|
161
|
+
Mutation candidates use their own source, generated graph and server; a passing
|
|
162
|
+
test against an older fixed-port live showcase cannot validate a candidate.
|
|
163
|
+
|
|
164
|
+
Use `mode: "strict"` only for React with a project development harness that mounts
|
|
165
|
+
the relevant API in StrictMode. The production MCP App does not replay development
|
|
166
|
+
effects. This profile does not receive a production showcase URL from the helper.
|
|
167
|
+
For Preact, register its actual lifecycle tests without claiming React StrictMode.
|
|
168
|
+
The profile names record the chosen environment; ADS does not infer that a test's
|
|
169
|
+
assertions cover every lifecycle condition.
|
|
170
|
+
|
|
171
|
+
Other runners use `runner: "protocol"` (the default). ADS provides
|
|
172
|
+
`ADS_VERIFY_REQUEST` and `ADS_VERIFY_REPORT` absolute paths. Read the request's
|
|
173
|
+
`schemaVersion`, unique `runId`, `projectRoot`, `framework`, `profile`, `mode`,
|
|
174
|
+
selected `checks` and optional `scenarios` URLs. Write a bounded JSON report:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"schemaVersion": 1,
|
|
179
|
+
"runId": "<the request's runId>",
|
|
180
|
+
"cases": [
|
|
181
|
+
{
|
|
182
|
+
"id": "prepend-anchor",
|
|
183
|
+
"file": "design-system/components/MessageScroller/behavior.spec.ts",
|
|
184
|
+
"status": "passed"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Case statuses are `passed`, `failed` or `skipped`, with optional `message`.
|
|
191
|
+
`file` is project-relative. Nonzero process exit, missing cases, skipped cases,
|
|
192
|
+
wrong run IDs and unavailable reports do not pass. Test commands are trusted
|
|
193
|
+
project code; an adapter cannot prove the quality or honesty of their assertions.
|
|
194
|
+
|
|
195
|
+
## Execute and inspect evidence
|
|
196
|
+
|
|
197
|
+
Use `ads_behaviors` for bounded discovery; request an exact unit for its contract.
|
|
198
|
+
General listings return counts and short API/guarantee/scenario summaries. Exact
|
|
199
|
+
owner requests return the registered details; source reads remain available for
|
|
200
|
+
bounded inspection of large contracts. No full guide or test body is injected
|
|
201
|
+
into discovery results.
|
|
202
|
+
Call `ads_verify({unit, checks?})` for selected registered checks. Read
|
|
203
|
+
`ads://project/behaviors` for current evidence or `ads://guides/behaviors` for this
|
|
204
|
+
guide. CLI/CI equivalents are:
|
|
205
|
+
|
|
206
|
+
```sh
|
|
207
|
+
ads behaviors . --json
|
|
208
|
+
ads verify . --unit controllers/ScrollFollow
|
|
209
|
+
ads verify . --unit components/MessageScroller --check prepend-anchor --json
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Execution has bounded output, a configured timeout, cancellation and process-tree
|
|
213
|
+
ownership. Evidence records case/profile identity, source/dependency revision,
|
|
214
|
+
completion time, report path and the available preview revision. Later input
|
|
215
|
+
changes mark results stale; changes during execution prevent a current pass.
|
|
216
|
+
Guarantees report passing only when all their checks have current passing evidence.
|
|
217
|
+
Passing applies to those cases and profiles, not every application state.
|
|
218
|
+
|
|
219
|
+
Revisions include owned files, literal import dependencies, local CSS imports and
|
|
220
|
+
asset URLs, token foundation, project/runner configuration, lockfiles and tooling.
|
|
221
|
+
Computed module selection conservatively includes all ADS owners. Environment,
|
|
222
|
+
network and other unregistered external inputs remain the runner's responsibility;
|
|
223
|
+
an evidence record is not a proof about arbitrary external state.
|
|
224
|
+
|
|
225
|
+
Guarded mutations execute affected registered behavior contracts after core,
|
|
226
|
+
Oxlint and configured project checks, before writing source. Imported shared
|
|
227
|
+
controller changes also select dependent contracts conservatively. Rejected and
|
|
228
|
+
dry-run patches publish no source changes. Verification output stays under `.ds/`.
|
|
229
|
+
|
|
230
|
+
## Packaging and performance
|
|
231
|
+
|
|
232
|
+
Controllers follow normal component/scenario imports into the project's compiled
|
|
233
|
+
resource graph. Their framework dependencies are bundled by the project compiler
|
|
234
|
+
and served through MCP resources inside the App iframe; external hosts install
|
|
235
|
+
nothing. The selected scenario loads its dependency closure. Shared modules are
|
|
236
|
+
cached within that App instance, and each separately opened App has its own runtime.
|
|
237
|
+
|
|
238
|
+
Keep ESM modules and explicit imports. Avoid an eagerly imported controller
|
|
239
|
+
registry. Tree shaking and shared chunks follow the project bundler: class methods,
|
|
240
|
+
side effects, global CSS and dynamic maps can retain extra code. Inspect emitted
|
|
241
|
+
resources instead of assuming a controller produces a minimal bundle.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.3.6
|
|
6
|
+
|
|
7
|
+
- Isolate managed resource-graph output by session; reuse verified compiled
|
|
8
|
+
snapshots across warm starts without letting standalone builds overwrite live
|
|
9
|
+
preview success records.
|
|
10
|
+
- Add component/pattern-owned token namespaces, closed definition-only sheets,
|
|
11
|
+
discovery, alias/ownership checks and real colocated token-preview coverage.
|
|
12
|
+
- Add owner draft/diff preparation and project-directed token sample reconciliation.
|
|
13
|
+
Keep all source writes behind guarded Git patches.
|
|
14
|
+
- Add bounded coupled-owner transactions, validating all guards, registered checks
|
|
15
|
+
and affected behavior checks against the final candidate before publication.
|
|
16
|
+
- Permit empty .gitkeep deletion alongside real new owner source. Retain hidden
|
|
17
|
+
file restrictions, render coverage and public scenario-control ownership.
|
|
18
|
+
- Document framed content-visibility geometry as a browser comparison condition,
|
|
19
|
+
with observable layout/focus readiness and separate rapid-input checks.
|
|
20
|
+
|
|
21
|
+
- Use MCP display titles throughout the diagnostic explorer, with annotation-title
|
|
22
|
+
and tool-name fallbacks. Publish configured App titles in tool metadata and keep
|
|
23
|
+
machine-readable names for protocol calls.
|
|
24
|
+
|
|
25
|
+
## 0.3.5
|
|
26
|
+
|
|
27
|
+
- Bound preview-watch test teardown, publish selection requests atomically and
|
|
28
|
+
wait for the changed preview output before checking revision/queue order.
|
|
29
|
+
Cap the release test stage so failed cleanup cannot hold publication indefinitely.
|
|
30
|
+
|
|
31
|
+
- Stabilize the development StrictMode browser harness across dependency-optimizer
|
|
32
|
+
reloads. Verify the broken controller fails its cleanup assertion and the
|
|
33
|
+
repaired controller passes. Version 0.3.4 was not published after CI caught the
|
|
34
|
+
harness navigation race.
|
|
35
|
+
|
|
36
|
+
- Add shared controller units, framework/dependency and headless ownership checks,
|
|
37
|
+
while retaining private controllers in their consumers' units.
|
|
38
|
+
- Add optional owner-local behavior contracts, scenario `exercises`, public hook
|
|
39
|
+
discovery, `ads_behaviors`/`ads_verify`, revision-bound results and subscribed
|
|
40
|
+
evidence resources. Guarded edits run affected registered checks in candidates.
|
|
41
|
+
- Add registered protocol/Playwright execution profiles with cancellation,
|
|
42
|
+
process-tree cleanup, real sandboxed-App checks and development StrictMode
|
|
43
|
+
harness guidance. Keep behavior metadata/tests outside production imports.
|
|
44
|
+
- Rename the external-library adaptation workflow and MCP prompt to `ads-migrate`;
|
|
45
|
+
retain `ads-import` for ADS-compatible source and token transfers.
|
|
46
|
+
- Expose compiler progress phases and restart a timed-out builder on the next
|
|
47
|
+
explicit preview request without requiring an MCP reconnect.
|
|
48
|
+
|
|
49
|
+
- Close the raw `ch` sizing gap across absolute/font-relative CSS length units,
|
|
50
|
+
nested calculations and numeric notation. Share unit categories with dimension
|
|
51
|
+
token validation; keep structural angles and responsive geometry available.
|
|
52
|
+
Preserve the demo's text measures in owned tokens with preview coverage.
|
|
53
|
+
|
|
54
|
+
- Close the whole MCP runtime on stdio wire closure, including broken output,
|
|
55
|
+
and stop browser sockets, subscriptions and preview processes together.
|
|
56
|
+
- Add an independent preview ownership guard so abrupt MCP process or process-group
|
|
57
|
+
death also terminates detached builders and their descendants.
|
|
58
|
+
|
|
3
59
|
## 0.3.3
|
|
4
60
|
|
|
5
61
|
- Reject unused inline-style permissions and imperative property permissions.
|
package/docs/GUIDE.md
CHANGED
|
@@ -29,6 +29,20 @@ template strings and Shadow DOM style constructs lack equivalent coverage.
|
|
|
29
29
|
Retain framework-specific checks; a clean ADS check does not validate those
|
|
30
30
|
unchecked surfaces.
|
|
31
31
|
|
|
32
|
+
### Controllers and behavior checks
|
|
33
|
+
|
|
34
|
+
Keep private controllers with their consumer; share reusable behavior through
|
|
35
|
+
`design-system/controllers/<Name>/`. Use the configured framework and declared
|
|
36
|
+
project dependencies. Controllers own lifecycle/measurements while components and
|
|
37
|
+
patterns own presentation. A shared context provider is a behavioral API too.
|
|
38
|
+
|
|
39
|
+
Optional owner-local `behavior.json` registers guarantees and maintained checks.
|
|
40
|
+
Scenario `exercises` records demonstrations separately from rendered `covers`.
|
|
41
|
+
Use `ads behaviors --json` for discovery and `ads verify --unit <discovered-id>`
|
|
42
|
+
to run registered cases; MCP exposes `ads_behaviors` and `ads_verify`. Tests and
|
|
43
|
+
contracts stay outside production exports. See the [complete schema and runner
|
|
44
|
+
integration](BEHAVIORS.md), including browser and React development StrictMode profiles.
|
|
45
|
+
|
|
32
46
|
### Linaria integration
|
|
33
47
|
|
|
34
48
|
Before authoring components or patterns, integrate Linaria extraction with the
|
|
@@ -350,7 +364,11 @@ for edits made by other tools.
|
|
|
350
364
|
categories, undefined aliases, alias cycles, and individual theme/media
|
|
351
365
|
overrides. Project-specific values and additional definitions within ADS's fixed
|
|
352
366
|
naming contract are allowed. The contract's `naming` section lists the fixed
|
|
353
|
-
shared families and names; projects cannot
|
|
367
|
+
shared families and names; projects cannot rename those shared semantics.
|
|
368
|
+
Component/pattern constants can use an explicit unique owner-local namespace and
|
|
369
|
+
definition-only stylesheet, with the same real-token preview completeness rules.
|
|
370
|
+
See [owner-local tokens](ADS.md#owner-local-tokens). Unregistered foreign names
|
|
371
|
+
remain rejected.
|
|
354
372
|
`--ds-*`, `--ux-*`, and `--showcase-*` variables remain owned by their layers,
|
|
355
373
|
including when a file is inside `tokens/`. Shared token assignments outside
|
|
356
374
|
`tokens/` fail. Source styles also check shared references for undeclared names.
|
|
@@ -484,8 +502,9 @@ in owned component/pattern styles, with tokens supplying visual values.
|
|
|
484
502
|
|
|
485
503
|
ADS has fixed token names and ownership namespaces. Change values in the existing
|
|
486
504
|
token files; `--accent`, `--font-sans`, `--radius-md`, and the other shared roles
|
|
487
|
-
keep their meanings across projects. Foreign prefixes such as `--nuv-*` or
|
|
488
|
-
`--brand-*` fail
|
|
505
|
+
keep their meanings across projects. Foreign shared prefixes such as `--nuv-*` or
|
|
506
|
+
`--brand-*` fail; a registered owner-local constant namespace is separate from
|
|
507
|
+
the shared branding vocabulary. Components own `--ds-*`, patterns own `--ux-*`, and the showcase
|
|
489
508
|
reserves `--showcase-*` for showcase boundaries. Fixture files still define no
|
|
490
509
|
custom styling; the frame pattern uses `--ux-*`. Branding never assigns
|
|
491
510
|
component state variables.
|
|
@@ -558,6 +577,7 @@ Application manifest metadata and other platform exports remain project-owned.
|
|
|
558
577
|
| Asset ownership | ADS/public mount collisions, configured generated assets in source, and tracked generated output |
|
|
559
578
|
| Product patterns | CSS/JSX namespace ownership; ADS implementations and showcase cannot import app source |
|
|
560
579
|
| Primitive state | State-variable overrides outside components; undocumented non-state component variables |
|
|
580
|
+
| Literal visual values | Absolute/font-relative lengths (including `ch` and root font units), durations and color/effect formulas require tokens; geometry angles and responsive viewport/container relationships remain available |
|
|
561
581
|
| Fixed token ownership | Foreign token names, shared token overrides, misplaced component/pattern/showcase variables, and noncanonical foundation imports |
|
|
562
582
|
| Showcase ownership | Fixture CSS/Linaria definitions, custom JSX classes, native controls/widget roles, state styling, private CSS/aliased imports, legacy catalogue dependencies and source ownership, and runtime imports of fixtures/test helpers |
|
|
563
583
|
| Scenario coverage | All public renderable UI has path-discovered entries, colocated fixtures, literal metadata and reachable public render references; runtime imports of scenarios/fixtures are rejected |
|
|
@@ -717,7 +737,7 @@ Retain unrelated lint, type checking, and framework build commands.
|
|
|
717
737
|
## External content
|
|
718
738
|
|
|
719
739
|
Use the repository's `ads-import` skill for selected external ADS source or theme
|
|
720
|
-
values, and `ads-
|
|
740
|
+
values, and `ads-migrate` for a native implementation inspired by an upstream
|
|
721
741
|
library. These agent workflows handle dependency closure, token mapping, motion
|
|
722
742
|
comparisons, source credits, applicable notices, and local documentation.
|
|
723
743
|
They are agent workflows, rather than CLI import/design subcommands. Install
|