get-shit-pretty 0.5.2 → 0.6.1
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/.claude-plugin/plugin.json +1 -1
- package/README.md +3 -4
- package/bin/install.js +27 -1
- package/gsp/agents/gsp-builder.md +1 -1
- package/gsp/references/questioning.md +17 -9
- package/gsp/skills/gsp-accessibility/SKILL.md +52 -186
- package/gsp/skills/gsp-accessibility-audit/SKILL.md +219 -0
- package/gsp/skills/gsp-brand-audit/SKILL.md +7 -6
- package/gsp/skills/gsp-brand-identity/SKILL.md +7 -5
- package/gsp/skills/gsp-brand-patterns/SKILL.md +42 -35
- package/gsp/skills/gsp-brand-refine/SKILL.md +148 -0
- package/gsp/skills/gsp-brand-research/SKILL.md +2 -3
- package/gsp/skills/gsp-brand-strategy/SKILL.md +7 -5
- package/gsp/skills/gsp-brand-sync/SKILL.md +3 -4
- package/gsp/skills/gsp-doctor/SKILL.md +20 -1
- package/gsp/skills/gsp-help/SKILL.md +1 -0
- package/gsp/skills/gsp-launch/SKILL.md +3 -8
- package/gsp/skills/gsp-palette/SKILL.md +3 -0
- package/gsp/skills/gsp-project-brief/SKILL.md +3 -11
- package/gsp/skills/gsp-project-build/SKILL.md +2 -5
- package/gsp/skills/gsp-project-critique/SKILL.md +4 -8
- package/gsp/skills/gsp-project-design/SKILL.md +3 -9
- package/gsp/skills/gsp-project-research/SKILL.md +2 -5
- package/gsp/skills/gsp-project-review/SKILL.md +4 -6
- package/gsp/skills/gsp-start/SKILL.md +101 -180
- package/gsp/skills/gsp-style/SKILL.md +12 -174
- package/gsp/skills/gsp-typescale/SKILL.md +39 -161
- package/gsp/skills/gsp-update/SKILL.md +52 -23
- package/gsp/templates/branding/config.json +1 -0
- package/package.json +1 -1
|
@@ -34,6 +34,7 @@ Generate a production-ready typography system with fluid responsive sizing, vert
|
|
|
34
34
|
|
|
35
35
|
<rules>
|
|
36
36
|
- Always use `AskUserQuestion` for user interaction — never prompt via plain text
|
|
37
|
+
- One decision per question — never batch multiple questions in a single message
|
|
37
38
|
- Foundation chunks follow `references/chunk-format.md` format exactly
|
|
38
39
|
- All sizes include px, rem, AND fluid clamp() values for headings
|
|
39
40
|
- Line heights snap to a 4px grid for vertical rhythm (body 24px = 6 × 4px)
|
|
@@ -117,70 +118,45 @@ Calculate the implied ratio from the preset's type scale if present, or default
|
|
|
117
118
|
|
|
118
119
|
Use `AskUserQuestion` for each input:
|
|
119
120
|
|
|
120
|
-
1. **Primary font** —
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
- **Plus Jakarta Sans** — "modern geometric with personality"
|
|
124
|
-
- **DM Sans** — "low-contrast geometric, contemporary"
|
|
125
|
-
- **Space Grotesk** — "technical, monospaced-inspired sans"
|
|
126
|
-
- **Instrument Serif** — "elegant serif with sharp details"
|
|
127
|
-
- **Custom** — "enter your own font family"
|
|
128
|
-
|
|
129
|
-
2. **Scale ratio** — "What scale ratio? Preview interactively at https://typescale.com/" with options:
|
|
130
|
-
- **minor-third (1.2)** — "balanced, safe default — used by Shopify Polaris"
|
|
131
|
-
- **major-third (1.25)** — "clear hierarchy, marketing-friendly"
|
|
132
|
-
- **perfect-fourth (1.333)** — "strong contrast, bold headlines"
|
|
133
|
-
- **augmented-fourth (1.414)** — "dramatic, editorial feel"
|
|
134
|
-
- **Custom** — "enter a custom ratio"
|
|
135
|
-
|
|
136
|
-
3. **Base size** — default to 16px unless user specifies otherwise
|
|
121
|
+
1. **Primary font** — offer: Inter, Geist Sans, Plus Jakarta Sans, DM Sans, Space Grotesk, Instrument Serif, Custom
|
|
122
|
+
2. **Scale ratio** — offer: minor-third (1.2), major-third (1.25), perfect-fourth (1.333), augmented-fourth (1.414), Custom. Link https://typescale.com/ for preview.
|
|
123
|
+
3. **Base size** — default 16px unless specified
|
|
137
124
|
|
|
138
125
|
## Step 3: Calculate type scale
|
|
139
126
|
|
|
140
|
-
Generate a 9-level scale
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
size = base × ratio^n
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Where `n` is the level's exponent:
|
|
147
|
-
|
|
148
|
-
| Level | Exponent | Tailwind class | shadcn equivalent | Purpose |
|
|
149
|
-
|-------|----------|----------------|-------------------|---------|
|
|
150
|
-
| Display | 5 | `text-6xl`–`text-7xl` | — | Hero headlines, splash screens |
|
|
151
|
-
| H1 | 4 | `text-4xl` | `scroll-m-20 text-4xl font-extrabold tracking-tight` | Page titles |
|
|
152
|
-
| H2 | 3 | `text-3xl` | `scroll-m-20 text-3xl font-semibold tracking-tight` | Section headings |
|
|
153
|
-
| H3 | 2 | `text-2xl` | `scroll-m-20 text-2xl font-semibold tracking-tight` | Subsection headings |
|
|
154
|
-
| H4 | 1 | `text-xl` | `scroll-m-20 text-xl font-semibold tracking-tight` | Minor headings |
|
|
155
|
-
| body-large | 0.5* | `text-lg` | Lead: `text-xl text-muted-foreground` | Lead paragraphs, intros |
|
|
156
|
-
| body | 0 | `text-base` | `leading-7 [&:not(:first-child)]:mt-6` | Default body text (= base size) |
|
|
157
|
-
| body-small | -1 | `text-sm` | Small: `text-sm font-medium leading-none` | Secondary text, metadata |
|
|
158
|
-
| caption | -2 | `text-xs` | Muted: `text-sm text-muted-foreground` | Labels, helper text |
|
|
159
|
-
| overline | -2 | `text-xs` | — | All-caps category labels (same size as caption) |
|
|
127
|
+
Generate a 9-level scale: `size = base × ratio^n`. Round px to nearest 0.5px, rem = `px / 16`.
|
|
160
128
|
|
|
161
|
-
|
|
129
|
+
| Level | Exponent | Tailwind | Purpose |
|
|
130
|
+
|-------|----------|----------|---------|
|
|
131
|
+
| Display | 5 | `text-6xl`–`text-7xl` | Hero headlines |
|
|
132
|
+
| H1 | 4 | `text-4xl` | Page titles |
|
|
133
|
+
| H2 | 3 | `text-3xl` | Section headings |
|
|
134
|
+
| H3 | 2 | `text-2xl` | Subsection headings |
|
|
135
|
+
| H4 | 1 | `text-xl` | Minor headings |
|
|
136
|
+
| body-large | 0.5* | `text-lg` | Lead paragraphs |
|
|
137
|
+
| body | 0 | `text-base` | Default body (= base) |
|
|
138
|
+
| body-small | -1 | `text-sm` | Secondary text |
|
|
139
|
+
| caption | -2 | `text-xs` | Labels, helper text |
|
|
140
|
+
| overline | -2 | `text-xs` | All-caps labels (= caption size) |
|
|
162
141
|
|
|
163
|
-
|
|
142
|
+
*body-large uses half-step exponent to bridge body → H4 gap.
|
|
164
143
|
|
|
165
144
|
### Line height per level (snapped to 4px grid)
|
|
166
145
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
|
173
|
-
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
| body-small | 1.5 | 20px (5 × 4px) |
|
|
182
|
-
| caption | 1.4 | 16px (4 × 4px) |
|
|
183
|
-
| overline | 1.5 | 16px (4 × 4px) |
|
|
146
|
+
Formula: `ceil(fontSize * targetRatio / 4) * 4` — every line-height is a multiple of 4px.
|
|
147
|
+
|
|
148
|
+
| Level | Target ratio |
|
|
149
|
+
|-------|-------------|
|
|
150
|
+
| Display | 1.1 |
|
|
151
|
+
| H1 | 1.15 |
|
|
152
|
+
| H2 | 1.2 |
|
|
153
|
+
| H3 | 1.25 |
|
|
154
|
+
| H4 | 1.3 |
|
|
155
|
+
| body-large | 1.5 |
|
|
156
|
+
| body | 1.5 (anchor: e.g. 24px = 6 × 4px) |
|
|
157
|
+
| body-small | 1.5 |
|
|
158
|
+
| caption | 1.4 |
|
|
159
|
+
| overline | 1.5 |
|
|
184
160
|
|
|
185
161
|
If user provided `--line-height`, use it as the body target ratio and adjust proportionally.
|
|
186
162
|
|
|
@@ -203,22 +179,9 @@ Based on the principle: small text needs more space, large text needs less. Refe
|
|
|
203
179
|
|
|
204
180
|
## Step 3.5: Calculate fluid type values
|
|
205
181
|
|
|
206
|
-
For
|
|
182
|
+
For headings (Display → H4), generate `clamp()` values scaling between 375px (mobile) and 1280px (desktop). Mobile uses a ratio two steps down from the chosen ratio. Body and below stay fixed.
|
|
207
183
|
|
|
208
|
-
**
|
|
209
|
-
- Min viewport: 375px (mobile)
|
|
210
|
-
- Max viewport: 1280px (desktop)
|
|
211
|
-
- Mobile ratio: step down two named ratios from chosen ratio
|
|
212
|
-
- Desktop ratio: the chosen ratio
|
|
213
|
-
|
|
214
|
-
**clamp() formula:**
|
|
215
|
-
```
|
|
216
|
-
slope = (maxSize - minSize) / (maxViewport - minViewport)
|
|
217
|
-
intercept = minSize - slope * minViewport
|
|
218
|
-
clamp(minSize_rem, intercept_rem + slope * 100vw, maxSize_rem)
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**Ratio step-down map** (each entry steps to the next lower named ratio):
|
|
184
|
+
**Ratio step-down map:**
|
|
222
185
|
|
|
223
186
|
```
|
|
224
187
|
golden-ratio → perfect-fifth → augmented-fourth
|
|
@@ -231,45 +194,11 @@ major-second → minor-second → minor-second
|
|
|
231
194
|
minor-second → minor-second → minor-second (floor)
|
|
232
195
|
```
|
|
233
196
|
|
|
234
|
-
Mobile size = `base × mobileRatio^exponent`
|
|
235
|
-
Desktop size = `base × desktopRatio^exponent`
|
|
236
|
-
|
|
237
|
-
Body and below don't scale — they stay at the base size across all viewports.
|
|
238
|
-
|
|
239
197
|
If `--no-fluid` is passed, skip clamp() and use breakpoint-only `@media` rules instead.
|
|
240
198
|
|
|
241
199
|
## Step 4: Preview mode (`--preview`)
|
|
242
200
|
|
|
243
|
-
If `--preview`, display
|
|
244
|
-
|
|
245
|
-
```
|
|
246
|
-
/gsp:typescale preview — {font family}
|
|
247
|
-
═══════════════════════════════════════
|
|
248
|
-
|
|
249
|
-
Base: {base}px | Ratio: {ratio} ({ratio name})
|
|
250
|
-
Fluid: 375px → 1280px | Mobile ratio: {mobile ratio name}
|
|
251
|
-
|
|
252
|
-
Level Mobile Desktop Fluid clamp() Weight LH LS
|
|
253
|
-
───────────────────────────────────────────────────────────────────────────────────────────────────
|
|
254
|
-
Display {px}px {px}px clamp({min}, {pref}, {max}) {wt} {lh} -0.025em
|
|
255
|
-
H1 {px}px {px}px clamp({min}, {pref}, {max}) {wt} {lh} -0.025em
|
|
256
|
-
H2 {px}px {px}px clamp({min}, {pref}, {max}) {wt} {lh} -0.025em
|
|
257
|
-
H3 {px}px {px}px clamp({min}, {pref}, {max}) {wt} {lh} -0.015em
|
|
258
|
-
H4 {px}px {px}px clamp({min}, {pref}, {max}) {wt} {lh} -0.01em
|
|
259
|
-
body-large {px}px — — {wt} {lh} 0
|
|
260
|
-
body {base}px — — {wt} {lh} 0
|
|
261
|
-
body-small {px}px — — {wt} {lh} 0.01em
|
|
262
|
-
caption {px}px — — {wt} {lh} 0.015em
|
|
263
|
-
overline {px}px — — 600 {lh} 0.1em
|
|
264
|
-
───────────────────────────────────────────────────────────────────────────────────────────────────
|
|
265
|
-
|
|
266
|
-
Vertical rhythm grid: {grid}px
|
|
267
|
-
Body line-height: {lh}px ({lh/base} unitless) — spacing anchor
|
|
268
|
-
|
|
269
|
-
Run /gsp:typescale "{font}" --ratio {ratio} to write files.
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
Stop here. Do not write any files.
|
|
201
|
+
If `--preview`, display all 10 levels in a table with columns: Level, Mobile px, Desktop px, Fluid clamp(), Weight, LH, LS. Show base/ratio/fluid range header. Footer: grid unit, body line-height anchor, usage hint to write files. Stop here — do not write any files.
|
|
273
202
|
|
|
274
203
|
## Step 5: Resolve output path
|
|
275
204
|
|
|
@@ -286,70 +215,19 @@ If a brand context exists (`.design/branding/{brand}/`):
|
|
|
286
215
|
|
|
287
216
|
## Step 6: Write typography.md
|
|
288
217
|
|
|
289
|
-
Write `{OUTPUT_PATH}/typography.md` as a foundation chunk per `references/chunk-format.md
|
|
290
|
-
|
|
291
|
-
The typography.md chunk must include these sections with calculated values from Step 3:
|
|
292
|
-
|
|
293
|
-
- **Font Families** — table with Role, Family, Variable (yes/no), Source, Fallback stack. Include Google Fonts URL and self-hosting note.
|
|
294
|
-
- **Type Scale** — table with Level, px, rem, Fluid clamp(), Weight, Line height (px + unitless), Letter spacing, Tailwind class. All 10 levels: Display, H1-H4, body-large, body, body-small, caption, overline.
|
|
295
|
-
- **shadcn/ui Typography Classes** — ready-to-use className strings for headings, body, and special elements (blockquote, code, overline). Customize values to match the calculated scale.
|
|
296
|
-
- **Vertical Rhythm** — grid unit, body line-height as spacing anchor, spacing token table (space-xs through space-2xl) with values, lines, and usage. Include CSS `lh`/`rlh` unit examples.
|
|
297
|
-
- **Weights** — table mapping Regular/Medium/Semibold/Bold to values and usage.
|
|
298
|
-
- **Accessibility** — WCAG 2.2 AA compliance notes: body line-height ≥ 1.5, zoom survival, minimum text size, max line length. SC 1.4.12 resilience note.
|
|
299
|
-
- **Variable Font Notes** — conditional section: optical sizing, dark mode grade adjustment, precise weight control.
|
|
300
|
-
- **Modern CSS Enhancements** — `text-wrap: balance` for headings, `text-wrap: pretty` for paragraphs.
|
|
301
|
-
- **Related** — links to companion files.
|
|
218
|
+
Write `{OUTPUT_PATH}/typography.md` as a foundation chunk per `references/chunk-format.md`. Required sections: Font Families (with Google Fonts URL), Type Scale (all 10 levels — px, rem, clamp, weight, LH, LS, Tailwind class), shadcn/ui Typography Classes, Vertical Rhythm (grid unit + spacing tokens), Weights, Accessibility (WCAG 2.2 AA), Variable Font Notes (conditional), Modern CSS (`text-wrap: balance/pretty`), Related.
|
|
302
219
|
|
|
303
220
|
## Step 7: Write CSS output
|
|
304
221
|
|
|
305
222
|
### Tailwind / shadcn mode (default)
|
|
306
223
|
|
|
307
|
-
Write `{OUTPUT_PATH}/tailwind.typography.css` —
|
|
308
|
-
|
|
309
|
-
The CSS file must include these sections, using calculated values from Step 3:
|
|
310
|
-
|
|
311
|
-
- **Header comment** — font family, ratio name, date, import instruction
|
|
312
|
-
- **Font imports** — Google Fonts `@import url()` for primary + mono families
|
|
313
|
-
- **Tailwind v4 @theme extension** — `--font-sans`, `--font-mono` families, plus custom `--text-{level}` tokens for Display, H1-H4, body-large, overline (each with `--line-height`, `--letter-spacing`, `--font-weight` sub-tokens)
|
|
314
|
-
- **Fluid type custom properties** — `:root` block with `--fs-display` through `--fs-h4` using `clamp()` (rem-based min/max, never pure vw — required for WCAG 1.4.4 zoom compliance)
|
|
315
|
-
- **Typography utility classes** — `.text-display`, `.text-h1` through `.text-h4`, `.text-body-large`, `.text-overline` with corresponding font-size (using fluid var), line-height, letter-spacing, font-weight, and `text-wrap: balance` for headings
|
|
316
|
-
- **Optical sizing + dark mode** — `font-optical-sizing: auto`, dark mode antialiasing
|
|
317
|
-
- **Modern CSS** — `text-wrap: balance` on headings, `text-wrap: pretty` on paragraphs
|
|
224
|
+
Write `{OUTPUT_PATH}/tailwind.typography.css` — Tailwind v4 `@theme` extension. Include: header comment, Google Fonts `@import`, `--font-sans`/`--font-mono` + custom `--text-{level}` tokens (with `--line-height`, `--letter-spacing`, `--font-weight` sub-tokens), `:root` fluid clamp() properties (rem-based min/max only — never pure vw per WCAG 1.4.4), utility classes (`.text-display` through `.text-overline`), optical sizing + dark mode antialiasing, `text-wrap: balance` headings / `pretty` paragraphs.
|
|
318
225
|
|
|
319
226
|
### Vanilla mode (`--vanilla`)
|
|
320
227
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
Plain CSS custom properties (no Tailwind syntax). Include:
|
|
324
|
-
|
|
325
|
-
- **Font imports** — Google Fonts `@import`
|
|
326
|
-
- **:root custom properties** — font families (`--font-primary`, `--font-secondary`, `--font-mono`), font weights (`--fw-regular` through `--fw-bold`), fluid font sizes (`--fs-display` through `--fs-overline` with clamp() for headings, rem-based min/max only — never pure vw per WCAG 1.4.4), line heights (`--lh-display` through `--lh-overline`, 4px grid-snapped), letter spacing (`--ls-display` through `--ls-overline`), vertical rhythm (`--grid-unit`, `--space-line`)
|
|
228
|
+
Write `{OUTPUT_PATH}/typescale.css` instead — plain CSS custom properties (no Tailwind syntax). Include: Google Fonts import, `:root` with font families, weights, fluid font sizes (clamp, rem-based), 4px grid-snapped line heights, letter spacing, vertical rhythm tokens.
|
|
327
229
|
|
|
328
230
|
## Step 8: Completion output
|
|
329
231
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
/gsp:typescale — {font family} @ {ratio}
|
|
334
|
-
═══════════════════════════════════════
|
|
335
|
-
|
|
336
|
-
{OUTPUT_PATH}/
|
|
337
|
-
├── typography.md Foundation chunk
|
|
338
|
-
└── tailwind.typography.css Tailwind v4 / shadcn ready
|
|
339
|
-
|
|
340
|
-
Scale: {ratio name} ({ratio})
|
|
341
|
-
Range: {caption px}px → {display px}px
|
|
342
|
-
Levels: 10 (Display → Overline)
|
|
343
|
-
Fluid: 375px → 1280px (clamp)
|
|
344
|
-
Grid: {grid}px vertical rhythm
|
|
345
|
-
|
|
346
|
-
─────────────────────────────────────
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
Then use `AskUserQuestion` with routing options:
|
|
350
|
-
|
|
351
|
-
- **Generate palette** — "pair this type scale with color palettes" → route to `/gsp:palette`
|
|
352
|
-
- **Apply a full style** — "use a style preset for the complete system" → route to `/gsp:style`
|
|
353
|
-
- **Continue to identity** — "use this type scale in the branding diamond" → route to `/gsp:brand-identity`
|
|
354
|
-
- **Done** — "that's all for now"
|
|
232
|
+
Show: header (`/gsp:typescale — {font} @ {ratio}`), file tree (typography.md + CSS file), scale summary (ratio, range, levels, fluid, grid). Then `AskUserQuestion`: Generate palette → `/gsp:palette`, Apply a full style → `/gsp:style`, Continue to identity → `/gsp:brand-identity`, Done.
|
|
355
233
|
</process>
|
|
@@ -2,36 +2,51 @@
|
|
|
2
2
|
name: update
|
|
3
3
|
description: Update GSP to the latest version
|
|
4
4
|
user-invocable: true
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
- Glob
|
|
10
|
+
- WebFetch
|
|
5
11
|
---
|
|
6
12
|
<objective>
|
|
7
13
|
Check for GSP updates, show what's new, and run the update if the user confirms.
|
|
8
14
|
</objective>
|
|
9
15
|
|
|
16
|
+
<rules>
|
|
17
|
+
- Always use `AskUserQuestion` for user-facing questions — never raw text prompts
|
|
18
|
+
- One decision per question — never batch multiple questions in a single message
|
|
19
|
+
</rules>
|
|
20
|
+
|
|
10
21
|
<process>
|
|
11
22
|
|
|
12
23
|
## Step 1 — Detect installation
|
|
13
24
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
Determine the runtime by checking which config directory exists. Check local first, then global:
|
|
26
|
+
|
|
27
|
+
| Runtime | Local dir | Global dir |
|
|
28
|
+
|---------|-----------|------------|
|
|
29
|
+
| Claude Code | `.claude/` | `~/.claude/` |
|
|
30
|
+
| OpenCode | `.opencode/` | `~/.config/opencode/` |
|
|
31
|
+
| Gemini | `.gemini/` | `~/.gemini/` |
|
|
32
|
+
| Codex | `.codex/` | `~/.codex/` |
|
|
19
33
|
|
|
20
|
-
|
|
34
|
+
For each runtime, look for the VERSION file in two paths (current layout first, legacy fallback):
|
|
21
35
|
1. `{runtime-dir}/VERSION` (v0.5.0+)
|
|
22
36
|
2. `{runtime-dir}/get-shit-pretty/VERSION` (legacy v0.4.x)
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
Record which runtime(s) and install type (local/global) were found.
|
|
39
|
+
|
|
40
|
+
If no VERSION file exists anywhere, tell the user GSP doesn't appear to be installed and suggest:
|
|
25
41
|
```
|
|
26
42
|
npx get-shit-pretty
|
|
27
43
|
```
|
|
28
44
|
Then stop.
|
|
29
45
|
|
|
30
|
-
Read the VERSION file to get the installed version.
|
|
46
|
+
Read the VERSION file to get the installed version.
|
|
31
47
|
|
|
32
48
|
## Step 2 — Check latest version
|
|
33
49
|
|
|
34
|
-
Run:
|
|
35
50
|
```bash
|
|
36
51
|
npm view get-shit-pretty version
|
|
37
52
|
```
|
|
@@ -40,7 +55,7 @@ If the command fails, tell the user the version check failed (they may be offlin
|
|
|
40
55
|
|
|
41
56
|
## Step 3 — Compare versions
|
|
42
57
|
|
|
43
|
-
If installed version >= latest version
|
|
58
|
+
If installed version >= latest version:
|
|
44
59
|
```
|
|
45
60
|
GSP v{installed} is already up to date.
|
|
46
61
|
```
|
|
@@ -48,40 +63,55 @@ Then stop.
|
|
|
48
63
|
|
|
49
64
|
## Step 4 — Show what's new
|
|
50
65
|
|
|
51
|
-
Tell the user:
|
|
52
66
|
```
|
|
53
67
|
Update available: v{installed} → v{latest}
|
|
54
68
|
```
|
|
55
69
|
|
|
56
|
-
Fetch the changelog
|
|
70
|
+
Fetch the changelog:
|
|
57
71
|
```bash
|
|
58
72
|
curl -sf https://raw.githubusercontent.com/jubscodes/get-shit-pretty/main/CHANGELOG.md
|
|
59
73
|
```
|
|
60
74
|
|
|
61
|
-
If the fetch succeeds, extract and display the section
|
|
75
|
+
If the fetch succeeds, extract and display the section(s) between the installed and latest versions. If it fails, skip — changelog display is optional.
|
|
62
76
|
|
|
63
77
|
## Step 5 — Warn about clean install
|
|
64
78
|
|
|
65
|
-
Tell the user:
|
|
66
79
|
```
|
|
67
80
|
The update replaces:
|
|
68
|
-
• skills/gsp-*
|
|
69
|
-
•
|
|
70
|
-
•
|
|
81
|
+
• skills/gsp-* (all GSP skills + sibling files)
|
|
82
|
+
• prompts/ (agent system prompts)
|
|
83
|
+
• templates/ (config, state, brief templates)
|
|
84
|
+
• references/ (shared reference material)
|
|
85
|
+
• agents/gsp-* (all GSP agents)
|
|
71
86
|
|
|
72
87
|
Custom files outside these prefixes are preserved.
|
|
73
88
|
```
|
|
74
89
|
|
|
75
90
|
## Step 6 — Confirm with user
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
Use `AskUserQuestion`:
|
|
93
|
+
- **Update now** — "Install v{latest}"
|
|
94
|
+
- **Skip** — "I'll update later"
|
|
95
|
+
|
|
96
|
+
If skip → stop.
|
|
78
97
|
|
|
79
98
|
## Step 7 — Execute update
|
|
80
99
|
|
|
81
|
-
|
|
100
|
+
Build the installer command based on what was detected in Step 1:
|
|
101
|
+
|
|
102
|
+
**Runtime flag:** use the detected runtime (`--claude`, `--opencode`, `--gemini`, `--codex`). If multiple runtimes were found, use `--all`.
|
|
103
|
+
|
|
104
|
+
**Scope flag:** `--local` if local install was detected, `--global` if global.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx get-shit-pretty@latest {runtime-flag} {scope-flag}
|
|
108
|
+
```
|
|
82
109
|
|
|
83
|
-
|
|
84
|
-
-
|
|
110
|
+
Examples:
|
|
111
|
+
- Local Claude: `npx get-shit-pretty@latest --claude --local`
|
|
112
|
+
- Global Claude: `npx get-shit-pretty@latest --claude --global`
|
|
113
|
+
- Global OpenCode: `npx get-shit-pretty@latest --opencode --global`
|
|
114
|
+
- Multiple runtimes: `npx get-shit-pretty@latest --all --global`
|
|
85
115
|
|
|
86
116
|
Show the output to the user.
|
|
87
117
|
|
|
@@ -102,10 +132,9 @@ rm -f {runtime-dir}/get-shit-pretty/.update-cache.json
|
|
|
102
132
|
|
|
103
133
|
## Step 9 — Remind to restart
|
|
104
134
|
|
|
105
|
-
Tell the user:
|
|
106
135
|
```
|
|
107
136
|
GSP updated to v{latest}.
|
|
108
|
-
Restart your
|
|
137
|
+
Restart your session to load the new skills and agents.
|
|
109
138
|
```
|
|
110
139
|
|
|
111
140
|
</process>
|
package/package.json
CHANGED