@mtdt/observeops-ds-spec 0.1.0

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 (79) hide show
  1. package/AGENTS.md +102 -0
  2. package/README.md +73 -0
  3. package/components/index.json +1270 -0
  4. package/components/recipes/README.md +41 -0
  5. package/components/recipes/recipes.json +922 -0
  6. package/components/registry/README.md +44 -0
  7. package/components/registry/_schema.json +47 -0
  8. package/components/registry/button.json +368 -0
  9. package/components/registry/checkbox.json +177 -0
  10. package/components/registry/data-viz-tooltips.json +409 -0
  11. package/components/registry/date-time-pickers.json +296 -0
  12. package/components/registry/drawer.json +222 -0
  13. package/components/registry/dropdown-picker.json +388 -0
  14. package/components/registry/filters.json +155 -0
  15. package/components/registry/form-item.json +281 -0
  16. package/components/registry/input.json +277 -0
  17. package/components/registry/link.json +186 -0
  18. package/components/registry/loose-tags.json +196 -0
  19. package/components/registry/menu.json +145 -0
  20. package/components/registry/modal.json +265 -0
  21. package/components/registry/navigation.json +425 -0
  22. package/components/registry/popover.json +216 -0
  23. package/components/registry/radio.json +238 -0
  24. package/components/registry/scheduler.json +188 -0
  25. package/components/registry/select.json +247 -0
  26. package/components/registry/severity.json +179 -0
  27. package/components/registry/switch.json +177 -0
  28. package/components/registry/table.json +275 -0
  29. package/components/registry/tabs.json +264 -0
  30. package/components/registry/tag.json +345 -0
  31. package/components/registry/tags-list.json +115 -0
  32. package/components/registry/toolbars.json +240 -0
  33. package/components/registry/tooltip.json +175 -0
  34. package/components/specs/README.md +72 -0
  35. package/components/specs/button.md +230 -0
  36. package/components/specs/checkbox.md +162 -0
  37. package/components/specs/data-viz-tooltips.md +93 -0
  38. package/components/specs/date-time-pickers.md +161 -0
  39. package/components/specs/drawer.md +162 -0
  40. package/components/specs/dropdown-picker.md +161 -0
  41. package/components/specs/filters.md +118 -0
  42. package/components/specs/form-item.md +130 -0
  43. package/components/specs/input.md +130 -0
  44. package/components/specs/link.md +131 -0
  45. package/components/specs/loose-tags.md +139 -0
  46. package/components/specs/menu.md +88 -0
  47. package/components/specs/modal.md +176 -0
  48. package/components/specs/navigation.md +181 -0
  49. package/components/specs/popover.md +118 -0
  50. package/components/specs/radio.md +144 -0
  51. package/components/specs/scheduler.md +133 -0
  52. package/components/specs/select.md +118 -0
  53. package/components/specs/switch.md +124 -0
  54. package/components/specs/table.md +115 -0
  55. package/components/specs/tabs.md +136 -0
  56. package/components/specs/tag.md +196 -0
  57. package/components/specs/tags-list.md +105 -0
  58. package/components/specs/toolbars.md +108 -0
  59. package/components/specs/tooltip.md +112 -0
  60. package/foundation/README.md +39 -0
  61. package/foundation/layout-shells.md +67 -0
  62. package/foundation/page-templates.md +69 -0
  63. package/foundation/panel-behaviours.md +61 -0
  64. package/foundation/screen-regions.md +62 -0
  65. package/index.js +75 -0
  66. package/layout/grid.json +34 -0
  67. package/layout/layouts.json +310 -0
  68. package/llms.txt +60 -0
  69. package/package.json +42 -0
  70. package/spec.manifest.json +407 -0
  71. package/tokens/README.md +125 -0
  72. package/tokens/component.json +34 -0
  73. package/tokens/kit-accents.json +14 -0
  74. package/tokens/primitive.json +130 -0
  75. package/tokens/purpose-map.json +67 -0
  76. package/tokens/semantic.dark.json +90 -0
  77. package/tokens/semantic.light.json +90 -0
  78. package/tokens/structural.json +35 -0
  79. package/tokens/variables.json +2018 -0
package/llms.txt ADDED
@@ -0,0 +1,60 @@
1
+ # ObserveOps Design System
2
+
3
+ > The design system of Motadata ObserveOps (a Vue 2.6 enterprise network-monitoring SPA).
4
+ > Machine-readable: components, tokens, page recipes, layout structure, and product coverage —
5
+ > everything an AI tool needs to build ObserveOps UI faithfully instead of guessing.
6
+
7
+ Any AI tool building ObserveOps UI must follow the operating contract below, then load the spec
8
+ in the given order. All paths are relative to this file (`design-system/`).
9
+
10
+ ## Start here (required reading)
11
+
12
+ - [AI Operating Contract](AGENTS.md): the rules — use only catalogued components, resolve every
13
+ colour to a token, compose from recipes/layout, and STOP-and-ASK before using anything not in
14
+ this DS. Read this before generating anything.
15
+
16
+ ## Spec (load in this order)
17
+
18
+ - [components/index.json](components/index.json): the machine index — load FIRST. Every component
19
+ (family, `selectHint`, `summary`, `variants`), plus pointers to tokens, recipes, and layout.
20
+ - [components/registry/](components/registry/): per-component spec — `props` / `events` / `slots` /
21
+ `apis`, `decisionFlow`, `variants`, `sizes`, `states`, `do` / `dont`, `tokensUsed`, `a11y`.
22
+ - [components/recipes/recipes.json](components/recipes/recipes.json): 7 page templates + 5 flows,
23
+ each mapping screen regions → components.
24
+ - [layout/layouts.json](layout/layouts.json): app shell, 4 route shells + 2 content layouts,
25
+ screen regions, 6 content layouts, 10 panel behaviours, 7 page templates.
26
+ - [layout/grid.json](layout/grid.json): the 12-column MRow/MCol grid.
27
+ - [foundation/](foundation/): product page-by-page coverage — which real pages/flows use each
28
+ layout element (grounding/best practices).
29
+
30
+ ## Tokens (never hardcode a colour)
31
+
32
+ - [tokens/variables.json](tokens/variables.json): the runtime CSS `--vars` crosswalk (336 vars,
33
+ light + dark) — the LIVE product token layer. Emit these.
34
+ - [tokens/structural.json](tokens/structural.json): LESS `@vars` — spacing, sizing, radius, type.
35
+ - [tokens/kit-accents.json](tokens/kit-accents.json): Ant 1.x LESS accents (`@primary-color` cyan).
36
+ - [tokens/purpose-map.json](tokens/purpose-map.json): purpose → token (surface / text / border /
37
+ brand / status / severity / shadow + structural scale) for styling a NEW element by intent.
38
+ - Note: `--primary` = navy `#111c2c` (light) / `#e3e8f2` (dark), NOT cyan. The cyan `@primary-color`
39
+ `#099dd9` is the Ant form-control accent only. Do NOT emit `mds-*` tokens (a future/unwired layer).
40
+
41
+ ## Live reference
42
+
43
+ - Storybook (visual catalogue): <https://niravbhatt1317.github.io/motadata-design-system/>
44
+
45
+ ## Key rules (full list in AGENTS.md)
46
+
47
+ - Use only components in `index.json`; configure only with documented props/events/slots/apis.
48
+ - Resolve every colour/space to a token; never hardcode hex/rgb/rgba/hsl.
49
+ - Compose pages from `recipes` + `layout`; forms use the 12-col MRow/MCol grid. Recipes are examples,
50
+ not an allow-list — for an undocumented screen (signup, etc.), COMPOSE it from DS parts, don't ask.
51
+ - Never branch on theme — tokens are theme-aware. Honour each component's `a11y`.
52
+ - ASK only when you'd need a BUILDING BLOCK not in the DS (a component/token/primitive that doesn't
53
+ exist, e.g. charts) — then STOP and ASK before substituting. Never ask permission to combine parts
54
+ already in the DS.
55
+
56
+ ## Known gaps (expect to ASK here)
57
+
58
+ - Charts / data-viz / widget tiles / topology graph — only tooltips (`data-viz-tooltips`) are
59
+ catalogued; the chart/graph components themselves are not in the DS yet.
60
+ - Figma library — not built.
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@mtdt/observeops-ds-spec",
3
+ "version": "0.1.0",
4
+ "description": "Machine-readable spec and AI operating contract for the Motadata ObserveOps design system — components, tokens, page recipes, layout structure, and the rules an AI tool follows to build ObserveOps UI faithfully.",
5
+ "license": "UNLICENSED",
6
+ "main": "index.js",
7
+ "files": [
8
+ "index.js",
9
+ "AGENTS.md",
10
+ "llms.txt",
11
+ "spec.manifest.json",
12
+ "components/",
13
+ "tokens/",
14
+ "layout/",
15
+ "foundation/",
16
+ "README.md"
17
+ ],
18
+ "exports": {
19
+ ".": "./index.js",
20
+ "./llms.txt": "./llms.txt",
21
+ "./AGENTS.md": "./AGENTS.md",
22
+ "./manifest": "./spec.manifest.json",
23
+ "./package.json": "./package.json",
24
+ "./*": "./*"
25
+ },
26
+ "keywords": [
27
+ "design-system",
28
+ "observeops",
29
+ "motadata",
30
+ "ai",
31
+ "llms",
32
+ "design-tokens",
33
+ "spec",
34
+ "agents"
35
+ ],
36
+ "scripts": {
37
+ "test": "echo \"spec validated at build time via design-system/scripts/validate-spec.js\" && exit 0"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ }
42
+ }
@@ -0,0 +1,407 @@
1
+ {
2
+ "name": "@mtdt/observeops-ds-spec",
3
+ "version": "0.1.0",
4
+ "generated": "2026-06-18T16:17:51.962Z",
5
+ "entry": "llms.txt",
6
+ "contract": "AGENTS.md",
7
+ "index": "components/index.json",
8
+ "counts": {
9
+ "components": 26,
10
+ "registries": 26,
11
+ "recipes": 12,
12
+ "specs": 26,
13
+ "files": 78
14
+ },
15
+ "files": [
16
+ {
17
+ "path": "AGENTS.md",
18
+ "bytes": 6546,
19
+ "sha256": "d8be4b87ca70d65e97f75a8b9d8cae07be928ec2af15ed0f3b7938f4384b7069"
20
+ },
21
+ {
22
+ "path": "README.md",
23
+ "bytes": 3476,
24
+ "sha256": "cdae300727bcd2a9fa8177a5bbb3f406f0ece8a9e6c2e7697d31323b5232a939"
25
+ },
26
+ {
27
+ "path": "components/index.json",
28
+ "bytes": 39047,
29
+ "sha256": "d82d1fc5e16dfe7e870dbadd48145f15fb4b95ed7eb7a8b9da34d3f6b1b7bf2d"
30
+ },
31
+ {
32
+ "path": "components/recipes/README.md",
33
+ "bytes": 2225,
34
+ "sha256": "bd243736992628b2252338dfffc781eb794e63e2f5c8107420360eebdc658d0c"
35
+ },
36
+ {
37
+ "path": "components/recipes/recipes.json",
38
+ "bytes": 29120,
39
+ "sha256": "3fcd699265dd8f6910d31a9e09d1e0652e6dd1b9d50e7b03c0fdce9c953f6b55"
40
+ },
41
+ {
42
+ "path": "components/registry/README.md",
43
+ "bytes": 2335,
44
+ "sha256": "fb04a84f87557ca4ea5a60c20a55e6a438592f84c5dbc48390b939b68f9fc239"
45
+ },
46
+ {
47
+ "path": "components/registry/_schema.json",
48
+ "bytes": 3851,
49
+ "sha256": "41ecd89f9768437de188468cb8c1d6386720649657390a6880f8ce0fccf2e72a"
50
+ },
51
+ {
52
+ "path": "components/registry/button.json",
53
+ "bytes": 11751,
54
+ "sha256": "e9386f39e5f312c7386c6334ee5a7baad27a83d049187f7a3596ebecce1eb05d"
55
+ },
56
+ {
57
+ "path": "components/registry/checkbox.json",
58
+ "bytes": 6134,
59
+ "sha256": "3c2c0d792cbbf5cdbea508f1f1b25830c7a9de8bf845ea936bad835fa48d9094"
60
+ },
61
+ {
62
+ "path": "components/registry/data-viz-tooltips.json",
63
+ "bytes": 10395,
64
+ "sha256": "4a2534cfca43d1026db23eb513adc83ddb95c70312fed0d3640079d72a913e9e"
65
+ },
66
+ {
67
+ "path": "components/registry/date-time-pickers.json",
68
+ "bytes": 13126,
69
+ "sha256": "bd2f41e4beef9332d1a781cf4919ae4118c237e8739f50c82b55ec22d8f75234"
70
+ },
71
+ {
72
+ "path": "components/registry/drawer.json",
73
+ "bytes": 8083,
74
+ "sha256": "9694ec900d7b2569cd9e14b913e756a0f70f90828a3ea342b792f7e392d7c2bb"
75
+ },
76
+ {
77
+ "path": "components/registry/dropdown-picker.json",
78
+ "bytes": 10481,
79
+ "sha256": "3038e9f5c6bed91092e5d5a0f3986f2e4ea6a5330b97381140c2850e36447d3c"
80
+ },
81
+ {
82
+ "path": "components/registry/filters.json",
83
+ "bytes": 7343,
84
+ "sha256": "036bf8dd8cf79f00be42d76eeb702b5c659dde63a7792b4d21741626e2764157"
85
+ },
86
+ {
87
+ "path": "components/registry/form-item.json",
88
+ "bytes": 9546,
89
+ "sha256": "1fa620e289e84955e92e9f442115efd0068806eaa31f43a03e23e310d366bdcf"
90
+ },
91
+ {
92
+ "path": "components/registry/input.json",
93
+ "bytes": 8618,
94
+ "sha256": "538679e44180798fa6f8a0e644b9e074c4e863d494cc3e27f6fff8e7faa70160"
95
+ },
96
+ {
97
+ "path": "components/registry/link.json",
98
+ "bytes": 6575,
99
+ "sha256": "b3362ab4305d631e24c83149482d46723f964f4f9c62d516aaeec14bbf2e6ff4"
100
+ },
101
+ {
102
+ "path": "components/registry/loose-tags.json",
103
+ "bytes": 6261,
104
+ "sha256": "01b28b99f5938984176dd09cfae6d59a21c6ec45fedce6eafaf4e29a30b7bdac"
105
+ },
106
+ {
107
+ "path": "components/registry/menu.json",
108
+ "bytes": 5410,
109
+ "sha256": "4a6b1f25688d7f9f55b61d2202951548d54051f02c3309646aec8e604cffac3a"
110
+ },
111
+ {
112
+ "path": "components/registry/modal.json",
113
+ "bytes": 9110,
114
+ "sha256": "eb56de0ddd2ccb74cedf0ad5c62550d2608ecf649a5d3cef7eee4a939027e365"
115
+ },
116
+ {
117
+ "path": "components/registry/navigation.json",
118
+ "bytes": 17792,
119
+ "sha256": "c0d36d2e8775f7c7c04352c626a60b974a13d8b6ddae9fa46162c6c7981216d1"
120
+ },
121
+ {
122
+ "path": "components/registry/popover.json",
123
+ "bytes": 6373,
124
+ "sha256": "f24c5f0acbe8810bf583772bcdea8ceeba79ede66a94e794aeedafb76faf8d46"
125
+ },
126
+ {
127
+ "path": "components/registry/radio.json",
128
+ "bytes": 7951,
129
+ "sha256": "7c338f1f946f6e9e0e0a4b0d55a7512c6aa695b8f2b4bafc44bfad35b8b7e6fd"
130
+ },
131
+ {
132
+ "path": "components/registry/scheduler.json",
133
+ "bytes": 8269,
134
+ "sha256": "7ca9e76b347ecc5a36bb7b80b34c6825028a611b6cc04af4632ca909d63794d9"
135
+ },
136
+ {
137
+ "path": "components/registry/select.json",
138
+ "bytes": 7514,
139
+ "sha256": "6643c5479e7347cd08860c821de71d02da9ce286250c27a8b767ef4d24eec394"
140
+ },
141
+ {
142
+ "path": "components/registry/severity.json",
143
+ "bytes": 6781,
144
+ "sha256": "d9453cd3151b41ca6a37b5419f8138e152e8a9ff6d39687eeac785af8029ce05"
145
+ },
146
+ {
147
+ "path": "components/registry/switch.json",
148
+ "bytes": 4771,
149
+ "sha256": "6ed63cd265b2e25c1c8cee3db4ad46817ec3c9a75e1841dadc091cee9dd2cf61"
150
+ },
151
+ {
152
+ "path": "components/registry/table.json",
153
+ "bytes": 7841,
154
+ "sha256": "282c640d00d6b276e2e2ff2440addfa71bd4b5d754568ce4f66ea11627af8b3d"
155
+ },
156
+ {
157
+ "path": "components/registry/tabs.json",
158
+ "bytes": 9320,
159
+ "sha256": "ed1255fbca37e258133a39e3043c05b8d328ad7a5b57eb825844bedc41461c7b"
160
+ },
161
+ {
162
+ "path": "components/registry/tag.json",
163
+ "bytes": 11493,
164
+ "sha256": "245aef496865fb8ba8ddd065bba02c1f1b4863faa7b9b837bfd2bb09dae8738f"
165
+ },
166
+ {
167
+ "path": "components/registry/tags-list.json",
168
+ "bytes": 3798,
169
+ "sha256": "0668ebfab596511042a1789b2c88d0ac2d2223a2699e85405923d1877954f11a"
170
+ },
171
+ {
172
+ "path": "components/registry/toolbars.json",
173
+ "bytes": 9274,
174
+ "sha256": "ae49305918b42b3c8049a8cfa3a88b2e1aa529652c66754e6ba5afbb42e16805"
175
+ },
176
+ {
177
+ "path": "components/registry/tooltip.json",
178
+ "bytes": 5805,
179
+ "sha256": "86f0a203cdd0d7270c18dabd08feae017ebaebe90408696ccbfa34df00bc7a41"
180
+ },
181
+ {
182
+ "path": "components/specs/README.md",
183
+ "bytes": 6042,
184
+ "sha256": "70295fc5d20cbc6f9f19be807c1ffb52429cd736d320b5311f5e7bc60759304e"
185
+ },
186
+ {
187
+ "path": "components/specs/button.md",
188
+ "bytes": 11302,
189
+ "sha256": "54ab4ffcacf7076f7948c07bb58b60d802d6eacf284e2b7d8233bbde8136c0a0"
190
+ },
191
+ {
192
+ "path": "components/specs/checkbox.md",
193
+ "bytes": 7347,
194
+ "sha256": "9841b45d6f19ea3f2f3ae8678ccf39ece59ddbd148989f59bcda294c59c1a5e2"
195
+ },
196
+ {
197
+ "path": "components/specs/data-viz-tooltips.md",
198
+ "bytes": 5751,
199
+ "sha256": "13d481553390cec68f82a8015639186cb3d38c3292f6f1bf66fd7e48aaceb404"
200
+ },
201
+ {
202
+ "path": "components/specs/date-time-pickers.md",
203
+ "bytes": 9578,
204
+ "sha256": "b9c4bc271bbc891715450e8f9de196439d93715477a5480416ca52afc4e321af"
205
+ },
206
+ {
207
+ "path": "components/specs/drawer.md",
208
+ "bytes": 9625,
209
+ "sha256": "ecbf7f1a19a857baccb8b445c2bbce9a1b9968e03d89f6ff3dfdad0e2e45212b"
210
+ },
211
+ {
212
+ "path": "components/specs/dropdown-picker.md",
213
+ "bytes": 8938,
214
+ "sha256": "61ce7e447b70207653a6822d776fbc4189e3c81ed62602d3dbc9f4aacf7daf0e"
215
+ },
216
+ {
217
+ "path": "components/specs/filters.md",
218
+ "bytes": 6869,
219
+ "sha256": "f4a59c322c2e3eae01f2cc48c832922d65884d31035424868466b9538afbbb19"
220
+ },
221
+ {
222
+ "path": "components/specs/form-item.md",
223
+ "bytes": 7210,
224
+ "sha256": "4cf62a2255c3d84911ffa9e8c88442eaf2d26df38a130cdd6fef6802e9614f8e"
225
+ },
226
+ {
227
+ "path": "components/specs/input.md",
228
+ "bytes": 6493,
229
+ "sha256": "7f5778289cd3ae6077e2c6574a74d587d4183da2995b7bd4ce04ea8452e000d2"
230
+ },
231
+ {
232
+ "path": "components/specs/link.md",
233
+ "bytes": 6628,
234
+ "sha256": "91311fb9c45bd92419f8d3423dbf5b2ad98b9dd89ddfedfcb0c5f38b67858056"
235
+ },
236
+ {
237
+ "path": "components/specs/loose-tags.md",
238
+ "bytes": 6731,
239
+ "sha256": "9c78302407ee658d54d39cfa6b6044b2635f953098c0fb02045589d561dd6256"
240
+ },
241
+ {
242
+ "path": "components/specs/menu.md",
243
+ "bytes": 5131,
244
+ "sha256": "bdb0267c3b83ab191837c3a8b00ba66b69de2bfbba1f22664fbc5b7a88b7faea"
245
+ },
246
+ {
247
+ "path": "components/specs/modal.md",
248
+ "bytes": 10177,
249
+ "sha256": "93aadb07cf438b5c1671604dbafe566b948afc07280d406aa2f0c40d44a3d9fa"
250
+ },
251
+ {
252
+ "path": "components/specs/navigation.md",
253
+ "bytes": 12418,
254
+ "sha256": "c29dba31ba6bd1967a2271bef737cd9eee2ff3225b9af7d5126057fc7e8073f0"
255
+ },
256
+ {
257
+ "path": "components/specs/popover.md",
258
+ "bytes": 5994,
259
+ "sha256": "09e162ff0cd518f0627123a12e4fd93d7337640e6ff58e4843d1b1401648cd36"
260
+ },
261
+ {
262
+ "path": "components/specs/radio.md",
263
+ "bytes": 7547,
264
+ "sha256": "7884592b99d1bb91ae9b4f779e6ec44ed702b0f67d0908d3da3edd0eb37649cc"
265
+ },
266
+ {
267
+ "path": "components/specs/scheduler.md",
268
+ "bytes": 7132,
269
+ "sha256": "9aca6a3c29f9a0c9c97544e58c1bb2804c66560dc9e4b9e5559b38b15347d259"
270
+ },
271
+ {
272
+ "path": "components/specs/select.md",
273
+ "bytes": 6498,
274
+ "sha256": "9c260251d31ea3f876780e01b975284871955aae0a55511bedfe5c3709f395f8"
275
+ },
276
+ {
277
+ "path": "components/specs/switch.md",
278
+ "bytes": 5087,
279
+ "sha256": "ef3aecc7f363197b36760d16e56176c7e8c2436c52b518201da38ed0b1946dec"
280
+ },
281
+ {
282
+ "path": "components/specs/table.md",
283
+ "bytes": 5689,
284
+ "sha256": "af2212b1b08d4cbd7cbf36174b26e14e9778d4672d2c558062e37ba688984312"
285
+ },
286
+ {
287
+ "path": "components/specs/tabs.md",
288
+ "bytes": 6913,
289
+ "sha256": "a132c9277c97f5334c45df17e7a349c1f606d58af0dfe67a968da51201a0f620"
290
+ },
291
+ {
292
+ "path": "components/specs/tag.md",
293
+ "bytes": 10916,
294
+ "sha256": "b6f967b019dbc79fde7b99c0088f3f6dd11e9e5a6ed63f3e3c02a5e294e854f7"
295
+ },
296
+ {
297
+ "path": "components/specs/tags-list.md",
298
+ "bytes": 4432,
299
+ "sha256": "8232fe4ad865308ab7fa2cc99ac356217184e4bb16436bebd722ec86e6deba9b"
300
+ },
301
+ {
302
+ "path": "components/specs/toolbars.md",
303
+ "bytes": 5962,
304
+ "sha256": "99fb315247698021f70049752ffb0180a00a885a83c665aa3ccc1ee1536b2d76"
305
+ },
306
+ {
307
+ "path": "components/specs/tooltip.md",
308
+ "bytes": 5516,
309
+ "sha256": "6fc27b526ee89a67f57ee62c7313faf1f37da35baf78f224eb397ceb22c71b92"
310
+ },
311
+ {
312
+ "path": "foundation/README.md",
313
+ "bytes": 2990,
314
+ "sha256": "94f1523186d10971f2ce457da5e9820904080985c6b11aace4a39912345444df"
315
+ },
316
+ {
317
+ "path": "foundation/layout-shells.md",
318
+ "bytes": 4705,
319
+ "sha256": "288447032d22d1ae7772f085d83ae8675ce6bd24107498d7a6da61f4ad4805b2"
320
+ },
321
+ {
322
+ "path": "foundation/page-templates.md",
323
+ "bytes": 5915,
324
+ "sha256": "836d92df25504eaf7d8817d8962da2aee1eaaf9722d588dce901a29bf6b8effd"
325
+ },
326
+ {
327
+ "path": "foundation/panel-behaviours.md",
328
+ "bytes": 5340,
329
+ "sha256": "591906d7ce58feb0090f1a64d3f3eaa5f9e24a3842d3de2e1066f95a7e19536e"
330
+ },
331
+ {
332
+ "path": "foundation/screen-regions.md",
333
+ "bytes": 4800,
334
+ "sha256": "c9f0766013de3aa6061c263ea9ffd3aa87d2936a819915b7527a936e736b3adb"
335
+ },
336
+ {
337
+ "path": "index.js",
338
+ "bytes": 2501,
339
+ "sha256": "0da016aa4afee511535107f45d96251027ffd2a657671b5c54fbded7886f4f1d"
340
+ },
341
+ {
342
+ "path": "layout/grid.json",
343
+ "bytes": 1913,
344
+ "sha256": "494f090e9b68c11f04b1d00961ba4e337ee07b2e81e7b762266b7b717ba19eec"
345
+ },
346
+ {
347
+ "path": "layout/layouts.json",
348
+ "bytes": 12255,
349
+ "sha256": "15ff34879aad3c71f4a05b1fe579b201d71d74d9f933ebf55487f4d6e2b52b38"
350
+ },
351
+ {
352
+ "path": "llms.txt",
353
+ "bytes": 3562,
354
+ "sha256": "53945f6464853840a1edf3c34cf1c854e3fed0e4b4145529ed54ea6d2182c4e1"
355
+ },
356
+ {
357
+ "path": "package.json",
358
+ "bytes": 1049,
359
+ "sha256": "e41f71682d46fcbffb236a880259b9772acf0e958eeb5330b57057b45d4b7621"
360
+ },
361
+ {
362
+ "path": "tokens/README.md",
363
+ "bytes": 7022,
364
+ "sha256": "4c4e8b0d534812963300a75e9894b8b84a62b756e2f52995c66713e2c76367f4"
365
+ },
366
+ {
367
+ "path": "tokens/component.json",
368
+ "bytes": 923,
369
+ "sha256": "e32a3474956fe014a03de0e72d726e27ec6d1d434abb0b635e65356caa0b2964"
370
+ },
371
+ {
372
+ "path": "tokens/kit-accents.json",
373
+ "bytes": 583,
374
+ "sha256": "003f4b286c7568d2c46ac45e8cad74c55e5eb0a3f202b8cb23007a76266b2592"
375
+ },
376
+ {
377
+ "path": "tokens/primitive.json",
378
+ "bytes": 2682,
379
+ "sha256": "00df60a24baed14a14471646c9a90b61003ba85bb66966dbc3ad750cf1bb5740"
380
+ },
381
+ {
382
+ "path": "tokens/purpose-map.json",
383
+ "bytes": 6096,
384
+ "sha256": "3f114a1444e4579cc67c30ae3716fbe2f452a61985f0f3dbec50f35494dd8781"
385
+ },
386
+ {
387
+ "path": "tokens/semantic.dark.json",
388
+ "bytes": 2253,
389
+ "sha256": "5b13ddb8e1728c6f569e1cea0723b5f61f88a4af249119f62405eb82e3d30c9c"
390
+ },
391
+ {
392
+ "path": "tokens/semantic.light.json",
393
+ "bytes": 2203,
394
+ "sha256": "3b3848c76a3e1223230aa8759c6b277daaae9b4413039158cfc1c0e152380200"
395
+ },
396
+ {
397
+ "path": "tokens/structural.json",
398
+ "bytes": 1042,
399
+ "sha256": "5441e71a2e1898f3f709781b6dffa7da50bdf60f71c97e703514750dbafd2224"
400
+ },
401
+ {
402
+ "path": "tokens/variables.json",
403
+ "bytes": 51193,
404
+ "sha256": "9c7fc743214a6bfc27d294e3fb91d7462ad1d06c43c5db5c234a857f1e86df0f"
405
+ }
406
+ ]
407
+ }
@@ -0,0 +1,125 @@
1
+ # Tokens
2
+
3
+ Two layers live here:
4
+
5
+ 1. **`variables.json` + `structural.json` + `kit-accents.json` — the complete as-is resolution
6
+ crosswalk.** This is what an **AI / codegen tool uses today** to render product-faithful values.
7
+ `variables.json` = themed CSS `--vars`; `structural.json` = LESS `@vars` (spacing/sizing/radii/type);
8
+ `kit-accents.json` = the Ant 1.x LESS accents not in `variable.less` (e.g. the cyan `@primary-color`
9
+ `#099dd9` that paints radio dots / checkbox checks). Generated verbatim from the product source.
10
+ **`purpose-map.json`** sits alongside these — a **purpose → token** map (surface / text / border /
11
+ brand / status / severity / shadow + the structural scale) so an AI styling a **net-new** element picks
12
+ the right token by intent instead of hardcoding. Indexed from `components/index.json` → `tokens.purposeMap`.
13
+ 2. **`primitive` / `semantic.{light,dark}` / `component.json` — the DTCG token *model*** (a curated
14
+ slice) that the future Figma / Style-Dictionary pipeline is built on.
15
+
16
+ ## variables.json — the AI crosswalk (use this for product-faithful values)
17
+
18
+ Every component registry's `tokensUsed` lists product **CSS custom-property names** (`--primary`,
19
+ `--nav-panel-bg`, `--code-tag-background-color`, …). **`variables.json` resolves each one to its actual
20
+ light + dark value**, with aliases (`var(--x)`) followed to a final value:
21
+
22
+ ```json
23
+ "--primary": { "light": "#111c2c", "dark": "#e3e8f2", "lightRaw": "#111c2c", "darkRaw": "#e3e8f2" },
24
+ "--code-tag-background-color": { "light": "#ecf1f9", "dark": "#172336", "lightRaw": "var(--neutral-lightest)", "darkRaw": "var(--left-menu-hover-bg)" }
25
+ ```
26
+
27
+ **How an AI uses it:** registry says a component uses `--primary` → look it up in `variables.json` →
28
+ emit `var(--primary)` in code **and** know it renders `#111c2c` (light) / `#e3e8f2` (dark) for the
29
+ mockup/Figma. `structural.json` does the same for the LESS `@vars` (spacing `@padding-md: 16px`, sizing
30
+ `@input-height-base: 32px`, radius `@btn-radius: 4px`, type `@text-sm: 0.8rem`).
31
+
32
+ **Coverage:** **336** themed CSS vars (306 with both light + dark, 25 light-only), 313 resolve to a
33
+ colour value. Of the **57** distinct `--vars` referenced across all registries, **100% of the real ones
34
+ resolve** (the only non-resolving entries are prose wildcards like `--severity-*` and two LESS `@vars`
35
+ — `@btn-height` / `@btn-radius` — which live in `structural.json`).
36
+
37
+ > ### ⚠️ `--primary` drift — resolved
38
+ >
39
+ > Older docs (`/.claude/rules/design-rules.md`, the DTCG `link` role below) describe `--primary` /
40
+ > "brand" as **cyan `#099dd9`**. That is **wrong for the runtime CSS vars**: in `variable.less`,
41
+ > `--primary` = **navy `#111c2c`** (light) / `#e3e8f2` (dark), and **no CSS custom property resolves to
42
+ > `#099dd9` at all**. The cyan exists only as Ant Design's internal LESS `@primary-color` (affecting a
43
+ > few Ant component internals) and the not-yet-wired DTCG `link` role. **For product-faithful output,
44
+ > trust `variables.json` (navy).**
45
+
46
+ ## The DTCG token model (the future Figma / Style-Dictionary slice)
47
+
48
+ > **Status: SLICE for sign-off.** These files contain a small, representative set
49
+ > (brand/accent split, neutrals, two severity families, surfaces/text/border, a few
50
+ > component tokens) to validate the *shape* before converting all ~322 tokens. Values
51
+ > are extracted verbatim from `src/design/variable.less`.
52
+
53
+ ## Files (the 3 tiers)
54
+
55
+ | File | Tier | Role |
56
+ | --- | --- | --- |
57
+ | `primitive.json` | 1 · Primitive | Raw values (`color.navy.900`, `space.300`). Never themed, never used directly. |
58
+ | `semantic.light.json` | 2 · Semantic (light mode) | Roles referencing primitives. The **shared contract with Figma**. |
59
+ | `semantic.dark.json` | 2 · Semantic (dark mode) | **Same keys**, dark references. This is what "modes" means. |
60
+ | `component.json` | 3 · Component | Code-only; references semantic. Figma binds components to semantic, so this tier is **excluded** from the Figma export. |
61
+
62
+ Naming follows [`../strategy/token-taxonomy.md`](../strategy/token-taxonomy.md):
63
+ property-first (`color.background.brand.bold`), prominence ladder, severity as a role,
64
+ `mds` namespace on output.
65
+
66
+ ## What gets generated (verified)
67
+
68
+ Resolving the references produces these CSS custom properties (output prefixed `mds`).
69
+ The values match `variable.less` exactly in both themes — i.e. **no visual change**
70
+ when the app eventually consumes the generated file:
71
+
72
+ ```css
73
+ /* LIGHT — :root */
74
+ --mds-color-background-brand-bold: #07101f; /* brand = primary action */
75
+ --mds-color-text-default: #1d2a3e;
76
+ --mds-color-text-subtle: #7186a8;
77
+ --mds-color-text-inverse: #ffffff; /* on brand/bold surfaces */
78
+ --mds-color-link: #099dd9; /* interaction (cyan) */
79
+ --mds-color-border-focused: #099dd9;
80
+ --mds-color-text-accent-teal: #0d9488; /* accent = decorative */
81
+ --mds-color-text-severity-critical: #ec5b5b; /* status */
82
+ --mds-color-background-severity-critical-subtle: #fef5f5;
83
+ --mds-color-border-default: #e3e8f2;
84
+
85
+ /* DARK — [data-theme='dark-theme'] */
86
+ --mds-color-background-brand-bold: #ffffff;
87
+ --mds-color-text-default: #e3e8f2;
88
+ --mds-color-text-inverse: #07101f;
89
+ --mds-color-link: #099dd9;
90
+ --mds-color-background-severity-critical-subtle: #310c0c;
91
+ --mds-color-border-default: #1d2a3e;
92
+ ```
93
+
94
+ Note the corrected color roles (decision D9, Atlassian-aligned): `brand` = primary
95
+ action navy, `link`/`border.focused` = interactive cyan, `accent.*` = decorative
96
+ hues (chart palette), `inverse` = text on bold surfaces, `severity.*` = status.
97
+
98
+ Note how `color.background.severity.critical.subtle` is `#fef5f5` in light and
99
+ `#310c0c` in dark — same token name, mode-swapped value. That single shared name is
100
+ what guarantees code ↔ Figma fidelity.
101
+
102
+ ## Build pipeline (to wire next)
103
+
104
+ ```text
105
+ tokens/*.json ──► Style Dictionary ──► ┌─ css/mds-tokens.css (--mds-* vars, both themes)
106
+ ├─ tailwind/preset.js (theme-safe utilities)
107
+ ├─ figma/tokens.json (tiers 1–2 only → Tokens Studio)
108
+ └─ ai/tokens.json (flat, documented → AI spec)
109
+ ```
110
+
111
+ - **Style Dictionary** resolves the `{alias}` references and emits each target.
112
+ - The two semantic files become **modes** (Figma) / themed blocks (CSS).
113
+ - `component.json` is filtered OUT of the Figma export.
114
+
115
+ ## Conversion plan (rest of Phase 1)
116
+
117
+ 1. Sign off on this slice's shape.
118
+ 2. Expand `primitive.json` — full neutral ramp, all 13 severity families, chart hues,
119
+ spacing/type/radius/z-index scales.
120
+ 3. Expand `semantic.{light,dark}.json` — map every themed token in `variable.less` to a
121
+ property-first role; resolve all hardcodes/typos at the source.
122
+ 4. Expand `component.json` — buttons, inputs, grid, nav, tags, etc.
123
+ 5. Wire Style Dictionary; diff generated CSS against current rendered values (both
124
+ themes) to confirm zero visual regression.
125
+ </content>
@@ -0,0 +1,34 @@
1
+ {
2
+ "$description": "TIER 3 — COMPONENT. Code-only (Figma binds components to semantic, not these). References the SEMANTIC tier, never primitives. SLICE for sign-off.",
3
+ "$status": "FUTURE / portable DTCG token layer (mds-*). NOT yet wired to the running product or component tokensUsed — the LIVE product uses tokens/variables.json (--vars). Do not emit mds-* for live output.",
4
+ "button": {
5
+ "background": {
6
+ "primary": {
7
+ "$type": "color",
8
+ "$value": "{color.background.brand.bold}"
9
+ }
10
+ },
11
+ "text": {
12
+ "primary": {
13
+ "$type": "color",
14
+ "$value": "{color.text.inverse}"
15
+ }
16
+ }
17
+ },
18
+ "input": {
19
+ "border": {
20
+ "default": {
21
+ "$type": "color",
22
+ "$value": "{color.border.subtle}"
23
+ }
24
+ }
25
+ },
26
+ "grid": {
27
+ "background": {
28
+ "header": {
29
+ "$type": "color",
30
+ "$value": "{color.surface.raised}"
31
+ }
32
+ }
33
+ }
34
+ }