trdr-ds-install 1.1.0 → 1.2.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.
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: trdr-ds
|
|
3
|
-
description: Applies the TRDR Design System to any project. Runs a two-phase workflow
|
|
3
|
+
description: Applies the TRDR Design System to any project. Runs a two-phase workflow - first analyzes the project and presents a migration plan for approval, then executes the full implementation (tokens, components, CLAUDE.md, violation fixes). Trigger when developer mentions "apply design system", "implement TRDR DS", "add TRDR tokens", "design system setup", "migrar design system", "aplicar design system", or invokes /trdr-ds.
|
|
4
4
|
user-invocable: true
|
|
5
|
-
argument-hint: "[analyze|apply]"
|
|
5
|
+
argument-hint: "[analyze|apply|sync]"
|
|
6
6
|
allowed-tools: [Read, Glob, Grep, Edit, Write, Bash, WebFetch]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
You are implementing the TRDR Design System in a developer's project. The Design Hub is the single source of truth and lives at **https://trdr.mrocontent.com.br**.
|
|
9
|
+
You are implementing the **TRDR Design System** in a developer's project. The Design Hub is the single source of truth and lives at **https://trdr.mrocontent.com.br**.
|
|
10
|
+
|
|
11
|
+
This skill ships with two **offline-first snapshots** of the Hub:
|
|
12
|
+
|
|
13
|
+
- `references/tokens.css` — all TRDR CSS variables (dark + light mode), copied verbatim from the Hub
|
|
14
|
+
- `data/components.json` — full component catalog (implemented + stubs), with code blocks for everything `implemented: true`
|
|
15
|
+
|
|
16
|
+
The snapshots are kept in sync by the skill's maintainer via `npm run sync` in the `trdr-plugins` repo. **Always prefer the local snapshot.** Only fetch from the Hub when the user explicitly asks for the latest (`--latest` argument or `sync` mode).
|
|
10
17
|
|
|
11
18
|
Execute in two clearly separated phases: **PHASE 1: ANALYZE → PHASE 2: EXECUTE (only after approval)**.
|
|
12
19
|
|
|
13
20
|
---
|
|
14
21
|
|
|
15
|
-
##
|
|
22
|
+
## Argument behaviour
|
|
23
|
+
|
|
24
|
+
| Arg | Behaviour |
|
|
25
|
+
|-----|-----------|
|
|
26
|
+
| `analyze` *(default when none given)* | Run Phase 1 only — produce a migration plan, do not modify any project file |
|
|
27
|
+
| `apply` | Run Phase 1 + Phase 2 |
|
|
28
|
+
| `sync` | Re-fetch `https://trdr.mrocontent.com.br/components.json` and `https://trdr.mrocontent.com.br/tokens.css`, overwrite `data/components.json` and `references/tokens.css` in the skill directory, report the diff. No project changes. |
|
|
29
|
+
| `--latest` *(modifier on `analyze` or `apply`)* | Same as `sync` first, then continue normally |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## PHASE 1: ANALYSIS (default behaviour on invocation)
|
|
16
34
|
|
|
17
|
-
Scan the project and produce a structured migration plan. Do NOT modify any files yet.
|
|
35
|
+
Scan the project and produce a structured migration plan. Do NOT modify any project files yet.
|
|
18
36
|
|
|
19
37
|
### Step 1 — Detect framework
|
|
20
38
|
|
|
@@ -71,16 +89,56 @@ Flag any gradient that doesn't reference a TRDR gradient token (`var(--gradient-
|
|
|
71
89
|
**H — Hardcoded font-size in px** (should use .trdr-h* / .trdr-body-* text style classes):
|
|
72
90
|
Search: `font-size:\s*\d+px` in CSS/SCSS files (skip tokens.css itself)
|
|
73
91
|
|
|
74
|
-
### Step 4 —
|
|
92
|
+
### Step 4 — Load component catalog (offline-first)
|
|
93
|
+
|
|
94
|
+
Read the local snapshot from the skill directory:
|
|
75
95
|
|
|
76
|
-
Fetch the component catalog to know what's currently available:
|
|
77
96
|
```
|
|
78
|
-
|
|
97
|
+
Read: <skill-dir>/data/components.json
|
|
79
98
|
```
|
|
80
99
|
|
|
81
|
-
|
|
100
|
+
Where `<skill-dir>` is either `~/.claude/skills/trdr-ds/` or `<project>/.claude/skills/trdr-ds/`. Try both.
|
|
101
|
+
|
|
102
|
+
Expected JSON shape:
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"version": "1.0",
|
|
106
|
+
"generatedAt": "2026-05-08T...",
|
|
107
|
+
"total": 60,
|
|
108
|
+
"implemented": 13,
|
|
109
|
+
"categories": { "formulario": "Formulário / Controles", ... },
|
|
110
|
+
"components": [
|
|
111
|
+
{
|
|
112
|
+
"slug": "button", "name": "Button", "figmaId": "1318:749",
|
|
113
|
+
"category": "formulario", "description": "...",
|
|
114
|
+
"implemented": true,
|
|
115
|
+
"props": [...], "dimensions": [...], "tokens": [...],
|
|
116
|
+
"code": { "html": "...", "css": "...", "react": "...", "prompt": "..." }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"slug": "modal", "name": "Modal", "figmaId": "...",
|
|
120
|
+
"category": "modal", "description": "...",
|
|
121
|
+
"implemented": false,
|
|
122
|
+
"tokens": [{ "property": "background", "token": "--surface-secondary", "value": "#222" }, ...]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If `--latest` was passed (or argument is `sync`), first fetch the canonical JSON:
|
|
129
|
+
```
|
|
130
|
+
WebFetch: https://trdr.mrocontent.com.br/components.json
|
|
131
|
+
```
|
|
132
|
+
And overwrite `data/components.json` in the skill directory before continuing.
|
|
133
|
+
|
|
134
|
+
If both the local snapshot and the Hub fail → STOP with:
|
|
135
|
+
> ❌ Could not load TRDR component catalog (local snapshot missing AND Hub unreachable). Aborting. Run `npm run sync` in the trdr-plugins repo to refresh the snapshot.
|
|
136
|
+
|
|
137
|
+
Use the loaded data throughout the rest of the workflow. Track:
|
|
138
|
+
- `implementedSlugs` = list of `c.slug` where `c.implemented === true`
|
|
139
|
+
- `stubSlugs` = list of `c.slug` where `c.implemented !== true`
|
|
82
140
|
|
|
83
|
-
### Step 5 — Present the
|
|
141
|
+
### Step 5 — Present the migration plan and STOP
|
|
84
142
|
|
|
85
143
|
Output the following report and **do not proceed** until the developer explicitly approves:
|
|
86
144
|
|
|
@@ -88,7 +146,8 @@ Output the following report and **do not proceed** until the developer explicitl
|
|
|
88
146
|
## TRDR Design System — Migration Plan
|
|
89
147
|
|
|
90
148
|
### Project: [framework] | [language] | [styling approach]
|
|
91
|
-
###
|
|
149
|
+
### Catalog: TRDR DS v[version] (generated [generatedAt])
|
|
150
|
+
### Coverage: [implemented]/[total] components implemented
|
|
92
151
|
|
|
93
152
|
---
|
|
94
153
|
|
|
@@ -98,9 +157,10 @@ Output the following report and **do not proceed** until the developer explicitl
|
|
|
98
157
|
---
|
|
99
158
|
|
|
100
159
|
### FILES TO CREATE:
|
|
101
|
-
- [ ] `[detected-styles-dir]/tokens.css` —
|
|
160
|
+
- [ ] `[detected-styles-dir]/tokens.css` — TRDR CSS custom properties (dark + light mode)
|
|
102
161
|
- [ ] `[detected-styles-dir]/components.css` — TRDR utility classes (.trdr-btn, .trdr-card, etc.)
|
|
103
162
|
- [ ] `CLAUDE.md` (project root) — design system rules for Claude Code
|
|
163
|
+
- [ ] `MISSING_COMPONENTS.md` (only if stubs are referenced) — pending implementations
|
|
104
164
|
|
|
105
165
|
### FILES TO MODIFY:
|
|
106
166
|
- [ ] `[global-css-file]` — add @import for tokens.css and components.css
|
|
@@ -119,9 +179,14 @@ Output the following report and **do not proceed** until the developer explicitl
|
|
|
119
179
|
| Custom gradients | N | `linear-gradient(135deg, #FF6B6B...)` in header:24 |
|
|
120
180
|
| Hardcoded font-size | N | `font-size: 22px` in card.css:99 |
|
|
121
181
|
|
|
122
|
-
### TRDR COMPONENTS
|
|
123
|
-
[
|
|
124
|
-
|
|
182
|
+
### TRDR COMPONENTS REFERENCED IN PROJECT:
|
|
183
|
+
[Cross-reference detected UI patterns with the catalog]
|
|
184
|
+
|
|
185
|
+
| Slug | Status | Project usage |
|
|
186
|
+
|------|--------|---------------|
|
|
187
|
+
| button | ✅ implemented | 6 occurrences in Button.tsx, Header.tsx |
|
|
188
|
+
| modal | ⚠️ stub (figmaId 1234:5) | 2 occurrences in Modal.tsx — will receive token guidance, not full code |
|
|
189
|
+
| (other) | ... | ... |
|
|
125
190
|
|
|
126
191
|
### SCOPE ESTIMATE: [Small / Medium / Large]
|
|
127
192
|
Small = <10 violations | Medium = 10–50 | Large = 50+
|
|
@@ -139,6 +204,7 @@ Small = <10 violations | Medium = 10–50 | Large = 50+
|
|
|
139
204
|
- `"Apply, skip [file or directory]"` — proceed but exclude specific paths
|
|
140
205
|
- `"Only tokens"` — only create tokens.css, components.css, and CLAUDE.md (no violation fixes)
|
|
141
206
|
- `"Change [detail]"` — adjust a specific part of the plan before executing
|
|
207
|
+
- `"Sync first"` — pull the latest catalog from the Hub before applying
|
|
142
208
|
```
|
|
143
209
|
|
|
144
210
|
**STOP HERE. Wait for explicit developer approval before Phase 2.**
|
|
@@ -151,447 +217,33 @@ Execute in order. Report progress after each major step.
|
|
|
151
217
|
|
|
152
218
|
### Step 1 — Create tokens.css
|
|
153
219
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```css
|
|
157
|
-
/* ==========================================================================
|
|
158
|
-
TRDR Design System — CSS Variables
|
|
159
|
-
Source: designtokens.md v1.4 | https://trdr.mrocontent.com.br
|
|
160
|
-
DO NOT edit manually — update via the TRDR Design Hub
|
|
161
|
-
========================================================================== */
|
|
162
|
-
|
|
163
|
-
:root {
|
|
164
|
-
|
|
165
|
-
/* =========================================================================
|
|
166
|
-
PRIMITIVES — COLORS (never use directly in UI — use semantic tokens)
|
|
167
|
-
========================================================================= */
|
|
168
|
-
|
|
169
|
-
/* Brand Cyan (formerly Blue) */
|
|
170
|
-
--color-blue-50: #E6FEFF;
|
|
171
|
-
--color-blue-100: #CCFDFF;
|
|
172
|
-
--color-blue-200: #99F9FF;
|
|
173
|
-
--color-blue-300: #5CF3FF;
|
|
174
|
-
--color-blue-400: #29ECFF;
|
|
175
|
-
--color-blue-500: #00D4FF;
|
|
176
|
-
--color-blue-600: #00A8CC;
|
|
177
|
-
--color-blue-700: #007D99;
|
|
178
|
-
--color-blue-800: #005266;
|
|
179
|
-
--color-blue-900: #002933;
|
|
180
|
-
--color-blue-alpha-08: #00D4FF14;
|
|
181
|
-
--color-blue-alpha-16: #00D4FF29;
|
|
182
|
-
--color-blue-alpha-32: #00D4FF52;
|
|
183
|
-
|
|
184
|
-
/* Neutral */
|
|
185
|
-
--color-neutral-0: #FFFFFF;
|
|
186
|
-
--color-neutral-50: #FAFAFA;
|
|
187
|
-
--color-neutral-100: #EEEEEE;
|
|
188
|
-
--color-neutral-200: #E8E8E8;
|
|
189
|
-
--color-neutral-300: #D2D2D2;
|
|
190
|
-
--color-neutral-400: #BCBCBC;
|
|
191
|
-
--color-neutral-500: #A4A4A4;
|
|
192
|
-
--color-neutral-600: #777777;
|
|
193
|
-
--color-neutral-700: #4A4A4A;
|
|
194
|
-
--color-neutral-800: #222222;
|
|
195
|
-
--color-neutral-900: #1A1A1A;
|
|
196
|
-
--color-neutral-1000: #141519;
|
|
197
|
-
--color-neutral-1200: #0E0E0E;
|
|
198
|
-
|
|
199
|
-
/* Green */
|
|
200
|
-
--color-green-50: #F0FFF7;
|
|
201
|
-
--color-green-100: #CCFFDF;
|
|
202
|
-
--color-green-200: #99FFBF;
|
|
203
|
-
--color-green-300: #66FFA0;
|
|
204
|
-
--color-green-400: #33FF80;
|
|
205
|
-
--color-green-500: #00FF60;
|
|
206
|
-
--color-green-600: #31DD7E;
|
|
207
|
-
--color-green-700: #00CC4D;
|
|
208
|
-
--color-green-800: #009933;
|
|
209
|
-
--color-green-900: #00661F;
|
|
210
|
-
--color-green-alpha-08: #4FE29014;
|
|
211
|
-
--color-green-alpha-12: #4FE2901F;
|
|
212
|
-
--color-green-alpha-16: #4FE29029;
|
|
213
|
-
--color-green-alpha-32: #4FE29052;
|
|
214
|
-
--color-green-alpha-40: #4FE29066;
|
|
215
|
-
--color-green-alpha-48: #4FE2907A;
|
|
216
|
-
--color-green-alpha-56: #4FE2908F;
|
|
217
|
-
|
|
218
|
-
/* Red */
|
|
219
|
-
--color-red-50: #FFF0F0;
|
|
220
|
-
--color-red-100: #FFCCCC;
|
|
221
|
-
--color-red-200: #FF9999;
|
|
222
|
-
--color-red-300: #FF6666;
|
|
223
|
-
--color-red-400: #FF3333;
|
|
224
|
-
--color-red-500: #FF0000;
|
|
225
|
-
--color-red-600: #F34F45;
|
|
226
|
-
--color-red-700: #CC0000;
|
|
227
|
-
--color-red-800: #990000;
|
|
228
|
-
--color-red-900: #660000;
|
|
229
|
-
--color-red-alpha-08: #F34F4514;
|
|
230
|
-
--color-red-alpha-12: #F34F451F;
|
|
231
|
-
--color-red-alpha-16: #F34F4529;
|
|
232
|
-
--color-red-alpha-32: #F34F4552;
|
|
233
|
-
--color-red-alpha-40: #F34F4566;
|
|
234
|
-
--color-red-alpha-48: #F34F457A;
|
|
235
|
-
--color-red-alpha-56: #F34F458F;
|
|
236
|
-
|
|
237
|
-
/* Yellow */
|
|
238
|
-
--color-yellow-50: #FFFBF0;
|
|
239
|
-
--color-yellow-100: #FFF3CC;
|
|
240
|
-
--color-yellow-200: #FFE799;
|
|
241
|
-
--color-yellow-300: #FFDB66;
|
|
242
|
-
--color-yellow-400: #FFCF33;
|
|
243
|
-
--color-yellow-500: #FFCC40;
|
|
244
|
-
--color-yellow-600: #FFB800;
|
|
245
|
-
--color-yellow-700: #CC9200;
|
|
246
|
-
--color-yellow-800: #996D00;
|
|
247
|
-
--color-yellow-900: #664900;
|
|
248
|
-
--color-yellow-alpha-08: #FFCC4014;
|
|
249
|
-
--color-yellow-alpha-16: #FFCC4029;
|
|
250
|
-
--color-yellow-alpha-32: #FFCC4052;
|
|
251
|
-
|
|
252
|
-
/* Orange */
|
|
253
|
-
--color-orange-50: #FFF5F0;
|
|
254
|
-
--color-orange-100: #FFE0CC;
|
|
255
|
-
--color-orange-200: #FFC199;
|
|
256
|
-
--color-orange-300: #FFA266;
|
|
257
|
-
--color-orange-400: #FF8333;
|
|
258
|
-
--color-orange-500: #FF6400;
|
|
259
|
-
--color-orange-600: #F57C00;
|
|
260
|
-
--color-orange-700: #CC5000;
|
|
261
|
-
--color-orange-800: #993C00;
|
|
262
|
-
--color-orange-900: #662800;
|
|
263
|
-
--color-orange-alpha-08: #FF640014;
|
|
264
|
-
--color-orange-alpha-16: #FF640029;
|
|
265
|
-
--color-orange-alpha-32: #FF640052;
|
|
266
|
-
|
|
267
|
-
/* Purple */
|
|
268
|
-
--color-purple-50: #F1EFF5;
|
|
269
|
-
--color-purple-100: #D6D3E5;
|
|
270
|
-
--color-purple-200: #BBB4D6;
|
|
271
|
-
--color-purple-300: #9E94C9;
|
|
272
|
-
--color-purple-400: #8072BE;
|
|
273
|
-
--color-purple-500: #6350B3;
|
|
274
|
-
--color-purple-600: #50418E;
|
|
275
|
-
--color-purple-700: #3E3467;
|
|
276
|
-
--color-purple-800: #2A2542;
|
|
277
|
-
--color-purple-900: #161320;
|
|
278
|
-
--color-purple-alpha-08: #6350B314;
|
|
279
|
-
--color-purple-alpha-16: #6350B329;
|
|
280
|
-
--color-purple-alpha-32: #6350B352;
|
|
281
|
-
|
|
282
|
-
/* =========================================================================
|
|
283
|
-
PRIMITIVES — SPACING
|
|
284
|
-
========================================================================= */
|
|
285
|
-
--space-0: 0px;
|
|
286
|
-
--space-50: 4px;
|
|
287
|
-
--space-100: 8px;
|
|
288
|
-
--space-200: 12px;
|
|
289
|
-
--space-300: 16px;
|
|
290
|
-
--space-400: 20px;
|
|
291
|
-
--space-500: 24px;
|
|
292
|
-
--space-600: 32px;
|
|
293
|
-
--space-700: 40px;
|
|
294
|
-
--space-800: 48px;
|
|
295
|
-
--space-900: 56px;
|
|
296
|
-
--space-1000: 64px;
|
|
297
|
-
--space-1200: 80px;
|
|
298
|
-
--space-1400: 96px;
|
|
299
|
-
|
|
300
|
-
/* =========================================================================
|
|
301
|
-
PRIMITIVES — BORDER RADIUS
|
|
302
|
-
========================================================================= */
|
|
303
|
-
--radius-prim-0: 0px;
|
|
304
|
-
--radius-prim-50: 2px;
|
|
305
|
-
--radius-prim-100: 4px;
|
|
306
|
-
--radius-prim-200: 8px;
|
|
307
|
-
--radius-prim-300: 12px;
|
|
308
|
-
--radius-prim-400: 16px;
|
|
309
|
-
--radius-prim-500: 20px;
|
|
310
|
-
--radius-prim-600: 24px;
|
|
311
|
-
--radius-prim-700: 32px;
|
|
312
|
-
--radius-prim-full: 9999px;
|
|
313
|
-
|
|
314
|
-
/* =========================================================================
|
|
315
|
-
PRIMITIVES — TYPOGRAPHY
|
|
316
|
-
========================================================================= */
|
|
317
|
-
--font-size-50: 12px;
|
|
318
|
-
--font-size-100: 14px;
|
|
319
|
-
--font-size-200: 16px;
|
|
320
|
-
--font-size-300: 18px;
|
|
321
|
-
--font-size-400: 20px;
|
|
322
|
-
--font-size-500: 24px;
|
|
323
|
-
--font-size-600: 28px;
|
|
324
|
-
--font-size-700: 32px;
|
|
325
|
-
--font-size-800: 40px;
|
|
326
|
-
|
|
327
|
-
/* =========================================================================
|
|
328
|
-
PRIMITIVES — OPACITY
|
|
329
|
-
========================================================================= */
|
|
330
|
-
--opacity-0: 0;
|
|
331
|
-
--opacity-08: 0.08;
|
|
332
|
-
--opacity-16: 0.16;
|
|
333
|
-
--opacity-32: 0.32;
|
|
334
|
-
--opacity-48: 0.48;
|
|
335
|
-
--opacity-64: 0.64;
|
|
336
|
-
--opacity-80: 0.80;
|
|
337
|
-
--opacity-100: 1;
|
|
338
|
-
|
|
339
|
-
/* =========================================================================
|
|
340
|
-
SEMANTIC — BACKGROUNDS (dark default)
|
|
341
|
-
========================================================================= */
|
|
342
|
-
--bg-primary: #0E0E0E;
|
|
343
|
-
--bg-secondary: #141519;
|
|
344
|
-
--bg-tertiary: #1A1A1A;
|
|
345
|
-
--bg-inverse: #FFFFFF;
|
|
346
|
-
--bg-overlay: #FFFFFF29;
|
|
347
|
-
--bg-brand: #00D4FF;
|
|
348
|
-
--bg-brand2: #6350B3;
|
|
349
|
-
--bg-warning: #FFCC40;
|
|
350
|
-
--bg-danger: #F34F45;
|
|
351
|
-
--bg-success: #31DD7E;
|
|
352
|
-
--bg-base-alpha-0: #0E0E0E00;
|
|
353
|
-
|
|
354
|
-
/* =========================================================================
|
|
355
|
-
SEMANTIC — SURFACES
|
|
356
|
-
========================================================================= */
|
|
357
|
-
--surface-primary: #4A4A4A;
|
|
358
|
-
--surface-secondary: #222222;
|
|
359
|
-
--surface-tertiary: #1A1A1A;
|
|
360
|
-
--surface-interactive: #002933;
|
|
361
|
-
--surface-disabled: #1A1A1A;
|
|
362
|
-
--surface-info: #00D4FF14;
|
|
363
|
-
--surface-error: #F1312614;
|
|
364
|
-
--surface-warning: #FFCC4014;
|
|
365
|
-
--surface-success: #4FE29014;
|
|
366
|
-
--surface-brand: #00D4FF29;
|
|
367
|
-
|
|
368
|
-
/* =========================================================================
|
|
369
|
-
SEMANTIC — CONTENT (TEXT)
|
|
370
|
-
========================================================================= */
|
|
371
|
-
--content-primary: #FFFFFF;
|
|
372
|
-
--content-secondary: #E8E8E8;
|
|
373
|
-
--content-tertiary: #A4A4A4;
|
|
374
|
-
--content-disabled: #4A4A4A;
|
|
375
|
-
--content-placeholder: #777777;
|
|
376
|
-
--content-inverse: #1A1A1A;
|
|
377
|
-
--content-info: #CCFDFF;
|
|
378
|
-
--content-warning: #FFCC40;
|
|
379
|
-
--content-error: #F34F45;
|
|
380
|
-
--content-success: #4FE290;
|
|
381
|
-
--content-brand: #00D4FF;
|
|
382
|
-
--content-on-brand: #FFFFFF;
|
|
383
|
-
|
|
384
|
-
/* =========================================================================
|
|
385
|
-
SEMANTIC — BORDERS
|
|
386
|
-
========================================================================= */
|
|
387
|
-
--border-default: #4A4A4A;
|
|
388
|
-
--border-subtle: #222222;
|
|
389
|
-
--border-strong: #A4A4A4;
|
|
390
|
-
--border-focus: #00D4FF;
|
|
391
|
-
--border-disabled: #777777;
|
|
392
|
-
|
|
393
|
-
/* =========================================================================
|
|
394
|
-
SEMANTIC — ACTIONS
|
|
395
|
-
========================================================================= */
|
|
396
|
-
|
|
397
|
-
/* Brand (Cyan — primary) */
|
|
398
|
-
--action-brand-default: #00D4FF;
|
|
399
|
-
--action-brand-hover: #00A8CC;
|
|
400
|
-
--action-brand-active: #007D99;
|
|
401
|
-
--action-brand-disabled: #777777;
|
|
402
|
-
--action-brand-alpha: #00D4FF14;
|
|
403
|
-
|
|
404
|
-
/* Brand Inverse (solid cyan primary button) */
|
|
405
|
-
--action-brand-inverse-default: #005266;
|
|
406
|
-
--action-brand-inverse-hover: #007D99;
|
|
407
|
-
--action-brand-inverse-active: #002933;
|
|
408
|
-
--action-brand-inverse-alpha: #00D4FF14;
|
|
409
|
-
--action-brand-inverse-disabled: #777777;
|
|
410
|
-
|
|
411
|
-
/* Secondary (Neutral) */
|
|
412
|
-
--action-secondary-default: #4A4A4A;
|
|
413
|
-
--action-secondary-hover: #777777;
|
|
414
|
-
--action-secondary-active: #A4A4A4;
|
|
415
|
-
--action-secondary-disabled: #1A1A1A;
|
|
416
|
-
--action-secondary-alpha: #FFFFFF00;
|
|
417
|
-
|
|
418
|
-
/* Tertiary (Purple) */
|
|
419
|
-
--action-tertiary-default: #50418E;
|
|
420
|
-
--action-tertiary-hover: #3E3467;
|
|
421
|
-
--action-tertiary-active: #2A2542;
|
|
422
|
-
--action-tertiary-disabled: #777777;
|
|
423
|
-
--action-tertiary-alpha: #6350B314;
|
|
424
|
-
|
|
425
|
-
/* Destructive (Orange) */
|
|
426
|
-
--action-destructive-default: #EA580C;
|
|
427
|
-
--action-destructive-hover: #C2410C;
|
|
428
|
-
--action-destructive-active: #9A3412;
|
|
429
|
-
--action-destructive-disabled: #777777;
|
|
430
|
-
--action-destructive-alpha: #F9731614;
|
|
431
|
-
|
|
432
|
-
/* =========================================================================
|
|
433
|
-
SEMANTIC — TRADING CONTEXT
|
|
434
|
-
========================================================================= */
|
|
435
|
-
|
|
436
|
-
/* Candlesticks */
|
|
437
|
-
--context-chart-up: #31DD7E;
|
|
438
|
-
--context-chart-down: #F34F45;
|
|
439
|
-
|
|
440
|
-
/* Price */
|
|
441
|
-
--context-trading-up: #4FE290;
|
|
442
|
-
--context-trading-up-alpha: #4FE29029;
|
|
443
|
-
--context-trading-down: #F34F45;
|
|
444
|
-
--context-trading-down-alpha: #F1312629;
|
|
445
|
-
|
|
446
|
-
/* Long (Buy) */
|
|
447
|
-
--context-trading-long-text: #6DE7A2;
|
|
448
|
-
--context-trading-long-default: #4FE29014;
|
|
449
|
-
--context-trading-long-hover: #4FE29029;
|
|
450
|
-
--context-trading-long-active: #4FE29052;
|
|
451
|
-
|
|
452
|
-
/* Short (Sell) */
|
|
453
|
-
--context-trading-short-text: #F56D64;
|
|
454
|
-
--context-trading-short-default: #F1312614;
|
|
455
|
-
--context-trading-short-hover: #F1312629;
|
|
456
|
-
--context-trading-short-active: #F1312652;
|
|
457
|
-
|
|
458
|
-
/* Stop Loss */
|
|
459
|
-
--context-trading-stop-default: #F97316;
|
|
460
|
-
--context-trading-stop-hover: #EA580C;
|
|
461
|
-
--context-trading-stop-active: #C2410C;
|
|
462
|
-
--context-trading-stop-alpha: #F9731614;
|
|
463
|
-
|
|
464
|
-
/* =========================================================================
|
|
465
|
-
SCALE — RESPONSIVE SPACING (Desktop default)
|
|
466
|
-
========================================================================= */
|
|
467
|
-
--spacing-xs: 4px;
|
|
468
|
-
--spacing-sm: 8px;
|
|
469
|
-
--spacing-md: 12px;
|
|
470
|
-
--spacing-lg: 16px;
|
|
471
|
-
--spacing-xl: 20px;
|
|
472
|
-
--spacing-2xl: 24px;
|
|
473
|
-
--spacing-3xl: 32px;
|
|
474
|
-
--spacing-3xl-2: 40px;
|
|
475
|
-
--spacing-3xl-3: 48px;
|
|
476
|
-
--spacing-3xl-4: 56px;
|
|
477
|
-
--spacing-3xl-5: 64px;
|
|
478
|
-
--spacing-3xl-6: 80px;
|
|
479
|
-
--spacing-3xl-7: 96px;
|
|
480
|
-
|
|
481
|
-
/* =========================================================================
|
|
482
|
-
SCALE — BORDER RADIUS
|
|
483
|
-
========================================================================= */
|
|
484
|
-
--radius-none: 0px;
|
|
485
|
-
--radius-xs: 2px;
|
|
486
|
-
--radius-sm: 4px;
|
|
487
|
-
--radius-md: 8px;
|
|
488
|
-
--radius-lg: 16px;
|
|
489
|
-
--radius-xl: 20px;
|
|
490
|
-
--radius-full: 9999px;
|
|
491
|
-
|
|
492
|
-
/* =========================================================================
|
|
493
|
-
FONTS (use Google Fonts or next/font to load these)
|
|
494
|
-
JetBrains Mono → headings | Inter → body/labels | Roboto Mono → numbers
|
|
495
|
-
========================================================================= */
|
|
496
|
-
--font-primary: 'JetBrains Mono', monospace;
|
|
497
|
-
--font-secondary: 'Inter', sans-serif;
|
|
498
|
-
--font-mono: 'Roboto Mono', monospace;
|
|
499
|
-
|
|
500
|
-
/* =========================================================================
|
|
501
|
-
BRAND GRADIENTS (Site/Marketing)
|
|
502
|
-
========================================================================= */
|
|
503
|
-
--gradient-text-brand: linear-gradient(90deg, #00D4FF 0%, #FFFFFF 100%);
|
|
504
|
-
--gradient-text-brand-hero: linear-gradient(90deg, #00D4FF 30%, #FFFFFF 100%);
|
|
505
|
-
--gradient-bg-hero: linear-gradient(180deg, #002933 0%, #0E0E0E 40%);
|
|
506
|
-
--gradient-bg-fade: linear-gradient(180deg, rgba(14,14,14,0) 0%, #0E0E0E 47%);
|
|
507
|
-
}
|
|
220
|
+
Copy the local snapshot verbatim:
|
|
508
221
|
|
|
509
|
-
/* ==========================================================================
|
|
510
|
-
LIGHT MODE — apply [data-theme="light"] to <html> or <body>
|
|
511
|
-
========================================================================== */
|
|
512
|
-
[data-theme="light"] {
|
|
513
|
-
--bg-primary: #EEEEEE;
|
|
514
|
-
--bg-secondary: #F5F5F5;
|
|
515
|
-
--bg-tertiary: #FAFAFA;
|
|
516
|
-
--bg-inverse: #1A1A1A;
|
|
517
|
-
--bg-overlay: #FFFFFF52;
|
|
518
|
-
--surface-primary: #D2D2D2;
|
|
519
|
-
--surface-secondary: #E8E8E8;
|
|
520
|
-
--surface-tertiary: #EEEEEE;
|
|
521
|
-
--surface-interactive: #29ECFF;
|
|
522
|
-
--surface-disabled: #FAFAFA;
|
|
523
|
-
--surface-brand: #00D4FF29;
|
|
524
|
-
--content-primary: #1A1A1A;
|
|
525
|
-
--content-secondary: #222222;
|
|
526
|
-
--content-tertiary: #4A4A4A;
|
|
527
|
-
--content-disabled: #777777;
|
|
528
|
-
--content-inverse: #FFFFFF;
|
|
529
|
-
--content-brand: #005266;
|
|
530
|
-
--content-info: #00A8CC;
|
|
531
|
-
--border-default: #A4A4A4;
|
|
532
|
-
--border-subtle: #E8E8E8;
|
|
533
|
-
--border-strong: #D2D2D2;
|
|
534
|
-
--border-disabled: #E8E8E8;
|
|
535
|
-
--border-focus: #00D4FF;
|
|
536
|
-
--action-brand-default: #007D99;
|
|
537
|
-
--action-brand-hover: #005266;
|
|
538
|
-
--action-brand-active: #002933;
|
|
539
|
-
--action-brand-inverse-default: #00A8CC;
|
|
540
|
-
--action-brand-inverse-hover: #007D99;
|
|
541
|
-
--action-brand-inverse-active: #005266;
|
|
542
|
-
}
|
|
543
222
|
```
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
Fetch all component CSS directly from the Hub. The Hub is the single source of truth — **NEVER use a static fallback. No exceptions.**
|
|
548
|
-
|
|
549
|
-
#### Step 2.a — Fetch component utility classes
|
|
550
|
-
|
|
551
|
-
```
|
|
552
|
-
WebFetch: https://trdr.mrocontent.com.br/design-md
|
|
223
|
+
Read: <skill-dir>/references/tokens.css
|
|
224
|
+
Write: <project>/<detected-styles-dir>/tokens.css
|
|
553
225
|
```
|
|
554
226
|
|
|
555
|
-
|
|
227
|
+
Do NOT regenerate the file. Do NOT inline tokens from any other source. The snapshot is authoritative.
|
|
556
228
|
|
|
557
|
-
|
|
229
|
+
If `references/tokens.css` is missing in the skill directory:
|
|
230
|
+
1. Try `WebFetch: https://trdr.mrocontent.com.br/tokens.css`, save it to the skill dir, then proceed.
|
|
231
|
+
2. If the Hub is also unreachable → STOP with error message asking the maintainer to run `npm run sync`.
|
|
558
232
|
|
|
559
|
-
|
|
560
|
-
|------|-----------------|
|
|
561
|
-
| `button` | `.trdr-btn` |
|
|
562
|
-
| `card` | `.trdr-card` |
|
|
563
|
-
| `text-input` | `.trdr-input` |
|
|
564
|
-
| `dropdown` | `.trdr-dropdown` |
|
|
565
|
-
| `combo-input` | `.trdr-combo` |
|
|
566
|
-
| `checkbox` | `.trdr-checkbox` |
|
|
567
|
-
| `radio-button` | `.trdr-radio` |
|
|
568
|
-
| `switch` | `.trdr-switch` |
|
|
569
|
-
| `segmented-control` | `.trdr-segment` |
|
|
570
|
-
| `tooltip` | `.trdr-tooltip` |
|
|
571
|
-
| `abas` | `.trdr-tabs` |
|
|
572
|
-
| `sub-menu-item` | `.trdr-submenu` |
|
|
573
|
-
| `boleta` | `.trdr-boleta` |
|
|
233
|
+
### Step 2 — Create components.css
|
|
574
234
|
|
|
575
|
-
|
|
235
|
+
Build `components.css` by concatenating the `.code.css` block of every implemented component plus the typography utility classes.
|
|
576
236
|
|
|
577
237
|
```
|
|
578
|
-
|
|
238
|
+
For each c in components where c.implemented === true:
|
|
239
|
+
append c.code.css to components.css (with a "/* === <c.name> === */" header)
|
|
579
240
|
```
|
|
580
241
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
**If the Hub is unreachable at any point → STOP. Do NOT proceed with any fallback.**
|
|
584
|
-
Report to the developer:
|
|
585
|
-
> ❌ Hub unreachable (https://trdr.mrocontent.com.br). Cannot create components.css — the DS Hub is required for faithful component implementation. Retry when the Hub is accessible.
|
|
586
|
-
|
|
587
|
-
#### Step 2.b — Add typography text style classes
|
|
588
|
-
|
|
589
|
-
After the component classes, append the following text style utility classes to `components.css`. These represent the Hub's Text Styles spec (H1–H7, B1–B5, Auxiliar, L2–L3). If `/design-md` already contains these classes verbatim, use those instead.
|
|
242
|
+
After all component CSS blocks, append the text style utility classes:
|
|
590
243
|
|
|
591
244
|
```css
|
|
592
245
|
/* ==========================================================================
|
|
593
246
|
TRDR Design System — Text Style Utility Classes
|
|
594
|
-
Source: https://trdr.mrocontent.com.br | Text Styles spec
|
|
595
247
|
========================================================================== */
|
|
596
248
|
|
|
597
249
|
/* Headings — var(--font-primary) = JetBrains Mono */
|
|
@@ -616,21 +268,6 @@ After the component classes, append the following text style utility classes to
|
|
|
616
268
|
.trdr-label-l3 { font-family: var(--font-secondary); font-size: 14px; font-weight: 600; line-height: 1.4; }
|
|
617
269
|
```
|
|
618
270
|
|
|
619
|
-
#### Step 2.c — Flag missing components
|
|
620
|
-
|
|
621
|
-
If the developer's project uses a UI pattern that has no corresponding Hub component (e.g., a date picker, a data table, a modal), do NOT invent CSS for it. Instead, create or append to `MISSING_COMPONENTS.md` at the project root:
|
|
622
|
-
|
|
623
|
-
```markdown
|
|
624
|
-
# Missing Hub Components
|
|
625
|
-
|
|
626
|
-
These patterns were found in the project but have no corresponding component in the TRDR Design Hub.
|
|
627
|
-
Request their implementation at: https://trdr.mrocontent.com.br
|
|
628
|
-
|
|
629
|
-
| Pattern found | File | Status |
|
|
630
|
-
|---------------|------|--------|
|
|
631
|
-
| [pattern name] | [file:line] | ⚠️ Missing from Hub |
|
|
632
|
-
```
|
|
633
|
-
|
|
634
271
|
### Step 3 — Update global CSS
|
|
635
272
|
|
|
636
273
|
Find the main global CSS file (globals.css, main.css, index.css, app.css) and add at the very top:
|
|
@@ -646,14 +283,20 @@ If the project already imports a different design system's variables and there a
|
|
|
646
283
|
|
|
647
284
|
### Step 4 — Create CLAUDE.md
|
|
648
285
|
|
|
649
|
-
Create `CLAUDE.md` at the project root:
|
|
286
|
+
Create `CLAUDE.md` at the project root, populated dynamically from the catalog:
|
|
287
|
+
|
|
288
|
+
- The list of "Pre-built component classes" must be generated from the loaded JSON's `implementedSlugs` and their CSS class prefixes (parse the first `.trdr-<prefix>` from each `c.code.css`).
|
|
289
|
+
- The list of "Pending stubs" should mention the count of stubs and link to MISSING_COMPONENTS.md if generated.
|
|
290
|
+
|
|
291
|
+
Template (replace `[…]` with actual values):
|
|
650
292
|
|
|
651
293
|
```markdown
|
|
652
294
|
# [Project Name] — Context for Claude Code
|
|
653
295
|
|
|
654
296
|
## Design System
|
|
655
297
|
This project uses the TRDR Design System.
|
|
656
|
-
|
|
298
|
+
Reference Hub: https://trdr.mrocontent.com.br
|
|
299
|
+
Local catalog: TRDR DS v[catalog-version] ([implemented]/[total] components)
|
|
657
300
|
|
|
658
301
|
## Absolute Rules (never break these)
|
|
659
302
|
1. NEVER use primitive tokens directly (--color-*, --space-*) — always use semantic tokens
|
|
@@ -663,7 +306,7 @@ Full reference: https://trdr.mrocontent.com.br
|
|
|
663
306
|
5. Fonts: --font-primary = JetBrains Mono (headings) | --font-secondary = Inter (body) | --font-mono = Roboto Mono (numbers)
|
|
664
307
|
6. Spacing: always var(--spacing-xs/sm/md/lg/xl/2xl/3xl) — never hardcoded px
|
|
665
308
|
7. Border radius: always var(--radius-sm/md/lg/full) — never hardcoded px
|
|
666
|
-
8. Text styles: use .trdr-h1/.../h7
|
|
309
|
+
8. Text styles: use .trdr-h1/.../h7, .trdr-body-b1/.../b5, .trdr-label-l2/l3 — never raw font-size px
|
|
667
310
|
9. No colors outside the DS anywhere — rgba(), inline gradients, hardcoded hex all require a semantic token. No exceptions.
|
|
668
311
|
|
|
669
312
|
## Token files
|
|
@@ -685,34 +328,17 @@ Full reference: https://trdr.mrocontent.com.br
|
|
|
685
328
|
| Error | --content-error | #F34F45 |
|
|
686
329
|
| Warning | --content-warning | #FFCC40 |
|
|
687
330
|
|
|
688
|
-
##
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
## Pre-built component classes
|
|
695
|
-
.trdr-btn, .trdr-btn-primary, .trdr-btn-secondary, .trdr-btn-ghost, .trdr-btn-destructive
|
|
696
|
-
.trdr-btn-long (buy), .trdr-btn-short (sell)
|
|
697
|
-
.trdr-badge, .trdr-badge-brand, .trdr-badge-success, .trdr-badge-neutral
|
|
698
|
-
.trdr-card, .trdr-card-hover
|
|
699
|
-
.trdr-input, .trdr-dropdown, .trdr-combo, .trdr-checkbox, .trdr-radio, .trdr-switch
|
|
700
|
-
.trdr-segment-control, .trdr-segment-active, .trdr-segment-inactive
|
|
701
|
-
.trdr-tabs, .trdr-submenu, .trdr-tooltip, .trdr-boleta
|
|
702
|
-
|
|
703
|
-
## Getting component code
|
|
704
|
-
For any component, go to: https://trdr.mrocontent.com.br/componentes/[slug]
|
|
705
|
-
Available: button, text-input, switch, dropdown, checkbox, radio-button, combo-input, tooltip, boleta, segmented-control, abas, sub-menu-item, card
|
|
706
|
-
(Check Hub for latest — new components are added regularly)
|
|
331
|
+
## Implemented components
|
|
332
|
+
[Generate from catalog: list each implemented component as a row "slug — figmaId — Hub URL"]
|
|
333
|
+
|
|
334
|
+
## Pending components (stubs)
|
|
335
|
+
[N] components in the catalog have no canonical code yet. When using one of these, the skill applies tokens and a banner comment, then logs the gap in MISSING_COMPONENTS.md. See https://trdr.mrocontent.com.br/componentes for status.
|
|
707
336
|
|
|
708
337
|
## Layer hierarchy
|
|
709
338
|
bg.primary (base) → bg.secondary/tertiary (content areas) → surface.* (cards, panels)
|
|
710
339
|
→ interactive components → overlays/modals/tooltips
|
|
711
340
|
```
|
|
712
341
|
|
|
713
|
-
Replace `[Project Name]` with the actual project name detected from package.json.
|
|
714
|
-
Replace `[detected-path]` with the actual relative path to tokens.css.
|
|
715
|
-
|
|
716
342
|
### Step 5 — Migrate violations
|
|
717
343
|
|
|
718
344
|
For each violation found in Phase 1, apply the semantic token replacement.
|
|
@@ -796,17 +422,31 @@ For each violation found in Phase 1, apply the semantic token replacement.
|
|
|
796
422
|
|
|
797
423
|
**All other values MUST be replaced or flagged.** There are no exceptions for "decorative" gradients, shadows, or overlays. If no semantic token exists for a given pattern, flag it in DS_MIGRATION.md under "Missing DS tokens" and notify the developer to request the token in the Hub.
|
|
798
424
|
|
|
799
|
-
### Step 6 —
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
425
|
+
### Step 6 — Apply component code (smart fallback)
|
|
426
|
+
|
|
427
|
+
For each detected UI pattern in the project that matches a TRDR component slug:
|
|
428
|
+
|
|
429
|
+
1. **Look up the component** in the loaded catalog by slug (or by category, if slug is ambiguous).
|
|
430
|
+
2. **If `c.implemented === true`** and `c.code.css` exists:
|
|
431
|
+
- The CSS is already in the project's `components.css` from Step 2 — no further action needed unless the developer asks for component-level scaffolding (e.g., create a `Button.tsx` from `c.code.react`).
|
|
432
|
+
3. **If `c.implemented === false`** (stub):
|
|
433
|
+
- Add this banner comment above the affected element in the source file:
|
|
434
|
+
```
|
|
435
|
+
/* TRDR DS — <c.name> (figmaId: <c.figmaId>) */
|
|
436
|
+
/* Implementação canônica pendente. Consulte https://trdr.mrocontent.com.br/componentes/<c.slug> */
|
|
437
|
+
/* Tokens recomendados: <list c.tokens[].token> */
|
|
438
|
+
```
|
|
439
|
+
- Append an entry to `MISSING_COMPONENTS.md`:
|
|
440
|
+
```markdown
|
|
441
|
+
## <c.name>
|
|
442
|
+
- Slug: `<c.slug>` | figmaId: `<c.figmaId>` | Category: `<c.category>`
|
|
443
|
+
- Found in: <list of file:line>
|
|
444
|
+
- Description: <c.description>
|
|
445
|
+
- Recommended tokens: <c.tokens[]>
|
|
446
|
+
- Status: ⚠️ stub — code blocks pending
|
|
447
|
+
```
|
|
448
|
+
4. **If no slug matches** the detected pattern:
|
|
449
|
+
- Flag the pattern in `MISSING_COMPONENTS.md` under "Unmapped patterns" with the file location and a one-line description of the UI need. The maintainer can then decide whether to add a stub to the catalog.
|
|
810
450
|
|
|
811
451
|
### Step 7 — Generate DS_MIGRATION.md
|
|
812
452
|
|
|
@@ -815,14 +455,16 @@ Create `DS_MIGRATION.md` at the project root:
|
|
|
815
455
|
```markdown
|
|
816
456
|
# TRDR Design System — Migration Log
|
|
817
457
|
Applied: [date]
|
|
818
|
-
|
|
458
|
+
Catalog: TRDR DS v[catalog-version] ([implemented]/[total] components, generated [generatedAt])
|
|
459
|
+
Hub: https://trdr.mrocontent.com.br
|
|
819
460
|
|
|
820
461
|
## What was applied
|
|
821
|
-
- ✅ [path]/tokens.css —
|
|
822
|
-
- ✅ [path]/components.css —
|
|
462
|
+
- ✅ [path]/tokens.css — TRDR CSS custom properties (snapshot v[catalog-version])
|
|
463
|
+
- ✅ [path]/components.css — [implemented] component utility class blocks + typography
|
|
823
464
|
- ✅ CLAUDE.md — design system rules for Claude Code
|
|
824
465
|
- ✅ [N] violations fixed in [M] files
|
|
825
466
|
- ✅ [global-css] updated with @import
|
|
467
|
+
- ⚠️ [S] stub components flagged in MISSING_COMPONENTS.md (if any)
|
|
826
468
|
|
|
827
469
|
## Files modified
|
|
828
470
|
[List each file and what changed]
|
|
@@ -831,20 +473,13 @@ Skill version: trdr-ds v1.0 | Hub: https://trdr.mrocontent.com.br
|
|
|
831
473
|
[List by category with file:line references]
|
|
832
474
|
|
|
833
475
|
## Manual steps required
|
|
834
|
-
Check these before shipping:
|
|
835
|
-
|
|
836
476
|
- [ ] **Fonts**: Ensure JetBrains Mono, Inter, and Roboto Mono are loaded
|
|
837
477
|
- Next.js: use `next/font/google` in layout.tsx (`JetBrains_Mono`, `Inter`, `Roboto_Mono`)
|
|
838
478
|
- Others: add Google Fonts `<link>` in HTML head
|
|
839
|
-
|
|
840
|
-
- [ ] **
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
- [ ] **Trading UI**: If this project has price/position displays, verify
|
|
844
|
-
context.trading.* tokens are applied (see Hub: /tokens/semanticos)
|
|
845
|
-
|
|
479
|
+
- [ ] **Dark/light mode**: tokens.css uses [data-theme="light"] for overrides — add `data-theme="light"` to `<html>` to activate light mode
|
|
480
|
+
- [ ] **Trading UI**: If this project has price/position displays, verify context.trading.* tokens are applied (see Hub: /tokens/semanticos)
|
|
481
|
+
- [ ] **Stubs**: Review MISSING_COMPONENTS.md and decide whether to wait for canonical implementation in the Hub or hand-roll the component now using the listed tokens
|
|
846
482
|
- [ ] **Skipped files**: [list any files excluded from migration]
|
|
847
|
-
These still have hardcoded values — migrate manually or run /trdr-ds again
|
|
848
483
|
|
|
849
484
|
## Missing DS tokens (flagged — no semantic token available)
|
|
850
485
|
[List patterns found in the project that have no TRDR token yet — request these in the Hub]
|
|
@@ -853,15 +488,15 @@ Check these before shipping:
|
|
|
853
488
|
| `box-shadow: rgba(0,0,0,*)` | [file:line] | Request shadow token in Hub |
|
|
854
489
|
| `linear-gradient(...)` non-TRDR | [file:line] | Request gradient token or remove |
|
|
855
490
|
|
|
856
|
-
##
|
|
857
|
-
[
|
|
491
|
+
## Stub components encountered (See MISSING_COMPONENTS.md)
|
|
492
|
+
[List each stub slug + figmaId that was referenced in the project]
|
|
858
493
|
|
|
859
494
|
## Design System Reference
|
|
860
495
|
- Hub: https://trdr.mrocontent.com.br
|
|
496
|
+
- JSON catalog: https://trdr.mrocontent.com.br/components.json
|
|
861
497
|
- Tokens: https://trdr.mrocontent.com.br/tokens/semanticos
|
|
862
498
|
- Components: https://trdr.mrocontent.com.br/componentes
|
|
863
499
|
- Rules: https://trdr.mrocontent.com.br/para-ia
|
|
864
|
-
- Full spec: https://trdr.mrocontent.com.br/design-md
|
|
865
500
|
```
|
|
866
501
|
|
|
867
502
|
---
|
|
@@ -874,31 +509,50 @@ After all steps are complete, output:
|
|
|
874
509
|
✅ TRDR Design System applied
|
|
875
510
|
|
|
876
511
|
Created:
|
|
877
|
-
• [path]/tokens.css (
|
|
878
|
-
• [path]/components.css (
|
|
512
|
+
• [path]/tokens.css (snapshot v[catalog-version], dark + light mode)
|
|
513
|
+
• [path]/components.css ([implemented] component classes + typography)
|
|
879
514
|
• CLAUDE.md (design system context for Claude Code)
|
|
880
515
|
• DS_MIGRATION.md (migration log + manual checklist)
|
|
516
|
+
• MISSING_COMPONENTS.md ([S] stubs flagged) — only if applicable
|
|
881
517
|
|
|
882
518
|
Modified:
|
|
883
519
|
• [global-css] — @import added
|
|
884
520
|
• [N] files — [X] violations replaced with semantic tokens
|
|
885
521
|
|
|
522
|
+
Catalog: TRDR DS v[catalog-version] ([implemented]/[total] components)
|
|
886
523
|
Hub: https://trdr.mrocontent.com.br
|
|
887
524
|
→ Check DS_MIGRATION.md for manual steps
|
|
525
|
+
→ Stubs not yet canonical: see MISSING_COMPONENTS.md
|
|
888
526
|
```
|
|
889
527
|
|
|
890
528
|
---
|
|
891
529
|
|
|
892
|
-
##
|
|
530
|
+
## SYNC MODE (when invoked as `/trdr-ds sync`)
|
|
531
|
+
|
|
532
|
+
1. WebFetch `https://trdr.mrocontent.com.br/components.json` → save as `<skill-dir>/data/components.json`
|
|
533
|
+
2. WebFetch `https://trdr.mrocontent.com.br/tokens.css` → save as `<skill-dir>/references/tokens.css`
|
|
534
|
+
3. Compare new vs previous (if a previous version exists). Report:
|
|
535
|
+
- New components: [list slugs]
|
|
536
|
+
- Newly implemented: [list slugs that flipped from stub → implemented]
|
|
537
|
+
- Removed: [list slugs no longer in catalog]
|
|
538
|
+
4. No project files are touched.
|
|
539
|
+
|
|
540
|
+
If either fetch fails, report which one and exit with a non-zero status. Do NOT touch the snapshot if the fetch succeeded but the response is malformed (e.g., missing `components` array).
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
## LIVE HUB REFERENCE (canonical fallback)
|
|
893
545
|
|
|
894
|
-
When the developer asks about a
|
|
546
|
+
When the developer asks about a component, token, or rule that is not in the local snapshot, fetch from the Hub:
|
|
895
547
|
|
|
896
548
|
| Need | URL |
|
|
897
549
|
|------|-----|
|
|
898
|
-
|
|
|
550
|
+
| Full catalog (JSON) | https://trdr.mrocontent.com.br/components.json |
|
|
551
|
+
| All tokens (CSS) | https://trdr.mrocontent.com.br/tokens.css |
|
|
552
|
+
| Token reference | https://trdr.mrocontent.com.br/tokens/semanticos |
|
|
899
553
|
| Specific component | https://trdr.mrocontent.com.br/componentes/[slug] |
|
|
900
554
|
| All components | https://trdr.mrocontent.com.br/componentes |
|
|
901
555
|
| Rules & CLAUDE.md template | https://trdr.mrocontent.com.br/para-ia |
|
|
902
556
|
| Full design spec | https://trdr.mrocontent.com.br/design-md |
|
|
903
557
|
|
|
904
|
-
The Hub is the single source of truth. When in doubt,
|
|
558
|
+
The Hub is the single source of truth. The local snapshot is the offline mirror. When in doubt, refresh the snapshot via `/trdr-ds sync`.
|