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.
package/README.md
CHANGED
|
@@ -30,38 +30,82 @@ npx trdr-ds-install@latest
|
|
|
30
30
|
|
|
31
31
|
### `/trdr-ds` — TRDR Design System
|
|
32
32
|
|
|
33
|
-
Applies the TRDR Design System to any project in two phases:
|
|
33
|
+
Applies the TRDR Design System to any project. Operates in two phases:
|
|
34
34
|
|
|
35
35
|
1. **Analysis** — scans the project, finds violations, presents a migration plan
|
|
36
36
|
2. **Execution** — after approval, creates tokens.css, components.css, CLAUDE.md, and fixes violations
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
The skill is **offline-first**: it ships with a snapshot of the catalog (`data/components.json`) and tokens (`references/tokens.css`) baked in, so it works without network access. The snapshot is refreshed by the maintainer via `npm run sync` and shipped to devs via `npm publish`.
|
|
39
39
|
|
|
40
|
-
**
|
|
40
|
+
**Modes:**
|
|
41
|
+
|
|
42
|
+
| Command | Behaviour |
|
|
43
|
+
|---------|-----------|
|
|
44
|
+
| `/trdr-ds` *(default = analyze)* | Scan + plan, no changes |
|
|
45
|
+
| `/trdr-ds apply` | Scan + plan + execute after approval |
|
|
46
|
+
| `/trdr-ds sync` | Refresh local snapshot from the Hub (no project changes) |
|
|
47
|
+
| `/trdr-ds apply --latest` | Sync first, then apply |
|
|
48
|
+
|
|
49
|
+
The skill matches detected UI patterns against the catalog. Implemented components (`implemented: true`) are applied with full code; stubs (`implemented: false`) get tokens + a banner comment + an entry in `MISSING_COMPONENTS.md` for the maintainer to revisit.
|
|
41
50
|
|
|
42
51
|
## For maintainers (Mauro)
|
|
43
52
|
|
|
44
|
-
|
|
53
|
+
The full release workflow is in [PROCESS.md](./PROCESS.md). Quick summary:
|
|
45
54
|
|
|
46
|
-
```
|
|
47
|
-
# 1.
|
|
48
|
-
# plugins/trdr-design-system/skills/trdr-ds/SKILL.md
|
|
49
|
-
# plugins/trdr-design-system/skills/trdr-ds/references/rules.md
|
|
55
|
+
```powershell
|
|
56
|
+
# 1. Update the Hub (components.ts or tokens.css), commit, push, wait for Railway deploy.
|
|
50
57
|
|
|
51
|
-
# 2.
|
|
52
|
-
|
|
58
|
+
# 2. Pull the latest catalog into the skill snapshot
|
|
59
|
+
npm run sync
|
|
53
60
|
|
|
54
|
-
# 3.
|
|
55
|
-
|
|
61
|
+
# 3. Review the diff
|
|
62
|
+
git diff plugins/trdr-design-system/skills/trdr-ds/data/components.json
|
|
63
|
+
|
|
64
|
+
# 4. Commit, version, publish
|
|
65
|
+
git add . ; git commit -m "sync: <what changed>" ; git push
|
|
66
|
+
npm version patch ; npm publish
|
|
56
67
|
```
|
|
57
68
|
|
|
58
|
-
|
|
69
|
+
To sync directly from the local Hub build (skipping the deploy wait):
|
|
70
|
+
|
|
71
|
+
```powershell
|
|
72
|
+
npm run sync:local
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This reads `../trdr-design-hub/.next/server/app/components.json.body` and `../trdr-design-hub/src/styles/tokens.css` directly from the filesystem.
|
|
59
76
|
|
|
60
77
|
## Design Hub
|
|
61
78
|
|
|
62
79
|
https://trdr.mrocontent.com.br
|
|
63
80
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
| Path | Purpose |
|
|
82
|
+
|------|---------|
|
|
83
|
+
| `/components.json` | Catalog as JSON (consumed by sync) |
|
|
84
|
+
| `/tokens.css` | Tokens as CSS (consumed by sync) |
|
|
85
|
+
| `/tokens/semanticos` | Token reference (browsable) |
|
|
86
|
+
| `/componentes` | Component reference (browsable) |
|
|
87
|
+
| `/para-ia` | Rules and CLAUDE.md template |
|
|
88
|
+
| `/design-md` | Full design spec |
|
|
89
|
+
|
|
90
|
+
## Structure
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
trdr-plugins/
|
|
94
|
+
├── README.md
|
|
95
|
+
├── PROCESS.md ← release workflow + scenarios
|
|
96
|
+
├── package.json ← npm package "trdr-ds-install"
|
|
97
|
+
├── marketplace.json ← Claude Code marketplace metadata
|
|
98
|
+
├── bin/install.js ← copies skill to ~/.claude/skills
|
|
99
|
+
├── scripts/
|
|
100
|
+
│ ├── sync-components.js ← pull /components.json from Hub
|
|
101
|
+
│ └── sync-tokens.js ← pull /tokens.css from Hub
|
|
102
|
+
└── plugins/trdr-design-system/
|
|
103
|
+
├── .claude-plugin/plugin.json
|
|
104
|
+
└── skills/trdr-ds/
|
|
105
|
+
├── SKILL.md ← skill definition
|
|
106
|
+
├── data/
|
|
107
|
+
│ └── components.json ← snapshot of /components.json
|
|
108
|
+
└── references/
|
|
109
|
+
├── rules.md ← absolute design rules (PT-BR)
|
|
110
|
+
└── tokens.css ← snapshot of /tokens.css
|
|
111
|
+
```
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trdr-ds-install",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Installs the TRDR Design System skill for Claude Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"trdr-ds-install": "./bin/install.js"
|
|
7
7
|
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"sync-components": "node scripts/sync-components.js",
|
|
10
|
+
"sync-tokens": "node scripts/sync-tokens.js",
|
|
11
|
+
"sync": "node scripts/sync-tokens.js && node scripts/sync-components.js",
|
|
12
|
+
"sync:local": "node scripts/sync-tokens.js --local ../trdr-design-hub && node scripts/sync-components.js --local ../trdr-design-hub"
|
|
13
|
+
},
|
|
8
14
|
"files": [
|
|
9
15
|
"bin/",
|
|
10
16
|
"plugins/trdr-design-system/skills/"
|