@reqvire-org/ads 0.3.5 → 0.3.7
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 +5 -1
- package/dist/atomic-composition.mjs +183 -0
- package/dist/bootstrap-ds/ADS.md +9 -3
- package/dist/bootstrap-ds/README.md +10 -0
- package/dist/boundaries.mjs +3 -0
- package/dist/check.mjs +16 -0
- package/dist/cli.mjs +1 -1
- package/dist/config.mjs +6 -2
- package/dist/mcp/build-status.mjs +7 -4
- package/dist/mcp/context.mjs +2 -2
- package/dist/mcp/edit-preparation.mjs +111 -0
- package/dist/mcp/mutations.mjs +54 -38
- package/dist/mcp/preview-watch.mjs +10 -4
- package/dist/mcp/server.mjs +36 -24
- 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 +37 -1
- package/dist/scenarios-compiler.mjs +24 -17
- package/dist/scenarios.mjs +58 -6
- package/dist/scoped-tokens.mjs +57 -0
- package/dist/skills/ads-break-ui/SKILL.md +10 -2
- package/dist/skills/ads-break-ui/references/atomic-styles.md +121 -0
- 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 +10 -2
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +9 -3
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +10 -0
- package/dist/skills/ads-designer/references/atomic-styles.md +121 -0
- package/dist/skills/ads-designer/references/guarded-editing.md +44 -0
- package/dist/skills/ads-import/SKILL.md +10 -2
- package/dist/skills/ads-import/references/atomic-styles.md +121 -0
- 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-migrate/SKILL.md +10 -2
- package/dist/skills/ads-migrate/references/atomic-styles.md +121 -0
- package/dist/skills/ads-migrate/references/guarded-editing.md +44 -0
- package/dist/skills/ads-motion/SKILL.md +10 -2
- package/dist/skills/ads-motion/references/atomic-styles.md +121 -0
- package/dist/skills/ads-motion/references/guarded-editing.md +44 -0
- package/dist/token-fixtures.mjs +30 -0
- package/dist/tokens.mjs +8 -2
- package/dist/units.mjs +15 -0
- package/dist/verification.mjs +1 -1
- package/docs/ADS.md +59 -2
- package/docs/ARCHITECTURE.md +27 -0
- package/docs/BEHAVIORS.md +20 -0
- package/docs/CHANGELOG.md +32 -0
- package/docs/GUIDE.md +8 -3
- package/docs/MCP.md +70 -5
- package/package.json +4 -2
package/docs/MCP.md
CHANGED
|
@@ -171,6 +171,9 @@ The server supplies agent guidance through its instructions, tool descriptions,
|
|
|
171
171
|
| `ads_verify` | Execute an owner's registered checks and record revision-bound evidence |
|
|
172
172
|
| `ads_show_<id>` | Optional explicitly configured grouped App |
|
|
173
173
|
| `ads_units` | Discover edit owners and the files belonging to one unit |
|
|
174
|
+
| `ads_prepare_patch` | Prepare a local draft of one owner, then generate its Git patch |
|
|
175
|
+
| `ads_prepare_token_samples` | Reconcile real-token fixture samples using explicit project bindings |
|
|
176
|
+
| `ads_apply_transaction` | Validate and apply coupled owner patches as one final candidate |
|
|
174
177
|
| `ads_read_file` | Read bounded source ranges, with owning unit and full-file digest |
|
|
175
178
|
| `ads_apply_patch` | Opt-in Git unified diff for one ADS unit, with dry-run validation |
|
|
176
179
|
|
|
@@ -185,6 +188,16 @@ resources. No arbitrary filesystem reader is exposed. Prefer bounded tools for
|
|
|
185
188
|
large catalogues; explicit resource reads can enter model context and a client
|
|
186
189
|
may truncate large payloads.
|
|
187
190
|
|
|
191
|
+
`ads_check` and `ads://project/checks` return nonblocking atomic composition
|
|
192
|
+
warnings under `advisories` with `severity: "warning"`, related source declarations
|
|
193
|
+
and `guidanceUri: "ads://guides/atomic-styles"`. Read that guide for causes and
|
|
194
|
+
component-level fixes. The full guide lives in every ADS skill as
|
|
195
|
+
`references/atomic-styles.md` for standalone clients; MCP serves the packaged
|
|
196
|
+
[skill-local reference](../skills/ads-designer/references/atomic-styles.md).
|
|
197
|
+
Guarded mutation results preserve these warnings without rejecting valid source.
|
|
198
|
+
An overlap warning is a review signal; failed registered rendered checks remain
|
|
199
|
+
blocking.
|
|
200
|
+
|
|
188
201
|
### Behavioral verification
|
|
189
202
|
|
|
190
203
|
Read `ads://guides/behaviors` or the [behavior guide](BEHAVIORS.md) for the contract
|
|
@@ -220,8 +233,9 @@ npx -y @reqvire-org/ads mcp --mutations
|
|
|
220
233
|
```
|
|
221
234
|
|
|
222
235
|
`ads_status.mutations` reports the mode, checks, limits and latest result. Editing
|
|
223
|
-
is disabled by default. The editing tool accepts **one Git unified diff
|
|
224
|
-
ADS unit
|
|
236
|
+
is disabled by default. The default editing tool accepts **one Git unified diff
|
|
237
|
+
for one ADS unit**. Replacement file bodies are not mutation inputs. Genuinely
|
|
238
|
+
coupled changes use the bounded owner transaction described below.
|
|
225
239
|
|
|
226
240
|
Find the owner with `ads_units({ "query": "Button" })`, then request its file
|
|
227
241
|
manifest with `ads_units({ "unit": "components/core/Button" })`. IDs derive from
|
|
@@ -231,6 +245,8 @@ composition owns its scenario and mock inputs. Imported components and patterns
|
|
|
231
245
|
remain separate owners. `tokens` is one foundation unit covering token definitions,
|
|
232
246
|
themes and token scenarios/fixtures, whose coverage spans shared source files.
|
|
233
247
|
Preview IDs remain separate: several token previews belong to `tokens`.
|
|
248
|
+
Unit-local token definitions and their previews stay in their component/pattern
|
|
249
|
+
owner; see [owner tokens](ADS.md#owner-local-tokens).
|
|
234
250
|
|
|
235
251
|
The `tokens` manifest also returns `companionFiles` with the configured foundation
|
|
236
252
|
entry path. When creating or deleting a canonical token foundation file, include
|
|
@@ -256,6 +272,8 @@ name) or colocated fixture keeps ownership stable without `Scenario.tsx`.
|
|
|
256
272
|
A redundant standalone scenario can be removed when other registered scenarios
|
|
257
273
|
still declare and actually render its public exports. Coverage requirements remain
|
|
258
274
|
in force; there is no metadata waiver for uncovered UI.
|
|
275
|
+
An empty `.gitkeep` may be deleted alongside new source in the selected owner
|
|
276
|
+
beneath that marker. Other hidden files and nonempty markers remain blocked.
|
|
259
277
|
|
|
260
278
|
The same discovery covers the rest of the project ADS:
|
|
261
279
|
|
|
@@ -310,6 +328,47 @@ not an edit to live ADS source. Binary `ads_read_file` results return the digest
|
|
|
310
328
|
byte count without encoded content. Git verifies the original binary blob and
|
|
311
329
|
reconstructs the result inside the validation copy.
|
|
312
330
|
|
|
331
|
+
For local editing without a second Git mirror, call
|
|
332
|
+
`ads_prepare_patch({unit, action:"create"})`. It returns a draft ID and a local
|
|
333
|
+
directory containing only the owner and declared companions. Edit that directory
|
|
334
|
+
using the client's local file tools, then call
|
|
335
|
+
`ads_prepare_patch({unit, action:"diff", draft})`. It checks source/baseline
|
|
336
|
+
freshness and owner paths and returns a `patchFile`; it changes no live source.
|
|
337
|
+
Apply the result through `ads_apply_patch`, which runs the normal candidate gates.
|
|
338
|
+
Use `action:"discard"` to remove the draft. Remote clients can continue sending
|
|
339
|
+
inline Git diffs. Drafts are local conveniences, not an alternative mutation API.
|
|
340
|
+
|
|
341
|
+
`ads_prepare_token_samples({id, bindings?})` reconciles the selected token
|
|
342
|
+
scenario's consumed literal sample array. Existing bindings and other fixture
|
|
343
|
+
fields are preserved; undeclared samples are removed. New bindings explicitly
|
|
344
|
+
name a real `token`, CSS `property` and `probe`. Missing mappings are reported as
|
|
345
|
+
`unresolved`; ADS never guesses a property or renderer from the token name.
|
|
346
|
+
The result is an owner patch file for guarded application. This preparation does
|
|
347
|
+
not establish rendered effects or waive token coverage.
|
|
348
|
+
|
|
349
|
+
For a coupled rename or upgrade, call `ads_apply_transaction`:
|
|
350
|
+
|
|
351
|
+
```json
|
|
352
|
+
{
|
|
353
|
+
"patches": [
|
|
354
|
+
{ "unit": "tokens", "patchFile": ".ds/patches/tokens.patch" },
|
|
355
|
+
{ "unit": "components/Button", "patchFile": ".ds/patches/button.patch" }
|
|
356
|
+
],
|
|
357
|
+
"dryRun": true
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
It accepts 2–8 distinct owners, at most 32 distinct files and 16 MiB of combined
|
|
362
|
+
Git diff text. Each patch obeys its own ownership/companion rules. Patches apply
|
|
363
|
+
in order inside one candidate; shared-entry hunks in a later patch must match
|
|
364
|
+
the earlier candidate's content. Core checks, registered Oxlint, project commands
|
|
365
|
+
and all affected behavior checks run against the final candidate. No intermediate
|
|
366
|
+
candidate is published. Dry runs, failures, conflicts and cancellation write no
|
|
367
|
+
source; a publication failure rolls back prior writes. This coordinates owned
|
|
368
|
+
source migrations, not dependency installation or arbitrary application files.
|
|
369
|
+
Install changed dependencies before verification; candidates use the project's
|
|
370
|
+
installed `node_modules`.
|
|
371
|
+
|
|
313
372
|
Resolve ownership diagnostics by preserving the required capability in its proper
|
|
314
373
|
layer. Demo-only sizing, borders and framing belong in a public review/layout
|
|
315
374
|
pattern; a component API addition needs a runtime use case. Measured imperative
|
|
@@ -326,8 +385,8 @@ a new directory owner, or change unrelated public-entry statements. Shared
|
|
|
326
385
|
public-entry changes are limited to re-exports from the selected unit. Alongside
|
|
327
386
|
its real re-export, a patch can remove an obsolete `export {};` placeholder;
|
|
328
387
|
it cannot add one or change unrelated statements. Init generates no empty-export
|
|
329
|
-
placeholder.
|
|
330
|
-
|
|
388
|
+
placeholder. For coupled owners use the bounded transaction; a rejection still
|
|
389
|
+
requires correcting its owner/policy, never a direct-write bypass.
|
|
331
390
|
|
|
332
391
|
Set `dryRun` to `false` to apply. ADS reconstructs complete candidate files locally
|
|
333
392
|
and validates a temporary project copy with core guards and registered Oxlint
|
|
@@ -557,7 +616,13 @@ wrappers require their own launcher and are not shell-executed by ADS.
|
|
|
557
616
|
Both build output streams go to stderr, keeping stdout exclusively for MCP.
|
|
558
617
|
Opening an App waits up to 30 seconds for validated current output. A matching
|
|
559
618
|
success cache is republished in the new watcher session without recompilation;
|
|
560
|
-
merely finding an older HTML file is insufficient.
|
|
619
|
+
merely finding an older HTML file is insufficient. Managed resource graphs and
|
|
620
|
+
HTML descriptors use private session output; standalone build commands retain
|
|
621
|
+
the configured output. One cannot overwrite the other's success record. The
|
|
622
|
+
compiler caches at most six verified graph snapshots under `.ds/preview-graphs/`
|
|
623
|
+
and cleans its session output on ordinary shutdown. These are generated files;
|
|
624
|
+
do not track or use them as source. Legacy self-contained HTML builders retain
|
|
625
|
+
their existing publication contract. A timeout leaves the watcher running: inspect the
|
|
561
626
|
logs and invoke the preview again. `ads_status` distinguishes watcher process
|
|
562
627
|
state from reported build state. Token inspection and other ordinary tools
|
|
563
628
|
remain available after a build failure. Invalid scenario metadata at startup and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
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": {
|
|
@@ -34,8 +34,10 @@
|
|
|
34
34
|
"generate:icons": "node scripts/generate-icons.mjs",
|
|
35
35
|
"sync:skill-starter": "node scripts/sync-skill-starter.mjs",
|
|
36
36
|
"check:skill-starter": "node scripts/sync-skill-starter.mjs --check",
|
|
37
|
+
"sync:skill-references": "node scripts/sync-skill-references.mjs",
|
|
38
|
+
"check:skill-references": "node scripts/sync-skill-references.mjs --check",
|
|
37
39
|
"lint": "npm run lint:tool",
|
|
38
|
-
"lint:tool": "npm run check:skill-starter && oxlint --deny-warnings src preview-client showcase-client mcp-explorer tests/*.test.mjs scripts/build-ads-tool.mjs scripts/pack-ads-tool.mjs",
|
|
40
|
+
"lint:tool": "npm run check:skill-starter && npm run check:skill-references && oxlint --deny-warnings src preview-client showcase-client mcp-explorer tests/*.test.mjs scripts/build-ads-tool.mjs scripts/pack-ads-tool.mjs scripts/sync-skill-references.mjs",
|
|
39
41
|
"lint:project": "npm run lint:ds && npm run lint:style && npm run check:skill-starter",
|
|
40
42
|
"lint:ds": "node dist/cli.mjs lint-config && node dist/cli.mjs check && oxlint --deny-warnings --config .ds/oxlintrc.json src design-system",
|
|
41
43
|
"lint:style": "biome lint --config-path=biome.css.json .",
|