@reqvire-org/ads 0.3.28 → 0.3.29

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 (53) hide show
  1. package/dist/atomic-composition.mjs +2 -1
  2. package/dist/behaviors.mjs +2 -2
  3. package/dist/boundaries.mjs +6 -3
  4. package/dist/check.mjs +3 -0
  5. package/dist/cli.mjs +13 -0
  6. package/dist/config.mjs +5 -3
  7. package/dist/mcp/build-status.mjs +17 -4
  8. package/dist/mcp/context.mjs +2 -1
  9. package/dist/mcp/execution-results.mjs +4 -3
  10. package/dist/mcp/mutations.mjs +5 -43
  11. package/dist/mcp/preview-watch.mjs +23 -3
  12. package/dist/mcp/preview-widget.bundle.js +16 -15
  13. package/dist/mcp/resource-loader.js +40 -12
  14. package/dist/mcp/server.mjs +74 -36
  15. package/dist/oxlint.mjs +6 -1
  16. package/dist/preview-builder.mjs +10 -4
  17. package/dist/preview-resources.mjs +11 -4
  18. package/dist/preview-scope.mjs +6 -0
  19. package/dist/preview-workers.mjs +184 -0
  20. package/dist/scenario-inspector.mjs +34 -0
  21. package/dist/scenario-trace.mjs +3 -2
  22. package/dist/scenarios-compiler.mjs +200 -25
  23. package/dist/showcase/client.bundle.js +22 -21
  24. package/dist/showcase/index.html +2 -2
  25. package/dist/showcase/style.css +2 -1
  26. package/dist/skills/ads-break-ui/SKILL.md +3 -0
  27. package/dist/skills/ads-break-ui/references/runtimes.md +31 -0
  28. package/dist/skills/ads-break-ui/references/validation.md +53 -0
  29. package/dist/skills/ads-designer/SKILL.md +3 -0
  30. package/dist/skills/ads-designer/references/runtimes.md +31 -0
  31. package/dist/skills/ads-designer/references/validation.md +53 -0
  32. package/dist/skills/ads-import/SKILL.md +3 -0
  33. package/dist/skills/ads-import/references/runtimes.md +31 -0
  34. package/dist/skills/ads-import/references/validation.md +53 -0
  35. package/dist/skills/ads-motion/SKILL.md +3 -0
  36. package/dist/skills/ads-motion/references/runtimes.md +31 -0
  37. package/dist/skills/ads-motion/references/validation.md +53 -0
  38. package/dist/skills/ads-port/SKILL.md +3 -0
  39. package/dist/skills/ads-port/references/runtimes.md +31 -0
  40. package/dist/skills/ads-port/references/validation.md +53 -0
  41. package/dist/source-symbols.mjs +11 -0
  42. package/dist/source-values.mjs +10 -3
  43. package/dist/test-boundaries.mjs +95 -0
  44. package/dist/ui-framework.mjs +2 -1
  45. package/dist/units.mjs +12 -1
  46. package/dist/validation-checks.mjs +50 -0
  47. package/dist/validation.mjs +172 -0
  48. package/dist/verification/browser.mjs +3 -1
  49. package/dist/verification.mjs +1 -0
  50. package/docs/ARCHITECTURE.md +72 -17
  51. package/docs/CHANGELOG.md +37 -0
  52. package/docs/MCP.md +68 -9
  53. package/package.json +1 -1
package/docs/MCP.md CHANGED
@@ -63,9 +63,10 @@ policy. A disconnected subscription marks retained output stale and tears down
63
63
  App watchers; refresh the page after restarting ADS. Compilation remains necessary for project TSX/Linaria, performed by the
64
64
  managed project compiler on demand and after relevant source changes.
65
65
 
66
- Switching entries overlays a centered loading spinner, then reveals the new
67
- scenario inside the existing App. Loading and diagnostic overlays do not move the
68
- preview. Token presentation comes from project-owned scenarios, fixtures and
66
+ Switching entries updates the scenario inside the existing App. A quiet monochrome
67
+ indicator in the upper-right header reports compilation, checking, readiness or
68
+ failure; hover or click reveals details. The preview remains interactive during
69
+ background checks. Token presentation comes from project-owned scenarios, fixtures and
69
70
  development-only review helpers, using the project's real foundation CSS and extracted
70
71
  styles. The App runtime contains no token sample templates or named token ordering.
71
72
  The generic definition inspector remains available without a scenario build.
@@ -208,6 +209,7 @@ The server supplies agent guidance through its instructions, tool descriptions,
208
209
  | `ads_show_scenario` | Render an exact discovered scenario with its own fixtures |
209
210
  | `ads_behaviors` | Paged owner discovery; select a unit and detail section |
210
211
  | `ads_verify` | Execute an owner's registered checks and record revision-bound evidence |
212
+ | `ads_validate` | Run the complete project audit, or affected checks since a successful full baseline |
211
213
  | `ads_results` | Page saved execution outcomes, diagnostics, logs and captures without rerunning |
212
214
  | `ads_investigate` | Read one check's summary, then paged requests/errors/artifacts |
213
215
  | `ads_capture` | On-demand PNG of a discovered scenario or named element; replace current and clear candidate |
@@ -630,6 +632,14 @@ fixtures. `ads_show_tokens({category})` selects a discovered token scenario;
630
632
  omitting category selects the first token entry. The tool contains no project
631
633
  token templates or copied values.
632
634
 
635
+ Both tools default to `waitFor: "verified"`. The showcase requests
636
+ `waitFor: "compiled"` to browse live feedback or the last verified graph while
637
+ checks run. That mode can return `build.current: false`; it is visual feedback,
638
+ not successful verification evidence. It does not alter capture, behavior or
639
+ guarded-edit acceptance. Legacy HTML compilers retain their existing wait path.
640
+ Registered browser verification URLs and `openPreviewScenario` explicitly select
641
+ `waitFor=verified`; captures also retain verified readiness.
642
+
633
643
  ### One App, shared resources
634
644
 
635
645
  With the resource compiler enabled, both tools link **`ui://ads/preview`**. Their
@@ -652,6 +662,7 @@ the tool result. `resources/read` supplies these registered resources:
652
662
  |-----|-------------------|
653
663
  | `ui://ads/preview` | Tool-owned App bootstrap, official App SDK and resource loader |
654
664
  | `ads://preview/manifest` | Project compiler's versioned scenario/dependency graph |
665
+ | `ads://preview/live` | Current-source compiled feedback while checks are pending; explicitly unverified |
655
666
  | `ads://assets/<hash>.js` | Compiled shared runtime or scenario module |
656
667
  | `ads://assets/<hash>.css` | Extracted foundation or scenario styles |
657
668
  | `ads://assets/<hash>.woff2` (and other asset types) | Binary font/image/worker assets |
@@ -722,8 +733,12 @@ and native-client evidence is recorded in [compatibility notes](#protocols-notif
722
733
  Host context selects the project's light/dark theme and conveys available space.
723
734
  It does not silently replace project tokens/fonts with a host palette.
724
735
  Compositions retain the complete project skin. App readiness uses standard Apps
725
- initialization plus optional structured `ads-preview` logging (`loading`, `ready`,
726
- `error`); no custom parent-window readiness message is required.
736
+ initialization plus optional structured `ads-preview` logging (`loading`,
737
+ `checking`, `reverting`, `ready`, `error`); no custom parent-window readiness
738
+ message is required. `checking` never establishes verified App readiness. The
739
+ showcase puts these states in a small monochrome header indicator with tooltip
740
+ and expandable details; it keeps status and loading overlays out of the widget
741
+ area. Other Apps hosts retain the in-App status fallback.
727
742
 
728
743
  ### Configure the project compiler
729
744
 
@@ -810,19 +825,45 @@ Linaria, shared foundation or validation configuration. Upgrade the project ADS
810
825
  dependency and restart its managed compiler to load the helper. Merely upgrading
811
826
  the server does not convert a custom project adapter to incremental compilation.
812
827
 
813
- On first demand, the adapter builds a shared graph for all registered scenarios.
814
- A selection loads only its static dependency closure. Validation and compilation
815
- run together; both must succeed before publication. `.ds/preview-cache.json`
828
+ Watched resource builds reuse self-contained IIFE worker bundles through the same
829
+ helper. `new Worker(new URL("./worker.ts", import.meta.url))`, `?worker` and
830
+ `?worker&url` imports use Vite's configured worker compiler on first demand, then
831
+ reuse its output while tracked source/configuration/dependency contents and
832
+ resolution directories match. Requests for one worker share the same pending
833
+ build. Every preview still receives its worker assets. Changed transitive inputs
834
+ rebuild the affected bundle; topology changes may invalidate more. Nested,
835
+ inline and split workers keep the normal Vite compilation path. No project names
836
+ or manually maintained worker dependency lists are needed.
837
+
838
+ On first demand or accepted-edit preparation, the adapter builds a shared graph for all registered scenarios.
839
+ A selection loads only its static dependency closure. Both validation and compilation
840
+ must succeed before verified publication. Watched compilation
841
+ can publish a separate live graph first, with `build.live.validated: false` and
842
+ `build.current: false`. Live reads require the current source digest and session;
843
+ they write no accepted scenario artifact or successful graph cache. The App
844
+ renders that feedback while checks run and restores the last verified graph on
845
+ failure. Validation and semantic registry inspection run off the visual update
846
+ path; new checks start after compilation, and rapid edits coalesce behind one
847
+ verification run. Compiled syntax errors
848
+ surface immediately. `.ds/preview-cache.json`
816
849
  reuses successful validation/output only when inputs, compiler/tool code,
817
850
  lockfile, recorded dependencies and content digests match. A source edit
818
851
  revalidates the project and incrementally updates the watched module graph. Both
819
- must succeed against unchanged source before atomic publication; a failed or
852
+ must succeed against unchanged source before verified atomic publication; a failed or
820
853
  superseded build cannot become current. Files outside Rollup's graph still trigger
821
854
  validation and a reconciled build. Preview refresh retains the selected view's
822
855
  state when its complete static module/style/asset closure is unchanged, while
823
856
  rerunning its token/paint audits against the new manifest. Actual selected-view
824
857
  changes remount it. Normal application builds retain their own chunking and optimization.
825
858
 
859
+ Accepted MCP edits enqueue preparation even without an open preview. Matching
860
+ validated candidate graphs seed the same project cache; location-dependent,
861
+ missing or incompatible output falls back to the normal compiler. A connected
862
+ showcase opportunistically prefetches changed peers' static resources after the
863
+ selected view paints, using its existing integrity-checked byte cache. This does
864
+ not import modules, attach styles or mount hidden examples; dynamic imports stay
865
+ lazy. Preparation is bounded and never establishes passing evidence by itself.
866
+
826
867
  The graph lives beside the configured manifest, under `assets/`. Tiny
827
868
  `.ds/scenarios/<id>/index.html` descriptors retain the reporter/registry contract;
828
869
  they are not standalone runnable previews. Six previous graph revisions retain
@@ -1240,3 +1281,21 @@ maintenance when needed. `ads_status.reports` identifies the two intake tools,
1240
1281
  storage directory and `ads://guides/reporting`, without listing report contents.
1241
1282
  All five skills include the same portable
1242
1283
  [reporting reference](../skills/ads-designer/references/reporting.md).
1284
+
1285
+ ## Complete and affected validation
1286
+
1287
+ `ads_validate({})` and `ads validate` share the full validation engine.
1288
+ `ads_validate({scope:"changed"})` matches `ads validate --changed`. The MCP tool
1289
+ runs trusted configured project commands with cancellation and bounded output; it
1290
+ is available with source mutations disabled and writes only build/evidence output
1291
+ when project commands honor their checking contract. Summaries include scope,
1292
+ requestedScope, fallback reason, sourceRevision, current, elapsedMs and resultId.
1293
+ Read diagnostics/checks/outcomes with `ads_results`; progress and the latest
1294
+ validation summary are in `ads_status.validation`. Retention is latest per kind:
1295
+ validation, verification and mutation are independent.
1296
+
1297
+ Read `ads://guides/validation` for trigger guidance, baseline expansion, test
1298
+ boundaries, script selection and limits. Full audits include configured scripts
1299
+ and registered guarantees; changed mode narrows behavior owners while core and
1300
+ opaque project scripts remain complete. Neither mode rewrites npm test commands
1301
+ or treats compiled live previews as verification evidence.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.3.28",
3
+ "version": "0.3.29",
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": {