@turquoisehealth/pit-viper 2.179.0 → 2.179.1-dev.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 (76) hide show
  1. package/claude-plugin/.claude-plugin/plugin.json +5 -0
  2. package/claude-plugin/CLAUDE.md +286 -0
  3. package/claude-plugin/README.md +119 -0
  4. package/claude-plugin/examples/.gitkeep +0 -0
  5. package/claude-plugin/skills/audit/SKILL.md +125 -0
  6. package/claude-plugin/skills/create/SKILL.md +389 -0
  7. package/claude-plugin/skills/resolve/SKILL.md +142 -0
  8. package/package.json +5 -2
  9. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  10. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  11. package/pv-components/dist/stats/web/pv-accordion-stats.html +1 -1
  12. package/pv-components/dist/stats/web/pv-action-bar-stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-ai-button-stats.html +1 -1
  14. package/pv-components/dist/stats/web/pv-avatar-group-stats.html +1 -1
  15. package/pv-components/dist/stats/web/pv-avatar-stats.html +1 -1
  16. package/pv-components/dist/stats/web/pv-banner-stats.html +1 -1
  17. package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +1 -1
  18. package/pv-components/dist/stats/web/pv-button-stats.html +1 -1
  19. package/pv-components/dist/stats/web/pv-card-stats.html +1 -1
  20. package/pv-components/dist/stats/web/pv-checkbox-stats.html +1 -1
  21. package/pv-components/dist/stats/web/pv-company-label-stats.html +1 -1
  22. package/pv-components/dist/stats/web/pv-company-logo-stats.html +1 -1
  23. package/pv-components/dist/stats/web/pv-company-tag-stats.html +1 -1
  24. package/pv-components/dist/stats/web/pv-counter-badge-stats.html +1 -1
  25. package/pv-components/dist/stats/web/pv-date-picker-stats.html +1 -1
  26. package/pv-components/dist/stats/web/pv-date-time-stats.html +1 -1
  27. package/pv-components/dist/stats/web/pv-distribution-bar-stats.html +1 -1
  28. package/pv-components/dist/stats/web/pv-drawer-stats.html +1 -1
  29. package/pv-components/dist/stats/web/pv-dropdown-stats.html +1 -1
  30. package/pv-components/dist/stats/web/pv-expandable-content-stats.html +1 -1
  31. package/pv-components/dist/stats/web/pv-ghost-input-stats.html +1 -1
  32. package/pv-components/dist/stats/web/pv-icon-stats.html +1 -1
  33. package/pv-components/dist/stats/web/pv-input-stats.html +1 -1
  34. package/pv-components/dist/stats/web/pv-insight-card-stats.html +1 -1
  35. package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
  36. package/pv-components/dist/stats/web/pv-modal-stats.html +1 -1
  37. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
  38. package/pv-components/dist/stats/web/pv-pagination-stats.html +1 -1
  39. package/pv-components/dist/stats/web/pv-pill-stats.html +1 -1
  40. package/pv-components/dist/stats/web/pv-popover-menu-stats.html +1 -1
  41. package/pv-components/dist/stats/web/pv-popover-stats.html +1 -1
  42. package/pv-components/dist/stats/web/pv-popover-v2-stats.html +1 -1
  43. package/pv-components/dist/stats/web/pv-progress-bar-stats.html +1 -1
  44. package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
  45. package/pv-components/dist/stats/web/pv-range-stats.html +1 -1
  46. package/pv-components/dist/stats/web/pv-rating-stats.html +1 -1
  47. package/pv-components/dist/stats/web/pv-release-badge-stats.html +1 -1
  48. package/pv-components/dist/stats/web/pv-search-input-stats.html +1 -1
  49. package/pv-components/dist/stats/web/pv-segmented-control-stats.html +1 -1
  50. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  51. package/pv-components/dist/stats/web/pv-selectable-card-stats.html +1 -1
  52. package/pv-components/dist/stats/web/pv-side-panel-stats.html +1 -1
  53. package/pv-components/dist/stats/web/pv-skeleton-stats.html +1 -1
  54. package/pv-components/dist/stats/web/pv-spinner-stats.html +1 -1
  55. package/pv-components/dist/stats/web/pv-sprite-stats.html +1 -1
  56. package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +1 -1
  57. package/pv-components/dist/stats/web/pv-switch-stats.html +1 -1
  58. package/pv-components/dist/stats/web/pv-tab-list-stats.html +1 -1
  59. package/pv-components/dist/stats/web/pv-tabs-stats.html +1 -1
  60. package/pv-components/dist/stats/web/pv-tag-stats.html +1 -1
  61. package/pv-components/dist/stats/web/pv-text-area-stats.html +1 -1
  62. package/pv-components/dist/stats/web/pv-toast-stats.html +1 -1
  63. package/pv-components/dist/stats/web/pv-toggle-button-stats.html +1 -1
  64. package/pv-components/dist/stats/web/pv-toggle-group-stats.html +1 -1
  65. package/pv-components/dist/stats/web/pv-tooltip-stats.html +1 -1
  66. package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +1 -1
  67. package/pv-components/dist/stats/web/pv-tree-stats.html +1 -1
  68. package/pv-components/dist/stats/web/pv-widget-stats.html +1 -1
  69. package/pv-components/dist/vue/charts/pv-components-charts.d.ts +0 -491
  70. package/pv-components/dist/vue/charts/pv-components-charts.js +0 -259
  71. package/pv-components/dist/vue/charts/pv-components-charts.mjs +0 -121834
  72. package/pv-components/dist/vue/charts/pv-components-charts.umd.js +0 -259
  73. package/pv-components/dist/vue/tables/pv-components-tables.d.ts +0 -299
  74. package/pv-components/dist/vue/tables/pv-components-tables.js +0 -223
  75. package/pv-components/dist/vue/tables/pv-components-tables.mjs +0 -47028
  76. package/pv-components/dist/vue/tables/pv-components-tables.umd.js +0 -223
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "pit-viper",
3
+ "version": "1.0.0",
4
+ "description": "Pit Viper design system tooling for Claude Code"
5
+ }
@@ -0,0 +1,286 @@
1
+ # Pit Viper Design System Reference
2
+
3
+ This plugin provides tooling for Turquoise Health's Pit Viper design system. Use `/pit-viper:resolve` to find components and `/pit-viper:audit` to check compliance.
4
+
5
+ ## Resources
6
+
7
+ - **Storybook:** https://pit-viper-storybook.netlify.app
8
+ - **Icons:** https://pitviper.turquoise.health/visual-style/icons/
9
+
10
+ ### CSS Themes
11
+
12
+ For complete utility class definitions, fetch the appropriate theme:
13
+
14
+ | Theme | URL | Usage |
15
+ |-------|-----|-------|
16
+ | **Platform** (default) | https://pitviper.turquoise.health/assets/css/pit-viper-v2.css | Internal platform apps |
17
+ | **Consumer** | https://pitviper.turquoise.health/assets/css/pit-viper-consumer.css | Marketing / consumer-facing pages |
18
+
19
+ Do not use the `-scoped` variant.
20
+
21
+ ## Overview
22
+
23
+ Pit Viper is Turquoise Health's custom design system. It exists as:
24
+
25
+ 1. **CSS framework** — utility classes for spacing, typography, color, layout (`pv-*` prefix)
26
+ 2. **Vue component library** — `@turquoisehealth/pit-viper`, providing 58+ components
27
+
28
+ **Package:** `@turquoisehealth/pit-viper` in `node_modules/`
29
+ **Font:** Inter (400, 500, 600)
30
+ **Type scale:** Compact (body-md = 0.75rem / 12px)
31
+
32
+ ## Color Palette
33
+
34
+ ### Brand Colors
35
+ | Token | Hex | Usage |
36
+ |---|---|---|
37
+ | Primary Brand | `#176F6F` | Interactive text, links, primary buttons, borders |
38
+ | Secondary Brand | `#02363D` | Body text, secondary buttons, dark surfaces |
39
+ | Brand Accent Light | `#A8E6E1` | Inverse buttons, AI button, tertiary buttons |
40
+ | Brand Accent Bg | `#F3FCFB` | Brand accent backgrounds |
41
+ | Brand Variant | `#16696D` | Visited links, tag primary, status success |
42
+ | Brand Gradient | `linear-gradient(109deg, #176F6F 0%, #02363D 100%)` | Brand surface gradient |
43
+
44
+ ### Semantic Colors
45
+ | Token | Hex | Usage |
46
+ |---|---|---|
47
+ | Error / Critical | `#DA1E28` | Error text, destructive buttons |
48
+ | Error Hover | `#A2191F` | Error border, destructive hover |
49
+ | Warning | `#896000` | Warning text |
50
+ | Success | `#0E6027` | Success text |
51
+ | Success Status | `#218C88` | Checked states, success status dots |
52
+ | Yellow Status | `#E5A000` | Status indicators |
53
+
54
+ ### Text Colors
55
+ | Class | Hex | Usage |
56
+ |---|---|---|
57
+ | `.pv-text-default` | `#02363D` | Primary body text |
58
+ | `.pv-text-subdued` | `#6E7784` | Secondary/helper text |
59
+ | `.pv-text-tertiary` | `#6E8081` | Tertiary text |
60
+ | `.pv-text-inverse` | `#FFFFFF` | Text on dark surfaces |
61
+ | `.pv-text-brand` | `#176F6F` | Brand-colored text, links |
62
+ | `.pv-text-critical` | `#DA1E28` | Error messages |
63
+ | `.pv-text-warning` | `#896000` | Warning text |
64
+ | `.pv-text-success` | `#0E6027` | Success text |
65
+
66
+ ### Surface Colors
67
+ | Class | Hex | Usage |
68
+ |---|---|---|
69
+ | `.pv-surface` | `#FFFFFF` | Default background |
70
+ | `.pv-surface-accent` | `#F8F8FA` | Subtle alternate backgrounds |
71
+ | `.pv-surface-brand` | `#02363D` | Dark brand surfaces |
72
+ | `.pv-surface-brand-inverse` | `#176F6F` | Teal brand surfaces |
73
+ | `.pv-surface-highlight` | `#E4F8F6` | Highlight/selection backgrounds |
74
+ | `.pv-surface-brand-accent` | `#F3FCFB` | Light teal backgrounds |
75
+ | `.pv-surface-inverse` | `#242626` | Dark mode surfaces |
76
+ | `.pv-surface-warning` | `#FAECCC` | Warning backgrounds |
77
+ | `.pv-surface-success` | `#E8FDEA` | Success backgrounds |
78
+ | `.pv-surface-critical` | `#FFF1F1` | Error backgrounds |
79
+
80
+ ### Border Colors
81
+ | Token | Hex | Usage |
82
+ |---|---|---|
83
+ | Default | `#DCDFE4` | Standard borders |
84
+ | Accent | `#176F6F` | Active/focus borders |
85
+ | Warning | `#EFC666` | Warning borders |
86
+ | Critical | `#A2191F` | Error borders |
87
+ | Brand | `#02363D` | Brand borders |
88
+
89
+ ### Data Visualization Colors (in order)
90
+ 1. `#36C5BA` 2. `#16696D` 3. `#FF7A4E` 4. `#C97AEB` 5. `#F2AD0D` 6. `#7C8AF4` 7. `#95C54C`
91
+
92
+ ## Typography
93
+
94
+ ### Headings
95
+ | Class | Size | Line Height | Weight |
96
+ |---|---|---|---|
97
+ | `.pv-heading-1` | 1.25rem (20px) | 1.2 | 600 |
98
+ | `.pv-heading-2` | 1rem (16px) | 1.5 | 600 |
99
+ | `.pv-heading-3` | 0.875rem (14px) | 1.43 | 600 |
100
+ | `.pv-heading-4` | 0.75rem (12px) | 1.33 | 600 |
101
+ | `.pv-heading-5` | 0.75rem (12px) | 1.33 | 600 |
102
+
103
+ ### Body Text
104
+ | Class | Size | Line Height |
105
+ |---|---|---|
106
+ | `.pv-text-body-xl` | 0.875rem (14px) | 1.14 |
107
+ | `.pv-text-body-lg` | 0.875rem (14px) | 1.14 |
108
+ | `.pv-text-body-md` | 0.75rem (12px) | 1.33 |
109
+ | `.pv-text-body-sm` | 0.6875rem (11px) | 1.45 |
110
+ | `.pv-text-body-xs` | 0.6875rem (11px) | 1.45 |
111
+
112
+ ### Title Classes (semibold variants)
113
+ `.pv-text-title-xl`, `.pv-text-title-lg`, `.pv-text-title-md`, `.pv-text-title-sm`, `.pv-text-title-xs` — same sizes as body, weight 600.
114
+
115
+ ### Eyebrow Classes
116
+ | Class | Size | Weight | Style |
117
+ |---|---|---|---|
118
+ | `.pv-text-eyebrow-lg` | 0.875rem | 700 | Uppercase, letter-spacing 0.0375rem |
119
+ | `.pv-text-eyebrow-sm` | 0.75rem | 700 | Uppercase, letter-spacing 0.0375rem |
120
+
121
+ ## Spacing
122
+
123
+ All spacing uses a 4px base grid. Classes apply `margin-bottom` (stack) or `padding` (inset).
124
+
125
+ ### Stack (Vertical Margin)
126
+ | Class | Value |
127
+ |---|---|
128
+ | `.pv-stack-0` | 0 |
129
+ | `.pv-stack-4` | 0.25rem (4px) |
130
+ | `.pv-stack-8` | 0.5rem (8px) |
131
+ | `.pv-stack-12` | 0.75rem (12px) |
132
+ | `.pv-stack-16` | 1rem (16px) |
133
+ | `.pv-stack-20` | 1.25rem (20px) |
134
+ | `.pv-stack-24` | 1.5rem (24px) |
135
+ | `.pv-stack-32` | 2rem (32px) |
136
+ | `.pv-stack-64` | 4rem (64px) |
137
+ | `.pv-stack-128` | 8rem (128px) |
138
+
139
+ Responsive variants (e.g. `.pv-stack-16-responsive`) use half-size on mobile, full size at 768px+.
140
+
141
+ ### Inset (Padding)
142
+ | Pattern | Example Classes | Description |
143
+ |---|---|---|
144
+ | Square (all sides) | `.pv-inset-square-8` through `-48` | Equal padding |
145
+ | Squish (horiz > vert) | `.pv-inset-squish-8`, `-12`, `-16` | e.g. `0.75rem 1rem` |
146
+ | Block (vertical) | `.pv-inset-block-8` through `-32` | `padding-block` only |
147
+ | Inline (horizontal) | `.pv-inset-inline-16` through `-32` | `padding-inline` only |
148
+
149
+ ### Flow (Gap between children)
150
+ `.pv-flow-8`, `.pv-flow-16`, `.pv-flow-24` — margin-bottom on all children except last.
151
+
152
+ ### Flex
153
+ | Class | Description |
154
+ |---|---|
155
+ | `.pv-flex` | `display: flex; gap: 0.5rem; align-items: center` |
156
+ | `.pv-flex-vertical` | Column direction |
157
+ | `.pv-flex-responsive` | Column on mobile, row at 768px+ |
158
+ | `.pv-flex-item` | `flex: 1` |
159
+ | `.pv-space-between` | `justify-content: space-between` |
160
+
161
+ Use CSS custom property `--flex-gap` to override gap, `--flex-justify` for justify-content.
162
+
163
+ ## Border Radius
164
+
165
+ | Class | Value |
166
+ |---|---|
167
+ | `.pv-radius-sm` | 2px |
168
+ | `.pv-radius` | 5px (default) |
169
+ | `.pv-radius-lg` | 12px |
170
+ | `.pv-radius-top` | 5px 5px 0 0 |
171
+ | `.pv-radius-bottom` | 0 0 5px 5px |
172
+
173
+ ## Shadows & Elevation
174
+
175
+ | Level | Usage | Value |
176
+ |---|---|---|
177
+ | Button | Default button elevation | `0px 6px 8px rgba(0,0,0,0.05), 0px 4px 6px -2px rgba(0,0,0,0.04)` |
178
+ | Popover | Dropdowns, popovers | `0px 8px 12px -4px rgba(0,0,0,0.08), 0px 12px 16px rgba(0,0,0,0.1)` |
179
+ | Elevated Hover | Button hover state | `0px 12px 16px rgba(0,0,0,0.1), 0px 8px 12px -4px rgba(0,0,0,0.08)` |
180
+ | Modal | Dialogs, drawers | `0px 12px 20px rgba(0,0,0,0.25), 0px 16px 28px -8px rgba(0,0,0,0.25)` |
181
+
182
+ ## Responsive Breakpoints
183
+
184
+ | Breakpoint | Usage |
185
+ |---|---|
186
+ | **768px** | Primary breakpoint — sidebar collapses, flex columns stack, responsive spacing adjusts |
187
+
188
+ Container max-widths: `.pv-container-sm` (768px), `.pv-container-md` (972px), `.pv-container-lg` (1448px).
189
+
190
+ Standard transition duration: **0.125s ease-in-out**.
191
+
192
+ ## Components
193
+
194
+ ### Most Commonly Used
195
+ | Component | Purpose |
196
+ |---|---|
197
+ | `PvButton` | All buttons (props: `variant`, `size`, `leftIcon`, `rightIcon`, `loading`, `disabled`, `inverse`) |
198
+ | `PvAiButton` | AI-specific action buttons |
199
+ | `PvIcon` | SVG icon (props: `name`, `size`: 10/12/20/24/32/64) |
200
+ | `PvSpinner` | Loading spinner (props: `variant`, `size`) |
201
+ | `PvInput` | Text input (v-model, props: `type`, `variant`, `placeholder`, `error`, `disabled`) |
202
+ | `PvTextArea` | Multi-line input |
203
+ | `PvCheckbox` | Checkbox (v-model, props: `indeterminate`, `disabled`) |
204
+ | `PvSwitch` | Toggle switch (v-model, props: `size`, `label`, `disabled`) |
205
+ | `PvSelectButton` | Dropdown with search (v-model, props: `options`, `optionsVariant`, `label`) |
206
+ | `PvTabs` | Tab bar (v-model, props: `tabs` array with `label`/`counter`/`icon`) |
207
+ | `PvSegmentedControl` | Button group toggle |
208
+ | `PvModal` | Dialog (v-model, props: `header`, `subheader`; slots: `#body`, `#footer`) |
209
+ | `PvDrawer` | Side panel (v-model, props: `header`, `showSearchbar`; slots: `#header`, `#default`, `#footer`) |
210
+ | `PvAccordion` | Collapsible section (v-model, props: `header`, `chevronPosition`, `counter`) |
211
+ | `PvToast` | Notification (props: `label`, `variant`: success/error/info/dark) |
212
+ | `PvTooltip` | Tooltip (props: `variant`, `tooltipPosition`, `interactive`; slots: `#label`, `#tooltip-content`) |
213
+ | `PvPopoverMenu` | Dropdown menu |
214
+ | `PvTag` | Inline tag |
215
+ | `PvPill` | Rounded badge |
216
+ | `PvCounterBadge` | Numeric badge |
217
+ | `PvBanner` | Alert banner |
218
+ | `PvAvatar` | User avatar |
219
+ | `PvCard` | Card container |
220
+ | `PvSkeleton` | Loading placeholder |
221
+ | `PvProgressBar` | Progress indicator |
222
+ | `PvTree` | Hierarchical tree |
223
+ | `PvSidePanel` | Three-column layout |
224
+ | `PvBreadcrumbs` | Breadcrumb nav |
225
+ | `PvPagination` | Pagination controls |
226
+
227
+ ### Visualization Components
228
+ Import from `@turquoisehealth/pit-viper/components/visualizations`:
229
+
230
+ | Component | Purpose |
231
+ |---|---|
232
+ | `PvDataTable` | AG Grid wrapper for data tables |
233
+ | `PvChart` | AG Charts wrapper for visualizations |
234
+ | `PvDataTableWithChart` | Combined table and chart view |
235
+ | `PvMapChart` | Geographic map visualization |
236
+
237
+ ## Import Paths
238
+
239
+ ```typescript
240
+ // Base components
241
+ import { PvButton, PvInput, PvModal } from '@turquoisehealth/pit-viper/components'
242
+
243
+ // Visualization components
244
+ import { PvDataTable, PvChart } from '@turquoisehealth/pit-viper/components/visualizations'
245
+ ```
246
+
247
+ ## Theme Selection
248
+
249
+ Choose the appropriate theme based on the application type:
250
+
251
+ | Application Type | Theme | CSS File |
252
+ |-----------------|-------|----------|
253
+ | Internal tools, dashboards, admin panels | Platform | `pit-viper-v2.css` |
254
+ | Marketing pages, public websites, consumer apps | Consumer | `pit-viper-consumer.css` |
255
+
256
+ ### Key Visual Differences
257
+
258
+ | Property | Platform | Consumer |
259
+ |----------|----------|----------|
260
+ | Font Family | Inter | GT Standard |
261
+ | Heading-1 Size | 1.25rem (20px) | 3.875rem (62px) |
262
+ | Body Text Size | 0.75rem (12px) | 1rem (16px) |
263
+ | Overall Density | Compact | Spacious |
264
+ | Color Warmth | Cool blue-gray | Warmer teal |
265
+
266
+ ### Theme URLs
267
+
268
+ ```
269
+ Platform: https://pitviper.turquoise.health/assets/css/pit-viper-v2.css
270
+ Consumer: https://pitviper.turquoise.health/assets/css/pit-viper-consumer.css
271
+ ```
272
+
273
+ ### Web Components (for non-Vue apps)
274
+
275
+ ```html
276
+ <script src="https://unpkg.com/@turquoisehealth/pit-viper/pv-components/dist/web/pv-components.iife.js"></script>
277
+ ```
278
+
279
+ Web components use kebab-case: `<pv-button>`, `<pv-input>`, `<pv-card>`, etc.
280
+
281
+ ## Rules
282
+
283
+ 1. **No custom CSS** — Use only Pit Viper utility classes (see CSS Themes above)
284
+ 2. **No Tailwind** — Pit Viper has its own utility system
285
+ 3. **Prefer components** — Use Pit Viper components over raw HTML elements
286
+ 4. **Valid icons only** — Only use icon names from https://pitviper.turquoise.health/visual-style/icons/
@@ -0,0 +1,119 @@
1
+ # Pit Viper Claude Plugin
2
+
3
+ Internal Claude Code plugin for Pit Viper design system tooling.
4
+
5
+ ## Installation
6
+
7
+ ### Claude Code CLI
8
+
9
+ ```bash
10
+ claude --plugin-dir ~/claude-plugins-pit-viper
11
+ ```
12
+
13
+ Or add to your Claude Code settings for persistent installation.
14
+
15
+ ### Cowork
16
+
17
+ Contact DevTools team for managed installation.
18
+
19
+ ## Prerequisites
20
+
21
+ Your project should have `@turquoisehealth/pit-viper` installed:
22
+
23
+ ```bash
24
+ npm install @turquoisehealth/pit-viper
25
+ ```
26
+
27
+ For Figma integration, authenticate via `/mcp` in Claude Code.
28
+
29
+ ## Available Skills
30
+
31
+ ### `/pit-viper:create`
32
+
33
+ Build complete pages and layouts from natural language descriptions. No Vue, imports, or CSS knowledge required.
34
+
35
+ **Usage:**
36
+ ```
37
+ /pit-viper:create a dashboard with a sidebar and data table
38
+ /pit-viper:create a login form
39
+ /pit-viper:create a settings page with tabs for profile and notifications
40
+ /pit-viper:create a marketing landing page with hero and features
41
+ ```
42
+
43
+ **Output:** Complete Vue SFC or HTML file ready to use.
44
+
45
+ **Theme Detection:**
46
+ - Keywords like "marketing", "landing", "consumer" → Consumer theme (large typography)
47
+ - Keywords like "dashboard", "admin", "internal" → Platform theme (compact, default)
48
+ - Override with `--theme=consumer` or `--theme=platform`
49
+
50
+ **Format Options:**
51
+ - Default: Vue Single File Component (`<script setup>` + `<template>`)
52
+ - Add `--format=html` for plain HTML with web components
53
+
54
+ ### `/pit-viper:resolve`
55
+
56
+ Find the correct Pit Viper component for a UI element.
57
+
58
+ **Usage:**
59
+ ```
60
+ /pit-viper:resolve dropdown with search
61
+ /pit-viper:resolve <figma-url>
62
+ /pit-viper:resolve <html-snippet>
63
+ ```
64
+
65
+ **Output:** Component name, import path, props, and usage example.
66
+
67
+ ### `/pit-viper:audit`
68
+
69
+ Check files for design system compliance and auto-fix violations.
70
+
71
+ **Usage:**
72
+ ```
73
+ /pit-viper:audit # Audit git-changed files
74
+ /pit-viper:audit src/components/Foo.vue # Audit specific file
75
+ /pit-viper:audit --all # Audit all Vue/HTML files
76
+ ```
77
+
78
+ **Checks:**
79
+ - Custom CSS (`<style>` blocks, inline styles)
80
+ - Raw HTML elements that should be Pit Viper components
81
+ - Invalid CSS class names
82
+ - Wrong import paths
83
+
84
+ ## Adding Production Examples
85
+
86
+ Add curated code snippets to `examples/` for the resolve skill to reference:
87
+
88
+ ```
89
+ examples/
90
+ ├── PvDataTable.vue # Common table patterns
91
+ ├── PvSelectButton.vue # Dropdown usage
92
+ ├── PvModal.vue # Modal with form
93
+ └── ...
94
+ ```
95
+
96
+ The resolve skill checks `examples/{ComponentName}.vue` before falling back to Storybook.
97
+
98
+ ## Resources
99
+
100
+ - **Storybook:** https://pit-viper-storybook.netlify.app
101
+ - **Icons:** https://pitviper.turquoise.health/visual-style/icons/
102
+ - **Design Tokens:** See `CLAUDE.md` for full color, typography, and spacing reference
103
+ - **MCP Server:** https://pitviper.turquoise.health/mcp
104
+
105
+ ## MCP Tools
106
+
107
+ The plugin uses the Pit Viper MCP server for fast component lookups. Available tools:
108
+
109
+ | Tool | Purpose |
110
+ |------|---------|
111
+ | `mcp__pit-viper__search` | Search across CSS and Vue components |
112
+ | `mcp__pit-viper__storybook_get_component` | Get Vue component details (props, stories, source) |
113
+ | `mcp__pit-viper__storybook_list_components` | List all Vue components with stories |
114
+ | `mcp__pit-viper__css_get_docs` | Get CSS component documentation |
115
+ | `mcp__pit-viper__css_list_components` | List CSS components by category |
116
+ | `mcp__pit-viper__css_list_tokens` | List design tokens (colors, spacing, etc.) |
117
+ | `mcp__pit-viper__css_search_classes` | Search CSS classes by pattern |
118
+
119
+ The MCP server is automatically enabled when using this plugin in the pit-viper repo.
File without changes
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: audit
3
+ description: Check Vue/HTML files for Pit Viper design system compliance and auto-fix violations
4
+ argument-hint: "[file-path | --all]"
5
+ allowed-tools: "Read, Glob, Grep, Edit, Bash"
6
+ ---
7
+
8
+ # Audit Design System Compliance
9
+
10
+ Check Vue and HTML files for Pit Viper design system violations and automatically fix them.
11
+
12
+ ## Input
13
+
14
+ `$ARGUMENTS` — One of:
15
+ - File path(s) to audit (e.g., `src/components/MyComponent.vue`)
16
+ - `--all` to audit all `.vue` and `.html` files in the project
17
+ - Empty: auto-detect changed files via `git diff --name-only`
18
+
19
+ ## Workflow
20
+
21
+ ### Step 1: Identify files to audit
22
+
23
+ - If file path(s) provided, use those
24
+ - If `--all`, glob for `**/*.vue` and `**/*.html`
25
+ - If empty, run `git diff --name-only` to find changed `.vue` and `.html` files
26
+
27
+ If no files to audit, report "No files to audit" and exit.
28
+
29
+ ### Step 2: Read each file
30
+
31
+ For each file:
32
+ - `.vue` files: check `<template>` and `<style>` sections
33
+ - `.html` files: check all markup and inline styles
34
+
35
+ ### Step 3: Check for violations
36
+
37
+ #### Custom CSS (auto-fix: replace with Pit Viper classes)
38
+
39
+ - `<style>` blocks — remove and replace CSS rules with Pit Viper utility classes
40
+ - `style="..."` inline attributes — remove and apply equivalent Pit Viper classes
41
+
42
+ #### Raw HTML elements (auto-fix: replace with Pit Viper components)
43
+
44
+ These raw elements should use Pit Viper equivalents:
45
+
46
+ | Raw Element | Pit Viper Component |
47
+ |-------------|---------------------|
48
+ | `<button>` | `<PvButton>` |
49
+ | `<table>` | `<PvDataTable>` |
50
+ | `<input type="text">` | `<PvInput>` |
51
+ | `<input type="checkbox">` | `<PvCheckbox>` |
52
+ | `<input type="search">` | `<PvSearchInput>` |
53
+ | `<select>` | `<PvSelectButton>` |
54
+ | `<textarea>` | `<PvTextArea>` |
55
+ | `<dialog>` | `<PvModal>` |
56
+
57
+ **Exceptions (allowed):** Basic structural HTML is fine:
58
+ `<div>`, `<span>`, `<p>`, `<h1>`-`<h6>`, `<a>`, `<img>`, `<ul>`, `<ol>`, `<li>`, `<section>`, `<header>`, `<footer>`, `<nav>`, `<main>`, `<article>`, `<aside>`, `<template>`, `<slot>`, `<form>`, `<label>`
59
+
60
+ #### Invalid CSS class names
61
+
62
+ Read the Pit Viper CSS file to validate class names:
63
+ ```
64
+ node_modules/@turquoisehealth/pit-viper/_site/assets/css/pit-viper-v2.css
65
+ ```
66
+
67
+ Flag any `class="..."` that contains classes not defined in `pit-viper-v2.css`. Suggest the closest valid class or remove invalid classes.
68
+
69
+ #### Wrong import paths (Vue only)
70
+
71
+ Check that Pit Viper imports use correct paths:
72
+ - Base components: `@turquoisehealth/pit-viper/components`
73
+ - Visualizations: `@turquoisehealth/pit-viper/components/visualizations`
74
+
75
+ ### Step 4: Apply fixes
76
+
77
+ For each violation:
78
+ 1. Log the violation (file, line, issue)
79
+ 2. Apply the auto-fix
80
+ 3. Log what was changed
81
+
82
+ ### Step 5: Report
83
+
84
+ Output a summary:
85
+
86
+ ```
87
+ ## Audit Results
88
+
89
+ ### src/components/MyComponent.vue
90
+
91
+ **Violations found: 3**
92
+
93
+ 1. Line 15: `<style>` block with custom CSS
94
+ → Removed, applied `.pv-flex .pv-stack-16` to container
95
+
96
+ 2. Line 23: Raw `<button>` element
97
+ → Replaced with `<PvButton>`
98
+
99
+ 3. Line 31: Invalid class `custom-spacing`
100
+ → Replaced with `.pv-stack-8`
101
+
102
+ ---
103
+
104
+ **Files audited:** 2
105
+ **Violations found:** 5
106
+ **Violations fixed:** 5
107
+ ```
108
+
109
+ If no violations found:
110
+ ```
111
+ ## Audit Results
112
+
113
+ All files pass design system compliance.
114
+
115
+ **Files audited:** 3
116
+ **Violations found:** 0
117
+ ```
118
+
119
+ ## Rules
120
+
121
+ - Always auto-fix violations (don't just report)
122
+ - Preserve file structure and formatting where possible
123
+ - If a fix is ambiguous (multiple valid options), pick the most common pattern
124
+ - If Pit Viper CSS file is not found, warn that `@turquoisehealth/pit-viper` may not be installed
125
+ - Do not modify files outside the audit scope