@reqvire-org/ads 0.3.11 → 0.3.13

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 (46) hide show
  1. package/README.md +20 -1
  2. package/dist/capture/worker.mjs +38 -0
  3. package/dist/capture-store.mjs +123 -0
  4. package/dist/capture.mjs +117 -0
  5. package/dist/config.mjs +6 -1
  6. package/dist/mcp/catalog.mjs +3 -3
  7. package/dist/mcp/context.mjs +1 -1
  8. package/dist/mcp/mutations.mjs +26 -6
  9. package/dist/mcp/server.mjs +64 -17
  10. package/dist/project-documents.mjs +29 -6
  11. package/dist/scenarios.mjs +9 -3
  12. package/dist/showcase/client.bundle.js +18 -18
  13. package/dist/showcase/style.css +2 -0
  14. package/dist/skills/ads-break-ui/SKILL.md +12 -5
  15. package/dist/skills/ads-break-ui/references/captures.md +147 -0
  16. package/dist/skills/ads-break-ui/references/guarded-editing.md +68 -0
  17. package/dist/skills/ads-break-ui/references/scenarios.md +22 -0
  18. package/dist/skills/ads-designer/SKILL.md +13 -6
  19. package/dist/skills/ads-designer/references/captures.md +147 -0
  20. package/dist/skills/ads-designer/references/guarded-editing.md +68 -0
  21. package/dist/skills/ads-designer/references/scenarios.md +22 -0
  22. package/dist/skills/ads-import/SKILL.md +13 -6
  23. package/dist/skills/ads-import/references/captures.md +147 -0
  24. package/dist/skills/ads-import/references/guarded-editing.md +68 -0
  25. package/dist/skills/ads-import/references/implementation.md +3 -1
  26. package/dist/skills/ads-import/references/scenarios.md +22 -0
  27. package/dist/skills/ads-migrate/SKILL.md +12 -5
  28. package/dist/skills/ads-migrate/references/captures.md +147 -0
  29. package/dist/skills/ads-migrate/references/guarded-editing.md +68 -0
  30. package/dist/skills/ads-migrate/references/scenarios.md +22 -0
  31. package/dist/skills/ads-migrate/references/testing.md +5 -0
  32. package/dist/skills/ads-motion/SKILL.md +12 -5
  33. package/dist/skills/ads-motion/references/captures.md +147 -0
  34. package/dist/skills/ads-motion/references/guarded-editing.md +68 -0
  35. package/dist/skills/ads-motion/references/scenarios.md +22 -0
  36. package/dist/units.mjs +7 -6
  37. package/dist/verification/browser.mjs +8 -3
  38. package/dist/verification/playwright-reporter.cjs +23 -8
  39. package/dist/verification.mjs +137 -33
  40. package/docs/ADS.md +9 -0
  41. package/docs/ARCHITECTURE.md +44 -3
  42. package/docs/BEHAVIORS.md +57 -3
  43. package/docs/CHANGELOG.md +28 -0
  44. package/docs/GUIDE.md +48 -1
  45. package/docs/MCP.md +63 -2
  46. package/package.json +1 -1
package/docs/MCP.md CHANGED
@@ -177,6 +177,8 @@ The server supplies agent guidance through its instructions, tool descriptions,
177
177
  | `ads_show_scenario` | Render an exact discovered scenario with its own fixtures |
178
178
  | `ads_behaviors` | Bounded guarantee/evidence discovery; pass an exact unit for contract details |
179
179
  | `ads_verify` | Execute an owner's registered checks and record revision-bound evidence |
180
+ | `ads_capture` | On-demand PNG of a discovered scenario or named element; replace current and clear candidate |
181
+ | `ads_capture_clear` | Remove generated captures or discard only the candidate |
180
182
  | `ads_show_<id>` | Optional explicitly configured grouped App |
181
183
  | `ads_units` | Discover edit owners and the files belonging to one unit |
182
184
  | `ads_prepare_patch` | Prepare a local draft of one owner, then generate its Git patch |
@@ -212,6 +214,36 @@ informational limit nor a traced target proves a rendered failure or success.
212
214
  Bounded check results put warnings before informational limits; the checks
213
215
  resource retains complete results.
214
216
 
217
+ ### Screenshots and candidate comparison
218
+
219
+ `ads_capture({scenario:"<discovered ID>",target?,theme?,viewport?})` renders current
220
+ source in the real sandboxed App using project-local Playwright/browser. It returns
221
+ PNG resource URIs and revision/settings metadata. The default is the full widget
222
+ viewport; optional `captureTargets` metadata names an element within the scenario.
223
+ Token/component/pattern/composition scenarios share this path. The tool adds no
224
+ project-specific renderer or fixture assumptions.
225
+
226
+ Patch and transaction dry runs accept `screenshot:true` plus an explicit 1–8-entry
227
+ `captures:[{scenario,target?,theme?,viewport?}]` selection. Existing gates run first;
228
+ current and candidate use matching capture settings. Source/conflict checks remain
229
+ mandatory. No screenshots are created by ordinary patches/dry runs. A newly added
230
+ scenario has a candidate with an explicit absent current baseline.
231
+
232
+ `ads://project/captures` lists current/candidate slots, metadata and freshness.
233
+ Read returned `ads://captures/{key}/{slot}` resources as `image/png` binary content;
234
+ the resource template is advertised without per-revision catalogue growth.
235
+ Subscriptions receive `resources/updated` for replacement/removal. Successful
236
+ standalone capture replaces current and clears any prior candidate. Applying
237
+ matching proposed source promotes candidate; explicit `ads_capture_clear` can
238
+ discard the candidate or both slots. There is no previous/history/TTL. Source
239
+ changes mark stale images; deleted targets are collected. Capture data is bounded
240
+ generated output under `.ds/captures/`, not a source mutation or behavior pass.
241
+
242
+ Optional `mcp.capture` selects browser, Chromium channel and runner timeout.
243
+ ADS installs no browser dependencies. See `ads://guides/captures` or the portable
244
+ [capture reference](../skills/ads-designer/references/captures.md) for setup, precise
245
+ limits, target declarations and the guarded review workflow.
246
+
215
247
  ### Behavioral verification
216
248
 
217
249
  Read `ads://guides/behaviors` or the [behavior guide](BEHAVIORS.md) for the contract
@@ -229,6 +261,15 @@ Missing/skipped cases, unavailable runners and changed inputs cannot pass.
229
261
  Results and subscribed resource notifications are available through
230
262
  `ads://project/behaviors`; explicitly re-read evidence when notifications are absent.
231
263
 
264
+ During a run, `ads_status.behaviors.progress` exposes completed/active/pending
265
+ checks, timings and the profile's whole-run timeout. Candidate mutation checks use
266
+ `ads_status.mutations.progress`. Requested MCP progress notifications also report
267
+ runner activity. Playwright uses the project's workers and filters selected case
268
+ tags; ADS does not silently change timeout or parallelism policy. Timeout results
269
+ retain partial outcomes and reports under `.ds/verification/`, but incomplete
270
+ runs still block application and cannot establish passing guarantees. See the
271
+ [runner and evidence details](BEHAVIORS.md#register-execution-profiles).
272
+
232
273
  Browser profiles start an isolated showcase and verify its sandboxed App using
233
274
  the selected candidate's sources. StrictMode profiles need a project React
234
275
  development harness. Profiles describe the execution environment, not a proof
@@ -294,10 +335,23 @@ The same discovery covers the rest of the project ADS:
294
335
  | Unit | Scope |
295
336
  |------|-------|
296
337
  | `foundation` | Shared ADS entry styles and root helpers |
297
- | `documentation` | ADS guides/licenses and the project's README, GUIDE, MCP, Architecture and ADS Markdown guides |
338
+ | `documentation` | ADS/project guides, shared credits and license notices, and `licenses/` text collections |
298
339
  | `assets/brand`, `assets/fonts`, other `assets/*` groups | Original SVG, image, font and other asset files |
299
340
  | `configuration` | `ds.config.json`, package/TypeScript/bundler/lint configuration, registered ADS guard modules, compiler/check entrypoints and their static local dependencies |
300
341
 
342
+ The `documentation` manifest includes `filePolicy` for paths that can be created
343
+ before they exist. One documentation patch can add `CREDITS.md`,
344
+ `licenses/example.txt` and the required README links together. Conventional root
345
+ `LICENSE`/`LICENCE`, `NOTICE`, `COPYING`, `COPYRIGHT` and `CREDITS` notices accept
346
+ `.md`, `.txt`, or extensionless names, with optional `-`/`_` qualifiers. Shared
347
+ `licenses/` collections may also live under `docs/`, `doc/`, or the configured ADS
348
+ root. Their entries use `.md`/`.txt` or conventional extensionless notice names.
349
+ Content must be UTF-8 without NUL bytes; Git patches preserve exact text, Unicode,
350
+ line endings and final-newline state. Code/configuration, hidden/generated paths
351
+ and peer-owned files retain their boundaries. A component's colocated notice stays
352
+ in that component unit. Shared notices are listed as readable MCP resources, while
353
+ workflow guide discovery omits provenance inventories. No asset unit is needed.
354
+
301
355
  Configuration ownership follows the project's registrations. It does not absorb
302
356
  components merely because a guard or compiler reads them. Guard registration,
303
357
  implementation, helpers and the associated check script can change together.
@@ -348,7 +402,14 @@ directory containing only the owner and declared companions. Edit that directory
348
402
  using the client's local file tools, then call
349
403
  `ads_prepare_patch({unit, action:"diff", draft})`. It checks source/baseline
350
404
  freshness and owner paths and returns a `patchFile`; it changes no live source.
351
- Apply the result through `ads_apply_patch`, which runs the normal candidate gates.
405
+ Pass that `patchFile` to `ads_apply_patch` with `dryRun:true` to validate before
406
+ applying. This runs the normal candidate gates, including affected registered
407
+ behavior checks against an isolated candidate and its configured browser preview.
408
+ It writes no live source and does not persist passing evidence for live inputs.
409
+ Read returned `behavior` failures or behavior-check results in `checks`; update the
410
+ draft, diff again and repeat as needed. Apply with `dryRun:false` after validation;
411
+ the gates run again. `ads_verify({unit,checks?})` checks current source and accepts
412
+ no draft argument; a selected-check draft runner is not currently exposed.
352
413
  Use `action:"discard"` to remove the draft. Remote clients can continue sending
353
414
  inline Git diffs. Drafts are local conveniences, not an alternative mutation API.
354
415
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
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": {