trdr-ds-install 1.2.5 → 1.3.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.
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: trdr-ds
|
|
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.
|
|
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). For large projects (50+ violations), execution is batched by folder with progress saved to DS_PROGRESS.md and resumable at any time. 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|sync]"
|
|
5
|
+
argument-hint: "[analyze|apply|resume|status|sync|batch N]"
|
|
6
6
|
allowed-tools: [Read, Glob, Grep, Edit, Write, Bash, WebFetch]
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -25,6 +25,9 @@ Execute in two clearly separated phases: **PHASE 1: ANALYZE → PHASE 2: EXECUTE
|
|
|
25
25
|
|-----|-----------|
|
|
26
26
|
| `analyze` *(default when none given)* | Run Phase 1 only — produce a migration plan, do not modify any project file |
|
|
27
27
|
| `apply` | Run Phase 1 + Phase 2 |
|
|
28
|
+
| `resume` | Read `DS_PROGRESS.md` from the project root and continue from the last checkpoint (Phase 2 batching only) |
|
|
29
|
+
| `status` | Read `DS_PROGRESS.md` and display a progress summary table — no files modified |
|
|
30
|
+
| `batch [N]` | Override default batch size for Phase 2 (default: 25 files/batch) |
|
|
28
31
|
| `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
32
|
| `--latest` *(modifier on `analyze` or `apply`)* | Same as `sync` first, then continue normally |
|
|
30
33
|
|
|
@@ -34,6 +37,26 @@ Execute in two clearly separated phases: **PHASE 1: ANALYZE → PHASE 2: EXECUTE
|
|
|
34
37
|
|
|
35
38
|
Scan the project and produce a structured migration plan. Do NOT modify any project files yet.
|
|
36
39
|
|
|
40
|
+
### Step 0 — Detect previous progress
|
|
41
|
+
|
|
42
|
+
Before any analysis, check if `DS_PROGRESS.md` exists at the project root.
|
|
43
|
+
|
|
44
|
+
**If found AND `Status:` line is NOT `COMPLETE`:**
|
|
45
|
+
```
|
|
46
|
+
⚠️ Previous TRDR DS migration found (status: [IN_PROGRESS/PAUSED]).
|
|
47
|
+
|
|
48
|
+
Reply with:
|
|
49
|
+
- `"resume"` — continue from last checkpoint (Batch [N])
|
|
50
|
+
- `"restart"` — discard progress and run a fresh analysis
|
|
51
|
+
- `"status"` — see a progress summary without modifying anything
|
|
52
|
+
```
|
|
53
|
+
**STOP HERE. Wait for the developer's reply.**
|
|
54
|
+
|
|
55
|
+
**If found AND `Status: COMPLETE`:**
|
|
56
|
+
Inform the dev that a previous migration was already completed (show date). Offer to re-run analysis to detect new files added since then. Continue only if the dev explicitly says so.
|
|
57
|
+
|
|
58
|
+
**If not found:** Continue normally to Step 1.
|
|
59
|
+
|
|
37
60
|
### Step 1 — Detect framework
|
|
38
61
|
|
|
39
62
|
Read `package.json` at the project root. Identify:
|
|
@@ -89,6 +112,11 @@ Flag any gradient that doesn't reference a TRDR gradient token (`var(--gradient-
|
|
|
89
112
|
**H — Hardcoded font-size in px** (should use .trdr-h* / .trdr-body-* text style classes):
|
|
90
113
|
Search: `font-size:\s*\d+px` in CSS/SCSS files (skip tokens.css itself)
|
|
91
114
|
|
|
115
|
+
Track:
|
|
116
|
+
- `total_violations` = sum of all A–H occurrences
|
|
117
|
+
- `total_files_with_violations` = count of unique files with ≥ 1 violation
|
|
118
|
+
- `violations_by_folder` = map of `{ folder: string, files: string[], count: number }[]` grouped by first-level folder inside `src/` (or project root if no `src/`)
|
|
119
|
+
|
|
92
120
|
### Step 3.5 — Detect component replacement candidates
|
|
93
121
|
|
|
94
122
|
Scan the project for UI patterns that indicate elements replaceable by TRDR implemented components.
|
|
@@ -176,7 +204,11 @@ Use the loaded data throughout the rest of the workflow. Track:
|
|
|
176
204
|
|
|
177
205
|
### Step 5 — Present the migration plan and STOP
|
|
178
206
|
|
|
179
|
-
Output the following report and **do not proceed** until the developer explicitly approves
|
|
207
|
+
Output the following report and **do not proceed** until the developer explicitly approves.
|
|
208
|
+
|
|
209
|
+
Determine execution mode based on thresholds:
|
|
210
|
+
- **Small project** (`total_violations <= 50` AND `total_files_with_violations <= 30`): standard monolithic execution — no batching, no DS_PROGRESS.md
|
|
211
|
+
- **Large project** (`total_violations > 50` OR `total_files_with_violations > 30`): batched execution — include the large project warning below
|
|
180
212
|
|
|
181
213
|
```markdown
|
|
182
214
|
## TRDR Design System — Migration Plan
|
|
@@ -230,11 +262,21 @@ Output the following report and **do not proceed** until the developer explicitl
|
|
|
230
262
|
|
|
231
263
|
> **Implementados:** o CSS já estará em `components.css` após a Fase 2 — o dev só precisa trocar as classes.
|
|
232
264
|
> **Stubs:** receberão banner comment com tokens recomendados + entrada em `MISSING_COMPONENTS.md`.
|
|
233
|
-
> **Não listados aqui:** componentes específicos da TRDR (boleta, janela) — verificar manualmente se o projeto os usa.
|
|
234
265
|
|
|
235
266
|
### SCOPE ESTIMATE: [Small / Medium / Large]
|
|
236
267
|
Small = <10 violations | Medium = 10–50 | Large = 50+
|
|
237
268
|
|
|
269
|
+
[ONLY for large projects — include this block:]
|
|
270
|
+
### ⚠️ LARGE PROJECT DETECTED
|
|
271
|
+
[total_violations] violations across [total_files_with_violations] files.
|
|
272
|
+
Phase 2 will run in **BATCHES BY FOLDER** to prevent context overflow and allow resuming.
|
|
273
|
+
|
|
274
|
+
Default batch: 25 files/batch → ~[ceil(total_files_with_violations/25)] batches estimated
|
|
275
|
+
Progress saved to `DS_PROGRESS.md` — resumable anytime with `/trdr-ds resume`.
|
|
276
|
+
|
|
277
|
+
To change batch size: reply with `"Apply, batch 15"` or `"Apply, batch 40"`.
|
|
278
|
+
[END large project block]
|
|
279
|
+
|
|
238
280
|
### WHAT WILL NOT BE TOUCHED:
|
|
239
281
|
- Images, SVGs, fonts files
|
|
240
282
|
- node_modules/, .next/, dist/, build/, out/
|
|
@@ -245,6 +287,7 @@ Small = <10 violations | Medium = 10–50 | Large = 50+
|
|
|
245
287
|
|
|
246
288
|
**Reply with one of:**
|
|
247
289
|
- `"Apply"` or `"Executar"` — proceed with everything above
|
|
290
|
+
- `"Apply, batch [N]"` — proceed with custom batch size (large projects only)
|
|
248
291
|
- `"Apply, skip [file or directory]"` — proceed but exclude specific paths
|
|
249
292
|
- `"Only tokens"` — only create tokens.css, components.css, and CLAUDE.md (no violation fixes)
|
|
250
293
|
- `"Change [detail]"` — adjust a specific part of the plan before executing
|
|
@@ -257,7 +300,55 @@ Small = <10 violations | Medium = 10–50 | Large = 50+
|
|
|
257
300
|
|
|
258
301
|
## PHASE 2: EXECUTION (only after explicit approval)
|
|
259
302
|
|
|
260
|
-
|
|
303
|
+
Parse the developer's reply:
|
|
304
|
+
- Extract batch size override from `"Apply, batch N"` → use N; otherwise default to 25.
|
|
305
|
+
- Extract skip paths from `"Apply, skip [path]"` → exclude those from violation processing.
|
|
306
|
+
- `"Only tokens"` → skip Steps 5 and 6 (no violation fixes, no component banners).
|
|
307
|
+
|
|
308
|
+
Report progress after each major step.
|
|
309
|
+
|
|
310
|
+
### Step 0 — Initialize checkpoint
|
|
311
|
+
|
|
312
|
+
**Determine execution mode:**
|
|
313
|
+
```
|
|
314
|
+
if total_violations <= 50 AND total_files_with_violations <= 30:
|
|
315
|
+
mode = MONOLITHIC (no DS_PROGRESS.md created — skip to Step 1)
|
|
316
|
+
else:
|
|
317
|
+
mode = BATCHED (create DS_PROGRESS.md, execute in batches)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
**For BATCHED mode — create `DS_PROGRESS.md` at the project root:**
|
|
321
|
+
|
|
322
|
+
```markdown
|
|
323
|
+
# TRDR DS Migration — Progress
|
|
324
|
+
Started: [ISO datetime]
|
|
325
|
+
Project: [project name from package.json]
|
|
326
|
+
Batch size: [N]
|
|
327
|
+
Status: IN_PROGRESS
|
|
328
|
+
|
|
329
|
+
## Foundation
|
|
330
|
+
- [ ] tokens.css
|
|
331
|
+
- [ ] components.css
|
|
332
|
+
- [ ] CLAUDE.md
|
|
333
|
+
- [ ] @import no CSS global
|
|
334
|
+
|
|
335
|
+
## Lotes de Violações
|
|
336
|
+
Total de arquivos com violações: [total_files_with_violations]
|
|
337
|
+
Total de violações: [total_violations]
|
|
338
|
+
Total de lotes: [N]
|
|
339
|
+
|
|
340
|
+
[For each folder in violations_by_folder, sorted alphabetically.
|
|
341
|
+
If a folder has more files than batch_size, split into sub-batches labeled "1a", "1b", etc.
|
|
342
|
+
Files at the project root (not inside src/) go in a final "raiz" batch.]
|
|
343
|
+
|
|
344
|
+
### Lote 1 — [folder/] ([N] arquivos) — PENDING
|
|
345
|
+
### Lote 2 — [folder/] ([N] arquivos) — PENDING
|
|
346
|
+
...
|
|
347
|
+
### Lote [n] — raiz ([N] arquivos) — PENDING
|
|
348
|
+
|
|
349
|
+
## Padrões Sem Token (revisão manual)
|
|
350
|
+
[empty — filled during execution]
|
|
351
|
+
```
|
|
261
352
|
|
|
262
353
|
### Step 1 — Create tokens.css
|
|
263
354
|
|
|
@@ -274,6 +365,11 @@ If `references/tokens.css` is missing in the skill directory:
|
|
|
274
365
|
1. Try `WebFetch: https://trdr.mrocontent.com.br/tokens.css`, save it to the skill dir, then proceed.
|
|
275
366
|
2. If the Hub is also unreachable → STOP with error message asking the maintainer to run `npm run sync`.
|
|
276
367
|
|
|
368
|
+
**For BATCHED mode:** After writing tokens.css, update `DS_PROGRESS.md`:
|
|
369
|
+
```
|
|
370
|
+
- [x] tokens.css — [path]/tokens.css
|
|
371
|
+
```
|
|
372
|
+
|
|
277
373
|
### Step 2 — Create components.css
|
|
278
374
|
|
|
279
375
|
Build `components.css` by concatenating the `.code.css` block of every implemented component plus the typography utility classes.
|
|
@@ -312,6 +408,11 @@ After all component CSS blocks, append the text style utility classes:
|
|
|
312
408
|
.trdr-label-l3 { font-family: var(--font-secondary); font-size: 14px; font-weight: 600; line-height: 1.4; }
|
|
313
409
|
```
|
|
314
410
|
|
|
411
|
+
**For BATCHED mode:** Update `DS_PROGRESS.md`:
|
|
412
|
+
```
|
|
413
|
+
- [x] components.css — [path]/components.css
|
|
414
|
+
```
|
|
415
|
+
|
|
315
416
|
### Step 3 — Update global CSS
|
|
316
417
|
|
|
317
418
|
Find the main global CSS file (globals.css, main.css, index.css, app.css) and add at the very top:
|
|
@@ -325,6 +426,11 @@ Adjust the relative path if tokens.css is in a subdirectory.
|
|
|
325
426
|
|
|
326
427
|
If the project already imports a different design system's variables and there are naming conflicts, warn the developer before proceeding.
|
|
327
428
|
|
|
429
|
+
**For BATCHED mode:** Update `DS_PROGRESS.md`:
|
|
430
|
+
```
|
|
431
|
+
- [x] @import — [global-css-file]
|
|
432
|
+
```
|
|
433
|
+
|
|
328
434
|
### Step 4 — Create CLAUDE.md
|
|
329
435
|
|
|
330
436
|
Create `CLAUDE.md` at the project root, populated dynamically from the catalog:
|
|
@@ -383,9 +489,62 @@ bg.primary (base) → bg.secondary/tertiary (content areas) → surface.* (cards
|
|
|
383
489
|
→ interactive components → overlays/modals/tooltips
|
|
384
490
|
```
|
|
385
491
|
|
|
492
|
+
**For BATCHED mode:** Update `DS_PROGRESS.md`:
|
|
493
|
+
```
|
|
494
|
+
- [x] CLAUDE.md — CLAUDE.md
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
Then output:
|
|
498
|
+
```
|
|
499
|
+
✅ Foundation complete — tokens.css, components.css, CLAUDE.md, @import all done.
|
|
500
|
+
Starting violation processing in [N] batches of up to [batch_size] files each.
|
|
501
|
+
```
|
|
502
|
+
|
|
386
503
|
### Step 5 — Migrate violations
|
|
387
504
|
|
|
388
|
-
|
|
505
|
+
**MONOLITHIC mode:** Process all files with violations in one pass. Apply all replacements below. Continue to Step 6.
|
|
506
|
+
|
|
507
|
+
**BATCHED mode:** Process one batch at a time, with a STOP between batches.
|
|
508
|
+
|
|
509
|
+
For each batch listed as PENDING in `DS_PROGRESS.md`:
|
|
510
|
+
|
|
511
|
+
1. Update `DS_PROGRESS.md` — change batch status to `IN_PROGRESS`
|
|
512
|
+
2. For each file in the batch:
|
|
513
|
+
- Apply all applicable violation fixes (see mapping tables below)
|
|
514
|
+
- Count violations fixed
|
|
515
|
+
3. Update `DS_PROGRESS.md` — change batch status to `COMPLETED`:
|
|
516
|
+
```
|
|
517
|
+
### Lote [N] — [folder/] ([N] arquivos) — COMPLETED
|
|
518
|
+
Violações corrigidas: [N] | Arquivos: [N]/[N]
|
|
519
|
+
```
|
|
520
|
+
Add any unfixable patterns to the "Padrões Sem Token" section of `DS_PROGRESS.md`.
|
|
521
|
+
4. Output batch summary:
|
|
522
|
+
```
|
|
523
|
+
✅ Lote [N] concluído — [folder/] ([N] arquivos, [N] violações corrigidas)
|
|
524
|
+
Progresso geral: [done]/[total] lotes | [total_fixed] violações corrigidas
|
|
525
|
+
```
|
|
526
|
+
5. If more batches are PENDING:
|
|
527
|
+
|
|
528
|
+
**STOP HERE.** Output:
|
|
529
|
+
```
|
|
530
|
+
Próximo: **Lote [N+1] — [folder/]** ([N] arquivos)
|
|
531
|
+
Responda:
|
|
532
|
+
- "continuar" / "continue" — processar próximo lote
|
|
533
|
+
- "pular [pasta]" — skip this folder and go to the next batch
|
|
534
|
+
- "parar" / "stop" — save progress and stop here (resume later with `/trdr-ds resume`)
|
|
535
|
+
- "tudo" / "all" — process all remaining batches without pausing
|
|
536
|
+
```
|
|
537
|
+
**Wait for developer reply.**
|
|
538
|
+
|
|
539
|
+
If reply is `"tudo"` / `"all"`: process all remaining batches without pausing (update DS_PROGRESS.md after each).
|
|
540
|
+
If reply is `"pular [pasta]"`: mark that batch as SKIPPED in DS_PROGRESS.md and move to the next.
|
|
541
|
+
If reply is `"parar"`: set `Status: PAUSED` in DS_PROGRESS.md. STOP. Do not proceed to Step 6 or 7.
|
|
542
|
+
|
|
543
|
+
6. After ALL batches are COMPLETED (or skipped): continue to Step 6.
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
**Violation mapping tables (used in Steps 5 for both modes):**
|
|
389
548
|
|
|
390
549
|
**Color mapping (hardcoded → semantic):**
|
|
391
550
|
| Hardcoded value | Context | Replace with |
|
|
@@ -430,17 +589,17 @@ For each violation found in Phase 1, apply the semantic token replacement.
|
|
|
430
589
|
**rgba() mapping:**
|
|
431
590
|
| Hardcoded pattern | Context | Replace with |
|
|
432
591
|
|-------------------|---------|-------------|
|
|
433
|
-
| `rgba(0,0,0,*)` | box-shadow | No TRDR shadow token exists → flag in DS_MIGRATION.md as "Missing shadow token" |
|
|
592
|
+
| `rgba(0,0,0,*)` | box-shadow | No TRDR shadow token exists → flag in DS_PROGRESS.md / DS_MIGRATION.md as "Missing shadow token" |
|
|
434
593
|
| `rgba(255,255,255,.29)` approx | overlay/backdrop | `var(--bg-overlay)` |
|
|
435
|
-
| `rgba(255,255,255,*)` other | overlay | flag
|
|
594
|
+
| `rgba(255,255,255,*)` other | overlay | flag |
|
|
436
595
|
| Any other `rgba(N,N,N,*)` | various | Map to nearest semantic alpha token (--surface-brand, --surface-info, --action-*-alpha, etc.) or flag |
|
|
437
596
|
|
|
438
597
|
**Gradient mapping:**
|
|
439
598
|
| Pattern | Replace with |
|
|
440
599
|
|---------|-------------|
|
|
441
600
|
| `linear-gradient(...)` using only TRDR brand colors | `var(--gradient-text-brand)`, `var(--gradient-bg-hero)`, or `var(--gradient-bg-fade)` as appropriate |
|
|
442
|
-
| `linear-gradient(...)` using any non-DS colors | Flag
|
|
443
|
-
| Gradient inside SVG data URI embedded in CSS | Flag
|
|
601
|
+
| `linear-gradient(...)` using any non-DS colors | Flag — developer must decide: remove, replace with TRDR gradient token, or add new token to Hub |
|
|
602
|
+
| Gradient inside SVG data URI embedded in CSS | Flag |
|
|
444
603
|
|
|
445
604
|
**Font-size mapping:**
|
|
446
605
|
| Hardcoded value | Replace with |
|
|
@@ -457,14 +616,14 @@ For each violation found in Phase 1, apply the semantic token replacement.
|
|
|
457
616
|
| `font-size: 14px` | `.trdr-body-b3` or `.trdr-label-l3` (check weight context) |
|
|
458
617
|
| `font-size: 12px` | `.trdr-body-b4` or `.trdr-body-aux` (check letter-spacing) |
|
|
459
618
|
| `font-size: 10px` | `.trdr-body-b5` class |
|
|
460
|
-
| `font-size: [other px]` | Nearest text style class — flag
|
|
619
|
+
| `font-size: [other px]` | Nearest text style class — flag if no match |
|
|
461
620
|
|
|
462
621
|
**Do NOT replace:**
|
|
463
622
|
- Hex values inside binary image files (PNG, JPG, GIF)
|
|
464
|
-
- SVG external files — flag them
|
|
623
|
+
- SVG external files — flag them but do not auto-edit
|
|
465
624
|
- Values in commented-out code
|
|
466
625
|
|
|
467
|
-
**All other values MUST be replaced or flagged.**
|
|
626
|
+
**All other values MUST be replaced or flagged.** No exceptions for "decorative" gradients, shadows, or overlays.
|
|
468
627
|
|
|
469
628
|
### Step 6 — Apply component code (smart fallback)
|
|
470
629
|
|
|
@@ -490,7 +649,7 @@ Use the `replacementCandidates[]` list built in Phase 1 Step 3.5. For each entry
|
|
|
490
649
|
- Status: ⚠️ stub — code blocks pending
|
|
491
650
|
```
|
|
492
651
|
4. **If no slug matches** the detected pattern:
|
|
493
|
-
- Flag the pattern in `MISSING_COMPONENTS.md` under "Unmapped patterns" with the file location and a one-line description of the UI need.
|
|
652
|
+
- Flag the pattern in `MISSING_COMPONENTS.md` under "Unmapped patterns" with the file location and a one-line description of the UI need.
|
|
494
653
|
|
|
495
654
|
### Step 7 — Generate DS_MIGRATION.md
|
|
496
655
|
|
|
@@ -509,6 +668,7 @@ Hub: https://trdr.mrocontent.com.br
|
|
|
509
668
|
- ✅ [N] violations fixed in [M] files
|
|
510
669
|
- ✅ [global-css] updated with @import
|
|
511
670
|
- ⚠️ [S] stub components flagged in MISSING_COMPONENTS.md (if any)
|
|
671
|
+
[If batched: - ✅ Migrated in [N] batches — see DS_PROGRESS.md for batch-level detail]
|
|
512
672
|
|
|
513
673
|
## Files modified
|
|
514
674
|
[List each file and what changed]
|
|
@@ -522,11 +682,10 @@ Hub: https://trdr.mrocontent.com.br
|
|
|
522
682
|
- Others: add Google Fonts `<link>` in HTML head
|
|
523
683
|
- [ ] **Dark/light mode**: tokens.css uses [data-theme="light"] for overrides — add `data-theme="light"` to `<html>` to activate light mode
|
|
524
684
|
- [ ] **Trading UI**: If this project has price/position displays, verify context.trading.* tokens are applied (see Hub: /tokens/semanticos)
|
|
525
|
-
- [ ] **Stubs**: Review MISSING_COMPONENTS.md and decide whether to wait for canonical implementation in the Hub or hand-roll
|
|
685
|
+
- [ ] **Stubs**: Review MISSING_COMPONENTS.md and decide whether to wait for canonical implementation in the Hub or hand-roll using the listed tokens
|
|
526
686
|
- [ ] **Skipped files**: [list any files excluded from migration]
|
|
527
687
|
|
|
528
688
|
## Missing DS tokens (flagged — no semantic token available)
|
|
529
|
-
[List patterns found in the project that have no TRDR token yet — request these in the Hub]
|
|
530
689
|
| Pattern | File | Suggestion |
|
|
531
690
|
|---------|------|-----------|
|
|
532
691
|
| `box-shadow: rgba(0,0,0,*)` | [file:line] | Request shadow token in Hub |
|
|
@@ -543,6 +702,12 @@ Hub: https://trdr.mrocontent.com.br
|
|
|
543
702
|
- Rules: https://trdr.mrocontent.com.br/para-ia
|
|
544
703
|
```
|
|
545
704
|
|
|
705
|
+
**For BATCHED mode:** After writing DS_MIGRATION.md, update `DS_PROGRESS.md`:
|
|
706
|
+
```
|
|
707
|
+
Status: COMPLETE
|
|
708
|
+
Completed: [ISO datetime]
|
|
709
|
+
```
|
|
710
|
+
|
|
546
711
|
---
|
|
547
712
|
|
|
548
713
|
## EXECUTION SUMMARY
|
|
@@ -558,6 +723,7 @@ Created:
|
|
|
558
723
|
• CLAUDE.md (design system context for Claude Code)
|
|
559
724
|
• DS_MIGRATION.md (migration log + manual checklist)
|
|
560
725
|
• MISSING_COMPONENTS.md ([S] stubs flagged) — only if applicable
|
|
726
|
+
[If batched: • DS_PROGRESS.md (migration log — status: COMPLETE)]
|
|
561
727
|
|
|
562
728
|
Modified:
|
|
563
729
|
• [global-css] — @import added
|
|
@@ -571,6 +737,63 @@ Hub: https://trdr.mrocontent.com.br
|
|
|
571
737
|
|
|
572
738
|
---
|
|
573
739
|
|
|
740
|
+
## RESUME MODE (when invoked with `resume` argument)
|
|
741
|
+
|
|
742
|
+
1. Look for `DS_PROGRESS.md` at the project root.
|
|
743
|
+
- If not found: output `❌ No previous migration found. Run /trdr-ds to start a new one.`
|
|
744
|
+
- If `Status: COMPLETE`: output `✅ Migration already complete (finished [date]). Run /trdr-ds to check for new violations.`
|
|
745
|
+
|
|
746
|
+
2. Read `DS_PROGRESS.md`. Find the first batch with status `IN_PROGRESS` or `PENDING`.
|
|
747
|
+
|
|
748
|
+
3. Output a resume summary:
|
|
749
|
+
```
|
|
750
|
+
Resuming TRDR DS migration — [project name]
|
|
751
|
+
Foundation: ✅ complete
|
|
752
|
+
Batches completed: [done]/[total] | Violations fixed so far: [N]
|
|
753
|
+
Resuming at: **Lote [N] — [folder/]** ([N] files)
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
4. Continue Phase 2 Step 5 from that batch. Follow the same STOP-between-batches flow.
|
|
757
|
+
|
|
758
|
+
5. After all batches finish: run Steps 6 and 7 (component banners + DS_MIGRATION.md).
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
762
|
+
## STATUS MODE (when invoked with `status` argument)
|
|
763
|
+
|
|
764
|
+
1. Look for `DS_PROGRESS.md` at the project root.
|
|
765
|
+
- If not found: output `No migration in progress. Run /trdr-ds to start.`
|
|
766
|
+
|
|
767
|
+
2. Read `DS_PROGRESS.md` and output a progress table — do NOT modify any files:
|
|
768
|
+
|
|
769
|
+
```
|
|
770
|
+
## TRDR DS — Migration Status
|
|
771
|
+
|
|
772
|
+
Project: [name] | Started: [date] | Status: [IN_PROGRESS/PAUSED/COMPLETE]
|
|
773
|
+
|
|
774
|
+
### Foundation
|
|
775
|
+
| Step | File | Status |
|
|
776
|
+
|------|------|--------|
|
|
777
|
+
| tokens.css | [path] | ✅ / ⏳ |
|
|
778
|
+
| components.css | [path] | ✅ / ⏳ |
|
|
779
|
+
| CLAUDE.md | CLAUDE.md | ✅ / ⏳ |
|
|
780
|
+
| @import | [global-css] | ✅ / ⏳ |
|
|
781
|
+
|
|
782
|
+
### Violation Batches
|
|
783
|
+
| Lote | Pasta | Arquivos | Violações | Status |
|
|
784
|
+
|------|-------|----------|-----------|--------|
|
|
785
|
+
| 1 | src/components/ | 12 | 34 | ✅ COMPLETED |
|
|
786
|
+
| 2 | src/pages/ | 8 | 12 | 🔄 IN_PROGRESS |
|
|
787
|
+
| 3 | src/app/ | 15 | — | ⏳ PENDING |
|
|
788
|
+
| 4 | src/styles/ | 6 | — | ⏳ PENDING |
|
|
789
|
+
|
|
790
|
+
Progress: [N]% ([done]/[total] batches — [violations_fixed]/[total_violations] violations fixed)
|
|
791
|
+
|
|
792
|
+
To continue: `/trdr-ds resume`
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
---
|
|
796
|
+
|
|
574
797
|
## SYNC MODE (when invoked as `/trdr-ds sync`)
|
|
575
798
|
|
|
576
799
|
1. WebFetch `https://trdr.mrocontent.com.br/components.json` → save as `<skill-dir>/data/components.json`
|
|
@@ -581,7 +804,7 @@ Hub: https://trdr.mrocontent.com.br
|
|
|
581
804
|
- Removed: [list slugs no longer in catalog]
|
|
582
805
|
4. No project files are touched.
|
|
583
806
|
|
|
584
|
-
If either fetch fails, report which one and exit
|
|
807
|
+
If either fetch fails, report which one and exit. Do NOT touch the snapshot if the response is malformed (e.g., missing `components` array).
|
|
585
808
|
|
|
586
809
|
---
|
|
587
810
|
|