@reqvire-org/ads 0.3.23 → 0.3.25

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 (37) hide show
  1. package/dist/behaviors.mjs +6 -4
  2. package/dist/config.mjs +2 -1
  3. package/dist/contract-migration.mjs +1 -1
  4. package/dist/contracts.d.mts +2 -2
  5. package/dist/declarative-flow.mjs +144 -0
  6. package/dist/mcp/catalog.mjs +4 -2
  7. package/dist/mcp/mutations.mjs +4 -4
  8. package/dist/mcp/preview-widget.bundle.js +5 -5
  9. package/dist/runtime-contracts.mjs +26 -37
  10. package/dist/scenario-trace.mjs +47 -18
  11. package/dist/scenarios.mjs +1 -1
  12. package/dist/showcase/client.bundle.js +15 -15
  13. package/dist/skills/ads-break-ui/SKILL.md +2 -1
  14. package/dist/skills/ads-break-ui/references/contracts.md +50 -3
  15. package/dist/skills/ads-break-ui/references/guarded-editing.md +10 -0
  16. package/dist/skills/ads-designer/SKILL.md +2 -1
  17. package/dist/skills/ads-designer/references/contracts.md +50 -3
  18. package/dist/skills/ads-designer/references/guarded-editing.md +10 -0
  19. package/dist/skills/ads-import/SKILL.md +2 -1
  20. package/dist/skills/ads-import/references/contracts.md +50 -3
  21. package/dist/skills/ads-import/references/guarded-editing.md +10 -0
  22. package/dist/skills/ads-migrate/SKILL.md +2 -1
  23. package/dist/skills/ads-migrate/references/contracts.md +50 -3
  24. package/dist/skills/ads-migrate/references/guarded-editing.md +10 -0
  25. package/dist/skills/ads-motion/SKILL.md +2 -1
  26. package/dist/skills/ads-motion/references/contracts.md +50 -3
  27. package/dist/skills/ads-motion/references/guarded-editing.md +10 -0
  28. package/dist/source-values.mjs +3 -3
  29. package/dist/unit-contracts.mjs +23 -4
  30. package/dist/verification/browser.mjs +2 -0
  31. package/docs/ARCHITECTURE.md +5 -0
  32. package/docs/BEHAVIORS.md +8 -0
  33. package/docs/CHANGELOG.md +21 -0
  34. package/docs/CONTRACTS.md +50 -3
  35. package/docs/GUIDE.md +3 -1
  36. package/docs/MCP.md +23 -4
  37. package/package.json +1 -1
@@ -357,5 +357,6 @@ Source credits and retained MIT terms: [README.md](README.md) and
357
357
  [LICENSE.upstream](LICENSE.upstream).
358
358
 
359
359
  For static owner contracts, `.ads.` development roles, typed paint/binding APIs,
360
- declarative evidence, token privacy and guarded migration, read
360
+ declarative parent graphs, constrained theme bindings, private visual subject roles,
361
+ token privacy and guarded migration, read
361
362
  [contracts.md](references/contracts.md) when the task touches those contracts.
@@ -75,7 +75,7 @@ export default {
75
75
  { api: Series, parent: Plot, consumer: Renderer, checks: ["isolation"] },
76
76
  ],
77
77
  behavior: {
78
- subjects: { plot: { api: Plot }, renderer: { implementation: Renderer } },
78
+ subjects: { plot: { api: Plot }, renderer: { implementation: Renderer, role: "implementation" } },
79
79
  guarantees: [{
80
80
  id: "scoped-output",
81
81
  description: "Changing either instance updates only its own output.",
@@ -97,7 +97,13 @@ Symbol references resolve through normal imports, aliases and re-exports.
97
97
  Calls, getters, methods, computed metadata and environment-dependent expressions
98
98
  are rejected. Function references are opaque identities, never executed.
99
99
  Private implementation subjects may be internal module exports without becoming
100
- public barrel exports. Producers/consumers must belong to the same owner. Required
100
+ public barrel exports. Private subjects default to the existing headless controller
101
+ contract. Use `role: "controller"` explicitly for behavior-only code, or
102
+ `role: "implementation"` for a private visual renderer or binding producer whose
103
+ guarantees should be tracked without classifying it as a controller. Shared
104
+ `controllers/` source always remains headless. An implementation role retains
105
+ normal ownership, dependency, styling and development boundaries; it is not a
106
+ style exception. Producers/consumers must belong to the same owner. Required
101
107
  checks must exist, back named guarantees and use a browser profile with the
102
108
  corresponding scenario. A relationship is registration, not a passing guarantee.
103
109
 
@@ -145,6 +151,19 @@ it does not authorize arbitrary inline styling, CSSProperties APIs or bulk write
145
151
  Unsupported dynamic producers/attachment paths fail with an analysis diagnostic.
146
152
  Keep the implementation project-owned; there is no required ADS binding helper.
147
153
 
154
+ A producer with alternative/derived sources declares each entry path, for example:
155
+
156
+ ```ts
157
+ valueFrom: ["paint", "scheme.day", "scheme.night"],
158
+ ```
159
+
160
+ Register each matching `config.*.<path>` in `paintInputs`. The producer may write
161
+ one declared field, or an exact `light-dark(${entry.scheme.day}, ${entry.scheme.night})`
162
+ template over two declared fields. The normal key/map/root proof still applies.
163
+ Raw constants, undeclared fields, extra writes and unknown transforms are rejected.
164
+ The browser audit checks actual accessible color references in both branches;
165
+ a local SVG URL or `none` is not a CSS color inside `light-dark()`.
166
+
148
167
  Families cannot overlap shared tokens, owner-token namespaces, private runtime
149
168
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
150
169
  shared-token exception. Use a distinct private family where collision freedom
@@ -152,6 +171,13 @@ cannot be established. Registered paint consumers list their allowed binding IDs
152
171
  borrowing a peer's family or private token remains invalid. Bindings are scoped
153
172
  to their actual root; portals outside it need deliberate project integration.
154
173
 
174
+ A registered binding producer may combine two accessible color references as
175
+ `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
176
+ both branches and their observed effect in the active color scheme. Raw colors,
177
+ unknown/private tokens and SVG URLs inside this color function remain invalid.
178
+ This derived binding form does not widen public paint-input types; use constrained
179
+ references for each theme input and verify both color schemes in browser checks.
180
+
155
181
  The App audit checks current mounted instances, accessible values, local SVG
156
182
  resources and computed paint-property responses. Visibility and complete rendered
157
183
  output still need assertions in the registered browser checks. It rejects missing/duplicate IDs and reports unobserved written values separately. It is bounded to 100 families, 20 instances per family, 100 keys
@@ -177,9 +203,30 @@ export const scenario = {
177
203
  };
178
204
  ```
179
205
 
180
- The real part must reach its registered consumer through a rendered parent.
206
+ A part may register several distinct parents; each API/parent pair has one
207
+ consumer/check declaration. A parent may itself be a registered declarative part.
208
+ The graph must be acyclic and every parent chain must reach a public rendering
209
+ root. Duplicate pairs, cycles and detached part graphs fail.
210
+
211
+ For example, `Entry` can belong to `FirstView` and `SecondView`, while `Detail`
212
+ belongs to `Entry`. The scenario covers the rendering roots and exercises both
213
+ `Entry` and `Detail`. A nested `Detail` outside its registered parent does not count.
214
+
215
+ The real part must reach its registered consumer through a rendering parent.
181
216
  ADS resolves source identity comparisons (`child.type === Series`, including a
182
217
  traceable comparison helper) and reads of that same child’s props traced from the consumer’s children input.
218
+ Traceable paths include local recursive fragment flattening, `find`/`filter`,
219
+ callback aliases and props carried through local records. Reusing a review layout
220
+ inside another instance of itself is ordinary component composition, not a
221
+ recursive helper call. Source sites/work limits still bound analysis.
222
+
223
+ `exercises` establishes reachable behavioral use, including a conditional state
224
+ and mapped literal fixture data; it does not promise unconditional initial DOM.
225
+ Always-false branches, unused adapters, empty/unknown fixture maps and broken
226
+ parent chains grant no credit. `covers` retains its rendering contract. Required
227
+ browser checks cover a rendering root and exercise the relevant parent/child
228
+ chain, then verify adding/removing/updating the part changes actual output.
229
+
183
230
  A comparison against a decoy object gives no evidence. An import, unrelated parent, unused
184
231
  child or metadata claim gives no consumption credit. Unknown render branches are
185
232
  conservative. Browser checks must verify that adding/removing/changing the part
@@ -28,6 +28,16 @@ as passing evidence for the live project.
28
28
  draft argument. There is no dedicated selected-check runner for drafts yet.
29
29
  Use a dry-run transaction for genuinely coupled draft patches.
30
30
 
31
+ Build notifications are deferred until the showcase finishes initial discovery;
32
+ a preview cannot be opened with an incomplete tool list. A missing App tool is a
33
+ host-startup failure, not evidence that component behavior failed. Preserve the
34
+ draft and inspect the host diagnostic.
35
+
36
+ Registered project scripts default to 60 seconds each. A guarded configuration
37
+ change can set `mcp.mutationCheckTimeoutMs` (100–300000 ms) after measuring build
38
+ duration and contention. Timeouts name the command, budget and elapsed time;
39
+ behavior-profile budgets are separate. Do not drop checks to fit either budget.
40
+
31
41
  Behavior-run performance belongs to both orchestration and project checks. ADS
32
42
  selects affected owners, filters registered Playwright case tags and shares one
33
43
  candidate host per run. The project owns assertions, browser setup, worker count,
@@ -524,5 +524,6 @@ A screenshot alone does not prove behavior or animation. Validate public imports
524
524
  CSS/asset resolution, required setup, and local documentation links.
525
525
 
526
526
  For static owner contracts, `.ads.` development roles, typed paint/binding APIs,
527
- declarative evidence, token privacy and guarded migration, read
527
+ declarative parent graphs, constrained theme bindings, private visual subject roles,
528
+ token privacy and guarded migration, read
528
529
  [contracts.md](references/contracts.md) when the task touches those contracts.
@@ -75,7 +75,7 @@ export default {
75
75
  { api: Series, parent: Plot, consumer: Renderer, checks: ["isolation"] },
76
76
  ],
77
77
  behavior: {
78
- subjects: { plot: { api: Plot }, renderer: { implementation: Renderer } },
78
+ subjects: { plot: { api: Plot }, renderer: { implementation: Renderer, role: "implementation" } },
79
79
  guarantees: [{
80
80
  id: "scoped-output",
81
81
  description: "Changing either instance updates only its own output.",
@@ -97,7 +97,13 @@ Symbol references resolve through normal imports, aliases and re-exports.
97
97
  Calls, getters, methods, computed metadata and environment-dependent expressions
98
98
  are rejected. Function references are opaque identities, never executed.
99
99
  Private implementation subjects may be internal module exports without becoming
100
- public barrel exports. Producers/consumers must belong to the same owner. Required
100
+ public barrel exports. Private subjects default to the existing headless controller
101
+ contract. Use `role: "controller"` explicitly for behavior-only code, or
102
+ `role: "implementation"` for a private visual renderer or binding producer whose
103
+ guarantees should be tracked without classifying it as a controller. Shared
104
+ `controllers/` source always remains headless. An implementation role retains
105
+ normal ownership, dependency, styling and development boundaries; it is not a
106
+ style exception. Producers/consumers must belong to the same owner. Required
101
107
  checks must exist, back named guarantees and use a browser profile with the
102
108
  corresponding scenario. A relationship is registration, not a passing guarantee.
103
109
 
@@ -145,6 +151,19 @@ it does not authorize arbitrary inline styling, CSSProperties APIs or bulk write
145
151
  Unsupported dynamic producers/attachment paths fail with an analysis diagnostic.
146
152
  Keep the implementation project-owned; there is no required ADS binding helper.
147
153
 
154
+ A producer with alternative/derived sources declares each entry path, for example:
155
+
156
+ ```ts
157
+ valueFrom: ["paint", "scheme.day", "scheme.night"],
158
+ ```
159
+
160
+ Register each matching `config.*.<path>` in `paintInputs`. The producer may write
161
+ one declared field, or an exact `light-dark(${entry.scheme.day}, ${entry.scheme.night})`
162
+ template over two declared fields. The normal key/map/root proof still applies.
163
+ Raw constants, undeclared fields, extra writes and unknown transforms are rejected.
164
+ The browser audit checks actual accessible color references in both branches;
165
+ a local SVG URL or `none` is not a CSS color inside `light-dark()`.
166
+
148
167
  Families cannot overlap shared tokens, owner-token namespaces, private runtime
149
168
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
150
169
  shared-token exception. Use a distinct private family where collision freedom
@@ -152,6 +171,13 @@ cannot be established. Registered paint consumers list their allowed binding IDs
152
171
  borrowing a peer's family or private token remains invalid. Bindings are scoped
153
172
  to their actual root; portals outside it need deliberate project integration.
154
173
 
174
+ A registered binding producer may combine two accessible color references as
175
+ `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
176
+ both branches and their observed effect in the active color scheme. Raw colors,
177
+ unknown/private tokens and SVG URLs inside this color function remain invalid.
178
+ This derived binding form does not widen public paint-input types; use constrained
179
+ references for each theme input and verify both color schemes in browser checks.
180
+
155
181
  The App audit checks current mounted instances, accessible values, local SVG
156
182
  resources and computed paint-property responses. Visibility and complete rendered
157
183
  output still need assertions in the registered browser checks. It rejects missing/duplicate IDs and reports unobserved written values separately. It is bounded to 100 families, 20 instances per family, 100 keys
@@ -177,9 +203,30 @@ export const scenario = {
177
203
  };
178
204
  ```
179
205
 
180
- The real part must reach its registered consumer through a rendered parent.
206
+ A part may register several distinct parents; each API/parent pair has one
207
+ consumer/check declaration. A parent may itself be a registered declarative part.
208
+ The graph must be acyclic and every parent chain must reach a public rendering
209
+ root. Duplicate pairs, cycles and detached part graphs fail.
210
+
211
+ For example, `Entry` can belong to `FirstView` and `SecondView`, while `Detail`
212
+ belongs to `Entry`. The scenario covers the rendering roots and exercises both
213
+ `Entry` and `Detail`. A nested `Detail` outside its registered parent does not count.
214
+
215
+ The real part must reach its registered consumer through a rendering parent.
181
216
  ADS resolves source identity comparisons (`child.type === Series`, including a
182
217
  traceable comparison helper) and reads of that same child’s props traced from the consumer’s children input.
218
+ Traceable paths include local recursive fragment flattening, `find`/`filter`,
219
+ callback aliases and props carried through local records. Reusing a review layout
220
+ inside another instance of itself is ordinary component composition, not a
221
+ recursive helper call. Source sites/work limits still bound analysis.
222
+
223
+ `exercises` establishes reachable behavioral use, including a conditional state
224
+ and mapped literal fixture data; it does not promise unconditional initial DOM.
225
+ Always-false branches, unused adapters, empty/unknown fixture maps and broken
226
+ parent chains grant no credit. `covers` retains its rendering contract. Required
227
+ browser checks cover a rendering root and exercise the relevant parent/child
228
+ chain, then verify adding/removing/updating the part changes actual output.
229
+
183
230
  A comparison against a decoy object gives no evidence. An import, unrelated parent, unused
184
231
  child or metadata claim gives no consumption credit. Unknown render branches are
185
232
  conservative. Browser checks must verify that adding/removing/changing the part
@@ -28,6 +28,16 @@ as passing evidence for the live project.
28
28
  draft argument. There is no dedicated selected-check runner for drafts yet.
29
29
  Use a dry-run transaction for genuinely coupled draft patches.
30
30
 
31
+ Build notifications are deferred until the showcase finishes initial discovery;
32
+ a preview cannot be opened with an incomplete tool list. A missing App tool is a
33
+ host-startup failure, not evidence that component behavior failed. Preserve the
34
+ draft and inspect the host diagnostic.
35
+
36
+ Registered project scripts default to 60 seconds each. A guarded configuration
37
+ change can set `mcp.mutationCheckTimeoutMs` (100–300000 ms) after measuring build
38
+ duration and contention. Timeouts name the command, budget and elapsed time;
39
+ behavior-profile budgets are separate. Do not drop checks to fit either budget.
40
+
31
41
  Behavior-run performance belongs to both orchestration and project checks. ADS
32
42
  selects affected owners, filters registered Playwright case tags and shares one
33
43
  candidate host per run. The project owns assertions, browser setup, worker count,
@@ -457,5 +457,6 @@ demo URLs only when running; clean up
457
457
  temporary comparison servers when finished unless the user requested they remain.
458
458
 
459
459
  For static owner contracts, `.ads.` development roles, typed paint/binding APIs,
460
- declarative evidence, token privacy and guarded migration, read
460
+ declarative parent graphs, constrained theme bindings, private visual subject roles,
461
+ token privacy and guarded migration, read
461
462
  [contracts.md](references/contracts.md) when the task touches those contracts.
@@ -75,7 +75,7 @@ export default {
75
75
  { api: Series, parent: Plot, consumer: Renderer, checks: ["isolation"] },
76
76
  ],
77
77
  behavior: {
78
- subjects: { plot: { api: Plot }, renderer: { implementation: Renderer } },
78
+ subjects: { plot: { api: Plot }, renderer: { implementation: Renderer, role: "implementation" } },
79
79
  guarantees: [{
80
80
  id: "scoped-output",
81
81
  description: "Changing either instance updates only its own output.",
@@ -97,7 +97,13 @@ Symbol references resolve through normal imports, aliases and re-exports.
97
97
  Calls, getters, methods, computed metadata and environment-dependent expressions
98
98
  are rejected. Function references are opaque identities, never executed.
99
99
  Private implementation subjects may be internal module exports without becoming
100
- public barrel exports. Producers/consumers must belong to the same owner. Required
100
+ public barrel exports. Private subjects default to the existing headless controller
101
+ contract. Use `role: "controller"` explicitly for behavior-only code, or
102
+ `role: "implementation"` for a private visual renderer or binding producer whose
103
+ guarantees should be tracked without classifying it as a controller. Shared
104
+ `controllers/` source always remains headless. An implementation role retains
105
+ normal ownership, dependency, styling and development boundaries; it is not a
106
+ style exception. Producers/consumers must belong to the same owner. Required
101
107
  checks must exist, back named guarantees and use a browser profile with the
102
108
  corresponding scenario. A relationship is registration, not a passing guarantee.
103
109
 
@@ -145,6 +151,19 @@ it does not authorize arbitrary inline styling, CSSProperties APIs or bulk write
145
151
  Unsupported dynamic producers/attachment paths fail with an analysis diagnostic.
146
152
  Keep the implementation project-owned; there is no required ADS binding helper.
147
153
 
154
+ A producer with alternative/derived sources declares each entry path, for example:
155
+
156
+ ```ts
157
+ valueFrom: ["paint", "scheme.day", "scheme.night"],
158
+ ```
159
+
160
+ Register each matching `config.*.<path>` in `paintInputs`. The producer may write
161
+ one declared field, or an exact `light-dark(${entry.scheme.day}, ${entry.scheme.night})`
162
+ template over two declared fields. The normal key/map/root proof still applies.
163
+ Raw constants, undeclared fields, extra writes and unknown transforms are rejected.
164
+ The browser audit checks actual accessible color references in both branches;
165
+ a local SVG URL or `none` is not a CSS color inside `light-dark()`.
166
+
148
167
  Families cannot overlap shared tokens, owner-token namespaces, private runtime
149
168
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
150
169
  shared-token exception. Use a distinct private family where collision freedom
@@ -152,6 +171,13 @@ cannot be established. Registered paint consumers list their allowed binding IDs
152
171
  borrowing a peer's family or private token remains invalid. Bindings are scoped
153
172
  to their actual root; portals outside it need deliberate project integration.
154
173
 
174
+ A registered binding producer may combine two accessible color references as
175
+ `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
176
+ both branches and their observed effect in the active color scheme. Raw colors,
177
+ unknown/private tokens and SVG URLs inside this color function remain invalid.
178
+ This derived binding form does not widen public paint-input types; use constrained
179
+ references for each theme input and verify both color schemes in browser checks.
180
+
155
181
  The App audit checks current mounted instances, accessible values, local SVG
156
182
  resources and computed paint-property responses. Visibility and complete rendered
157
183
  output still need assertions in the registered browser checks. It rejects missing/duplicate IDs and reports unobserved written values separately. It is bounded to 100 families, 20 instances per family, 100 keys
@@ -177,9 +203,30 @@ export const scenario = {
177
203
  };
178
204
  ```
179
205
 
180
- The real part must reach its registered consumer through a rendered parent.
206
+ A part may register several distinct parents; each API/parent pair has one
207
+ consumer/check declaration. A parent may itself be a registered declarative part.
208
+ The graph must be acyclic and every parent chain must reach a public rendering
209
+ root. Duplicate pairs, cycles and detached part graphs fail.
210
+
211
+ For example, `Entry` can belong to `FirstView` and `SecondView`, while `Detail`
212
+ belongs to `Entry`. The scenario covers the rendering roots and exercises both
213
+ `Entry` and `Detail`. A nested `Detail` outside its registered parent does not count.
214
+
215
+ The real part must reach its registered consumer through a rendering parent.
181
216
  ADS resolves source identity comparisons (`child.type === Series`, including a
182
217
  traceable comparison helper) and reads of that same child’s props traced from the consumer’s children input.
218
+ Traceable paths include local recursive fragment flattening, `find`/`filter`,
219
+ callback aliases and props carried through local records. Reusing a review layout
220
+ inside another instance of itself is ordinary component composition, not a
221
+ recursive helper call. Source sites/work limits still bound analysis.
222
+
223
+ `exercises` establishes reachable behavioral use, including a conditional state
224
+ and mapped literal fixture data; it does not promise unconditional initial DOM.
225
+ Always-false branches, unused adapters, empty/unknown fixture maps and broken
226
+ parent chains grant no credit. `covers` retains its rendering contract. Required
227
+ browser checks cover a rendering root and exercise the relevant parent/child
228
+ chain, then verify adding/removing/updating the part changes actual output.
229
+
183
230
  A comparison against a decoy object gives no evidence. An import, unrelated parent, unused
184
231
  child or metadata claim gives no consumption credit. Unknown render branches are
185
232
  conservative. Browser checks must verify that adding/removing/changing the part
@@ -28,6 +28,16 @@ as passing evidence for the live project.
28
28
  draft argument. There is no dedicated selected-check runner for drafts yet.
29
29
  Use a dry-run transaction for genuinely coupled draft patches.
30
30
 
31
+ Build notifications are deferred until the showcase finishes initial discovery;
32
+ a preview cannot be opened with an incomplete tool list. A missing App tool is a
33
+ host-startup failure, not evidence that component behavior failed. Preserve the
34
+ draft and inspect the host diagnostic.
35
+
36
+ Registered project scripts default to 60 seconds each. A guarded configuration
37
+ change can set `mcp.mutationCheckTimeoutMs` (100–300000 ms) after measuring build
38
+ duration and contention. Timeouts name the command, budget and elapsed time;
39
+ behavior-profile budgets are separate. Do not drop checks to fit either budget.
40
+
31
41
  Behavior-run performance belongs to both orchestration and project checks. ADS
32
42
  selects affected owners, filters registered Playwright case tags and shares one
33
43
  candidate host per run. The project owns assertions, browser setup, worker count,
@@ -414,5 +414,6 @@ upstream reference. Keep comparison dependencies and downloaded source outside
414
414
  the production dependency graph unless the user chose otherwise.
415
415
 
416
416
  For static owner contracts, `.ads.` development roles, typed paint/binding APIs,
417
- declarative evidence, token privacy and guarded migration, read
417
+ declarative parent graphs, constrained theme bindings, private visual subject roles,
418
+ token privacy and guarded migration, read
418
419
  [contracts.md](references/contracts.md) when the task touches those contracts.
@@ -75,7 +75,7 @@ export default {
75
75
  { api: Series, parent: Plot, consumer: Renderer, checks: ["isolation"] },
76
76
  ],
77
77
  behavior: {
78
- subjects: { plot: { api: Plot }, renderer: { implementation: Renderer } },
78
+ subjects: { plot: { api: Plot }, renderer: { implementation: Renderer, role: "implementation" } },
79
79
  guarantees: [{
80
80
  id: "scoped-output",
81
81
  description: "Changing either instance updates only its own output.",
@@ -97,7 +97,13 @@ Symbol references resolve through normal imports, aliases and re-exports.
97
97
  Calls, getters, methods, computed metadata and environment-dependent expressions
98
98
  are rejected. Function references are opaque identities, never executed.
99
99
  Private implementation subjects may be internal module exports without becoming
100
- public barrel exports. Producers/consumers must belong to the same owner. Required
100
+ public barrel exports. Private subjects default to the existing headless controller
101
+ contract. Use `role: "controller"` explicitly for behavior-only code, or
102
+ `role: "implementation"` for a private visual renderer or binding producer whose
103
+ guarantees should be tracked without classifying it as a controller. Shared
104
+ `controllers/` source always remains headless. An implementation role retains
105
+ normal ownership, dependency, styling and development boundaries; it is not a
106
+ style exception. Producers/consumers must belong to the same owner. Required
101
107
  checks must exist, back named guarantees and use a browser profile with the
102
108
  corresponding scenario. A relationship is registration, not a passing guarantee.
103
109
 
@@ -145,6 +151,19 @@ it does not authorize arbitrary inline styling, CSSProperties APIs or bulk write
145
151
  Unsupported dynamic producers/attachment paths fail with an analysis diagnostic.
146
152
  Keep the implementation project-owned; there is no required ADS binding helper.
147
153
 
154
+ A producer with alternative/derived sources declares each entry path, for example:
155
+
156
+ ```ts
157
+ valueFrom: ["paint", "scheme.day", "scheme.night"],
158
+ ```
159
+
160
+ Register each matching `config.*.<path>` in `paintInputs`. The producer may write
161
+ one declared field, or an exact `light-dark(${entry.scheme.day}, ${entry.scheme.night})`
162
+ template over two declared fields. The normal key/map/root proof still applies.
163
+ Raw constants, undeclared fields, extra writes and unknown transforms are rejected.
164
+ The browser audit checks actual accessible color references in both branches;
165
+ a local SVG URL or `none` is not a CSS color inside `light-dark()`.
166
+
148
167
  Families cannot overlap shared tokens, owner-token namespaces, private runtime
149
168
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
150
169
  shared-token exception. Use a distinct private family where collision freedom
@@ -152,6 +171,13 @@ cannot be established. Registered paint consumers list their allowed binding IDs
152
171
  borrowing a peer's family or private token remains invalid. Bindings are scoped
153
172
  to their actual root; portals outside it need deliberate project integration.
154
173
 
174
+ A registered binding producer may combine two accessible color references as
175
+ `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
176
+ both branches and their observed effect in the active color scheme. Raw colors,
177
+ unknown/private tokens and SVG URLs inside this color function remain invalid.
178
+ This derived binding form does not widen public paint-input types; use constrained
179
+ references for each theme input and verify both color schemes in browser checks.
180
+
155
181
  The App audit checks current mounted instances, accessible values, local SVG
156
182
  resources and computed paint-property responses. Visibility and complete rendered
157
183
  output still need assertions in the registered browser checks. It rejects missing/duplicate IDs and reports unobserved written values separately. It is bounded to 100 families, 20 instances per family, 100 keys
@@ -177,9 +203,30 @@ export const scenario = {
177
203
  };
178
204
  ```
179
205
 
180
- The real part must reach its registered consumer through a rendered parent.
206
+ A part may register several distinct parents; each API/parent pair has one
207
+ consumer/check declaration. A parent may itself be a registered declarative part.
208
+ The graph must be acyclic and every parent chain must reach a public rendering
209
+ root. Duplicate pairs, cycles and detached part graphs fail.
210
+
211
+ For example, `Entry` can belong to `FirstView` and `SecondView`, while `Detail`
212
+ belongs to `Entry`. The scenario covers the rendering roots and exercises both
213
+ `Entry` and `Detail`. A nested `Detail` outside its registered parent does not count.
214
+
215
+ The real part must reach its registered consumer through a rendering parent.
181
216
  ADS resolves source identity comparisons (`child.type === Series`, including a
182
217
  traceable comparison helper) and reads of that same child’s props traced from the consumer’s children input.
218
+ Traceable paths include local recursive fragment flattening, `find`/`filter`,
219
+ callback aliases and props carried through local records. Reusing a review layout
220
+ inside another instance of itself is ordinary component composition, not a
221
+ recursive helper call. Source sites/work limits still bound analysis.
222
+
223
+ `exercises` establishes reachable behavioral use, including a conditional state
224
+ and mapped literal fixture data; it does not promise unconditional initial DOM.
225
+ Always-false branches, unused adapters, empty/unknown fixture maps and broken
226
+ parent chains grant no credit. `covers` retains its rendering contract. Required
227
+ browser checks cover a rendering root and exercise the relevant parent/child
228
+ chain, then verify adding/removing/updating the part changes actual output.
229
+
183
230
  A comparison against a decoy object gives no evidence. An import, unrelated parent, unused
184
231
  child or metadata claim gives no consumption credit. Unknown render branches are
185
232
  conservative. Browser checks must verify that adding/removing/changing the part
@@ -28,6 +28,16 @@ as passing evidence for the live project.
28
28
  draft argument. There is no dedicated selected-check runner for drafts yet.
29
29
  Use a dry-run transaction for genuinely coupled draft patches.
30
30
 
31
+ Build notifications are deferred until the showcase finishes initial discovery;
32
+ a preview cannot be opened with an incomplete tool list. A missing App tool is a
33
+ host-startup failure, not evidence that component behavior failed. Preserve the
34
+ draft and inspect the host diagnostic.
35
+
36
+ Registered project scripts default to 60 seconds each. A guarded configuration
37
+ change can set `mcp.mutationCheckTimeoutMs` (100–300000 ms) after measuring build
38
+ duration and contention. Timeouts name the command, budget and elapsed time;
39
+ behavior-profile budgets are separate. Do not drop checks to fit either budget.
40
+
31
41
  Behavior-run performance belongs to both orchestration and project checks. ADS
32
42
  selects affected owners, filters registered Playwright case tags and shares one
33
43
  candidate host per run. The project owns assertions, browser setup, worker count,
@@ -339,5 +339,6 @@ This workflow adapts Emil Kowalski's animation skills. See
339
339
  [README.md](README.md) and [LICENSE.upstream](LICENSE.upstream) for provenance.
340
340
 
341
341
  For static owner contracts, `.ads.` development roles, typed paint/binding APIs,
342
- declarative evidence, token privacy and guarded migration, read
342
+ declarative parent graphs, constrained theme bindings, private visual subject roles,
343
+ token privacy and guarded migration, read
343
344
  [contracts.md](references/contracts.md) when the task touches those contracts.
@@ -75,7 +75,7 @@ export default {
75
75
  { api: Series, parent: Plot, consumer: Renderer, checks: ["isolation"] },
76
76
  ],
77
77
  behavior: {
78
- subjects: { plot: { api: Plot }, renderer: { implementation: Renderer } },
78
+ subjects: { plot: { api: Plot }, renderer: { implementation: Renderer, role: "implementation" } },
79
79
  guarantees: [{
80
80
  id: "scoped-output",
81
81
  description: "Changing either instance updates only its own output.",
@@ -97,7 +97,13 @@ Symbol references resolve through normal imports, aliases and re-exports.
97
97
  Calls, getters, methods, computed metadata and environment-dependent expressions
98
98
  are rejected. Function references are opaque identities, never executed.
99
99
  Private implementation subjects may be internal module exports without becoming
100
- public barrel exports. Producers/consumers must belong to the same owner. Required
100
+ public barrel exports. Private subjects default to the existing headless controller
101
+ contract. Use `role: "controller"` explicitly for behavior-only code, or
102
+ `role: "implementation"` for a private visual renderer or binding producer whose
103
+ guarantees should be tracked without classifying it as a controller. Shared
104
+ `controllers/` source always remains headless. An implementation role retains
105
+ normal ownership, dependency, styling and development boundaries; it is not a
106
+ style exception. Producers/consumers must belong to the same owner. Required
101
107
  checks must exist, back named guarantees and use a browser profile with the
102
108
  corresponding scenario. A relationship is registration, not a passing guarantee.
103
109
 
@@ -145,6 +151,19 @@ it does not authorize arbitrary inline styling, CSSProperties APIs or bulk write
145
151
  Unsupported dynamic producers/attachment paths fail with an analysis diagnostic.
146
152
  Keep the implementation project-owned; there is no required ADS binding helper.
147
153
 
154
+ A producer with alternative/derived sources declares each entry path, for example:
155
+
156
+ ```ts
157
+ valueFrom: ["paint", "scheme.day", "scheme.night"],
158
+ ```
159
+
160
+ Register each matching `config.*.<path>` in `paintInputs`. The producer may write
161
+ one declared field, or an exact `light-dark(${entry.scheme.day}, ${entry.scheme.night})`
162
+ template over two declared fields. The normal key/map/root proof still applies.
163
+ Raw constants, undeclared fields, extra writes and unknown transforms are rejected.
164
+ The browser audit checks actual accessible color references in both branches;
165
+ a local SVG URL or `none` is not a CSS color inside `light-dark()`.
166
+
148
167
  Families cannot overlap shared tokens, owner-token namespaces, private runtime
149
168
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
150
169
  shared-token exception. Use a distinct private family where collision freedom
@@ -152,6 +171,13 @@ cannot be established. Registered paint consumers list their allowed binding IDs
152
171
  borrowing a peer's family or private token remains invalid. Bindings are scoped
153
172
  to their actual root; portals outside it need deliberate project integration.
154
173
 
174
+ A registered binding producer may combine two accessible color references as
175
+ `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
176
+ both branches and their observed effect in the active color scheme. Raw colors,
177
+ unknown/private tokens and SVG URLs inside this color function remain invalid.
178
+ This derived binding form does not widen public paint-input types; use constrained
179
+ references for each theme input and verify both color schemes in browser checks.
180
+
155
181
  The App audit checks current mounted instances, accessible values, local SVG
156
182
  resources and computed paint-property responses. Visibility and complete rendered
157
183
  output still need assertions in the registered browser checks. It rejects missing/duplicate IDs and reports unobserved written values separately. It is bounded to 100 families, 20 instances per family, 100 keys
@@ -177,9 +203,30 @@ export const scenario = {
177
203
  };
178
204
  ```
179
205
 
180
- The real part must reach its registered consumer through a rendered parent.
206
+ A part may register several distinct parents; each API/parent pair has one
207
+ consumer/check declaration. A parent may itself be a registered declarative part.
208
+ The graph must be acyclic and every parent chain must reach a public rendering
209
+ root. Duplicate pairs, cycles and detached part graphs fail.
210
+
211
+ For example, `Entry` can belong to `FirstView` and `SecondView`, while `Detail`
212
+ belongs to `Entry`. The scenario covers the rendering roots and exercises both
213
+ `Entry` and `Detail`. A nested `Detail` outside its registered parent does not count.
214
+
215
+ The real part must reach its registered consumer through a rendering parent.
181
216
  ADS resolves source identity comparisons (`child.type === Series`, including a
182
217
  traceable comparison helper) and reads of that same child’s props traced from the consumer’s children input.
218
+ Traceable paths include local recursive fragment flattening, `find`/`filter`,
219
+ callback aliases and props carried through local records. Reusing a review layout
220
+ inside another instance of itself is ordinary component composition, not a
221
+ recursive helper call. Source sites/work limits still bound analysis.
222
+
223
+ `exercises` establishes reachable behavioral use, including a conditional state
224
+ and mapped literal fixture data; it does not promise unconditional initial DOM.
225
+ Always-false branches, unused adapters, empty/unknown fixture maps and broken
226
+ parent chains grant no credit. `covers` retains its rendering contract. Required
227
+ browser checks cover a rendering root and exercise the relevant parent/child
228
+ chain, then verify adding/removing/updating the part changes actual output.
229
+
183
230
  A comparison against a decoy object gives no evidence. An import, unrelated parent, unused
184
231
  child or metadata claim gives no consumption credit. Unknown render branches are
185
232
  conservative. Browser checks must verify that adding/removing/changing the part
@@ -28,6 +28,16 @@ as passing evidence for the live project.
28
28
  draft argument. There is no dedicated selected-check runner for drafts yet.
29
29
  Use a dry-run transaction for genuinely coupled draft patches.
30
30
 
31
+ Build notifications are deferred until the showcase finishes initial discovery;
32
+ a preview cannot be opened with an incomplete tool list. A missing App tool is a
33
+ host-startup failure, not evidence that component behavior failed. Preserve the
34
+ draft and inspect the host diagnostic.
35
+
36
+ Registered project scripts default to 60 seconds each. A guarded configuration
37
+ change can set `mcp.mutationCheckTimeoutMs` (100–300000 ms) after measuring build
38
+ duration and contention. Timeouts name the command, budget and elapsed time;
39
+ behavior-profile budgets are separate. Do not drop checks to fit either budget.
40
+
31
41
  Behavior-run performance belongs to both orchestration and project checks. ADS
32
42
  selects affected owners, filters registered Playwright case tags and shares one
33
43
  candidate host per run. The project owns assertions, browser setup, worker count,
@@ -53,7 +53,7 @@ export function createSourceValues(program, options, { preserveCall = () => fals
53
53
  }
54
54
  const state = () => ({ budget: { steps: 0 }, depth: 0, calls: new Set() });
55
55
  function next(context) { return { ...context, depth: context.depth + 1 }; }
56
- function exhausted(context) { return ++context.budget.steps > 4000 || context.depth > 48; }
56
+ function exhausted(context) { return ++context.budget.steps > (context.maxSteps??4000) || context.depth > (context.maxDepth??48); }
57
57
  function at(node, kind, name) {
58
58
  const source = node.getSourceFile(), position = source.getLineAndCharacterOfPosition(node.getStart(source));
59
59
  return { file: source.fileName, line: position.line + 1, column: position.character + 1, kind, name: name.slice(0, 100) };
@@ -137,10 +137,10 @@ export function createSourceValues(program, options, { preserveCall = () => fals
137
137
  return [];
138
138
  }
139
139
  function returns(fn, args, context, kind = "helper") {
140
- if (context.calls.has(fn.node)) return [unknown("Recursive local call could not be fully traced.")];
140
+ if (kind!=="component"&&context.calls.has(fn.node)) return [unknown("Recursive local call could not be fully traced.")];
141
141
  if (!fn.node.body || fn.node.asteriskToken || fn.node.modifiers?.some(item => item.kind === ts.SyntaxKind.AsyncKeyword)) return [unknown("Async, generator or declaration-only calls are outside atomic source tracing.")];
142
142
  const env = new Map(fn.env), via = [...fn.via, at(fn.node, kind, fn.node.name?.getText() ?? "local function")];
143
- const inner = { ...next(context), calls: new Set([...context.calls, fn.node]) };
143
+ const inner = { ...next(context), calls: new Set(kind==="component"?[fn.node]:[...context.calls, fn.node]) };
144
144
  for (const [index, parameter] of fn.node.parameters.entries()) {
145
145
  if (parameter.dotDotDotToken) { bind(parameter.name, { kind: "array", values: args.slice(index) }, env, via, inner); break; }
146
146
  bind(parameter.name, withDefault(resolve(args[index] ?? literal(undefined), inner), parameter.initializer && reference(parameter.initializer, env, via), inner), env, via, inner);