get-shit-pretty 0.2.0 → 0.4.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/LICENSE +21 -0
- package/README.md +15 -9
- package/agents/{gsp-accessibility-auditor.md → gsp-auditor.md} +17 -14
- package/agents/gsp-brand-auditor.md +97 -0
- package/agents/gsp-brand-strategist.md +64 -27
- package/agents/{gsp-design-engineer.md → gsp-builder.md} +12 -9
- package/agents/gsp-campaign-director.md +50 -11
- package/agents/gsp-codebase-scanner.md +171 -0
- package/agents/gsp-critic.md +18 -13
- package/agents/gsp-designer.md +126 -0
- package/agents/gsp-identity-designer.md +90 -0
- package/agents/gsp-project-researcher.md +102 -0
- package/agents/gsp-researcher.md +54 -18
- package/agents/gsp-reviewer.md +66 -0
- package/agents/gsp-scoper.md +103 -0
- package/agents/gsp-system-architect.md +91 -26
- package/agents/gsp-verbal-strategist.md +84 -0
- package/bin/install.js +161 -5
- package/commands/gsp/brand-audit.md +116 -0
- package/commands/gsp/brand-discover.md +17 -0
- package/commands/gsp/brand-identity.md +200 -0
- package/commands/gsp/brand-patterns.md +223 -0
- package/commands/gsp/brand-research.md +99 -0
- package/commands/gsp/brand-strategy.md +140 -0
- package/commands/gsp/brand-system.md +17 -0
- package/commands/gsp/brand-verbal.md +94 -0
- package/commands/gsp/brand.md +9 -83
- package/commands/gsp/brief.md +142 -0
- package/commands/gsp/build.md +49 -41
- package/commands/gsp/critique.md +140 -0
- package/commands/gsp/design.md +65 -50
- package/commands/gsp/discover.md +17 -0
- package/commands/gsp/doctor.md +319 -0
- package/commands/gsp/help.md +85 -38
- package/commands/gsp/identity.md +18 -0
- package/commands/gsp/launch.md +55 -35
- package/commands/gsp/new-project.md +5 -86
- package/commands/gsp/new.md +237 -0
- package/commands/gsp/plan.md +18 -0
- package/commands/gsp/progress.md +58 -26
- package/commands/gsp/research.md +91 -34
- package/commands/gsp/review.md +115 -59
- package/commands/gsp/strategy.md +18 -0
- package/commands/gsp/system.md +8 -65
- package/commands/gsp/update.md +102 -0
- package/commands/gsp/verbal.md +18 -0
- package/package.json +2 -2
- package/prompts/01-design-system-architect.md +35 -3
- package/prompts/03-ui-ux-pattern-master.md +11 -1
- package/prompts/09-design-to-code-translator.md +9 -0
- package/prompts/10-project-scoper.md +51 -0
- package/prompts/11-deliverable-reviewer.md +58 -0
- package/prompts/12-project-researcher.md +57 -0
- package/references/brand-archetypes.md +151 -0
- package/references/brand-prism.md +138 -0
- package/references/chunk-format.md +48 -0
- package/references/design-trends.md +47 -0
- package/references/positioning-frameworks.md +197 -0
- package/references/questioning.md +1 -1
- package/references/trends/aurora-gradients.md +245 -0
- package/references/trends/bento-grid.md +473 -0
- package/references/trends/claymorphism.md +232 -0
- package/references/trends/dark-mode-oled.md +282 -0
- package/references/trends/glassmorphism.md +455 -0
- package/references/trends/kinetic-typography.md +277 -0
- package/references/trends/liquid-glass.md +236 -0
- package/references/trends/micro-interactions.md +307 -0
- package/references/trends/neubrutalism.md +276 -0
- package/references/voice-tone.md +193 -0
- package/scripts/gsp-statusline.js +1 -1
- package/templates/branding/brief.md +74 -0
- package/templates/branding/config.json +26 -0
- package/templates/branding/roadmap.md +43 -0
- package/templates/branding/state.md +29 -0
- package/templates/changelog.md +4 -0
- package/templates/codebase-inventory.md +71 -0
- package/templates/exports-index.md +93 -0
- package/templates/manifest.md +19 -0
- package/templates/phases/brief.md +53 -0
- package/templates/phases/build.md +24 -48
- package/templates/phases/critique.md +68 -0
- package/templates/phases/design.md +54 -32
- package/templates/phases/discover.md +60 -0
- package/templates/phases/identity.md +78 -0
- package/templates/phases/launch.md +48 -55
- package/templates/phases/research.md +75 -47
- package/templates/phases/review.md +27 -75
- package/templates/phases/strategy.md +67 -0
- package/templates/phases/system.md +84 -78
- package/templates/phases/verbal.md +63 -0
- package/templates/{project.md → projects/brief.md} +13 -17
- package/templates/projects/config.json +32 -0
- package/templates/projects/roadmap.md +59 -0
- package/templates/{state.md → projects/state.md} +19 -9
- package/agents/gsp-spec-engineer.md +0 -121
- package/agents/gsp-ui-designer.md +0 -59
- package/commands/gsp/spec.md +0 -88
- package/templates/config.json +0 -26
- package/templates/phases/brand.md +0 -60
- package/templates/phases/spec.md +0 -46
- package/templates/roadmap.md +0 -62
|
@@ -1,27 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gsp-system-architect
|
|
3
|
-
description: Builds complete design systems with foundations, components, and tokens. Spawned by /gsp:system.
|
|
3
|
+
description: Builds complete design systems with foundations, components, and tokens. Spawned by /gsp:brand-system.
|
|
4
4
|
tools: Read, Write, Bash
|
|
5
5
|
color: magenta
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<role>
|
|
9
|
-
You are a GSP system architect spawned by `/gsp:system`.
|
|
9
|
+
You are a GSP system architect spawned by `/gsp:brand-system`.
|
|
10
10
|
|
|
11
11
|
Act as Apple Principal Designer. Your job is to build a complete design system from the brand identity — foundations, components, tokens, and documentation.
|
|
12
12
|
|
|
13
|
-
The system should be production-ready: every value specified, every state defined, every token exported.
|
|
13
|
+
The system is created once per brand and reused across all projects. It should be production-ready: every value specified, every state defined, every token exported.
|
|
14
14
|
</role>
|
|
15
15
|
|
|
16
|
+
<inputs>
|
|
17
|
+
- Identity chunks + palettes.json
|
|
18
|
+
- BRIEF.md
|
|
19
|
+
- Strategy + verbal chunks (for principles)
|
|
20
|
+
- system_strategy and tech_stack from config.json
|
|
21
|
+
- Execution mode: "foundations" | "components" | "full" (default: full for backward compat)
|
|
22
|
+
- Confirmed component scope (for components mode)
|
|
23
|
+
- Output path
|
|
24
|
+
</inputs>
|
|
25
|
+
|
|
16
26
|
<methodology>
|
|
17
27
|
## System Building Process
|
|
18
28
|
|
|
19
|
-
1. **Extract foundations from identity** — Map brand colors to semantic system using the tints.dev palettes from
|
|
29
|
+
1. **Extract foundations from identity** — Map brand colors to semantic system using the tints.dev palettes from the brand's `identity/palettes.json` (generated by [tints.dev](https://tints.dev) by [Simeon Griggs](https://github.com/SimeonGriggs/tints.dev)). Use the 11-stop OKLCH scales as the color foundation for tokens. Establish type scale from brand typography
|
|
20
30
|
2. **Define grid and spacing** — 12-column grid, 8px base spacing system
|
|
21
31
|
3. **Build component library** — 30+ components with all states, anatomy, usage rules
|
|
22
32
|
4. **Export tokens** — Machine-readable JSON following W3C Design Tokens format
|
|
23
33
|
5. **Document principles** — Design principles derived from brand and usage patterns
|
|
24
34
|
|
|
35
|
+
## Execution Mode
|
|
36
|
+
- **foundations** — write foundations/, principles.md, tokens.json (foundations only). Stop.
|
|
37
|
+
- **components** — read existing foundations/, write components/, update tokens.json, write INDEX.md.
|
|
38
|
+
- **full** — both passes (backward compatibility).
|
|
39
|
+
|
|
40
|
+
## System Strategy
|
|
41
|
+
|
|
42
|
+
Read `system_strategy` from brand config's `system_config`:
|
|
43
|
+
|
|
44
|
+
**GENERATE** — Full system from scratch. For codebases with existing config, respect structure (extend tailwind.config, not replace).
|
|
45
|
+
|
|
46
|
+
**EXTEND** — Evolve existing system: audit tokens, classify components (KEEP/RESTYLE/REFACTOR/REPLACE), design only net-new, output delta tokens, preserve naming.
|
|
47
|
+
|
|
48
|
+
**REFACTOR** — Redesign from ground up informed by existing: understand current system, design complete new system, produce migration mapping, flag breaking changes.
|
|
49
|
+
|
|
25
50
|
## Quality Standards
|
|
26
51
|
- All colors must include contrast ratios against common backgrounds
|
|
27
52
|
- Typography scale must support Dynamic Type / responsive scaling
|
|
@@ -31,26 +56,66 @@ The system should be production-ready: every value specified, every state define
|
|
|
31
56
|
</methodology>
|
|
32
57
|
|
|
33
58
|
<output>
|
|
34
|
-
Write
|
|
35
|
-
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
-
|
|
59
|
+
Write your design system as chunks to the brand's system directory (path provided by the command that spawned you):
|
|
60
|
+
|
|
61
|
+
### Foundation chunks
|
|
62
|
+
|
|
63
|
+
Write to `system/foundations/`, each following `references/chunk-format.md`:
|
|
64
|
+
|
|
65
|
+
1. **`foundations/color-system.md`** (~100-150 lines) — Primary, secondary, semantic (error, success, warning, info), neutral scale, dark mode mapping, contrast ratios
|
|
66
|
+
2. **`foundations/typography.md`** — 9 levels (Display → Overline) with size, weight, line height, letter spacing, usage
|
|
67
|
+
3. **`foundations/spacing.md`** — 8px base: 4, 8, 12, 16, 24, 32, 48, 64, 96
|
|
68
|
+
4. **`foundations/grid.md`** — 12-column with gutters, margins, breakpoints
|
|
69
|
+
5. **`foundations/elevation.md`** — 5 shadow levels with use cases and values
|
|
70
|
+
6. **`foundations/border-radius.md`** — Token scale (none, sm, md, lg, xl, full)
|
|
71
|
+
|
|
72
|
+
### Component chunks
|
|
73
|
+
|
|
74
|
+
Write to `system/components/`, one file per component (~50 lines each):
|
|
75
|
+
|
|
76
|
+
Each component chunk includes: states (default, hover, active, disabled, focus, loading), anatomy, usage rules, accessibility spec, code hints.
|
|
77
|
+
|
|
78
|
+
**Naming:** singular, kebab-case, lowercase. "Buttons" → `button.md`, "Date Picker" → `date-picker.md`
|
|
79
|
+
|
|
80
|
+
Component chunks cross-reference the foundations they use (e.g., button.md links to `../foundations/color-system.md`, `../foundations/typography.md`).
|
|
81
|
+
|
|
82
|
+
### Other files
|
|
83
|
+
|
|
84
|
+
- **`principles.md`** — 3-5 design principles + do's and don'ts
|
|
85
|
+
- **`tokens.json`** — Complete W3C Design Tokens format JSON (color, typography, spacing, shadow, border-radius, breakpoint tokens)
|
|
86
|
+
|
|
87
|
+
### `INDEX.md`
|
|
88
|
+
|
|
89
|
+
After writing all chunks and tokens.json, write `INDEX.md` in the system directory:
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
# System
|
|
93
|
+
> Phase: system | Brand: {name} | Generated: {DATE}
|
|
94
|
+
|
|
95
|
+
## Foundations
|
|
96
|
+
|
|
97
|
+
| Chunk | File | ~Lines |
|
|
98
|
+
|-------|------|--------|
|
|
99
|
+
| Color System | [color-system.md](./foundations/color-system.md) | ~{N} |
|
|
100
|
+
| Typography | [typography.md](./foundations/typography.md) | ~{N} |
|
|
101
|
+
| Spacing | [spacing.md](./foundations/spacing.md) | ~{N} |
|
|
102
|
+
| Grid | [grid.md](./foundations/grid.md) | ~{N} |
|
|
103
|
+
| Elevation | [elevation.md](./foundations/elevation.md) | ~{N} |
|
|
104
|
+
| Border Radius | [border-radius.md](./foundations/border-radius.md) | ~{N} |
|
|
105
|
+
|
|
106
|
+
## Components
|
|
107
|
+
|
|
108
|
+
| Component | File | States | Variants |
|
|
109
|
+
|-----------|------|--------|----------|
|
|
110
|
+
| Button | [button.md](./components/button.md) | default, hover, active, disabled, focus, loading | primary, secondary, ghost, destructive |
|
|
111
|
+
| ... | ... | ... | ... |
|
|
112
|
+
|
|
113
|
+
## Other
|
|
114
|
+
|
|
115
|
+
| File | Description |
|
|
116
|
+
|------|-------------|
|
|
117
|
+
| [principles.md](./principles.md) | Design principles and do's/don'ts |
|
|
118
|
+
| [tokens.json](./tokens.json) | W3C Design Tokens |
|
|
119
|
+
```
|
|
120
|
+
</output>
|
|
56
121
|
</output>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsp-verbal-strategist
|
|
3
|
+
description: Creates verbal identity — voice, tone, messaging, and nomenclature. Spawned by /gsp:brand-verbal.
|
|
4
|
+
tools: Read, Write, Bash, WebSearch, WebFetch
|
|
5
|
+
color: magenta
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<role>
|
|
9
|
+
You are a GSP verbal strategist spawned by `/gsp:brand-verbal`.
|
|
10
|
+
|
|
11
|
+
Act as Head of Verbal Identity at a top branding agency. You translate brand strategy into words — defining how the brand speaks, what it says, and how it adapts across contexts.
|
|
12
|
+
|
|
13
|
+
You receive the brand strategy (archetype, prism, positioning) and create a complete verbal identity system.
|
|
14
|
+
</role>
|
|
15
|
+
|
|
16
|
+
<inputs>
|
|
17
|
+
- Strategy chunks (all 6)
|
|
18
|
+
- BRIEF.md (audience context)
|
|
19
|
+
- User-confirmed voice direction
|
|
20
|
+
- Audit brand-inventory.md voice samples (if exist)
|
|
21
|
+
- Output path
|
|
22
|
+
</inputs>
|
|
23
|
+
|
|
24
|
+
<methodology>
|
|
25
|
+
## Verbal Identity Process
|
|
26
|
+
|
|
27
|
+
1. **Absorb strategy** — Read strategy chunks (or STRATEGY.md fallback) for archetype, prism personality, brand platform values, positioning. These inform every verbal decision.
|
|
28
|
+
2. **Define Brand Voice** — 3-5 voice attributes, each with "means / doesn't mean" and concrete examples. Voice must reflect the archetype and prism personality.
|
|
29
|
+
3. **Map Tone Spectrum** — Plot default position on 5 scales (formal↔casual, serious↔playful, authoritative↔friendly, technical↔simple, reserved↔enthusiastic). Then show how tone shifts across 8-10 contexts.
|
|
30
|
+
4. **Build Voice Chart** — Do/Don't table for each voice attribute with real writing examples. Include grammar and style rules (contractions, emoji, exclamation marks, etc.).
|
|
31
|
+
5. **Create Messaging Matrix** — Key messages by audience segment with tone shifts, proof points, and priority channels.
|
|
32
|
+
6. **Write Brand Narrative** — 4-part story arc (Setup → Tension → Resolution → Transformation). Also craft the origin story if relevant.
|
|
33
|
+
7. **Develop Tagline Directions** — 3 distinct tagline directions with rationale and best-use context.
|
|
34
|
+
8. **Define Nomenclature** — Naming conventions for products, features, plans/tiers. Naming principles. Terminology guide (use/don't use).
|
|
35
|
+
|
|
36
|
+
## Quality Standards
|
|
37
|
+
- Voice attributes must be specific enough that two writers would produce similar-sounding content
|
|
38
|
+
- Do/Don't examples must use real sentences, not abstract descriptions
|
|
39
|
+
- Tone spectrum positions must be justified by the archetype and audience
|
|
40
|
+
- Messaging matrix must cover at least 3 audience segments
|
|
41
|
+
- Tagline directions must be genuinely different approaches, not variations of one idea
|
|
42
|
+
- Nomenclature must be testable — someone should be able to name a new feature using these rules
|
|
43
|
+
- Every decision traces back to strategy: "We chose X because our archetype is Y and our audience values Z"
|
|
44
|
+
</methodology>
|
|
45
|
+
|
|
46
|
+
<references>
|
|
47
|
+
Use this reference file for framework details:
|
|
48
|
+
- `references/voice-tone.md` — Voice attribute framework, tone spectrum, voice chart examples, messaging matrix
|
|
49
|
+
</references>
|
|
50
|
+
|
|
51
|
+
<output>
|
|
52
|
+
Write your verbal identity as chunks to the brand's verbal directory (path provided by the command that spawned you):
|
|
53
|
+
|
|
54
|
+
### Chunk files
|
|
55
|
+
|
|
56
|
+
Write each chunk following the format in `references/chunk-format.md`:
|
|
57
|
+
|
|
58
|
+
1. **`brand-voice.md`** — 3-5 attributes with means/doesn't mean/examples
|
|
59
|
+
2. **`tone-spectrum.md`** — 5 scales with default position + context-based shifts
|
|
60
|
+
3. **`voice-chart.md`** — Do/Don't per attribute with real examples + grammar/style rules
|
|
61
|
+
4. **`messaging-matrix.md`** — Messages by audience segment with tone, proof points, channels
|
|
62
|
+
5. **`brand-narrative.md`** — Origin story + 4-part story arc
|
|
63
|
+
6. **`tagline-directions.md`** — 3 directions with rationale
|
|
64
|
+
7. **`nomenclature.md`** — Naming conventions, principles, terminology guide
|
|
65
|
+
|
|
66
|
+
### `INDEX.md`
|
|
67
|
+
|
|
68
|
+
After writing all chunks, write `INDEX.md` in the verbal directory:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
# Verbal
|
|
72
|
+
> Phase: verbal | Brand: {name} | Generated: {DATE}
|
|
73
|
+
|
|
74
|
+
| Chunk | File | ~Lines |
|
|
75
|
+
|-------|------|--------|
|
|
76
|
+
| Brand Voice | [brand-voice.md](./brand-voice.md) | ~{N} |
|
|
77
|
+
| Tone Spectrum | [tone-spectrum.md](./tone-spectrum.md) | ~{N} |
|
|
78
|
+
| Voice Chart | [voice-chart.md](./voice-chart.md) | ~{N} |
|
|
79
|
+
| Messaging Matrix | [messaging-matrix.md](./messaging-matrix.md) | ~{N} |
|
|
80
|
+
| Brand Narrative | [brand-narrative.md](./brand-narrative.md) | ~{N} |
|
|
81
|
+
| Tagline Directions | [tagline-directions.md](./tagline-directions.md) | ~{N} |
|
|
82
|
+
| Nomenclature | [nomenclature.md](./nomenclature.md) | ~{N} |
|
|
83
|
+
```
|
|
84
|
+
</output>
|
package/bin/install.js
CHANGED
|
@@ -9,6 +9,8 @@ const readline = require('readline');
|
|
|
9
9
|
const cyan = '\x1b[36m';
|
|
10
10
|
const green = '\x1b[32m';
|
|
11
11
|
const yellow = '\x1b[33m';
|
|
12
|
+
const magenta = '\x1b[35m';
|
|
13
|
+
const bold = '\x1b[1m';
|
|
12
14
|
const dim = '\x1b[2m';
|
|
13
15
|
const reset = '\x1b[0m';
|
|
14
16
|
|
|
@@ -26,6 +28,7 @@ const hasCodex = args.includes('--codex');
|
|
|
26
28
|
const hasAll = args.includes('--all');
|
|
27
29
|
const hasUninstall = args.includes('--uninstall') || args.includes('-u');
|
|
28
30
|
const hasHelp = args.includes('--help') || args.includes('-h');
|
|
31
|
+
const hasQuiet = args.includes('--quiet') || args.includes('-q');
|
|
29
32
|
const forceStatusline = args.includes('--force-statusline');
|
|
30
33
|
|
|
31
34
|
// Runtime selection
|
|
@@ -63,6 +66,19 @@ function parseConfigDirArg() {
|
|
|
63
66
|
}
|
|
64
67
|
const explicitConfigDir = parseConfigDirArg();
|
|
65
68
|
|
|
69
|
+
// Taglines
|
|
70
|
+
const taglines = [
|
|
71
|
+
'opinionated design systems, packaged for agents.',
|
|
72
|
+
'because "looks like AI made it" is becoming a genre.',
|
|
73
|
+
'strategy first. pixels second. ship it pretty.',
|
|
74
|
+
'teach your agent what good design looks like.',
|
|
75
|
+
'design systems that agents can actually follow.',
|
|
76
|
+
'your codebase called. it wants a design system.',
|
|
77
|
+
'stop shipping defaults. start shipping taste.',
|
|
78
|
+
'same system, different themes, different products.',
|
|
79
|
+
];
|
|
80
|
+
const tagline = taglines[Math.floor(Math.random() * taglines.length)];
|
|
81
|
+
|
|
66
82
|
// Banner
|
|
67
83
|
const banner = '\n' +
|
|
68
84
|
cyan + ' ██████╗ ███████╗██████╗\n' +
|
|
@@ -72,9 +88,8 @@ const banner = '\n' +
|
|
|
72
88
|
' ╚██████╔╝███████║██║\n' +
|
|
73
89
|
' ╚═════╝ ╚══════╝╚═╝' + reset + '\n' +
|
|
74
90
|
'\n' +
|
|
75
|
-
' Get Shit Pretty ' + dim + 'v' + pkg.version + reset + '\n' +
|
|
76
|
-
'
|
|
77
|
-
' OpenCode, Gemini, and Codex.\n';
|
|
91
|
+
' ' + bold + 'Get Shit Pretty' + reset + ' ' + dim + 'v' + pkg.version + reset + '\n' +
|
|
92
|
+
' ' + dim + tagline + reset + '\n';
|
|
78
93
|
|
|
79
94
|
console.log(banner);
|
|
80
95
|
|
|
@@ -92,6 +107,7 @@ if (hasHelp) {
|
|
|
92
107
|
${cyan}-u, --uninstall${reset} Uninstall GSP (remove GSP files only)
|
|
93
108
|
${cyan}-c, --config-dir <path>${reset} Specify custom config directory
|
|
94
109
|
${cyan}--force-statusline${reset} Replace existing statusline config
|
|
110
|
+
${cyan}-q, --quiet${reset} Skip onboarding message
|
|
95
111
|
${cyan}-h, --help${reset} Show this help message
|
|
96
112
|
|
|
97
113
|
${yellow}Examples:${reset}
|
|
@@ -621,6 +637,109 @@ function copyWithPathReplacement(srcDir, destDir, pathPrefix, runtime, isCommand
|
|
|
621
637
|
}
|
|
622
638
|
}
|
|
623
639
|
|
|
640
|
+
/**
|
|
641
|
+
* Check if we're running a local install inside the GSP source repo.
|
|
642
|
+
* When true, we symlink instead of copying so edits to agents/ and commands/
|
|
643
|
+
* are immediately reflected in .claude/ — no sync needed.
|
|
644
|
+
*/
|
|
645
|
+
function isGspSourceRepo(dir) {
|
|
646
|
+
try {
|
|
647
|
+
const p = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'));
|
|
648
|
+
return p.name === 'get-shit-pretty';
|
|
649
|
+
} catch { return false; }
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Create a symlink, removing any existing file/symlink at the destination.
|
|
654
|
+
*/
|
|
655
|
+
function forceSymlink(target, linkPath) {
|
|
656
|
+
try { fs.unlinkSync(linkPath); } catch {}
|
|
657
|
+
fs.symlinkSync(target, linkPath);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Install using symlinks for Claude Code local installs in the GSP source repo.
|
|
662
|
+
* Returns true if symlink install was performed, false if caller should fall back to copy.
|
|
663
|
+
*/
|
|
664
|
+
function installLocalSymlinks(targetDir, src) {
|
|
665
|
+
const cwd = process.cwd();
|
|
666
|
+
if (!isGspSourceRepo(cwd)) return false;
|
|
667
|
+
|
|
668
|
+
const failures = [];
|
|
669
|
+
|
|
670
|
+
// ── Agent symlinks (per-file, since agents/ dir is shared with other tools) ──
|
|
671
|
+
const agentsDest = path.join(targetDir, 'agents');
|
|
672
|
+
fs.mkdirSync(agentsDest, { recursive: true });
|
|
673
|
+
|
|
674
|
+
// Clean old GSP agent files/symlinks
|
|
675
|
+
for (const file of fs.readdirSync(agentsDest)) {
|
|
676
|
+
if (file.startsWith('gsp-') && file.endsWith('.md')) {
|
|
677
|
+
fs.unlinkSync(path.join(agentsDest, file));
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
const agentsSrc = path.join(cwd, 'agents');
|
|
682
|
+
let agentCount = 0;
|
|
683
|
+
for (const file of fs.readdirSync(agentsSrc)) {
|
|
684
|
+
if (file.startsWith('gsp-') && file.endsWith('.md')) {
|
|
685
|
+
forceSymlink(path.join('..', '..', 'agents', file), path.join(agentsDest, file));
|
|
686
|
+
agentCount++;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
if (agentCount > 0) {
|
|
690
|
+
console.log(` ${green}+${reset} Symlinked ${agentCount} agents`);
|
|
691
|
+
} else { failures.push('agents'); }
|
|
692
|
+
|
|
693
|
+
// ── Command symlink (whole gsp/ directory) ──
|
|
694
|
+
const commandsDir = path.join(targetDir, 'commands');
|
|
695
|
+
fs.mkdirSync(commandsDir, { recursive: true });
|
|
696
|
+
const gspCommandsDest = path.join(commandsDir, 'gsp');
|
|
697
|
+
try { fs.rmSync(gspCommandsDest, { recursive: true }); } catch {}
|
|
698
|
+
forceSymlink(path.join('..', '..', 'commands', 'gsp'), gspCommandsDest);
|
|
699
|
+
console.log(` ${green}+${reset} Symlinked commands/gsp`);
|
|
700
|
+
|
|
701
|
+
// ── Bundle symlinks (prompts, templates, references → get-shit-pretty/) ──
|
|
702
|
+
const bundleDest = path.join(targetDir, 'get-shit-pretty');
|
|
703
|
+
if (fs.existsSync(bundleDest)) {
|
|
704
|
+
fs.rmSync(bundleDest, { recursive: true });
|
|
705
|
+
}
|
|
706
|
+
fs.mkdirSync(bundleDest, { recursive: true });
|
|
707
|
+
|
|
708
|
+
for (const dir of ['prompts', 'templates', 'references']) {
|
|
709
|
+
if (fs.existsSync(path.join(cwd, dir))) {
|
|
710
|
+
forceSymlink(path.join('..', '..', dir), path.join(bundleDest, dir));
|
|
711
|
+
console.log(` ${green}+${reset} Symlinked get-shit-pretty/${dir}`);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
// VERSION is a real file (not in source repo as a standalone file)
|
|
716
|
+
fs.writeFileSync(path.join(bundleDest, 'VERSION'), pkg.version);
|
|
717
|
+
console.log(` ${green}+${reset} Wrote VERSION (${pkg.version})`);
|
|
718
|
+
|
|
719
|
+
// ── Statusline ──
|
|
720
|
+
const hooksDest = path.join(targetDir, 'hooks');
|
|
721
|
+
fs.mkdirSync(hooksDest, { recursive: true });
|
|
722
|
+
const statuslineSrc = path.join(src, 'scripts', 'gsp-statusline.js');
|
|
723
|
+
if (fs.existsSync(statuslineSrc)) {
|
|
724
|
+
let content = fs.readFileSync(statuslineSrc, 'utf8');
|
|
725
|
+
content = content.replace(/'\.claude'/g, getConfigDirFromHome('claude', false));
|
|
726
|
+
fs.writeFileSync(path.join(hooksDest, 'gsp-statusline.js'), content);
|
|
727
|
+
console.log(` ${green}+${reset} Installed GSP statusline`);
|
|
728
|
+
}
|
|
729
|
+
const dispatcherSrc = path.join(src, 'scripts', 'statusline-dispatcher.js');
|
|
730
|
+
if (fs.existsSync(dispatcherSrc)) {
|
|
731
|
+
fs.copyFileSync(dispatcherSrc, path.join(hooksDest, 'statusline-dispatcher.js'));
|
|
732
|
+
console.log(` ${green}+${reset} Installed statusline dispatcher`);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
if (failures.length > 0) {
|
|
736
|
+
console.error(`\n ${yellow}Installation incomplete!${reset} Failed: ${failures.join(', ')}`);
|
|
737
|
+
process.exit(1);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
return true;
|
|
741
|
+
}
|
|
742
|
+
|
|
624
743
|
function verifyInstalled(dirPath, description) {
|
|
625
744
|
if (!fs.existsSync(dirPath)) {
|
|
626
745
|
console.error(` ${yellow}!${reset} Failed to install ${description}: directory not created`);
|
|
@@ -664,6 +783,15 @@ function install(isGlobal, runtime = 'claude') {
|
|
|
664
783
|
const runtimeLabel = getRuntimeLabel(runtime);
|
|
665
784
|
console.log(` Installing for ${cyan}${runtimeLabel}${reset} to ${cyan}${locationLabel}${reset}\n`);
|
|
666
785
|
|
|
786
|
+
// Local Claude install in GSP source repo → use symlinks
|
|
787
|
+
if (!isGlobal && runtime === 'claude' && installLocalSymlinks(targetDir, src)) {
|
|
788
|
+
console.log(` ${dim}(symlinked — edits to agents/ and commands/ are reflected immediately)${reset}`);
|
|
789
|
+
const settingsPath = path.join(targetDir, 'settings.json');
|
|
790
|
+
const settings = readSettings(settingsPath);
|
|
791
|
+
const statuslineCommand = `node ${dirName}/hooks/statusline-dispatcher.js`;
|
|
792
|
+
return { settingsPath, settings, statuslineCommand, runtime };
|
|
793
|
+
}
|
|
794
|
+
|
|
667
795
|
const failures = [];
|
|
668
796
|
|
|
669
797
|
// ── Commands ──
|
|
@@ -949,6 +1077,8 @@ function handleStatusline(settings, isInteractive, callback) {
|
|
|
949
1077
|
});
|
|
950
1078
|
}
|
|
951
1079
|
|
|
1080
|
+
let onboardingShown = false;
|
|
1081
|
+
|
|
952
1082
|
function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, runtime = 'claude', isGlobal = true) {
|
|
953
1083
|
const isOpencode = runtime === 'opencode';
|
|
954
1084
|
const isCodex = runtime === 'codex';
|
|
@@ -968,8 +1098,34 @@ function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallS
|
|
|
968
1098
|
}
|
|
969
1099
|
|
|
970
1100
|
const runtimeLabel = getRuntimeLabel(runtime);
|
|
971
|
-
const
|
|
972
|
-
|
|
1101
|
+
const helpCmd = isOpencode ? '/gsp-help' : isCodex ? '$gsp-help' : '/gsp:help';
|
|
1102
|
+
const newCmd = isOpencode ? '/gsp-new' : isCodex ? '$gsp-new' : '/gsp:new';
|
|
1103
|
+
const brandCmd = isOpencode ? '/gsp-brand' : isCodex ? '$gsp-brand' : '/gsp:brand';
|
|
1104
|
+
console.log(`\n ${green}Done!${reset} GSP installed for ${cyan}${runtimeLabel}${reset}.`);
|
|
1105
|
+
|
|
1106
|
+
// Show onboarding once (not per-runtime)
|
|
1107
|
+
if (!onboardingShown && !hasQuiet) {
|
|
1108
|
+
onboardingShown = true;
|
|
1109
|
+
console.log(`
|
|
1110
|
+
${dim}┌──────────────────────────────────────────────────────┐${reset}
|
|
1111
|
+
${dim}│${reset} ${dim}│${reset}
|
|
1112
|
+
${dim}│${reset} ${bold}The idea${reset} ${dim}│${reset}
|
|
1113
|
+
${dim}│${reset} ${dim}│${reset}
|
|
1114
|
+
${dim}│${reset} GSP is a design system your agent can follow. ${dim}│${reset}
|
|
1115
|
+
${dim}│${reset} Research before pixels. Brand before screens. ${dim}│${reset}
|
|
1116
|
+
${dim}│${reset} Two pipelines, both opinionated: ${dim}│${reset}
|
|
1117
|
+
${dim}│${reset} ${dim}│${reset}
|
|
1118
|
+
${dim}│${reset} ${magenta}◇${reset} ${bold}Brand${reset} discover → strategy → identity ${dim}│${reset}
|
|
1119
|
+
${dim}│${reset} ${cyan}◇${reset} ${bold}Project${reset} brief → design → build → review ${dim}│${reset}
|
|
1120
|
+
${dim}│${reset} ${dim}│${reset}
|
|
1121
|
+
${dim}│${reset} ${yellow}Start here:${reset} ${dim}│${reset}
|
|
1122
|
+
${dim}│${reset} ${cyan}${newCmd}${reset} new project ${dim}│${reset}
|
|
1123
|
+
${dim}│${reset} ${cyan}${brandCmd}${reset} brand identity ${dim}│${reset}
|
|
1124
|
+
${dim}│${reset} ${cyan}${helpCmd}${reset} all commands ${dim}│${reset}
|
|
1125
|
+
${dim}│${reset} ${dim}│${reset}
|
|
1126
|
+
${dim}└──────────────────────────────────────────────────────┘${reset}
|
|
1127
|
+
`);
|
|
1128
|
+
}
|
|
973
1129
|
}
|
|
974
1130
|
|
|
975
1131
|
// ──────────────────────────────────────────────────────
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsp:brand-audit
|
|
3
|
+
description: Audit existing brand — assess coherence, market fit, equity, evolution map
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- Task
|
|
9
|
+
- WebSearch
|
|
10
|
+
- WebFetch
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
---
|
|
13
|
+
<context>
|
|
14
|
+
Phase 0 of the GSP branding diamond. Optional — only runs when evolving an existing brand. Produces a structured audit document consumed by all downstream phases.
|
|
15
|
+
|
|
16
|
+
When a user has an established brand and wants to refresh, modernize, or evolve it, this command gathers existing assets, spawns an auditor agent, and produces an evolution map that guides every subsequent phase.
|
|
17
|
+
</context>
|
|
18
|
+
|
|
19
|
+
<objective>
|
|
20
|
+
Audit an existing brand identity. Produce a structured audit document that downstream phases consume as baseline context — research knows what to validate, strategy knows what to evaluate, identity knows what to preserve/evolve.
|
|
21
|
+
|
|
22
|
+
**Input:** Existing brand assets + `.design/branding/{brand}/BRIEF.md`
|
|
23
|
+
**Output:** `.design/branding/{brand}/audit/` (5 chunks + INDEX.md)
|
|
24
|
+
**Agent:** `gsp-brand-auditor`
|
|
25
|
+
</objective>
|
|
26
|
+
|
|
27
|
+
<execution_context>
|
|
28
|
+
@/Users/jubs/.claude/get-shit-pretty/templates/phases/discover.md
|
|
29
|
+
@/Users/jubs/.claude/get-shit-pretty/references/chunk-format.md
|
|
30
|
+
</execution_context>
|
|
31
|
+
|
|
32
|
+
<process>
|
|
33
|
+
## Step 1: Resolve brand
|
|
34
|
+
|
|
35
|
+
Scan `.design/branding/` for brand directories. If only one brand exists, use it. If multiple, ask the user which brand to work on.
|
|
36
|
+
|
|
37
|
+
Set `BRAND_PATH` = `.design/branding/{brand}`
|
|
38
|
+
|
|
39
|
+
Read `{BRAND_PATH}/BRIEF.md` to understand the brand's aspirational direction.
|
|
40
|
+
Read `{BRAND_PATH}/config.json` to confirm `brand_mode` is `evolve` and get `evolution_scope`.
|
|
41
|
+
|
|
42
|
+
If BRAND_PATH doesn't exist, tell the user to run `/gsp:new` first.
|
|
43
|
+
|
|
44
|
+
## Step 2: Gather existing brand assets (interactive)
|
|
45
|
+
|
|
46
|
+
Present what you can work with:
|
|
47
|
+
|
|
48
|
+
"Show me what you've got. I can work with:
|
|
49
|
+
- Brand guidelines (PDF, Figma, URL)
|
|
50
|
+
- Colors (hex codes, palette screenshots)
|
|
51
|
+
- Typography (font names, type scale)
|
|
52
|
+
- Logo (description, files)
|
|
53
|
+
- Voice/tone (guidelines, writing samples)
|
|
54
|
+
- Taglines, messaging, positioning statements
|
|
55
|
+
|
|
56
|
+
Share whatever you have — I'll audit it all."
|
|
57
|
+
|
|
58
|
+
Accept whatever format the user provides. Infer from partial info. If they share URLs, use WebFetch to pull content. If they describe assets in prose, extract structured data from their descriptions.
|
|
59
|
+
|
|
60
|
+
Gather until you have enough to audit. Don't over-ask — work with what's given.
|
|
61
|
+
|
|
62
|
+
## Step 3: Spawn brand auditor
|
|
63
|
+
|
|
64
|
+
Create the audit output directory:
|
|
65
|
+
```bash
|
|
66
|
+
mkdir -p {BRAND_PATH}/audit
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Spawn the `gsp-brand-auditor` agent with:
|
|
70
|
+
- All gathered assets/descriptions
|
|
71
|
+
- BRIEF.md content (for aspirational direction)
|
|
72
|
+
- config.json evolution_scope (preserve/evolve/replace)
|
|
73
|
+
- **Output path:** `{BRAND_PATH}/audit/`
|
|
74
|
+
|
|
75
|
+
The agent writes chunks directly to the audit directory:
|
|
76
|
+
1. `brand-inventory.md`
|
|
77
|
+
2. `coherence-assessment.md`
|
|
78
|
+
3. `market-fit.md`
|
|
79
|
+
4. `equity-analysis.md`
|
|
80
|
+
5. `evolution-map.md`
|
|
81
|
+
6. `INDEX.md`
|
|
82
|
+
|
|
83
|
+
## Step 4: Present audit findings (interactive)
|
|
84
|
+
|
|
85
|
+
Read the audit outputs and present key findings:
|
|
86
|
+
|
|
87
|
+
"Here's where your brand stands: {summary}
|
|
88
|
+
|
|
89
|
+
Strongest elements: {list} — I'd preserve these
|
|
90
|
+
Weakest elements: {list} — these need work
|
|
91
|
+
Evolution recommendation: {direction}"
|
|
92
|
+
|
|
93
|
+
Let the user confirm or adjust what to preserve vs evolve vs replace.
|
|
94
|
+
|
|
95
|
+
Update `evolution_scope` in `{BRAND_PATH}/config.json` with confirmed decisions:
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"evolution_scope": {
|
|
99
|
+
"preserve": ["confirmed elements"],
|
|
100
|
+
"evolve": ["confirmed elements"],
|
|
101
|
+
"replace": ["confirmed elements"]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Step 5: Update state + route
|
|
107
|
+
|
|
108
|
+
Update `{BRAND_PATH}/STATE.md`:
|
|
109
|
+
- Set Phase 0 (Audit) status to `complete`
|
|
110
|
+
- Record completion date
|
|
111
|
+
|
|
112
|
+
Update `{BRAND_PATH}/config.json`:
|
|
113
|
+
- Set audit phase status to `complete`
|
|
114
|
+
|
|
115
|
+
"Audit complete. Run `/gsp:brand-research` — it'll use this audit to focus research on validating your brand position and finding evolution opportunities."
|
|
116
|
+
</process>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsp:brand-discover
|
|
3
|
+
description: Brand discovery (alias for /gsp:brand-research)
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
---
|
|
7
|
+
<process>
|
|
8
|
+
Display:
|
|
9
|
+
```
|
|
10
|
+
🎨 GSP — Redirecting...
|
|
11
|
+
|
|
12
|
+
/gsp:brand-discover now redirects to /gsp:brand-research.
|
|
13
|
+
The branding diamond is 4 commands: brand-research → brand-strategy → brand-identity → brand-patterns.
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Tell the user to run `/gsp:brand-research` instead.
|
|
17
|
+
</process>
|