@reqvire-org/ads 0.4.2 → 0.4.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.
Files changed (62) hide show
  1. package/README.md +10 -1
  2. package/dist/a11y.mjs +71 -65
  3. package/dist/analysis/helpers.mjs +5 -3
  4. package/dist/analysis/inputs.mjs +13 -6
  5. package/dist/analysis/module-resolvers.mjs +46 -0
  6. package/dist/analysis/service.mjs +7 -0
  7. package/dist/analysis/syntax.mjs +20 -5
  8. package/dist/assets.mjs +1 -1
  9. package/dist/boundaries.mjs +6 -4
  10. package/dist/check-service.mjs +8 -5
  11. package/dist/check.mjs +8 -3
  12. package/dist/component-contrast.mjs +126 -8
  13. package/dist/contrast-composition.mjs +134 -0
  14. package/dist/finding-rules.mjs +2 -0
  15. package/dist/font-rules.mjs +20 -15
  16. package/dist/fonts-generated.mjs +21 -14
  17. package/dist/foundation-views.mjs +6 -2
  18. package/dist/image-attributes.mjs +96 -92
  19. package/dist/mcp/drafts.mjs +6 -4
  20. package/dist/mcp/mutations.mjs +11 -8
  21. package/dist/mcp/preview-widget.bundle.js +43 -43
  22. package/dist/mcp/server.mjs +9 -2
  23. package/dist/pictogram-model.mjs +59 -0
  24. package/dist/pictograms.mjs +52 -0
  25. package/dist/preview-bun.mjs +1 -0
  26. package/dist/render-audit/image-shape.mjs +13 -3
  27. package/dist/render-audit/pictograms.mjs +88 -0
  28. package/dist/render-audit/worker.mjs +12 -0
  29. package/dist/render-audit.mjs +11 -1
  30. package/dist/render-composition.mjs +164 -0
  31. package/dist/scenario-registry.mjs +2 -2
  32. package/dist/scenarios-compiler.mjs +1 -1
  33. package/dist/showcase/client.bundle.js +23 -23
  34. package/dist/showcase/draft-navigation.js +5 -5
  35. package/dist/showcase/foundation-view.css +3 -0
  36. package/dist/showcase/foundation-view.mjs +3 -0
  37. package/dist/showcase/pictogram-view.mjs +53 -0
  38. package/dist/showcase/ui/ui.js +2 -0
  39. package/dist/skills/ads-designer/SKILL.md +13 -1
  40. package/dist/skills/ads-designer/references/accessibility.md +66 -2
  41. package/dist/skills/ads-designer/references/branding.md +5 -16
  42. package/dist/skills/ads-designer/references/performance.md +3 -2
  43. package/dist/skills/ads-designer/references/pictograms.md +131 -0
  44. package/dist/skills/ads-port/SKILL.md +4 -1
  45. package/dist/source-values.mjs +4 -1
  46. package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +13 -0
  47. package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +7 -0
  48. package/dist/starters/react/design-system/assets/pictograms/journey.svg +7 -0
  49. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +1 -0
  50. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +1 -0
  51. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +7 -0
  52. package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +26 -0
  53. package/dist/task-cache.mjs +2 -2
  54. package/dist/units.mjs +4 -4
  55. package/dist/validation-inputs.mjs +7 -3
  56. package/docs/ADS.md +6 -1
  57. package/docs/ARCHITECTURE.md +75 -2
  58. package/docs/CACHING.md +25 -0
  59. package/docs/CHANGELOG.md +75 -52
  60. package/docs/GUIDE.md +30 -5
  61. package/docs/MCP.md +6 -0
  62. package/package.json +2 -1
@@ -2,7 +2,7 @@ import { walkAsync, walkValuesAsync } from "./analysis/queries.mjs";
2
2
  import { createHash } from "node:crypto";
3
3
  import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync } from "node:fs";
4
4
  import path from "node:path";
5
- import ts from "./analysis/syntax.mjs";
5
+ import ts, { withModuleResolutionScope } from "./analysis/syntax.mjs";
6
6
  import postcss from "postcss";
7
7
  import valueParser from "postcss-value-parser";
8
8
  import { defaultConfig, fixedLayout, isInside, isTestFile } from "./config.mjs";
@@ -10,6 +10,7 @@ import { importResolver } from "./boundaries.mjs";
10
10
  import { configurationFiles } from "./units.mjs";
11
11
  import { createPreviewFileFilter } from "./preview-files.mjs";
12
12
  import { projectNoticeFiles } from "./project-documents.mjs";
13
+ import timing from "./stage-timing.cjs";
13
14
 
14
15
  const digest = (file) => `sha256:${createHash("sha256").update(readFileSync(file)).digest("hex")}`;
15
16
  const ignored = new Set(["output", "test-results", "playwright-report", ".playwright-cli"]);
@@ -54,7 +55,10 @@ async function references(file, content, revision) {
54
55
  }
55
56
 
56
57
  /** Mandatory UI/guard inputs, real local dependencies and declared opaque inputs. */
57
- export async function validationInputFiles(options, extraFiles = [], { maxFiles = Infinity, maxBytes = Infinity, onFile } = {}) {
58
+ export function validationInputFiles(options, extraFiles = [], limits = {}) {
59
+ return timing.timeStage("input-capture", () => withModuleResolutionScope(() => captureInputs(options, extraFiles, limits)));
60
+ }
61
+ async function captureInputs(options, extraFiles, { maxFiles = Infinity, maxBytes = Infinity, onFile }) {
58
62
  const supplied = options.config;
59
63
  const normalized = {
60
64
  ...defaultConfig,
@@ -212,7 +216,7 @@ export async function validationInputFiles(options, extraFiles = [], { maxFiles
212
216
  options.dsRoot,
213
217
  options.sourceRoot,
214
218
  ...config.assets.publicDirs.map((file) => path.resolve(root, file)),
215
- ...(await configurationFiles(options)),
219
+ ...(await configurationFiles(options, resolve)),
216
220
  ].map((file) => path.resolve(root, file)))
217
221
  await visit(file);
218
222
  for (const file of projectNoticeFiles(root)) await visit(path.resolve(root, file));
package/docs/ADS.md CHANGED
@@ -285,7 +285,10 @@ stylesheet dependencies are injected into preview entries.
285
285
  screen, in every theme and brand, through aliases) and `token-rhythm` (`--space-N` = N × 2
286
286
  px) are errors; `token-overlap-review` (equal values within one token family) is a review
287
287
  item. The accessibility guards (`a11y-*`) read tokens and runtime component source;
288
- `component-contrast` checks the color pairs components set themselves, and
288
+ `component-contrast` checks declared color pairs and text/background relationships proved
289
+ through owned JSX composition, including backgrounds supplied by another component.
290
+ It needs 4.5:1, or 3:1 for a source-resolved large-text size; incomplete composition is an
291
+ informational finding requiring a rendered audit. No custom contrast-pair registration is needed, and
289
292
  `layout-fixed-width` rejects fixed minima without a supported sizing role or beyond the spatial bound. `ads audit` adds axe-core
290
293
  in the rendered scenarios (`a11y-axe`), non-text contrast (`a11y-non-text-contrast`) and
291
294
  overflow at 390, 768 and 1280 px and in a 240 px container (`layout-overflow`). `ads tokens
@@ -586,3 +589,5 @@ The repository playground initializes the shipped Preact starter under ignored
586
589
  Edit `starters/shared/` for design changes and restart the playground to regenerate
587
590
  its source snapshot. Native mount adapters live under `starters/react/` and
588
591
  `starters/preact/`; framework import/config differences are generated during packing.
592
+
593
+ Pictograms are a separate illustrative asset category in `assets/pictograms/`, with a project-owned `catalog.ads.json`, explicit theme variants and dedicated showcase views. Fixed colors and gradients are allowed. Source checks validate the catalogue and SVG geometry; the render audit checks identified images against their declared theme, minimum height, aspect ratio and text alternative. See [Pictograms](../skills/ads-designer/references/pictograms.md) for the exact contract and limits.
@@ -83,9 +83,30 @@ acceptance stages and retain their own source-freshness requirements.
83
83
  Rules must use `analysis/helpers.mjs` for `sourceAst`, `sourceText`, `symbolAt`,
84
84
  `valueSymbolAt`, `localValueDeclarations`, `walk`, `findNode`, `nodesOfKind`, `memoFact` and `memoProgram`. Program acquisition
85
85
  goes through `cachedProgram`; import resolution goes through `importResolver`.
86
+ With fixed compiler options, import resolution shares normalized specifiers by
87
+ importing directory, including pending queries from sibling files. Its cache
88
+ belongs to the current inventory/request; a new capture resolves against current
89
+ package/configuration bytes and cannot inherit an earlier resolution by path alone.
90
+ Input capture shares compiler options and the import resolver with configuration
91
+ discovery. `analysis/module-resolvers.mjs` owns native resolver leases for that
92
+ capture, including pending queries; cleanup drains them on success or failure.
93
+ The syntax client stays alive until the capture releases its leases. No resolver
94
+ that observes the live filesystem survives into the next capture.
95
+ Warm checks collect compiler source bytes while computing the task input key and
96
+ pass them through `analyzeCaptured`; registered draft branches remain authoritative.
97
+ The independent post-check input capture still verifies freshness before caching
98
+ the report. Draft preparation similarly shares one inventory between inspection
99
+ and workspace population, retaining its targeted live conflict/path checks.
100
+ `render-composition.mjs` reuses the captured native program and `createSourceValues`
101
+ for owned JSX, component calls, props and classes. Its pending/completed graph is weakly
102
+ memoized by immutable program, so sibling drafts and edited imports do not share mutable
103
+ render facts. It does not execute project code or open another compiler. The contrast
104
+ adapter consumes the CSS trees already parsed by the check, resolves ancestor backdrops
105
+ and caches identical token-pair calculations within the check. It reports incomplete
106
+ cascade/branch evidence explicitly; browser axe audits retain dynamic rendering coverage.
86
107
  Optional inputs and immediate directory membership use `optionalSourceText` and
87
108
  `sourceDirectoryFiles`; both observe the captured revision, including absence.
88
- `sourceCss` shares read-only PostCSS trees within a request; transforms clone
109
+ `sourceCss` shares read-only PostCSS trees across requests on the same captured revision; transforms clone
89
110
  before modifying them. Spatial guards and foundation discovery use
90
111
  `spatial.mjs` over these helpers. The pure `spatial-model.cjs` compiler does no
91
112
  filesystem I/O. `spatial-inputs.cjs` retains a bounded cache of immutable models
@@ -106,6 +127,15 @@ The spatial design and starter defaults draw on IBM Carbon's 2x Grid. The
106
127
  source revision, and attribution boundaries. ADS's compiler and analysis services
107
128
  are separate from Carbon's Sass/React grid packages; consumers own their definitions.
108
129
 
130
+ File-local accessibility and image-attribute checks consume the main check's source
131
+ inventory and captured native ASTs. Their findings are memoized by immutable source
132
+ tree; they create no separate syntax parser or filesystem scan. Font checking and
133
+ preload generation share captured CSS trees and parsed face facts. Token values,
134
+ current preload configuration and actual style uses are evaluated separately on
135
+ each operation, so changing a consumer or theme cannot reuse an unrelated result.
136
+ Optional text (including absence) and CSS trees have weak captured-revision ownership;
137
+ new revisions invalidate them, while repeated reads on the same revision share data.
138
+
109
139
  Do not create compiler programs, native clients, path-keyed semantic caches or
110
140
  independent AST parsers in new rules. `memoFact` lives for one fenced request;
111
141
  `memoProgram` is only for facts determined by an immutable program/tree or captured
@@ -806,6 +836,10 @@ scroll state when that closure matches, and reruns token/paint audits against th
806
836
  accepted manifest. A changed selected closure remounts through the project's
807
837
  adapter. Native ESM resources still obey digest checks and the existing bounded
808
838
  revision lifecycle; this is state-preserving refresh, not component-level HMR.
839
+ The visible preview retains its framing while replacement resources load. Kind
840
+ and subject framing change only after a successful mount; structural padding is
841
+ resolved before paint, including delayed framework commits. Font readiness and
842
+ the later audits do not temporarily restore specimen padding during reloads.
809
843
 
810
844
  Incremental compilation is separate from test selection. Preview refresh runs the
811
845
  adapter's validation callback. Draft acceptance executes the draft owners' own
@@ -986,7 +1020,8 @@ instead of asking the browser to normalize a color per drawn item.
986
1020
  ADS findings are errors, review items or info items. An error is a rule ADS can decide: it
987
1021
  fails `ads check`, validation and acceptance, and no setting turns it off. Token, theme, brand,
988
1022
  glyph and accessibility rules read from tokens and source are errors: contrast between the
989
- roles that meet on screen and the color pairs components set themselves, in every theme and
1023
+ roles that meet on screen, declared component pairs and source-proven composed text/backdrop
1024
+ pairs, in every theme and
990
1025
  brand, the 2 px spacing rhythm, fixed widths built from spacing tokens, theme and brand
991
1026
  coverage, brand artwork that is undescribed, unlicensed or unpreviewed, glyphs off the
992
1027
  shared viewBox or with fixed colors, controls padded off their size, target size, focus,
@@ -1012,6 +1047,13 @@ image shape and horizontal overflow at 390, 768 and 1280 px, by resizing each re
1012
1047
  also narrows components and patterns to a 240 px container: a set width above the browser review threshold of 96 px
1013
1048
  that overflows it is a review item, since whether a part ever sits in a pane takes judgement.
1014
1049
 
1050
+ Audit previews retain the same subject framing and layout as showcase previews but disable
1051
+ the decorative grey surround and clipped canvas layer before mounting. The preview root
1052
+ therefore paints the project's theme/brand canvas directly, so axe and non-text contrast
1053
+ resolve the real ancestor background. Authored surfaces remain intact. Image shape uses
1054
+ untransformed CSS dimensions: explicit ratios respect `box-sizing`, while width/height
1055
+ attribute ratios compare the content box, excluding border and padding.
1056
+
1015
1057
  Each render waits, bounded, for its content to settle before anything is measured, and says so when it
1016
1058
  did not. The audit also renders what a scenario shows only after someone acts on it. It opens what
1017
1059
  `aria-haspopup` controls open, and hovers and focuses controls for contrast. Each worker lists what
@@ -1283,3 +1325,34 @@ custom outputs use `assets.generatedPaths`. Bundled binary assets are forwarded
1283
1325
  as resources: the built-in Apps sandbox permits blob reads and WebAssembly
1284
1326
  compilation without granting external network access, JavaScript eval or host
1285
1327
  DOM access. External MCP hosts retain their own CSP policy.
1328
+
1329
+ ### Pictogram ownership and evidence
1330
+
1331
+ Pictograms are project-owned illustrative SVGs in `assets/pictograms/`, separate
1332
+ from brand identity, glyphs and raster images. `catalog.ads.json` declares their
1333
+ meaning, license, minimum drawn height and exact-theme/scheme/shared source
1334
+ selection. See the [pictogram contract and examples](../skills/ads-designer/references/pictograms.md).
1335
+
1336
+ `src/pictogram-model.mjs` is the pure catalogue/XML/geometry model;
1337
+ `src/pictograms.mjs` is its captured-input adapter. Pictogram SVG text is retained during the
1338
+ existing analysis input read; unrelated image assets are not added to the source tree. The adapter shares immutable results per request
1339
+ and weakly per captured revision, including missing inputs; rules/discovery never
1340
+ fall back to disk for a missing snapshot. No TypeScript program or parser is
1341
+ created for asset metadata. The XML parser checks document structure without
1342
+ executing SVG. Artwork is embedded as image data, never injected into gallery DOM.
1343
+
1344
+ Discovery publishes tool-owned `pictograms/<id>` foundation views attached to the
1345
+ `assets/pictograms` draft owner. CLI checks, MCP discovery, validation and acceptance
1346
+ share the same diagnostics. The gallery resolves explicit theme variants, renders
1347
+ clean/actual-size samples and a separate construction-grid card. Components keep
1348
+ normal SVG imports and their own theme selection; no ADS runtime ships with them.
1349
+
1350
+ The render audit receives the registry's checked digests and geometry, without
1351
+ rereading sources. It identifies visible SVG images by digest, caches source
1352
+ identities across viewport samples, and checks the active variant, accessibility
1353
+ markup, drawn size and proportions. `data-ads-pictogram` disambiguates shared bytes
1354
+ and detects wrong source substitutions. Inline SVG/CSS backgrounds, arbitrary
1355
+ transformations, illustration meaning and optical quality remain outside this
1356
+ image guard. Assets remain shared inputs for change selection, so their edits
1357
+ widen verification to consuming UI. Browser measurements are not included in
1358
+ analysis/acceptance performance benchmarks.
package/docs/CACHING.md CHANGED
@@ -48,6 +48,8 @@ retains execution ownership, cancellation and cleanup.
48
48
  | Cache | Lifetime and invalidation |
49
49
  | --- | --- |
50
50
  | Request facts (`memoFact`) | One captured input revision/request; concurrent callers share pending work |
51
+ | Input-discovery resolvers | One input capture; shared compiler options and pending native leases, drained and disposed before returning |
52
+ | Owned JSX render relationships | Weakly owned by the immutable native program; pending graph work is shared and failed work is evicted |
51
53
  | Immutable program/tree facts (`memoProgram`) and native query results | Reused only with their owning immutable program/tree; rejected queries are evicted |
52
54
  | Native project and draft snapshots | Project session with bounded revisions/programs; source/import/configuration changes update the snapshot |
53
55
  | Relocated draft ASTs | Owned by that draft; releasing it drops the wrapper cache without changing sibling/live paths |
@@ -60,6 +62,29 @@ edits are changes. Dependency selection uses shared ASTs and before/current
60
62
  import closures; a cached parse alone cannot establish a passing check or render.
61
63
  See [analysis ownership and rule helpers](ARCHITECTURE.md#semantic-analysis).
62
64
 
65
+ Source accessibility and image-attribute checks reuse immutable native source facts.
66
+ They share the main check's inventory rather than scanning and parsing components
67
+ again. Optional source text and read-only CSS trees are cached by captured revision,
68
+ including missing files. Font rules and preload generation share the resulting CSS
69
+ and face definitions; current token values, configuration and consuming styles still
70
+ determine the result. An edited source/stylesheet, added or deleted input, or a sibling
71
+ draft receives its own revision. The cache cannot fall back to newer disk bytes.
72
+
73
+ Acceptance captures an unchanged original/candidate input scope once at each
74
+ freshness boundary; a configuration change retains both distinct scopes. Comparing
75
+ a reviewed preview's inputs is only needed when such a preview workspace exists.
76
+ Before/after validation captures and exact-byte publication checks remain required.
77
+ Browser-preview planning runs only when the accepted owners have selected behavior
78
+ checks and the project has a preview framework; an empty behavior selection needs
79
+ no additional discovery query. Render-audit planning remains independent.
80
+
81
+ A warm-check miss derives its key and compiler source bytes from one capture,
82
+ then captures again after checking. A hit still captures current inputs before
83
+ consuming the report. Draft preparation shares the inventory used in its inspected
84
+ revision with workspace population; targeted live conflict checks remain separate.
85
+ Neither optimization retains live input state across operations or removes an
86
+ acceptance/publication freshness boundary.
87
+
63
88
  ## Controls
64
89
 
65
90
  | Control | Behavior |
package/docs/CHANGELOG.md CHANGED
@@ -1,91 +1,114 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
4
-
5
- - Test and release verification always start unit, integration and browser groups
6
- together after one shared build. Each group retains its worker settings; the
7
- overlap-mode setting is removed.
8
- - Spatial checks protect generated geometry through composed selector branches,
9
- attributes, escaped/cased properties and keyframes. Unknown attribute values
10
- cannot certify cell ownership or hide a possible override. Draft rejection and
11
- repaired publication use the same checks; focused benchmarks cover these paths.
12
-
13
- - ADS's showcase has one popover surface, the new `Popover` component: chrome background, square
14
- corners, a chrome border and a light shadow. The layout-guides menu and the preview-status
15
- popover both render inside it.
16
- - The preview-status popover is readable: a title with the problem count, one entry per
17
- diagnostic (location, rule, first sentence, the rest under "Why and how to fix"), and a footer
18
- with background progress and an outlined Retry preview (`ToolbarButton variant="outlined"`).
19
- Only the problem list scrolls. The host renders the same structure (`PreviewMessageContent`).
20
-
21
- - Tokens → Grid system adds Units and scale (fine and mini unit, each scale step at its real
22
- width in mini units), Grid roles (each role the spatial definition names, its `var()` chain to
23
- the primitive and its measured value) and hybrid, docked-panel and floating-panel examples
24
- compiled from `@ads-layout`. Everything follows the project's own spatial definition and token
25
- names.
26
- - In Tokens → Grid system, each token in a role's chain (and in the breakpoint table's margins)
27
- is a link: it opens the token page that shows it and highlights the token.
28
-
29
- - MCP serves the tokens as W3C Design Tokens JSON at `ads://project/tokens/dtcg` (template
30
- `ads://project/tokens/dtcg{?theme,brand}`): the same export as `ads tokens --format dtcg`,
31
- updated with the token sheets. `ads_tokens` returns its address as `dtcgUri`.
32
-
33
- ## 0.4.2
3
+ ## 0.4.3
34
4
 
35
5
  <!-- ads-local-tests:start -->
36
- Local verification: **799/799 passed** with `bun run test`.
37
- Tested commit: `c2ecb91194b3ecab7d0a010e361548df03e73cce`; Bun 1.4.4.
38
- Completed 2026-11-06T16:27:21.331Z (502 seconds).
6
+ Local verification: **833/833 passed** with `bun run test`.
7
+ Tested commit: `b461dfe801b0fb0871ae814a0d75cc1e5db47b3e`; Bun 1.4.4.
8
+ Completed 2026-11-07T10:14:03.979Z (798 seconds).
39
9
 
40
10
  <!-- ads-local-test-proof
41
11
  {
42
12
  "schema": 3,
43
- "version": "0.4.2",
44
- "commit": "c2ecb91194b3ecab7d0a010e361548df03e73cce",
45
- "sourceSha256": "7281971700ccfdfcd7869a733cc426160f51209b8b4de3eef1ebcbeecd5b6347",
13
+ "version": "0.4.3",
14
+ "commit": "b461dfe801b0fb0871ae814a0d75cc1e5db47b3e",
15
+ "sourceSha256": "049f372686fea898cb3829668c6e3071c766bd18722c9270b26d596bf5e69937",
46
16
  "command": "bun run test",
47
17
  "result": "pass",
48
- "tests": 799,
49
- "pass": 799,
18
+ "tests": 833,
19
+ "pass": 833,
50
20
  "fail": 0,
51
21
  "skipped": 0,
52
22
  "groups": [
53
23
  {
54
24
  "name": "unit",
55
- "tests": 73,
56
- "pass": 73,
25
+ "tests": 83,
26
+ "pass": 83,
57
27
  "fail": 0,
58
28
  "skipped": 0,
59
- "reportSha256": "84828dc13b9225c9aaea6d5589bc8bca1fed9a7ba0c07a3179b2548dbc410104"
29
+ "reportSha256": "eaa05144b54ab4d694bbd66ab29c741d46eecbdef5eb6d9d5de5805b302f05c4"
60
30
  },
61
31
  {
62
32
  "name": "integration",
63
- "tests": 586,
64
- "pass": 586,
33
+ "tests": 603,
34
+ "pass": 603,
65
35
  "fail": 0,
66
36
  "skipped": 0,
67
- "reportSha256": "4473e231cd8ebe36354d49f77152fa07cdb50167a5d69d81974aec72bdebe7f9"
37
+ "reportSha256": "e7bf889b404194e73f0662ddc2a789dfc45e57190bf6afa9b3f0095f4b5aa1ec"
68
38
  },
69
39
  {
70
40
  "name": "browser",
71
- "tests": 140,
72
- "pass": 140,
41
+ "tests": 147,
42
+ "pass": 147,
73
43
  "fail": 0,
74
44
  "skipped": 0,
75
- "reportSha256": "c06f9e59587927e97e919860041af3dde1ca32df44d8db196c1ca0e19797ddbf"
45
+ "reportSha256": "4f08212c482bf42a7914e1e51b89964a884e730827c7eafb60a2609d3c6f5285"
76
46
  }
77
47
  ],
78
48
  "testOverrides": {
79
- "ADS_BROWSER_WORKERS": "6"
49
+ "ADS_BROWSER_WORKERS": "2"
80
50
  },
81
51
  "bun": "1.4.4",
82
- "completedAt": "2026-11-06T16:27:21.331Z",
83
- "durationMs": 502311,
84
- "logSha256": "06ccc42a9795f8dac7ca9ff0c862702ea53ff7eeaea2a0e561db189a87d9c439"
52
+ "completedAt": "2026-11-07T10:14:03.979Z",
53
+ "durationMs": 798441,
54
+ "logSha256": "8de81a9e0439a8ee1c3a4304e300f30f20a3e8844644b56610ca916c287f9d92"
85
55
  }
86
56
  -->
87
57
  <!-- ads-local-tests:end -->
88
58
 
59
+ - Audit contrast on the project's canvas without decorative showcase staging, preserving subject framing. Measure image shape against its content or CSS sizing box so borders, padding and rotated bounding rectangles do not cause false failures.
60
+
61
+ - Detect text contrast across source-resolvable component composition, including inherited ancestor backgrounds and forwarded children; report uncertain cascades for rendered auditing without requiring custom token-pair declarations.
62
+
63
+ - Reuse native resolver leases and compiler options within input capture; share captured bytes across warm-check keys/analysis and draft inspection/preparation, preserving post-check and publication freshness checks.
64
+
65
+ - Share native import-resolution queries between sibling source files during input capture, avoiding repeated resolver work while preserving freshness checks.
66
+ - Avoid duplicate acceptance inventories for identical input scopes, skip preview-workspace comparisons when there is no reviewed preview, and skip browser-behavior planning for an empty behavior selection.
67
+
68
+ - Reuse captured native ASTs for image/accessibility checks and share font/CSS facts across requests on an immutable revision, preserving dependency-sensitive checks.
69
+
70
+ - Add a separate pictogram catalogue/gallery, explicit theme variants, SVG source guards and rendered artwork checks, with an original shared-starter example.
71
+
72
+ - `component-contrast` applies WCAG's large-text minimum: a pair needs 3:1 instead of
73
+ 4.5:1 where its block or an enclosing block declares `font-size` of at least 24px, or
74
+ 18.66px at `font-weight` 700 or more, in `px`, `pt` or `rem`, literally or through a
75
+ token resolved per theme and brand. Other sizes keep 4.5:1. Each failing context reports
76
+ its `minimum`.
77
+
78
+ - Keep showcase subject framing stable during preview reloads. Full-frame
79
+ subjects no longer briefly acquire specimen padding while resources or fonts
80
+ load; replacement roots and delayed framework mounts resolve padding before paint.
81
+
82
+ ## 0.4.2
83
+
84
+ - Test and release verification always start unit, integration and browser groups
85
+ together after one shared build. Each group retains its worker settings; the
86
+ overlap-mode setting is removed.
87
+ - Spatial checks protect generated geometry through composed selector branches,
88
+ attributes, escaped/cased properties and keyframes. Unknown attribute values
89
+ cannot certify cell ownership or hide a possible override. Draft rejection and
90
+ repaired publication use the same checks; focused benchmarks cover these paths.
91
+
92
+ - ADS's showcase has one popover surface, the new `Popover` component: chrome background, square
93
+ corners, a chrome border and a light shadow. The layout-guides menu and the preview-status
94
+ popover both render inside it.
95
+ - The preview-status popover is readable: a title with the problem count, one entry per
96
+ diagnostic (location, rule, first sentence, the rest under "Why and how to fix"), and a footer
97
+ with background progress and an outlined Retry preview (`ToolbarButton variant="outlined"`).
98
+ Only the problem list scrolls. The host renders the same structure (`PreviewMessageContent`).
99
+
100
+ - Tokens → Grid system adds Units and scale (fine and mini unit, each scale step at its real
101
+ width in mini units), Grid roles (each role the spatial definition names, its `var()` chain to
102
+ the primitive and its measured value) and hybrid, docked-panel and floating-panel examples
103
+ compiled from `@ads-layout`. Everything follows the project's own spatial definition and token
104
+ names.
105
+ - In Tokens → Grid system, each token in a role's chain (and in the breakpoint table's margins)
106
+ is a link: it opens the token page that shows it and highlights the token.
107
+
108
+ - MCP serves the tokens as W3C Design Tokens JSON at `ads://project/tokens/dtcg` (template
109
+ `ads://project/tokens/dtcg{?theme,brand}`): the same export as `ads tokens --format dtcg`,
110
+ updated with the token sheets. `ads_tokens` returns its address as `dtcgUri`.
111
+
89
112
  - ADS runs on Bun with one asynchronous native TypeScript analysis engine. Checks,
90
113
  contract discovery, change selection and draft acceptance share captured inputs,
91
114
  ASTs and cached facts; draft branches retain isolation and exact-byte publication.
package/docs/GUIDE.md CHANGED
@@ -573,7 +573,13 @@ choosing another ramp step.
573
573
  Linaria style block (the template's top level, a nested block such as `&:hover` or
574
574
  `&[aria-selected="true"]`, or an at-rule) declares both `color: var(--a)` and
575
575
  `background` or `background-color: var(--b)`, the pair needs 4.5:1 in every theme and brand,
576
- resolved and composited as `token-contrast` resolves it. Local custom properties set in the
576
+ resolved and composited as `token-contrast` resolves it. Large text needs 3:1 (WCAG 1.4.3):
577
+ where the block or an enclosing block declares `font-size` of at least 24px, or at least
578
+ 18.66px with `font-weight` 700 or more, in `px`, `pt` or `rem` (a 16px root), literally or
579
+ through a token resolved per theme and brand. Other sizes (`em`, `%`, `calc()`, keywords,
580
+ the `font` shorthand) are not known to be large and keep 4.5:1; a size set by another
581
+ composed class is not seen, so declare it in the block that pairs the colors. Each failing
582
+ context reports its `minimum`. Local custom properties set in the
577
583
  block or an enclosing block resolve one level; an undeclared one reads its `var()` fallback.
578
584
  Fix it with the role contract: `--x-text` on
579
585
  `--x-bg`, `--x-fg` on `--x` (not `--success` as text on `--success-bg`). Disabled states
@@ -582,9 +588,26 @@ Fix it with the role contract: `--x-text` on
582
588
  sides and native `<progress>`, `<meter>` and range parts are skipped. A side that names no
583
589
  declared color token is a `component-contrast-unresolved` info item; so is text matching the
584
590
  canvas (under 1.25:1) over a translucent background, which sits on another backdrop.
585
- Pairs `token-contrast` checks are not repeated. A `color-contrast` audit finding that
586
- neither static check reports comes from colors the block does not pair itself, such as text
587
- inheriting its color onto a nested background.
591
+ Pairs `token-contrast` checks are not repeated.
592
+
593
+ The same rule also follows source-resolvable owned JSX composition: imported component
594
+ calls, wrappers forwarding `children`, fragments, returned style objects and separate
595
+ Linaria classes. For actual text, it checks the resolved foreground against the element's
596
+ background or an owned ancestor's background, across themes and brands. For example, a
597
+ link using `--text-product` inside a panel using `--bg-menu` is checked automatically;
598
+ there is no custom pair declaration to remember. Transparent wrappers preserve the
599
+ backdrop; translucent token layers need a known opaque ancestor. Composed text can use a
600
+ known inherited font size/weight. Hidden and disabled text is excluded; matching text and
601
+ background tokens are still an error when the source proves that text is rendered.
602
+
603
+ This composition pass does not guess the browser cascade. Competing classes, differing
604
+ class/interpolation alternatives, unknown prop spreads or components, conditional or
605
+ descendant paint selectors, gradients, opacity, filters, out-of-flow positioning and
606
+ missing backdrops produce `component-contrast-unresolved` info where contrast evidence
607
+ is incomplete. SVG text, native control value/placeholder text and dynamically generated
608
+ DOM remain browser-audit concerns. An informational limit is not a contrast pass: run
609
+ `ads audit` on the affected composed scenario and interaction states. Axe remains the
610
+ rendered check, including actual cascade, visibility and backgrounds.
588
611
 
589
612
  **Static accessibility.** Errors: `a11y-target-size` (`--control-height-*` at least 24 px),
590
613
  `a11y-focus` (`--focus-w` at least 2 px and a `:focus-visible` indicator in `base.css`),
@@ -741,7 +764,7 @@ demo frame to a maximum.
741
764
  |---|---|---|
742
765
  | `img-attributes` | `ads check` | A raw `<img>` in components, patterns or compositions without `loading`, or without `width` and `height`, a visible `aspect-ratio`, a width and height in its style, or out-of-flow positioning. A `srcset` with width descriptors and no `sizes`, on `<img>` or the project's `Image`. A spread or a class from elsewhere is an `img-attributes-unresolved` info item |
743
766
  | `asset-image-budget` | `ads check` | An image in `assets/` over its limit: SVG 100 KB, WebP and AVIF 300 KB, JPEG 400 KB, PNG and GIF 500 KB. `assets.imageBudgetKb` is one limit for every format |
744
- | `img-shape` | `ads audit` | A visible image whose box differs from its CSS `aspect-ratio`, or, with none and `object-fit: fill`, from its `width` and `height`. A height attribute beats `aspect-ratio`: add `height: auto`. `object-fit: cover` in a box of its own with no `aspect-ratio` is a deliberate crop |
767
+ | `img-shape` | `ads audit` | A visible image whose CSS sizing box differs from its explicit `aspect-ratio`, or, with none and `object-fit: fill`, whose content box differs from its `width` and `height`. Explicit CSS ratios respect `box-sizing`; attribute ratios exclude border and padding. A height attribute beats `aspect-ratio`: add `height: auto`. `object-fit: cover` in a box of its own with no `aspect-ratio` is a deliberate crop |
745
768
  | `layout-shift` | `ads audit` | A scenario with Cumulative Layout Shift above 0.1 on first render, where the browser reports it (Chromium) |
746
769
  | `themes-generated` | `ads check` | A stale `tokens/fonts.preload.generated.ts` |
747
770
  | `font-weight-missing` | `ads check` | CSS uses a weight of a family `tokens/fonts.css` declares and no face covers it. A range such as `100 900`, or a face with no `font-weight`, covers what it spans. A weight in a rule with no `font-family` counts against the body's family |
@@ -1422,3 +1445,5 @@ trusted local verification, not a signed attestation or a substitute for review.
1422
1445
 
1423
1446
  Release CI checks the committed proof, builds and packs the tool, and publishes
1424
1447
  the tagged version with its changelog entry as the release notes. It does not repeat the local browser/package suite.
1448
+
1449
+ To add illustrative SVG artwork, use `design-system/assets/pictograms/catalog.ads.json` and the separate **Pictograms** showcase section. The starter includes a Journey example and a project-owned Pictogram component. Read the [pictogram guide](../skills/ads-designer/references/pictograms.md) for full-color artwork, theme selection, accessibility and checks. Brand identity and UI icons keep their own sections.
package/docs/MCP.md CHANGED
@@ -340,6 +340,12 @@ returns it as `dtcgUri`). If the client cannot render Apps, use the returned
340
340
  showcase URL. Build reports identify current, stale and failed output; browser
341
341
  review and project checks still verify behavior.
342
342
 
343
+ Pictograms are discoverable with `ads_scenarios({kind: "pictograms"})` and preview
344
+ ids `pictograms/<id>`. Their source owner is `assets/pictograms`; its drafts attach
345
+ to those gallery entries. `ads://guides/pictograms` documents the catalogue, theme
346
+ rules, artistic freedom and render-guard limits. They are tool-owned foundation
347
+ views, not authored `.ads.scenario.tsx` files.
348
+
343
349
  The server supplies agent guidance through its instructions, tool descriptions,
344
350
  `ads://project/guide` and packaged ADS skills.
345
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.4.2",
3
+ "version": "0.4.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": {
@@ -66,6 +66,7 @@
66
66
  "postcss": "^8.5.30",
67
67
  "postcss-selector-parser": "^7.1.6",
68
68
  "postcss-value-parser": "^4.2.0",
69
+ "saxes": "6.0.0",
69
70
  "sharp": "^0.35.5",
70
71
  "turbo": "2.11.10",
71
72
  "typescript": "7.1.0-beta",