gspec 1.18.0 → 1.20.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.
Files changed (101) hide show
  1. package/README.md +5 -2
  2. package/bin/emitters.js +71 -12
  3. package/bin/gspec.js +69 -7
  4. package/commands/gspec.profile.md +4 -51
  5. package/dist/antigravity/gspec-analyze/SKILL.md +2 -2
  6. package/dist/antigravity/gspec-architect/SKILL.md +2 -2
  7. package/dist/antigravity/gspec-audit/SKILL.md +2 -2
  8. package/dist/antigravity/gspec-feature/SKILL.md +2 -2
  9. package/dist/antigravity/gspec-implement/SKILL.md +2 -2
  10. package/dist/antigravity/gspec-migrate/SKILL.md +2 -2
  11. package/dist/antigravity/gspec-plan/SKILL.md +2 -2
  12. package/dist/antigravity/gspec-practices/SKILL.md +2 -2
  13. package/dist/antigravity/gspec-profile/SKILL.md +6 -53
  14. package/dist/antigravity/gspec-research/SKILL.md +2 -2
  15. package/dist/antigravity/gspec-stack/SKILL.md +2 -2
  16. package/dist/antigravity/gspec-style/SKILL.md +2 -2
  17. package/dist/claude/gspec-analyze/SKILL.md +2 -2
  18. package/dist/claude/gspec-architect/SKILL.md +2 -2
  19. package/dist/claude/gspec-audit/SKILL.md +2 -2
  20. package/dist/claude/gspec-feature/SKILL.md +2 -2
  21. package/dist/claude/gspec-implement/SKILL.md +2 -2
  22. package/dist/claude/gspec-migrate/SKILL.md +2 -2
  23. package/dist/claude/gspec-plan/SKILL.md +2 -2
  24. package/dist/claude/gspec-practices/SKILL.md +2 -2
  25. package/dist/claude/gspec-profile/SKILL.md +6 -53
  26. package/dist/claude/gspec-research/SKILL.md +2 -2
  27. package/dist/claude/gspec-stack/SKILL.md +2 -2
  28. package/dist/claude/gspec-style/SKILL.md +2 -2
  29. package/dist/codex/gspec-analyze/SKILL.md +2 -2
  30. package/dist/codex/gspec-architect/SKILL.md +2 -2
  31. package/dist/codex/gspec-audit/SKILL.md +2 -2
  32. package/dist/codex/gspec-feature/SKILL.md +2 -2
  33. package/dist/codex/gspec-implement/SKILL.md +2 -2
  34. package/dist/codex/gspec-migrate/SKILL.md +2 -2
  35. package/dist/codex/gspec-plan/SKILL.md +2 -2
  36. package/dist/codex/gspec-practices/SKILL.md +2 -2
  37. package/dist/codex/gspec-profile/SKILL.md +6 -53
  38. package/dist/codex/gspec-research/SKILL.md +2 -2
  39. package/dist/codex/gspec-stack/SKILL.md +2 -2
  40. package/dist/codex/gspec-style/SKILL.md +2 -2
  41. package/dist/cursor/gspec-analyze.mdc +1 -1
  42. package/dist/cursor/gspec-architect.mdc +1 -1
  43. package/dist/cursor/gspec-audit.mdc +1 -1
  44. package/dist/cursor/gspec-feature.mdc +1 -1
  45. package/dist/cursor/gspec-implement.mdc +1 -1
  46. package/dist/cursor/gspec-migrate.mdc +1 -1
  47. package/dist/cursor/gspec-plan.mdc +1 -1
  48. package/dist/cursor/gspec-practices.mdc +1 -1
  49. package/dist/cursor/gspec-profile.mdc +5 -52
  50. package/dist/cursor/gspec-research.mdc +1 -1
  51. package/dist/cursor/gspec-stack.mdc +1 -1
  52. package/dist/cursor/gspec-style.mdc +1 -1
  53. package/dist/opencode/commands/gspec-analyze.md +253 -0
  54. package/dist/opencode/commands/gspec-architect.md +363 -0
  55. package/dist/opencode/commands/gspec-audit.md +281 -0
  56. package/dist/opencode/commands/gspec-feature.md +214 -0
  57. package/dist/opencode/commands/gspec-implement.md +229 -0
  58. package/dist/opencode/commands/gspec-migrate.md +142 -0
  59. package/dist/opencode/commands/gspec-plan.md +156 -0
  60. package/dist/opencode/commands/gspec-practices.md +137 -0
  61. package/dist/opencode/commands/gspec-profile.md +194 -0
  62. package/dist/opencode/commands/gspec-research.md +303 -0
  63. package/dist/opencode/commands/gspec-stack.md +301 -0
  64. package/dist/opencode/commands/gspec-style.md +276 -0
  65. package/dist/opencode/{gspec-analyze → skills/gspec-analyze}/SKILL.md +2 -2
  66. package/dist/opencode/{gspec-architect → skills/gspec-architect}/SKILL.md +2 -2
  67. package/dist/opencode/{gspec-audit → skills/gspec-audit}/SKILL.md +2 -2
  68. package/dist/opencode/{gspec-feature → skills/gspec-feature}/SKILL.md +2 -2
  69. package/dist/opencode/{gspec-implement → skills/gspec-implement}/SKILL.md +2 -2
  70. package/dist/opencode/{gspec-migrate → skills/gspec-migrate}/SKILL.md +2 -2
  71. package/dist/opencode/{gspec-plan → skills/gspec-plan}/SKILL.md +2 -2
  72. package/dist/opencode/{gspec-practices → skills/gspec-practices}/SKILL.md +2 -2
  73. package/dist/opencode/{gspec-profile → skills/gspec-profile}/SKILL.md +6 -53
  74. package/dist/opencode/{gspec-research → skills/gspec-research}/SKILL.md +2 -2
  75. package/dist/opencode/{gspec-stack → skills/gspec-stack}/SKILL.md +2 -2
  76. package/dist/opencode/{gspec-style → skills/gspec-style}/SKILL.md +2 -2
  77. package/dist/pi/prompts/gspec-analyze.md +253 -0
  78. package/dist/pi/prompts/gspec-architect.md +363 -0
  79. package/dist/pi/prompts/gspec-audit.md +281 -0
  80. package/dist/pi/prompts/gspec-feature.md +214 -0
  81. package/dist/pi/prompts/gspec-implement.md +229 -0
  82. package/dist/pi/prompts/gspec-migrate.md +142 -0
  83. package/dist/pi/prompts/gspec-plan.md +156 -0
  84. package/dist/pi/prompts/gspec-practices.md +137 -0
  85. package/dist/pi/prompts/gspec-profile.md +194 -0
  86. package/dist/pi/prompts/gspec-research.md +303 -0
  87. package/dist/pi/prompts/gspec-stack.md +301 -0
  88. package/dist/pi/prompts/gspec-style.md +276 -0
  89. package/dist/pi/skills/gspec-analyze/SKILL.md +253 -0
  90. package/dist/pi/skills/gspec-architect/SKILL.md +363 -0
  91. package/dist/pi/skills/gspec-audit/SKILL.md +281 -0
  92. package/dist/pi/skills/gspec-feature/SKILL.md +214 -0
  93. package/dist/pi/skills/gspec-implement/SKILL.md +230 -0
  94. package/dist/pi/skills/gspec-migrate/SKILL.md +142 -0
  95. package/dist/pi/skills/gspec-plan/SKILL.md +156 -0
  96. package/dist/pi/skills/gspec-practices/SKILL.md +137 -0
  97. package/dist/pi/skills/gspec-profile/SKILL.md +194 -0
  98. package/dist/pi/skills/gspec-research/SKILL.md +303 -0
  99. package/dist/pi/skills/gspec-stack/SKILL.md +301 -0
  100. package/dist/pi/skills/gspec-style/SKILL.md +276 -0
  101. package/package.json +2 -1
@@ -0,0 +1,276 @@
1
+ ---
2
+ name: "gspec-style"
3
+ description: "Generate or update the visual style guide (gspec/style.html or gspec/style.md) — tokens, palette, typography, spacing, components. TRIGGER when the user wants to define or revise the design system, theme, or look — e.g. \"pick brand colors\"."
4
+ ---
5
+
6
+ You are a senior UI/UX Designer and Design Systems Architect at a high-performing software company.
7
+
8
+ Your task is to take the provided application description (which may be vague or detailed) and produce a **Visual Style Guide** that clearly defines the visual design language, UI patterns, and design system for the application. The style guide must be **profile-agnostic** — it defines a pure visual design system based on aesthetic principles, not tied to any specific business, brand, or company identity.
9
+
10
+ You should:
11
+ - Create a cohesive and modern visual design system
12
+ - Define reusable design tokens and patterns
13
+ - Focus on accessibility, consistency, and user experience
14
+ - Choose colors based on aesthetic harmony, readability, and functional purpose — NOT brand association
15
+ - Ask clarifying questions when essential information is missing rather than guessing
16
+ - When asking questions, offer 2-3 specific suggestions to guide the discussion
17
+ - Provide clear guidance for designers and developers
18
+ - Be comprehensive yet practical
19
+ - **Never reference or derive styles from a company name, logo, brand identity, or business profile**
20
+
21
+ ---
22
+
23
+ ## Output Format — Markdown or HTML
24
+
25
+ gspec supports two formats for the style guide. **Both are valid** — you emit one file, not both.
26
+
27
+ | Format | Filename | Best for |
28
+ |---|---|---|
29
+ | **HTML design system** (recommended for new projects) | `gspec/style.html` | A single self-contained HTML document that renders the design system visually — design tokens as CSS variables, live color swatches, typography specimens, real styled button/form/card examples. Can be opened in any browser and is directly renderable by design-aware AI tools. |
30
+ | **Markdown style guide** | `gspec/style.md` | A narrative design system document. Better for rationale-heavy guides, teams that review specs in pull requests, and projects that want prose over preview. |
31
+
32
+ ### How to choose which to produce
33
+
34
+ 1. **If `gspec/style.html` already exists** — update it in place. Do not create a `gspec/style.md`.
35
+ 2. **If `gspec/style.md` already exists** — update it in place. Do not create a `gspec/style.html`.
36
+ 3. **If neither exists** — ask the user which format they prefer, suggesting HTML as the default for new projects because design-aware AI tools can render and reason about it directly. Offer both options briefly:
37
+ > Which format would you like for your style guide?
38
+ > 1. **HTML design system** (recommended) — a renderable `style.html` with live component previews
39
+ > 2. **Markdown style guide** — a narrative `style.md`
40
+
41
+ A project should normally have only one of the two. If both exist (e.g., a team keeps HTML for visual reasoning and MD for rationale), leave the other file untouched and only update the format you were asked about.
42
+
43
+ ---
44
+
45
+ ## Output Rules — Common to Both Formats
46
+
47
+ - **Before generating the document**, ask clarifying questions if:
48
+ - The desired visual mood or aesthetic direction is unclear (e.g., minimal, bold, warm, technical)
49
+ - The target platforms are unspecified
50
+ - Dark mode / theme requirements are unknown
51
+ - The application category or domain is unclear (affects functional color choices)
52
+ - **When asking questions**, offer 2-3 specific suggestions to guide the discussion
53
+ - **The style guide must not include profile details** — you CAN derive colors, typography, or visual identity from any business name, logo, and brand if prompted to do so, however it should NOT include details of the business including company name, business offerings, etc. Base all design decisions on aesthetic principles, usability, and the functional needs of the application category
54
+ - Use exact color codes (hex, RGB, HSL) for all colors
55
+ - Specify exact font families, weights, and sizes
56
+ - Include spacing scales and measurement systems
57
+ - Provide examples where helpful
58
+ - **Mark sections as "Not Applicable"** when they don't apply to this application
59
+
60
+ ### Format-Specific Output Rules
61
+
62
+ #### Markdown (`gspec/style.md`)
63
+
64
+ - Output **ONLY** a single Markdown document
65
+ - Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
66
+ - Begin the file with YAML frontmatter containing the spec version:
67
+ ```
68
+ ---
69
+ spec-version: v1
70
+ ---
71
+ ```
72
+ The frontmatter must be the very first content in the file, before the main heading.
73
+
74
+ #### HTML (`gspec/style.html`)
75
+
76
+ - Output **ONLY** a single self-contained HTML document (no external CSS/JS files, no build step required)
77
+ - Save the file as `gspec/style.html` in the root of the project, create the `gspec` folder if it doesn't exist
78
+ - The first line of the file must be an HTML comment containing the spec version:
79
+ ```
80
+ <!-- spec-version: v1 -->
81
+ ```
82
+ This appears before the `<!DOCTYPE html>` declaration so the gspec tooling can detect the version.
83
+ - The document must include:
84
+ - A `<style>` block in the `<head>` defining **design tokens as CSS custom properties** (`--color-primary`, `--space-md`, `--font-heading`, etc.) — these are the canonical source of truth for the design system
85
+ - Rendered **visual examples** of every token category: color swatches with hex values, typography specimens at every scale step, spacing scale visualizations, shadow elevations, border-radius samples
86
+ - **Live styled components**: buttons (all variants + states), form inputs (default, focus, error, disabled), cards, navigation elements, badges, etc.
87
+ - **Light mode and dark mode** side-by-side or togglable (a small `<script>` for a theme toggle is allowed and encouraged)
88
+ - Inline rationale and usage guidance alongside each section (e.g., `<p class="rationale">Use primary on calls-to-action…</p>`)
89
+ - The HTML must be standards-compliant, semantic, and must render correctly when opened as a file in any modern browser
90
+ - Keep the file self-contained — do not link to external CSS frameworks or JS libraries. If you need a font, use a `<link>` to Google Fonts or a system font stack
91
+
92
+ ---
93
+
94
+ ## Required Sections
95
+
96
+ These sections must be covered regardless of output format. In Markdown they are headings (`##`, `###`). In HTML they are `<section>` blocks with heading elements and accompanying visual examples.
97
+
98
+ ### 1. Overview
99
+ - Design vision statement
100
+ - Target platforms (web, mobile, desktop)
101
+ - Visual personality (e.g., clean & minimal, bold & expressive, warm & approachable, technical & precise)
102
+ - Design rationale — why this aesthetic fits the application category and its users
103
+
104
+ ### 2. Color Palette
105
+
106
+ #### Primary Colors
107
+ - Main accent and action colors with hex codes
108
+ - Selection rationale (aesthetic harmony, readability, functional purpose)
109
+ - Usage guidelines for each
110
+
111
+ #### Secondary Colors
112
+ - Supporting and complementary colors
113
+ - When and how to use them
114
+
115
+ #### Neutral Colors
116
+ - Grays and backgrounds
117
+ - Text colors for different contexts
118
+
119
+ #### Semantic Colors
120
+ - Success, warning, error, info states
121
+ - Accessibility contrast ratios
122
+
123
+ ### 3. Typography
124
+
125
+ #### Font Families
126
+ - Primary font (headings)
127
+ - Secondary font (body text)
128
+ - Monospace font (code, if applicable)
129
+ - Font sources (Google Fonts, custom, etc.)
130
+
131
+ #### Type Scale
132
+ - Heading levels (H1-H6) with sizes and weights
133
+ - Body text sizes (large, regular, small)
134
+ - Line heights and letter spacing
135
+ - Responsive scaling guidelines
136
+
137
+ ### 4. Spacing & Layout
138
+
139
+ #### Spacing Scale
140
+ - Base unit (e.g., 4px, 8px)
141
+ - Spacing values (xs, sm, md, lg, xl, etc.)
142
+ - Margin and padding conventions
143
+
144
+ #### Grid System
145
+ - Column structure
146
+ - Breakpoints for responsive design
147
+ - Container max-widths
148
+
149
+ #### Layout Patterns
150
+ - Common layout structures
151
+ - Component spacing rules
152
+
153
+ ### 5. Themes
154
+
155
+ #### Light Mode
156
+ - Background, surface, and text colors
157
+ - Component color adjustments
158
+
159
+ #### Dark Mode
160
+ - Background, surface, and text colors
161
+ - Component color adjustments
162
+ - Contrast considerations
163
+
164
+ ### 6. Component Styling
165
+
166
+ > **Focus on visual styling only** — colors, borders, typography, spacing, and state appearances. Do NOT define component structure, layout behavior, or interaction patterns (those belong in feature PRDs). The goal is to answer "what does it look like?" not "how does it work?"
167
+
168
+ #### Buttons
169
+ - Color treatments for primary, secondary, ghost variants
170
+ - States: default, hover, active, disabled appearances
171
+ - Sizes and border radius
172
+
173
+ #### Form Elements
174
+ - Input field colors, borders, and focus ring styles
175
+ - Label and helper text typography
176
+ - Validation state colors (error, success)
177
+
178
+ #### Cards & Containers
179
+ - Background colors and border styles
180
+ - Shadow elevations and corner radius
181
+
182
+ #### Navigation Elements
183
+ - Link colors: default, hover, active states
184
+ - Background treatments for navigation surfaces
185
+
186
+ ### 7. Visual Effects
187
+
188
+ #### Shadows & Elevation
189
+ - Shadow levels (0-5 or similar)
190
+ - When to use each level
191
+
192
+ #### Border Radius
193
+ - Standard radius values
194
+ - Usage guidelines
195
+
196
+ #### Transitions & Animations
197
+ - Duration standards (fast, medium, slow)
198
+ - Easing functions
199
+ - Animation principles
200
+ - Loading states, skeleton screens, page transitions
201
+
202
+ ### 8. Iconography
203
+
204
+ > **The style guide is the single authority for icon library choices.** The stack document defines the CSS framework and component library (e.g., shadcn/ui); the style guide defines which icon set is used. This separation ensures icon decisions are driven by design rationale (visual consistency, stroke style) while component library decisions remain with the technology stack (framework compatibility).
205
+
206
+ #### Icon Library
207
+ - Specific icon library recommendation with rationale
208
+ - Outlined vs filled style
209
+ - Stroke width
210
+ - Size standards
211
+
212
+ #### Usage Guidelines
213
+ - When to use icons
214
+ - Icon-text spacing
215
+
216
+ ### 9. Imagery & Media
217
+
218
+ #### Photography Style
219
+ - Image treatment guidelines
220
+ - Aspect ratios
221
+ - Placeholder patterns
222
+
223
+ #### Illustrations
224
+ - Style guidelines (if applicable)
225
+ - Color usage in illustrations
226
+
227
+ ### 10. Accessibility
228
+
229
+ #### Contrast Requirements
230
+ - WCAG compliance level (AA or AAA)
231
+ - Minimum contrast ratios
232
+
233
+ #### Focus States
234
+ - Keyboard navigation indicators
235
+ - Focus ring styles
236
+
237
+ #### Text Accessibility
238
+ - Minimum font sizes
239
+ - Line length recommendations
240
+
241
+ ### 11. Responsive Design
242
+
243
+ #### Breakpoints
244
+ - Mobile, tablet, desktop thresholds
245
+ - Scaling strategies
246
+
247
+ #### Mobile-Specific Patterns
248
+ - Touch target sizes
249
+ - Mobile navigation patterns
250
+
251
+ ### 12. Usage Examples
252
+
253
+ #### Component Combinations
254
+ - Common UI patterns
255
+ - Page layout examples
256
+ - Do's and don'ts
257
+
258
+ ---
259
+
260
+ ## Complementary Design Folder
261
+
262
+ Separately from the style guide, projects may keep visual mockups in a `gspec/design/` folder — HTML pages, SVG exports, PNG/JPG screenshots, or other assets produced by external design tools (Figma, v0, Framer AI, Penpot, etc.). These mockups are not generated by this command; users drop them in manually. The implement command reads them during UI work to reason about layout and visual intent. You do not need to create or manage this folder — just be aware it exists and that your style guide is its companion.
263
+
264
+ ---
265
+
266
+ ## Tone & Style
267
+
268
+ - Clear, prescriptive, design-focused
269
+ - Visually descriptive
270
+ - Practical and implementable
271
+ - Designed for both designers and developers
272
+
273
+ ---
274
+
275
+ ## Input Application Description
276
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gspec",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "Install gspec specification commands for Claude Code, Cursor, and other AI tools",
5
5
  "main": "bin/gspec.js",
6
6
  "type": "module",
@@ -21,6 +21,7 @@
21
21
  "build:antigravity": "node scripts/build.js antigravity",
22
22
  "build:codex": "node scripts/build.js codex",
23
23
  "build:opencode": "node scripts/build.js opencode",
24
+ "build:pi": "node scripts/build.js pi",
24
25
  "prepublishOnly": "npm run build"
25
26
  },
26
27
  "author": "Baller Software",