@reqvire-org/ads 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp/build-status.mjs +14 -4
- package/dist/mcp/catalog.mjs +3 -3
- package/dist/mcp/mutations.mjs +1 -1
- package/dist/mcp/preview-watch.mjs +7 -5
- package/dist/mcp/server.mjs +13 -10
- package/dist/preview-inputs.mjs +24 -0
- package/dist/project-documents.mjs +29 -6
- package/dist/scenarios-compiler.mjs +26 -20
- package/dist/showcase/client.bundle.js +17 -17
- package/dist/skills/ads-break-ui/SKILL.md +6 -4
- package/dist/skills/ads-break-ui/references/guarded-editing.md +10 -0
- package/dist/skills/ads-break-ui/references/scenarios.md +32 -0
- package/dist/skills/ads-designer/SKILL.md +6 -4
- package/dist/skills/ads-designer/references/guarded-editing.md +10 -0
- package/dist/skills/ads-designer/references/scenarios.md +32 -0
- package/dist/skills/ads-import/SKILL.md +6 -4
- package/dist/skills/ads-import/references/guarded-editing.md +10 -0
- package/dist/skills/ads-import/references/implementation.md +3 -1
- package/dist/skills/ads-import/references/scenarios.md +32 -0
- package/dist/skills/ads-migrate/SKILL.md +6 -4
- package/dist/skills/ads-migrate/references/guarded-editing.md +10 -0
- package/dist/skills/ads-migrate/references/scenarios.md +32 -0
- package/dist/skills/ads-migrate/references/testing.md +5 -0
- package/dist/skills/ads-motion/SKILL.md +6 -4
- package/dist/skills/ads-motion/references/guarded-editing.md +10 -0
- package/dist/skills/ads-motion/references/scenarios.md +32 -0
- package/dist/units.mjs +7 -6
- package/dist/verification.mjs +2 -2
- package/docs/ADS.md +4 -0
- package/docs/ARCHITECTURE.md +15 -4
- package/docs/CHANGELOG.md +24 -0
- package/docs/MCP.md +34 -2
- package/package.json +1 -1
|
@@ -49,10 +49,12 @@ For owner drafts, token-sample reconciliation, coupled transactions and local
|
|
|
49
49
|
constant namespaces, read [guarded-editing.md](references/guarded-editing.md).
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
For parent/child `covers`,
|
|
53
|
-
`scenario-render` / `showcase-class`
|
|
54
|
-
[scenario contracts](references/scenarios.md).
|
|
55
|
-
|
|
52
|
+
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
53
|
+
public style-helper use in scenarios, or `scenario-render` / `showcase-class`
|
|
54
|
+
findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
55
|
+
examples explain API visibility, reference baselines and state-transition checks.
|
|
56
|
+
Traced parents can cover declared public children; verified public Linaria
|
|
57
|
+
helpers do not grant custom scenario CSS.
|
|
56
58
|
|
|
57
59
|
For atomic base/variant styling, helper/wrapper class composition, extracted
|
|
58
60
|
custom-property arithmetic, or an
|
|
@@ -6,6 +6,16 @@ tools, request `action:"diff"`, then apply the returned patchFile. Discard the
|
|
|
6
6
|
draft afterward. Remote clients can keep sending inline Git diffs. Neither draft
|
|
7
7
|
preparation nor diff generation validates or changes live source.
|
|
8
8
|
|
|
9
|
+
Shared provenance uses the existing `documentation` unit. Read its `filePolicy`
|
|
10
|
+
from `ads_units`: one patch can create `CREDITS.md`, shared `licenses/*.txt` and
|
|
11
|
+
README links together. Conventional root credits/license/notice names support
|
|
12
|
+
UTF-8 `.md`/`.txt` or extensionless notices; `licenses/` may also sit under
|
|
13
|
+
`docs/`, `doc/` or the ADS root. Preserve upstream notice text exactly. Keep
|
|
14
|
+
component/asset-local notices with their owner; reference shared notices instead
|
|
15
|
+
of duplicating them across units. Do not create an asset group or bypass a guard
|
|
16
|
+
to add these documents. Code/configuration and hidden/generated paths remain
|
|
17
|
+
outside documentation ownership.
|
|
18
|
+
|
|
9
19
|
For genuinely coupled changes, `ads_apply_transaction` accepts 2–8 distinct owner
|
|
10
20
|
patches (32 distinct files and 16 MiB combined). Each patch keeps its ownership and
|
|
11
21
|
companion restrictions. Patches apply in order; later shared-entry hunks match the
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -53,6 +68,23 @@ just to satisfy a guard. Static evidence does not establish successful mounting,
|
|
|
53
68
|
visibility, interaction, every state or visual parity. Verify those in the built
|
|
54
69
|
App and registered browser checks.
|
|
55
70
|
|
|
71
|
+
## Verification pitfalls
|
|
72
|
+
|
|
73
|
+
Preserve the intended API and the reference baseline when resolving a diagnostic.
|
|
74
|
+
These examples describe verification mistakes, not component-specific rules:
|
|
75
|
+
|
|
76
|
+
| Situation | Do not | Do instead |
|
|
77
|
+
|-----------|--------|------------|
|
|
78
|
+
| A reference example sets `width: 15rem`, while the native popup uses its default width. | Remove the reference width and claim the original example now matches. | Keep the baseline intact. Reproduce demo sizing through the project's public review/layout pattern or supported style helper. If a different native size is intentional, document it. Label any additional normalized comparison separately. |
|
|
79
|
+
| Static tracing cannot prove that a public clear control renders when a value is selected. | Remove its export, drop its required coverage, or change runtime behavior merely to pass the gate. | Preserve the intended public API. Try a meaningful selected-state fixture or another real scenario. If valid rendering remains untraceable, report the tooling limitation with a small reproduction. |
|
|
80
|
+
| A screenshot shows the clear control in a selected state. | Treat its presence as evidence that clearing works. | Add a browser check: start selected, activate Clear, assert the value and selection are empty, verify the control's resulting visibility and documented focus behavior, then select again. |
|
|
81
|
+
|
|
82
|
+
A private helper exposed through its parent's public prop can legitimately stay
|
|
83
|
+
private when that is the intended API. Verify the behavior through the parent;
|
|
84
|
+
do not export the helper solely for a test. Public/private ownership is a product
|
|
85
|
+
decision, not a coverage workaround. Browser checks verify transitions but do not
|
|
86
|
+
replace the current static `covers` requirement; `exercises` does not waive it.
|
|
87
|
+
|
|
56
88
|
## Scenarios may consume verified public style helpers
|
|
57
89
|
|
|
58
90
|
A deliberately public helper can expose its owner's Linaria treatment:
|
|
@@ -80,10 +80,12 @@ use the client's normal source-editing tools.
|
|
|
80
80
|
For owner drafts, token-sample reconciliation, coupled transactions and local
|
|
81
81
|
constant namespaces, read [guarded-editing.md](references/guarded-editing.md).
|
|
82
82
|
|
|
83
|
-
For parent/child `covers`,
|
|
84
|
-
`scenario-render` / `showcase-class`
|
|
85
|
-
[scenario contracts](references/scenarios.md).
|
|
86
|
-
|
|
83
|
+
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
84
|
+
public style-helper use in scenarios, or `scenario-render` / `showcase-class`
|
|
85
|
+
findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
86
|
+
examples explain API visibility, reference baselines and state-transition checks.
|
|
87
|
+
Traced parents can cover declared public children; verified public Linaria
|
|
88
|
+
helpers do not grant custom scenario CSS.
|
|
87
89
|
|
|
88
90
|
For atomic base/variant styling, helper/wrapper class composition, extracted
|
|
89
91
|
custom-property arithmetic, or an
|
|
@@ -6,6 +6,16 @@ tools, request `action:"diff"`, then apply the returned patchFile. Discard the
|
|
|
6
6
|
draft afterward. Remote clients can keep sending inline Git diffs. Neither draft
|
|
7
7
|
preparation nor diff generation validates or changes live source.
|
|
8
8
|
|
|
9
|
+
Shared provenance uses the existing `documentation` unit. Read its `filePolicy`
|
|
10
|
+
from `ads_units`: one patch can create `CREDITS.md`, shared `licenses/*.txt` and
|
|
11
|
+
README links together. Conventional root credits/license/notice names support
|
|
12
|
+
UTF-8 `.md`/`.txt` or extensionless notices; `licenses/` may also sit under
|
|
13
|
+
`docs/`, `doc/` or the ADS root. Preserve upstream notice text exactly. Keep
|
|
14
|
+
component/asset-local notices with their owner; reference shared notices instead
|
|
15
|
+
of duplicating them across units. Do not create an asset group or bypass a guard
|
|
16
|
+
to add these documents. Code/configuration and hidden/generated paths remain
|
|
17
|
+
outside documentation ownership.
|
|
18
|
+
|
|
9
19
|
For genuinely coupled changes, `ads_apply_transaction` accepts 2–8 distinct owner
|
|
10
20
|
patches (32 distinct files and 16 MiB combined). Each patch keeps its ownership and
|
|
11
21
|
companion restrictions. Patches apply in order; later shared-entry hunks match the
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -53,6 +68,23 @@ just to satisfy a guard. Static evidence does not establish successful mounting,
|
|
|
53
68
|
visibility, interaction, every state or visual parity. Verify those in the built
|
|
54
69
|
App and registered browser checks.
|
|
55
70
|
|
|
71
|
+
## Verification pitfalls
|
|
72
|
+
|
|
73
|
+
Preserve the intended API and the reference baseline when resolving a diagnostic.
|
|
74
|
+
These examples describe verification mistakes, not component-specific rules:
|
|
75
|
+
|
|
76
|
+
| Situation | Do not | Do instead |
|
|
77
|
+
|-----------|--------|------------|
|
|
78
|
+
| A reference example sets `width: 15rem`, while the native popup uses its default width. | Remove the reference width and claim the original example now matches. | Keep the baseline intact. Reproduce demo sizing through the project's public review/layout pattern or supported style helper. If a different native size is intentional, document it. Label any additional normalized comparison separately. |
|
|
79
|
+
| Static tracing cannot prove that a public clear control renders when a value is selected. | Remove its export, drop its required coverage, or change runtime behavior merely to pass the gate. | Preserve the intended public API. Try a meaningful selected-state fixture or another real scenario. If valid rendering remains untraceable, report the tooling limitation with a small reproduction. |
|
|
80
|
+
| A screenshot shows the clear control in a selected state. | Treat its presence as evidence that clearing works. | Add a browser check: start selected, activate Clear, assert the value and selection are empty, verify the control's resulting visibility and documented focus behavior, then select again. |
|
|
81
|
+
|
|
82
|
+
A private helper exposed through its parent's public prop can legitimately stay
|
|
83
|
+
private when that is the intended API. Verify the behavior through the parent;
|
|
84
|
+
do not export the helper solely for a test. Public/private ownership is a product
|
|
85
|
+
decision, not a coverage workaround. Browser checks verify transitions but do not
|
|
86
|
+
replace the current static `covers` requirement; `exercises` does not waive it.
|
|
87
|
+
|
|
56
88
|
## Scenarios may consume verified public style helpers
|
|
57
89
|
|
|
58
90
|
A deliberately public helper can expose its owner's Linaria treatment:
|
|
@@ -44,10 +44,12 @@ use the client's normal source-editing tools.
|
|
|
44
44
|
For owner drafts, token-sample reconciliation, coupled transactions and local
|
|
45
45
|
constant namespaces, read [guarded-editing.md](references/guarded-editing.md).
|
|
46
46
|
|
|
47
|
-
For parent/child `covers`,
|
|
48
|
-
`scenario-render` / `showcase-class`
|
|
49
|
-
[scenario contracts](references/scenarios.md).
|
|
50
|
-
|
|
47
|
+
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
48
|
+
public style-helper use in scenarios, or `scenario-render` / `showcase-class`
|
|
49
|
+
findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
50
|
+
examples explain API visibility, reference baselines and state-transition checks.
|
|
51
|
+
Traced parents can cover declared public children; verified public Linaria
|
|
52
|
+
helpers do not grant custom scenario CSS.
|
|
51
53
|
|
|
52
54
|
For atomic base/variant styling, helper/wrapper class composition, extracted
|
|
53
55
|
custom-property arithmetic, or an
|
|
@@ -6,6 +6,16 @@ tools, request `action:"diff"`, then apply the returned patchFile. Discard the
|
|
|
6
6
|
draft afterward. Remote clients can keep sending inline Git diffs. Neither draft
|
|
7
7
|
preparation nor diff generation validates or changes live source.
|
|
8
8
|
|
|
9
|
+
Shared provenance uses the existing `documentation` unit. Read its `filePolicy`
|
|
10
|
+
from `ads_units`: one patch can create `CREDITS.md`, shared `licenses/*.txt` and
|
|
11
|
+
README links together. Conventional root credits/license/notice names support
|
|
12
|
+
UTF-8 `.md`/`.txt` or extensionless notices; `licenses/` may also sit under
|
|
13
|
+
`docs/`, `doc/` or the ADS root. Preserve upstream notice text exactly. Keep
|
|
14
|
+
component/asset-local notices with their owner; reference shared notices instead
|
|
15
|
+
of duplicating them across units. Do not create an asset group or bypass a guard
|
|
16
|
+
to add these documents. Code/configuration and hidden/generated paths remain
|
|
17
|
+
outside documentation ownership.
|
|
18
|
+
|
|
9
19
|
For genuinely coupled changes, `ads_apply_transaction` accepts 2–8 distinct owner
|
|
10
20
|
patches (32 distinct files and 16 MiB combined). Each patch keeps its ownership and
|
|
11
21
|
companion restrictions. Patches apply in order; later shared-entry hunks match the
|
|
@@ -92,7 +92,9 @@ imports, setup/providers, and scope/mounting across routes where relevant.
|
|
|
92
92
|
|
|
93
93
|
Compare the imported component or pattern with the actual source implementation
|
|
94
94
|
at the recorded revision. Align content, configuration, themes, viewport, and
|
|
95
|
-
input modality.
|
|
95
|
+
input modality. Preserve the original comparison baseline; see the
|
|
96
|
+
[verification pitfalls](scenarios.md#verification-pitfalls) before changing
|
|
97
|
+
reference sizing or API visibility to make checks pass. For implementation comparisons, use matching token values when
|
|
96
98
|
possible; also verify the item under its actual destination theme. For
|
|
97
99
|
stateful/motion-heavy items, check lifecycle, focus, keyboard,
|
|
98
100
|
pointer and touch, natural dimensions, transitions, interruption, reduced motion,
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -53,6 +68,23 @@ just to satisfy a guard. Static evidence does not establish successful mounting,
|
|
|
53
68
|
visibility, interaction, every state or visual parity. Verify those in the built
|
|
54
69
|
App and registered browser checks.
|
|
55
70
|
|
|
71
|
+
## Verification pitfalls
|
|
72
|
+
|
|
73
|
+
Preserve the intended API and the reference baseline when resolving a diagnostic.
|
|
74
|
+
These examples describe verification mistakes, not component-specific rules:
|
|
75
|
+
|
|
76
|
+
| Situation | Do not | Do instead |
|
|
77
|
+
|-----------|--------|------------|
|
|
78
|
+
| A reference example sets `width: 15rem`, while the native popup uses its default width. | Remove the reference width and claim the original example now matches. | Keep the baseline intact. Reproduce demo sizing through the project's public review/layout pattern or supported style helper. If a different native size is intentional, document it. Label any additional normalized comparison separately. |
|
|
79
|
+
| Static tracing cannot prove that a public clear control renders when a value is selected. | Remove its export, drop its required coverage, or change runtime behavior merely to pass the gate. | Preserve the intended public API. Try a meaningful selected-state fixture or another real scenario. If valid rendering remains untraceable, report the tooling limitation with a small reproduction. |
|
|
80
|
+
| A screenshot shows the clear control in a selected state. | Treat its presence as evidence that clearing works. | Add a browser check: start selected, activate Clear, assert the value and selection are empty, verify the control's resulting visibility and documented focus behavior, then select again. |
|
|
81
|
+
|
|
82
|
+
A private helper exposed through its parent's public prop can legitimately stay
|
|
83
|
+
private when that is the intended API. Verify the behavior through the parent;
|
|
84
|
+
do not export the helper solely for a test. Public/private ownership is a product
|
|
85
|
+
decision, not a coverage workaround. Browser checks verify transitions but do not
|
|
86
|
+
replace the current static `covers` requirement; `exercises` does not waive it.
|
|
87
|
+
|
|
56
88
|
## Scenarios may consume verified public style helpers
|
|
57
89
|
|
|
58
90
|
A deliberately public helper can expose its owner's Linaria treatment:
|
|
@@ -46,10 +46,12 @@ For owner drafts, token-sample reconciliation, coupled transactions and local
|
|
|
46
46
|
constant namespaces, read [guarded-editing.md](references/guarded-editing.md).
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
For parent/child `covers`,
|
|
50
|
-
`scenario-render` / `showcase-class`
|
|
51
|
-
[scenario contracts](references/scenarios.md).
|
|
52
|
-
|
|
49
|
+
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
50
|
+
public style-helper use in scenarios, or `scenario-render` / `showcase-class`
|
|
51
|
+
findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
52
|
+
examples explain API visibility, reference baselines and state-transition checks.
|
|
53
|
+
Traced parents can cover declared public children; verified public Linaria
|
|
54
|
+
helpers do not grant custom scenario CSS.
|
|
53
55
|
|
|
54
56
|
For atomic base/variant styling, helper/wrapper class composition, extracted
|
|
55
57
|
custom-property arithmetic, or an
|
|
@@ -6,6 +6,16 @@ tools, request `action:"diff"`, then apply the returned patchFile. Discard the
|
|
|
6
6
|
draft afterward. Remote clients can keep sending inline Git diffs. Neither draft
|
|
7
7
|
preparation nor diff generation validates or changes live source.
|
|
8
8
|
|
|
9
|
+
Shared provenance uses the existing `documentation` unit. Read its `filePolicy`
|
|
10
|
+
from `ads_units`: one patch can create `CREDITS.md`, shared `licenses/*.txt` and
|
|
11
|
+
README links together. Conventional root credits/license/notice names support
|
|
12
|
+
UTF-8 `.md`/`.txt` or extensionless notices; `licenses/` may also sit under
|
|
13
|
+
`docs/`, `doc/` or the ADS root. Preserve upstream notice text exactly. Keep
|
|
14
|
+
component/asset-local notices with their owner; reference shared notices instead
|
|
15
|
+
of duplicating them across units. Do not create an asset group or bypass a guard
|
|
16
|
+
to add these documents. Code/configuration and hidden/generated paths remain
|
|
17
|
+
outside documentation ownership.
|
|
18
|
+
|
|
9
19
|
For genuinely coupled changes, `ads_apply_transaction` accepts 2–8 distinct owner
|
|
10
20
|
patches (32 distinct files and 16 MiB combined). Each patch keeps its ownership and
|
|
11
21
|
companion restrictions. Patches apply in order; later shared-entry hunks match the
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -53,6 +68,23 @@ just to satisfy a guard. Static evidence does not establish successful mounting,
|
|
|
53
68
|
visibility, interaction, every state or visual parity. Verify those in the built
|
|
54
69
|
App and registered browser checks.
|
|
55
70
|
|
|
71
|
+
## Verification pitfalls
|
|
72
|
+
|
|
73
|
+
Preserve the intended API and the reference baseline when resolving a diagnostic.
|
|
74
|
+
These examples describe verification mistakes, not component-specific rules:
|
|
75
|
+
|
|
76
|
+
| Situation | Do not | Do instead |
|
|
77
|
+
|-----------|--------|------------|
|
|
78
|
+
| A reference example sets `width: 15rem`, while the native popup uses its default width. | Remove the reference width and claim the original example now matches. | Keep the baseline intact. Reproduce demo sizing through the project's public review/layout pattern or supported style helper. If a different native size is intentional, document it. Label any additional normalized comparison separately. |
|
|
79
|
+
| Static tracing cannot prove that a public clear control renders when a value is selected. | Remove its export, drop its required coverage, or change runtime behavior merely to pass the gate. | Preserve the intended public API. Try a meaningful selected-state fixture or another real scenario. If valid rendering remains untraceable, report the tooling limitation with a small reproduction. |
|
|
80
|
+
| A screenshot shows the clear control in a selected state. | Treat its presence as evidence that clearing works. | Add a browser check: start selected, activate Clear, assert the value and selection are empty, verify the control's resulting visibility and documented focus behavior, then select again. |
|
|
81
|
+
|
|
82
|
+
A private helper exposed through its parent's public prop can legitimately stay
|
|
83
|
+
private when that is the intended API. Verify the behavior through the parent;
|
|
84
|
+
do not export the helper solely for a test. Public/private ownership is a product
|
|
85
|
+
decision, not a coverage workaround. Browser checks verify transitions but do not
|
|
86
|
+
replace the current static `covers` requirement; `exercises` does not waive it.
|
|
87
|
+
|
|
56
88
|
## Scenarios may consume verified public style helpers
|
|
57
89
|
|
|
58
90
|
A deliberately public helper can expose its owner's Linaria treatment:
|
|
@@ -8,6 +8,11 @@ the baseline. The page frame may use native controls, but those controls must
|
|
|
8
8
|
trigger the original component and store. Two pages importing the native component
|
|
9
9
|
cannot establish upstream parity.
|
|
10
10
|
|
|
11
|
+
Keep example-level sizing and configuration intact too. Changing a reference to
|
|
12
|
+
match the native result weakens the comparison even when its component CSS is
|
|
13
|
+
untouched. Use the [verification pitfalls](scenarios.md#verification-pitfalls)
|
|
14
|
+
for concrete baseline, API-visibility and conditional-control examples.
|
|
15
|
+
|
|
11
16
|
Use identical messages, options, counts, async delays/outcomes, action payloads,
|
|
12
17
|
and viewport/input settings. Align configuration explicitly rather than relying
|
|
13
18
|
on two different defaults. Compare brand/token differences separately from UX
|
|
@@ -66,10 +66,12 @@ For owner drafts, token-sample reconciliation, coupled transactions and local
|
|
|
66
66
|
constant namespaces, read [guarded-editing.md](references/guarded-editing.md).
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
For parent/child `covers`,
|
|
70
|
-
`scenario-render` / `showcase-class`
|
|
71
|
-
[scenario contracts](references/scenarios.md).
|
|
72
|
-
|
|
69
|
+
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
70
|
+
public style-helper use in scenarios, or `scenario-render` / `showcase-class`
|
|
71
|
+
findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
72
|
+
examples explain API visibility, reference baselines and state-transition checks.
|
|
73
|
+
Traced parents can cover declared public children; verified public Linaria
|
|
74
|
+
helpers do not grant custom scenario CSS.
|
|
73
75
|
|
|
74
76
|
For atomic base/variant styling, helper/wrapper class composition, extracted
|
|
75
77
|
custom-property arithmetic, or an
|
|
@@ -6,6 +6,16 @@ tools, request `action:"diff"`, then apply the returned patchFile. Discard the
|
|
|
6
6
|
draft afterward. Remote clients can keep sending inline Git diffs. Neither draft
|
|
7
7
|
preparation nor diff generation validates or changes live source.
|
|
8
8
|
|
|
9
|
+
Shared provenance uses the existing `documentation` unit. Read its `filePolicy`
|
|
10
|
+
from `ads_units`: one patch can create `CREDITS.md`, shared `licenses/*.txt` and
|
|
11
|
+
README links together. Conventional root credits/license/notice names support
|
|
12
|
+
UTF-8 `.md`/`.txt` or extensionless notices; `licenses/` may also sit under
|
|
13
|
+
`docs/`, `doc/` or the ADS root. Preserve upstream notice text exactly. Keep
|
|
14
|
+
component/asset-local notices with their owner; reference shared notices instead
|
|
15
|
+
of duplicating them across units. Do not create an asset group or bypass a guard
|
|
16
|
+
to add these documents. Code/configuration and hidden/generated paths remain
|
|
17
|
+
outside documentation ownership.
|
|
18
|
+
|
|
9
19
|
For genuinely coupled changes, `ads_apply_transaction` accepts 2–8 distinct owner
|
|
10
20
|
patches (32 distinct files and 16 MiB combined). Each patch keeps its ownership and
|
|
11
21
|
companion restrictions. Patches apply in order; later shared-entry hunks match the
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -53,6 +68,23 @@ just to satisfy a guard. Static evidence does not establish successful mounting,
|
|
|
53
68
|
visibility, interaction, every state or visual parity. Verify those in the built
|
|
54
69
|
App and registered browser checks.
|
|
55
70
|
|
|
71
|
+
## Verification pitfalls
|
|
72
|
+
|
|
73
|
+
Preserve the intended API and the reference baseline when resolving a diagnostic.
|
|
74
|
+
These examples describe verification mistakes, not component-specific rules:
|
|
75
|
+
|
|
76
|
+
| Situation | Do not | Do instead |
|
|
77
|
+
|-----------|--------|------------|
|
|
78
|
+
| A reference example sets `width: 15rem`, while the native popup uses its default width. | Remove the reference width and claim the original example now matches. | Keep the baseline intact. Reproduce demo sizing through the project's public review/layout pattern or supported style helper. If a different native size is intentional, document it. Label any additional normalized comparison separately. |
|
|
79
|
+
| Static tracing cannot prove that a public clear control renders when a value is selected. | Remove its export, drop its required coverage, or change runtime behavior merely to pass the gate. | Preserve the intended public API. Try a meaningful selected-state fixture or another real scenario. If valid rendering remains untraceable, report the tooling limitation with a small reproduction. |
|
|
80
|
+
| A screenshot shows the clear control in a selected state. | Treat its presence as evidence that clearing works. | Add a browser check: start selected, activate Clear, assert the value and selection are empty, verify the control's resulting visibility and documented focus behavior, then select again. |
|
|
81
|
+
|
|
82
|
+
A private helper exposed through its parent's public prop can legitimately stay
|
|
83
|
+
private when that is the intended API. Verify the behavior through the parent;
|
|
84
|
+
do not export the helper solely for a test. Public/private ownership is a product
|
|
85
|
+
decision, not a coverage workaround. Browser checks verify transitions but do not
|
|
86
|
+
replace the current static `covers` requirement; `exercises` does not waive it.
|
|
87
|
+
|
|
56
88
|
## Scenarios may consume verified public style helpers
|
|
57
89
|
|
|
58
90
|
A deliberately public helper can expose its owner's Linaria treatment:
|
package/dist/units.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import ts from "typescript";
|
|
|
4
4
|
import postcss from "postcss";
|
|
5
5
|
import { isDevelopmentFile, isInside } from "./config.mjs";
|
|
6
6
|
import { importResolver } from "./boundaries.mjs";
|
|
7
|
-
import { isProjectDocument,
|
|
7
|
+
import { documentationFilePolicy, isProjectDocument, projectDocumentFiles } from "./project-documents.mjs";
|
|
8
8
|
import { foundationFiles, foundationImportTarget } from "./token-policy.mjs";
|
|
9
9
|
|
|
10
10
|
const source = /\.[cm]?[jt]sx?$/;
|
|
@@ -119,13 +119,13 @@ export function inspectUnits(options) {
|
|
|
119
119
|
function owner(relative) {
|
|
120
120
|
const projectFile = slash(path.relative(root, path.resolve(dsRoot, relative)));
|
|
121
121
|
if (setup.has(projectFile)) return "configuration";
|
|
122
|
-
if (
|
|
123
|
-
if (!isInside(dsRoot, path.resolve(dsRoot, relative))) return null;
|
|
122
|
+
if (!isInside(dsRoot, path.resolve(dsRoot, relative))) return isProjectDocument(projectFile) ? "documentation" : null;
|
|
124
123
|
if (relative === publicEntry) return null; // Controlled re-export bookkeeping.
|
|
125
124
|
if (relative.startsWith(tokenDir + "/")) return "tokens";
|
|
126
125
|
if (relative.startsWith("assets/")) return relative.split("/").length > 2 ? relative.split("/").slice(0, 2).join("/") : "assets";
|
|
126
|
+
if (isProjectDocument(relative)) return "documentation";
|
|
127
127
|
if (!relative.includes("/")) return /(?:\.(?:md|txt)$|^LICENSE$)/i.test(relative) ? "documentation" : "foundation";
|
|
128
|
-
if (!/^(?:components|patterns|controllers|composition)\//.test(relative)) return relative.split("/")[0];
|
|
128
|
+
if (!/^(?:components|patterns|controllers|composition)\//.test(relative)) return relative.split("/")[0] === "documentation" ? null : relative.split("/")[0];
|
|
129
129
|
for (const directory of directoryUnits) if (relative.startsWith(directory + "/")) return directory;
|
|
130
130
|
for (const unit of flatUnits) if (relative.startsWith(unit + "/") || relative.startsWith(unit + ".")) return unit;
|
|
131
131
|
const base = path.basename(relative).split(".")[0];
|
|
@@ -136,7 +136,8 @@ export function inspectUnits(options) {
|
|
|
136
136
|
for (const id of ["foundation", "documentation", "tokens", "assets/brand", "assets/fonts"]) units.set(id, { id, kind: id.split("/")[0], files: [] });
|
|
137
137
|
units.get("tokens").companionFiles = [{ path: slash(path.relative(root, path.join(dsRoot, stylesEntry))),
|
|
138
138
|
allowedChanges: "Only add/remove canonical foundation imports required by token foundation files created/deleted in this patch; preserve other imports and comments." }];
|
|
139
|
-
units.get("documentation").files =
|
|
139
|
+
units.get("documentation").files = projectDocumentFiles(root).filter(file => owner(slash(path.relative(dsRoot,path.resolve(root,file)))) === "documentation");
|
|
140
|
+
units.get("documentation").filePolicy = documentationFilePolicy;
|
|
140
141
|
for (const relative of files) {
|
|
141
142
|
const id = owner(relative);
|
|
142
143
|
if (!id) continue;
|
|
@@ -182,7 +183,7 @@ export function checkUnitFiles(options, unit, changes, inventory = inspectUnits(
|
|
|
182
183
|
if (unit === "tokens" && relative === inventory.stylesEntry) continue; // Controlled foundation import bookkeeping.
|
|
183
184
|
if (allowNew && change.originalContent === null && (relative.startsWith(unit + "/") || relative.startsWith(unit + "."))) continue;
|
|
184
185
|
const owner = inventory.owner(relative);
|
|
185
|
-
if (owner !== unit) throw fail(`This patch targets ${unit}; ${change.path} belongs to ${owner ?? "a different ADS layer"}. Submit a separate unit patch
|
|
186
|
+
if (owner !== unit) throw fail(`This patch targets ${unit}; ${change.path} belongs to ${owner ?? "a different ADS layer"}. Submit a separate unit patch.${unit === "documentation" ? ` ${documentationFilePolicy}` : ""}`, change.path);
|
|
186
187
|
}
|
|
187
188
|
return inventory;
|
|
188
189
|
}
|
package/dist/verification.mjs
CHANGED
|
@@ -171,8 +171,8 @@ export function createVerificationController(root) {
|
|
|
171
171
|
const { startAdsMcp } = await import("./mcp/server.mjs");
|
|
172
172
|
host ??= await startAdsMcp(root, { stdio: false, showcase: true });
|
|
173
173
|
for (const check of group.filter(check => check.scenario)) {
|
|
174
|
-
const url = new URL(host.url)
|
|
175
|
-
url.searchParams.set(
|
|
174
|
+
const url = new URL(host.url);
|
|
175
|
+
url.searchParams.set("scenario", check.scenario);
|
|
176
176
|
scenarios[check.scenario] = url.href;
|
|
177
177
|
}
|
|
178
178
|
}
|
package/docs/ADS.md
CHANGED
|
@@ -333,6 +333,10 @@ in each item's local README. Record source repository/file links, revision,
|
|
|
333
333
|
authors, concrete influences, and integration differences. Preserve applicable
|
|
334
334
|
license notices for copied/adapted source and assets. The project guide records
|
|
335
335
|
local implementation choices and links to the local item guides.
|
|
336
|
+
Shared `CREDITS.md`, conventional root notices and text files in `licenses/` use
|
|
337
|
+
the `documentation` mutation unit; its `filePolicy` describes supported new paths.
|
|
338
|
+
They can be added with README links in one guarded patch, without duplicating a
|
|
339
|
+
shared license into every component. Colocated notices retain their owning unit.
|
|
336
340
|
|
|
337
341
|
## Build contract
|
|
338
342
|
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -288,7 +288,10 @@ Reassembling a second screen from shared primitives still allows design drift.
|
|
|
288
288
|
The server discovers one path-derived scenario registry. The showcase's four
|
|
289
289
|
sections—Tokens, Components, Patterns and Composition—browse that same registry
|
|
290
290
|
through MCP results. They do not initialize the entry or define
|
|
291
|
-
its UI.
|
|
291
|
+
its UI. Every preview uses `?scenario=<id>`; discovered `kind` selects its section,
|
|
292
|
+
including token scenarios colocated with component/pattern owners. Existing
|
|
293
|
+
`?category=` links remain compatibility aliases. The host supplies theme and
|
|
294
|
+
available space; the public implementation
|
|
292
295
|
supplies presentation. Several related public parts may share a scenario with
|
|
293
296
|
their required parent. Every declared token and every public renderable component
|
|
294
297
|
and pattern needs addressable coverage. Token references must exist in the real
|
|
@@ -304,8 +307,12 @@ The skill-local [scenario guide](../skills/ads-designer/references/scenarios.md)
|
|
|
304
307
|
explains evidence, limits and diagnostics.
|
|
305
308
|
|
|
306
309
|
After source changes, validation and compilation must both succeed before a new
|
|
307
|
-
graph becomes current. MCP announces build/resource updates.
|
|
308
|
-
|
|
310
|
+
graph becomes current. MCP announces build/resource updates.
|
|
311
|
+
Build success records the project input digest captured before compilation;
|
|
312
|
+
status reads independently verify that digest and the output bytes. Guarded
|
|
313
|
+
publication invalidates the compiler explicitly. Content reconciliation recovers
|
|
314
|
+
missed atomic file replacements, so OS watch delivery cannot establish freshness.
|
|
315
|
+
The built-in client refreshes discovery and sends the current selection to the existing App, whose
|
|
309
316
|
loader mounts the new module graph. Failed builds retain the previous view with
|
|
310
317
|
visible stale diagnostics. Invalid scenario metadata at startup and later source
|
|
311
318
|
failures stay in the watcher's recoverable diagnostic path. Fixing source triggers validation again.
|
|
@@ -366,7 +373,11 @@ the isolated candidate project. Passing checks describe
|
|
|
366
373
|
their registered assertions, not every natural-language claim. This keeps edits
|
|
367
374
|
focused without requiring entire file bodies in model context. Peer units and
|
|
368
375
|
unrelated owners remain outside the selected unit's edit boundary. Shared foundation,
|
|
369
|
-
branding and guides have their own units.
|
|
376
|
+
branding and guides have their own units. Shared credits and text license notices
|
|
377
|
+
belong to the documentation unit, including conventional root notices and shared
|
|
378
|
+
`licenses/` collections. Colocated notices remain with their component or asset
|
|
379
|
+
owner. Documentation paths and UTF-8 validation do not grant code/configuration
|
|
380
|
+
ownership. Project configuration, registered guards
|
|
370
381
|
and compiler integration form an explicit configuration unit; their proposed
|
|
371
382
|
settings pass the same mandatory validation. Binary assets can travel as Git patch
|
|
372
383
|
artifacts without entering model context, and compiler configuration changes
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.12
|
|
4
|
+
|
|
5
|
+
- Let the documentation unit create shared credits, conventional root license
|
|
6
|
+
notices and text `licenses/` collections in one guarded owner patch. Expose its
|
|
7
|
+
new-file policy, discover readable provenance resources without enlarging
|
|
8
|
+
workflow guide context, preserve verbatim UTF-8 notices and keep code/peer/path
|
|
9
|
+
boundaries. Verify drafts, dry runs, publication, reads and rejection atomically.
|
|
10
|
+
- Add generic skill examples for preserving reference baselines and intended
|
|
11
|
+
public APIs while resolving coverage diagnostics; verify conditional controls
|
|
12
|
+
through browser state transitions instead of screenshots alone.
|
|
13
|
+
|
|
14
|
+
## 0.3.11
|
|
15
|
+
|
|
16
|
+
- Bind preview success to project input content as well as artifact bytes. Source
|
|
17
|
+
edits immediately mark older output stale, including edits missed by OS watches
|
|
18
|
+
and changes made during a build; reject reports without source evidence.
|
|
19
|
+
- Recover missed atomic replacements with one-second input reconciliation and
|
|
20
|
+
explicitly invalidate the live compiler after accepted single/coupled edits.
|
|
21
|
+
Retain the same process and verify repeated replacements with generic fixtures.
|
|
22
|
+
- Use canonical `?scenario=<id>` links for every preview kind and select the
|
|
23
|
+
showcase section from discovered metadata. Preserve legacy `?category=` links
|
|
24
|
+
as aliases, unify MCP preview and browser-check links, and cover all kinds,
|
|
25
|
+
owner-local tokens, navigation and reloads in a real sandboxed-App regression.
|
|
26
|
+
|
|
3
27
|
## 0.3.10
|
|
4
28
|
|
|
5
29
|
- Attach registered owner-local token sheets to independently compiled token
|