@hustle-together/api-dev-tools 3.12.16 → 4.5.3

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 (180) hide show
  1. package/.claude/adr-requests/.gitkeep +10 -0
  2. package/.claude/agents/adr-researcher.md +109 -0
  3. package/.claude/agents/visual-analyzer.md +183 -0
  4. package/.claude/api-dev-state.json +10 -0
  5. package/.claude/documentation-audit.json +114 -0
  6. package/.claude/registry.json +289 -0
  7. package/.claude/settings.json +45 -1
  8. package/.claude/settings.local.json +1 -7
  9. package/.claude/workflow-logs/None.json +49 -0
  10. package/.claude/workflow-logs/session-20251230-143727.json +106 -0
  11. package/.skills/adr-deep-research/SKILL.md +351 -0
  12. package/.skills/api-create/SKILL.md +34 -20
  13. package/.skills/api-research/SKILL.md +130 -0
  14. package/.skills/docs-update/SKILL.md +205 -0
  15. package/.skills/hustle-brand/SKILL.md +368 -0
  16. package/.skills/hustle-build/SKILL.md +365 -38
  17. package/.skills/parallel-spawn/SKILL.md +212 -0
  18. package/.skills/ralph-continue/SKILL.md +151 -0
  19. package/.skills/ralph-loop/SKILL.md +341 -0
  20. package/.skills/ralph-status/SKILL.md +87 -0
  21. package/.skills/refactor/SKILL.md +59 -0
  22. package/.skills/shadcn/SKILL.md +522 -0
  23. package/.skills/test-all/SKILL.md +210 -0
  24. package/.skills/test-builds/SKILL.md +208 -0
  25. package/.skills/test-debug/SKILL.md +212 -0
  26. package/.skills/test-e2e/SKILL.md +168 -0
  27. package/.skills/test-review/SKILL.md +707 -0
  28. package/.skills/test-unit/SKILL.md +143 -0
  29. package/.skills/test-visual/SKILL.md +301 -0
  30. package/.skills/token-report/SKILL.md +132 -0
  31. package/CHANGELOG.md +488 -0
  32. package/README.md +346 -53
  33. package/bin/cli.js +359 -123
  34. package/hooks/__pycache__/api-workflow-check.cpython-314.pyc +0 -0
  35. package/hooks/__pycache__/auto-answer.cpython-314.pyc +0 -0
  36. package/hooks/__pycache__/cache-research.cpython-314.pyc +0 -0
  37. package/hooks/__pycache__/check-api-routes.cpython-314.pyc +0 -0
  38. package/hooks/__pycache__/check-playwright-setup.cpython-314.pyc +0 -0
  39. package/hooks/__pycache__/check-storybook-setup.cpython-314.pyc +0 -0
  40. package/hooks/__pycache__/check-update.cpython-314.pyc +0 -0
  41. package/hooks/__pycache__/completion-promise-detector.cpython-314.pyc +0 -0
  42. package/hooks/__pycache__/context-capacity-warning.cpython-314.pyc +0 -0
  43. package/hooks/__pycache__/detect-interruption.cpython-314.pyc +0 -0
  44. package/hooks/__pycache__/docs-update-check.cpython-314.pyc +0 -0
  45. package/hooks/__pycache__/enforce-a11y-audit.cpython-314.pyc +0 -0
  46. package/hooks/__pycache__/enforce-brand-guide.cpython-314.pyc +0 -0
  47. package/hooks/__pycache__/enforce-component-type-confirm.cpython-314.pyc +0 -0
  48. package/hooks/__pycache__/enforce-deep-research.cpython-314.pyc +0 -0
  49. package/hooks/__pycache__/enforce-disambiguation.cpython-314.pyc +0 -0
  50. package/hooks/__pycache__/enforce-documentation.cpython-314.pyc +0 -0
  51. package/hooks/__pycache__/enforce-dry-run.cpython-314.pyc +0 -0
  52. package/hooks/__pycache__/enforce-environment.cpython-314.pyc +0 -0
  53. package/hooks/__pycache__/enforce-external-research.cpython-314.pyc +0 -0
  54. package/hooks/__pycache__/enforce-freshness.cpython-314.pyc +0 -0
  55. package/hooks/__pycache__/enforce-interview.cpython-314.pyc +0 -0
  56. package/hooks/__pycache__/enforce-page-components.cpython-314.pyc +0 -0
  57. package/hooks/__pycache__/enforce-page-data-schema.cpython-314.pyc +0 -0
  58. package/hooks/__pycache__/enforce-questions-sourced.cpython-314.pyc +0 -0
  59. package/hooks/__pycache__/enforce-refactor.cpython-314.pyc +0 -0
  60. package/hooks/__pycache__/enforce-research.cpython-314.pyc +0 -0
  61. package/hooks/__pycache__/enforce-schema-from-interview.cpython-314.pyc +0 -0
  62. package/hooks/__pycache__/enforce-schema.cpython-314.pyc +0 -0
  63. package/hooks/__pycache__/enforce-scope.cpython-314.pyc +0 -0
  64. package/hooks/__pycache__/enforce-tdd-red.cpython-314.pyc +0 -0
  65. package/hooks/__pycache__/enforce-ui-disambiguation.cpython-314.pyc +0 -0
  66. package/hooks/__pycache__/enforce-ui-interview.cpython-314.pyc +0 -0
  67. package/hooks/__pycache__/enforce-verify.cpython-314.pyc +0 -0
  68. package/hooks/__pycache__/generate-adr-options.cpython-314.pyc +0 -0
  69. package/hooks/__pycache__/generate-manifest-entry.cpython-314.pyc +0 -0
  70. package/hooks/__pycache__/hook_utils.cpython-314.pyc +0 -0
  71. package/hooks/__pycache__/notify-input-needed.cpython-314.pyc +0 -0
  72. package/hooks/__pycache__/notify-phase-complete.cpython-314.pyc +0 -0
  73. package/hooks/__pycache__/ntfy-on-question.cpython-314.pyc +0 -0
  74. package/hooks/__pycache__/orchestrator-completion.cpython-314.pyc +0 -0
  75. package/hooks/__pycache__/orchestrator-handoff.cpython-314.pyc +0 -0
  76. package/hooks/__pycache__/orchestrator-session-startup.cpython-314.pyc +0 -0
  77. package/hooks/__pycache__/parallel-orchestrator.cpython-314.pyc +0 -0
  78. package/hooks/__pycache__/periodic-reground.cpython-314.pyc +0 -0
  79. package/hooks/__pycache__/project-document-prompt.cpython-314.pyc +0 -0
  80. package/hooks/__pycache__/remote-question-proxy.cpython-314.pyc +0 -0
  81. package/hooks/__pycache__/remote-question-server.cpython-314.pyc +0 -0
  82. package/hooks/__pycache__/run-code-review.cpython-314.pyc +0 -0
  83. package/hooks/__pycache__/run-visual-qa.cpython-314.pyc +0 -0
  84. package/hooks/__pycache__/session-logger.cpython-314.pyc +0 -0
  85. package/hooks/__pycache__/session-startup.cpython-314.pyc +0 -0
  86. package/hooks/__pycache__/track-scope-coverage.cpython-314.pyc +0 -0
  87. package/hooks/__pycache__/track-token-usage.cpython-314.pyc +0 -0
  88. package/hooks/__pycache__/track-tool-use.cpython-314.pyc +0 -0
  89. package/hooks/__pycache__/update-adr-decision.cpython-314.pyc +0 -0
  90. package/hooks/__pycache__/update-api-showcase.cpython-314.pyc +0 -0
  91. package/hooks/__pycache__/update-registry.cpython-314.pyc +0 -0
  92. package/hooks/__pycache__/update-ui-showcase.cpython-314.pyc +0 -0
  93. package/hooks/__pycache__/verify-after-green.cpython-314.pyc +0 -0
  94. package/hooks/__pycache__/verify-implementation.cpython-314.pyc +0 -0
  95. package/hooks/api-workflow-check.py +34 -0
  96. package/hooks/auto-answer.py +97 -20
  97. package/{.claude/hooks → hooks}/completion-promise-detector.py +0 -0
  98. package/{.claude/hooks → hooks}/context-capacity-warning.py +0 -0
  99. package/{.claude/hooks → hooks}/docs-update-check.py +0 -0
  100. package/{.claude/hooks → hooks}/enforce-dry-run.py +0 -0
  101. package/hooks/enforce-external-research.py +25 -0
  102. package/hooks/enforce-interview.py +20 -0
  103. package/{.claude/hooks → hooks}/generate-adr-options.py +0 -0
  104. package/{.claude/hooks → hooks}/hook_utils.py +0 -0
  105. package/hooks/ntfy-on-question.py +15 -2
  106. package/hooks/orchestrator-handoff.py +81 -3
  107. package/{.claude/hooks → hooks}/parallel-orchestrator.py +0 -0
  108. package/hooks/periodic-reground.py +40 -0
  109. package/{.claude/hooks → hooks}/remote-question-server.py +0 -0
  110. package/hooks/run-code-review.py +176 -29
  111. package/{.claude/hooks → hooks}/run-visual-qa.py +0 -0
  112. package/hooks/session-logger.py +27 -1
  113. package/hooks/session-startup.py +113 -0
  114. package/{.claude/hooks → hooks}/update-adr-decision.py +0 -0
  115. package/package.json +1 -1
  116. package/templates/.skills/hustle-interview/SKILL.md +174 -0
  117. package/templates/adr-viewer/_components/ADRViewer.tsx +326 -0
  118. package/templates/api-dev-state.json +33 -1
  119. package/templates/brand-page/page.tsx +645 -0
  120. package/templates/component/Component.visual.spec.ts +30 -24
  121. package/templates/eslint-plugin-zod-schema/index.js +446 -0
  122. package/templates/eslint-plugin-zod-schema/package.json +26 -0
  123. package/templates/github-workflows/security.yml +274 -0
  124. package/templates/hustle-build-defaults.json +53 -1
  125. package/templates/page/page.e2e.test.ts +30 -26
  126. package/templates/performance-budgets.json +63 -5
  127. package/templates/registry.json +279 -3
  128. package/templates/review-dashboard/page.tsx +510 -0
  129. package/templates/settings.json +74 -7
  130. package/templates/ui-showcase/_components/UIShowcase.tsx +47 -0
  131. package/templates/ui-showcase/_components/VisualTestingDashboard.tsx +579 -0
  132. package/.claude/commands/hustle-combine.md +0 -1089
  133. package/.claude/commands/hustle-ui-create-page.md +0 -1078
  134. package/.claude/commands/hustle-ui-create.md +0 -1058
  135. package/.claude/hooks/auto-answer.py +0 -305
  136. package/.claude/hooks/cache-research.py +0 -337
  137. package/.claude/hooks/check-api-routes.py +0 -168
  138. package/.claude/hooks/check-playwright-setup.py +0 -103
  139. package/.claude/hooks/check-storybook-setup.py +0 -81
  140. package/.claude/hooks/check-update.py +0 -132
  141. package/.claude/hooks/detect-interruption.py +0 -165
  142. package/.claude/hooks/enforce-a11y-audit.py +0 -202
  143. package/.claude/hooks/enforce-brand-guide.py +0 -241
  144. package/.claude/hooks/enforce-component-type-confirm.py +0 -97
  145. package/.claude/hooks/enforce-freshness.py +0 -184
  146. package/.claude/hooks/enforce-page-components.py +0 -186
  147. package/.claude/hooks/enforce-page-data-schema.py +0 -155
  148. package/.claude/hooks/enforce-questions-sourced.py +0 -146
  149. package/.claude/hooks/enforce-schema-from-interview.py +0 -248
  150. package/.claude/hooks/enforce-ui-disambiguation.py +0 -108
  151. package/.claude/hooks/enforce-ui-interview.py +0 -130
  152. package/.claude/hooks/generate-manifest-entry.py +0 -1161
  153. package/.claude/hooks/lib/__init__.py +0 -1
  154. package/.claude/hooks/lib/greptile.py +0 -355
  155. package/.claude/hooks/lib/ntfy.py +0 -209
  156. package/.claude/hooks/notify-input-needed.py +0 -73
  157. package/.claude/hooks/notify-phase-complete.py +0 -90
  158. package/.claude/hooks/ntfy-on-question.py +0 -240
  159. package/.claude/hooks/orchestrator-completion.py +0 -313
  160. package/.claude/hooks/orchestrator-handoff.py +0 -267
  161. package/.claude/hooks/orchestrator-session-startup.py +0 -146
  162. package/.claude/hooks/run-code-review.py +0 -393
  163. package/.claude/hooks/session-logger.py +0 -323
  164. package/.claude/hooks/test-orchestrator-reground.py +0 -248
  165. package/.claude/hooks/track-scope-coverage.py +0 -220
  166. package/.claude/hooks/track-token-usage.py +0 -121
  167. package/.claude/hooks/update-api-showcase.py +0 -161
  168. package/.claude/hooks/update-registry.py +0 -352
  169. package/.claude/hooks/update-ui-showcase.py +0 -224
  170. package/.claude/test-auto-answer-bot.py +0 -183
  171. package/.claude/test-completion-detector.py +0 -263
  172. package/.claude/test-orchestrator-state.json +0 -20
  173. package/.claude/test-orchestrator.sh +0 -271
  174. /package/{.claude/commands → commands}/hustle-build.md +0 -0
  175. /package/{.claude/hooks → hooks}/lib/__pycache__/__init__.cpython-314.pyc +0 -0
  176. /package/{.claude/hooks → hooks}/lib/__pycache__/greptile.cpython-314.pyc +0 -0
  177. /package/{.claude/hooks → hooks}/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
  178. /package/{.claude/hooks → hooks}/project-document-prompt.py +0 -0
  179. /package/{.claude/hooks → hooks}/remote-question-proxy.py +0 -0
  180. /package/{.claude/hooks → hooks}/update-testing-checklist.py +0 -0
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: ralph-status
3
+ description: Show current Ralph Wiggum loop status - phase, iteration count, elapsed time, and promises emitted
4
+ license: MIT
5
+ compatibility: Requires Claude Code with hook_utils.py
6
+ metadata:
7
+ version: "4.5.0"
8
+ category: "workflow"
9
+ tags: ['ralph', 'autonomous', 'loop', 'status']
10
+ author: "Hustle Together"
11
+ allowed-tools: Read
12
+ model: haiku
13
+ ---
14
+
15
+ # Ralph Status
16
+
17
+ Show the current status of autonomous Ralph Wiggum loops.
18
+
19
+ ## Usage
20
+
21
+ ```
22
+ /ralph-status
23
+ ```
24
+
25
+ ## What It Shows
26
+
27
+ 1. **Current Phase** - Which workflow phase is active
28
+ 2. **Iteration Count** - How many iterations in current phase
29
+ 3. **Max Iterations** - The limit before safety cutoff
30
+ 4. **Active Promise** - Any completion promise waiting to be fulfilled
31
+ 5. **Recent History** - Last 5 promise detections
32
+ 6. **Elapsed Time** - How long the current session has been running
33
+
34
+ ## Output Format
35
+
36
+ ```
37
+ ┌─────────────────────────────────────────────────────────────────┐
38
+ │ RALPH WIGGUM STATUS │
39
+ ├─────────────────────────────────────────────────────────────────┤
40
+ │ │
41
+ │ Workflow ID: session-20251230-143022 │
42
+ │ Current Phase: tdd_green │
43
+ │ Iteration: 7 / 25 (max) │
44
+ │ Active Promise: None │
45
+ │ Elapsed: 12m 34s │
46
+ │ │
47
+ │ Recent Promises: │
48
+ │ └─ DONE via Write at 14:28:15 │
49
+ │ └─ TESTED via Bash at 14:25:42 │
50
+ │ │
51
+ │ Phase Iterations: │
52
+ │ └─ tdd_red: 3 │
53
+ │ └─ tdd_green: 7 │
54
+ │ │
55
+ └─────────────────────────────────────────────────────────────────┘
56
+ ```
57
+
58
+ ## Implementation
59
+
60
+ <claude-commands-template>
61
+ When /ralph-status is invoked:
62
+
63
+ 1. Read the workflow state files:
64
+ - `.claude/api-dev-state.json` - Main workflow state
65
+ - `.claude/completion-promises.json` - Ralph loop state
66
+
67
+ 2. Extract and display:
68
+ - workflow_id from state
69
+ - Current phase from state.phases (find "in_progress")
70
+ - phase_iterations from state
71
+ - active_promise from completion-promises.json
72
+ - history from completion-promises.json (last 5)
73
+
74
+ 3. Calculate elapsed time:
75
+ - Read workflow log from `.claude/workflow-logs/{workflow_id}.json`
76
+ - Get started_at timestamp
77
+ - Calculate difference from now
78
+
79
+ 4. Format output as shown above
80
+
81
+ 5. If no active workflow:
82
+ ```
83
+ No active workflow. Start one with:
84
+ - /api-create [endpoint]
85
+ - /hustle-build [prompt]
86
+ ```
87
+ </claude-commands-template>
@@ -150,3 +150,62 @@ This phase is **not part of the regular TDD workflow** and must only be applied
150
150
  - Testing notes
151
151
  - Document expected behavior and edge cases
152
152
  - Include real-world output examples
153
+
154
+ ## Autonomous Loop Completion (Ralph Wiggum Pattern)
155
+
156
+ When running in autonomous mode (`--auto` flag or `/ralph-loop`), this skill supports
157
+ self-terminating loops for iterative refactoring cycles.
158
+
159
+ ### Promise Signal
160
+
161
+ After completing refactoring and verifying tests still pass, output:
162
+
163
+ ```
164
+ <promise>REFACTORED</promise>
165
+ ```
166
+
167
+ This signal is detected by the `completion-promise-detector.py` hook, which:
168
+ 1. Records the promise in `.claude/completion-promises.json`
169
+ 2. Allows graceful workflow termination
170
+ 3. Prevents infinite refactoring loops
171
+
172
+ ### When to Output the Promise
173
+
174
+ Output `<promise>REFACTORED</promise>` when:
175
+ - All identified refactoring opportunities have been addressed
176
+ - Tests are still passing (verify with `pnpm test`)
177
+ - No additional cleanup is needed
178
+ - Code meets project quality standards
179
+
180
+ ### Iterative Refactor Loop
181
+
182
+ ```
183
+ ┌─────────────────────────────────────────────────────────────────┐
184
+ │ REFACTOR LOOP (Ralph Wiggum) │
185
+ ├─────────────────────────────────────────────────────────────────┤
186
+ │ │
187
+ │ 1. Identify refactoring opportunities │
188
+ │ └─ Code smells, duplication, complexity │
189
+ │ │
190
+ │ 2. Apply refactoring │
191
+ │ └─ Run tests → Failing? → Fix before continuing │
192
+ │ │
193
+ │ 3. Review result │
194
+ │ └─ More opportunities? → Loop back to step 1 │
195
+ │ │
196
+ │ 4. All clean? │
197
+ │ └─ Output: <promise>REFACTORED</promise> │
198
+ │ └─ Hook detects → Workflow terminates gracefully │
199
+ │ │
200
+ └─────────────────────────────────────────────────────────────────┘
201
+ ```
202
+
203
+ **Credit:** Ralph Wiggum pattern by [Geoffrey Huntley](https://ghuntley.com/ralph/)
204
+
205
+ ## See Also
206
+
207
+ - `/red` - Write failing tests
208
+ - `/green` - Minimal implementation
209
+ - `/cycle` - Full TDD cycle
210
+ - `/ralph-loop` - Autonomous loop execution
211
+ - [docs/AUTONOMOUS_LOOPS.md](../../docs/AUTONOMOUS_LOOPS.md) - Pattern documentation
@@ -0,0 +1,522 @@
1
+ ---
2
+ name: shadcn
3
+ description: ShadCN UI documentation and component installation with auto-updating docs
4
+ tools: Bash, Read, Write, Glob, WebFetch, mcp__context7__resolve-library-id, mcp__context7__get-library-docs
5
+ model: sonnet
6
+ ---
7
+
8
+ # ShadCN Skill
9
+
10
+ Access latest ShadCN UI documentation, install components, and ensure docs stay fresh.
11
+
12
+ ## Documentation Freshness
13
+
14
+ **Auto-Update Policy:** Every 15 days, this skill checks for documentation updates.
15
+
16
+ ### Freshness Check
17
+
18
+ On every invocation, check `.claude/research/shadcn/index.json`:
19
+
20
+ ```json
21
+ {
22
+ "library": "shadcn",
23
+ "last_fetched": "2025-12-29T10:00:00Z",
24
+ "freshness_days": 15,
25
+ "version": "2.1.0",
26
+ "sources": [
27
+ "https://ui.shadcn.com/docs",
28
+ "context7:/vercel/ui"
29
+ ]
30
+ }
31
+ ```
32
+
33
+ **If stale (>15 days):**
34
+ ```
35
+ ⚠️ ShadCN docs are 18 days old. Fetching latest...
36
+ ```
37
+
38
+ Then auto-fetch fresh documentation via Context7.
39
+
40
+ ## Commands
41
+
42
+ ### Get Documentation
43
+
44
+ ```bash
45
+ # General ShadCN docs
46
+ /shadcn docs
47
+
48
+ # Specific component docs
49
+ /shadcn docs button
50
+ /shadcn docs form
51
+ /shadcn docs data-table
52
+
53
+ # Installation guide
54
+ /shadcn docs installation
55
+
56
+ # Theming docs
57
+ /shadcn docs theming
58
+ ```
59
+
60
+ ### Install Components
61
+
62
+ ```bash
63
+ # Install single component
64
+ /shadcn add button
65
+
66
+ # Install multiple
67
+ /shadcn add button card input
68
+
69
+ # Install all form components
70
+ /shadcn add form input select checkbox radio textarea
71
+
72
+ # Install with dependencies
73
+ /shadcn add dialog --with-deps
74
+ ```
75
+
76
+ ### Check Status
77
+
78
+ ```bash
79
+ # Show installed components
80
+ /shadcn status
81
+
82
+ # Show available components
83
+ /shadcn list
84
+
85
+ # Check for updates
86
+ /shadcn check-updates
87
+ ```
88
+
89
+ ## Execution Flow
90
+
91
+ ### Step 1: Freshness Check
92
+
93
+ ```python
94
+ # Check if docs need refresh
95
+ index_file = Path(".claude/research/shadcn/index.json")
96
+ if index_file.exists():
97
+ data = json.load(index_file)
98
+ last_fetched = datetime.fromisoformat(data["last_fetched"])
99
+ days_old = (datetime.now() - last_fetched).days
100
+
101
+ if days_old > 15:
102
+ print(f"⚠️ ShadCN docs are {days_old} days old. Refreshing...")
103
+ fetch_fresh_docs()
104
+ else:
105
+ print("📚 First time setup. Fetching ShadCN documentation...")
106
+ fetch_fresh_docs()
107
+ ```
108
+
109
+ ### Step 2: Fetch Documentation
110
+
111
+ Use Context7 for latest docs:
112
+
113
+ ```javascript
114
+ // Resolve library ID
115
+ mcp__context7__resolve-library-id({
116
+ libraryName: "shadcn",
117
+ query: "ShadCN UI component library for React"
118
+ })
119
+
120
+ // Get docs
121
+ mcp__context7__get-library-docs({
122
+ libraryId: "/shadcn/ui",
123
+ query: "button component usage and variants"
124
+ })
125
+ ```
126
+
127
+ ### Step 3: Cache Locally
128
+
129
+ Save to `.claude/research/shadcn/`:
130
+ - `index.json` - Metadata and freshness
131
+ - `CURRENT.md` - Full documentation summary
132
+ - `components/` - Per-component docs
133
+
134
+ ### Step 4: Respond
135
+
136
+ Return documentation with usage examples and brand guide integration.
137
+
138
+ ## Component Installation
139
+
140
+ ### With Brand Guide Integration
141
+
142
+ When installing components, auto-configure with brand:
143
+
144
+ ```bash
145
+ /shadcn add button
146
+ ```
147
+
148
+ Output:
149
+ ```
150
+ Installing Button component...
151
+
152
+ ✅ src/components/ui/button.tsx created
153
+
154
+ Auto-configured with your brand:
155
+ • Primary color: #6366F1 (from BRAND_GUIDE.md)
156
+ • Border radius: 0.5rem (from theme)
157
+ • Font: Inter (from brand)
158
+
159
+ Usage:
160
+ import { Button } from "@/components/ui/button"
161
+
162
+ <Button>Default</Button>
163
+ <Button variant="secondary">Secondary</Button>
164
+ <Button variant="destructive">Destructive</Button>
165
+
166
+ Storybook story also created:
167
+ src/components/ui/button.stories.tsx
168
+ ```
169
+
170
+ ## Documentation Structure
171
+
172
+ ### Available Topics
173
+
174
+ | Topic | Command | Description |
175
+ |-------|---------|-------------|
176
+ | Installation | `/shadcn docs installation` | Setup guide |
177
+ | Theming | `/shadcn docs theming` | CSS variables, dark mode |
178
+ | Typography | `/shadcn docs typography` | Font configuration |
179
+ | Components | `/shadcn docs [component]` | Component-specific |
180
+ | CLI | `/shadcn docs cli` | CLI commands |
181
+ | Changelog | `/shadcn docs changelog` | Latest changes |
182
+
183
+ ### Component Categories
184
+
185
+ | Category | Components |
186
+ |----------|------------|
187
+ | **Forms** | button, input, textarea, select, checkbox, radio, switch, slider, form |
188
+ | **Layout** | card, separator, scroll-area, resizable |
189
+ | **Feedback** | alert, toast, sonner, progress, skeleton |
190
+ | **Overlay** | dialog, sheet, drawer, popover, tooltip, hover-card |
191
+ | **Navigation** | tabs, navigation-menu, menubar, breadcrumb |
192
+ | **Data** | table, data-table, calendar, date-picker |
193
+
194
+ ## Freshness Report
195
+
196
+ ```bash
197
+ /shadcn status
198
+ ```
199
+
200
+ Output:
201
+ ```
202
+ ═══════════════════════════════════════════════════════════════════
203
+ SHADCN STATUS
204
+ ═══════════════════════════════════════════════════════════════════
205
+
206
+ Documentation:
207
+ Last Updated: 2025-12-29 (0 days ago) ✅
208
+ Version: 2.1.0
209
+ Source: Context7 + ui.shadcn.com
210
+
211
+ Installed Components (12):
212
+ ✅ button ✅ card ✅ input
213
+ ✅ dialog ✅ toast ✅ tabs
214
+ ✅ form ✅ select ✅ checkbox
215
+ ✅ table ✅ skeleton ✅ separator
216
+
217
+ Available Updates:
218
+ • data-table: v1.2.0 → v1.3.0 (new sorting)
219
+ • form: v1.0.0 → v1.1.0 (zod v4 support)
220
+
221
+ Brand Integration:
222
+ ✅ Theme configured from BRAND_GUIDE.md
223
+ ✅ CSS variables set in globals.css
224
+ ✅ Tailwind config extended
225
+
226
+ ═══════════════════════════════════════════════════════════════════
227
+ ```
228
+
229
+ ## Auto-Update Trigger
230
+
231
+ The skill automatically refreshes docs when:
232
+
233
+ 1. **Time-based:** >15 days since last fetch
234
+ 2. **Version mismatch:** Detected newer version available
235
+ 3. **Manual:** User runs `/shadcn docs --refresh`
236
+ 4. **Error:** Context7 returns updated content hash
237
+
238
+ ## Design System Architecture
239
+
240
+ ### Brand Guide → ShadCN Flow
241
+
242
+ ```
243
+ ┌─────────────────────────────────────────────────────────────────┐
244
+ │ DESIGN SYSTEM FLOW │
245
+ ├─────────────────────────────────────────────────────────────────┤
246
+ │ │
247
+ │ .claude/BRAND_GUIDE.md │
248
+ │ ├─ colors.primary: "#ba0c2f" │
249
+ │ ├─ colors.secondary: "#1a1a1a" │
250
+ │ ├─ typography.font_sans: "system-ui" │
251
+ │ ├─ motion.duration_normal: "300ms" │
252
+ │ └─ spacing.radius: "0.5rem" │
253
+ │ │ │
254
+ │ ▼ │
255
+ │ src/styles/globals.css │
256
+ │ ┌─────────────────────────────────────────────────────────┐ │
257
+ │ │ @layer base { │ │
258
+ │ │ :root { │ │
259
+ │ │ --primary: 350 87% 39%; /* #ba0c2f → HSL */ │ │
260
+ │ │ --primary-foreground: 0 0% 100%; │ │
261
+ │ │ --secondary: 0 0% 10%; /* #1a1a1a → HSL */ │ │
262
+ │ │ --radius: 0.5rem; │ │
263
+ │ │ --font-sans: system-ui, sans-serif; │ │
264
+ │ │ } │ │
265
+ │ │ } │ │
266
+ │ └─────────────────────────────────────────────────────────┘ │
267
+ │ │ │
268
+ │ ▼ │
269
+ │ tailwind.config.ts │
270
+ │ ┌─────────────────────────────────────────────────────────┐ │
271
+ │ │ theme: { │ │
272
+ │ │ extend: { │ │
273
+ │ │ colors: { │ │
274
+ │ │ primary: "hsl(var(--primary))", │ │
275
+ │ │ secondary: "hsl(var(--secondary))", │ │
276
+ │ │ }, │ │
277
+ │ │ borderRadius: { │ │
278
+ │ │ lg: "var(--radius)", │ │
279
+ │ │ }, │ │
280
+ │ │ } │ │
281
+ │ │ } │ │
282
+ │ └─────────────────────────────────────────────────────────┘ │
283
+ │ │ │
284
+ │ ▼ │
285
+ │ ShadCN Components (auto-styled) │
286
+ │ ├─ <Button> uses primary color │
287
+ │ ├─ <Card> uses radius and background │
288
+ │ └─ All components inherit brand values │
289
+ │ │
290
+ └─────────────────────────────────────────────────────────────────┘
291
+ ```
292
+
293
+ ### CSS Variable Mapping
294
+
295
+ When brand guide changes, these CSS variables are auto-updated:
296
+
297
+ | Brand Guide | CSS Variable | ShadCN Usage |
298
+ |-------------|--------------|--------------|
299
+ | `colors.primary` | `--primary` | Button, badges, links |
300
+ | `colors.secondary` | `--secondary` | Secondary buttons |
301
+ | `colors.accent` | `--accent` | Highlights, focus rings |
302
+ | `colors.background` | `--background` | Page backgrounds |
303
+ | `colors.foreground` | `--foreground` | Text color |
304
+ | `colors.muted` | `--muted` | Disabled states |
305
+ | `colors.destructive` | `--destructive` | Error states, delete |
306
+ | `typography.font_sans` | `--font-sans` | Body text |
307
+ | `typography.font_mono` | `--font-mono` | Code blocks |
308
+ | `spacing.radius` | `--radius` | Border radius |
309
+
310
+ ### Globals.css Complete Template
311
+
312
+ ```css
313
+ @tailwind base;
314
+ @tailwind components;
315
+ @tailwind utilities;
316
+
317
+ @layer base {
318
+ :root {
319
+ /* Colors - From BRAND_GUIDE.md */
320
+ --background: 0 0% 100%;
321
+ --foreground: 0 0% 3.9%;
322
+ --card: 0 0% 100%;
323
+ --card-foreground: 0 0% 3.9%;
324
+ --popover: 0 0% 100%;
325
+ --popover-foreground: 0 0% 3.9%;
326
+ --primary: 350 87% 39%; /* Hustle Red #ba0c2f */
327
+ --primary-foreground: 0 0% 100%;
328
+ --secondary: 0 0% 96.1%;
329
+ --secondary-foreground: 0 0% 9%;
330
+ --muted: 0 0% 96.1%;
331
+ --muted-foreground: 0 0% 45.1%;
332
+ --accent: 0 0% 96.1%;
333
+ --accent-foreground: 0 0% 9%;
334
+ --destructive: 0 84.2% 60.2%;
335
+ --destructive-foreground: 0 0% 98%;
336
+ --border: 0 0% 89.8%;
337
+ --input: 0 0% 89.8%;
338
+ --ring: 350 87% 39%; /* Match primary */
339
+
340
+ /* Spacing */
341
+ --radius: 0.5rem;
342
+
343
+ /* Typography */
344
+ --font-sans: system-ui, -apple-system, sans-serif;
345
+ --font-mono: ui-monospace, monospace;
346
+
347
+ /* Motion - From BRAND_GUIDE.md */
348
+ --animation-duration-fast: 150ms;
349
+ --animation-duration-normal: 300ms;
350
+ --animation-duration-slow: 500ms;
351
+ --animation-easing: ease-out;
352
+ }
353
+
354
+ .dark {
355
+ --background: 0 0% 3.9%;
356
+ --foreground: 0 0% 98%;
357
+ --card: 0 0% 3.9%;
358
+ --card-foreground: 0 0% 98%;
359
+ --popover: 0 0% 3.9%;
360
+ --popover-foreground: 0 0% 98%;
361
+ --primary: 350 87% 45%; /* Slightly lighter for dark */
362
+ --primary-foreground: 0 0% 100%;
363
+ --secondary: 0 0% 14.9%;
364
+ --secondary-foreground: 0 0% 98%;
365
+ --muted: 0 0% 14.9%;
366
+ --muted-foreground: 0 0% 63.9%;
367
+ --accent: 0 0% 14.9%;
368
+ --accent-foreground: 0 0% 98%;
369
+ --destructive: 0 62.8% 30.6%;
370
+ --destructive-foreground: 0 0% 98%;
371
+ --border: 0 0% 14.9%;
372
+ --input: 0 0% 14.9%;
373
+ --ring: 350 87% 45%;
374
+ }
375
+ }
376
+
377
+ @layer base {
378
+ * {
379
+ @apply border-border;
380
+ }
381
+ body {
382
+ @apply bg-background text-foreground;
383
+ font-family: var(--font-sans);
384
+ }
385
+ }
386
+ ```
387
+
388
+ ### Registry Integration
389
+
390
+ Brand guide elements tracked in `registry.json`:
391
+
392
+ ```json
393
+ {
394
+ "brand_guide": {
395
+ "file": ".claude/BRAND_GUIDE.md",
396
+ "globals_css": "src/styles/globals.css",
397
+ "tailwind_config": "tailwind.config.ts",
398
+ "theme_file": "src/lib/theme.ts",
399
+ "css_variables": {
400
+ "--primary": "350 87% 39%",
401
+ "--secondary": "0 0% 96.1%",
402
+ "--radius": "0.5rem",
403
+ "--font-sans": "system-ui"
404
+ },
405
+ "shadcn": {
406
+ "initialized": true,
407
+ "components_installed": ["button", "card", "input"],
408
+ "theme_configured": true,
409
+ "last_sync": "2025-12-29T10:00:00Z"
410
+ }
411
+ }
412
+ }
413
+ ```
414
+
415
+ ## Brand Guide Sync
416
+
417
+ When brand guide is edited, components auto-update:
418
+
419
+ ### Sync Command
420
+
421
+ ```bash
422
+ /shadcn sync
423
+ ```
424
+
425
+ This command:
426
+ 1. Reads `.claude/BRAND_GUIDE.md`
427
+ 2. Converts colors to HSL for CSS variables
428
+ 3. Updates `globals.css`
429
+ 4. Updates `tailwind.config.ts`
430
+ 5. Updates registry with new values
431
+
432
+ ### Auto-Sync on Brand Edit
433
+
434
+ The `brand-sync.py` hook triggers sync when:
435
+ - `BRAND_GUIDE.md` is edited
436
+ - `/hustle-brand --edit` is run
437
+ - New brand guide is created
438
+
439
+ ### Sync Output
440
+
441
+ ```
442
+ ═══════════════════════════════════════════════════════════════
443
+ BRAND → SHADCN SYNC
444
+ ═══════════════════════════════════════════════════════════════
445
+
446
+ Reading Brand Guide...
447
+ Primary: #ba0c2f → hsl(350, 87%, 39%)
448
+ Secondary: #1a1a1a → hsl(0, 0%, 10%)
449
+ Font: system-ui
450
+
451
+ Updating globals.css...
452
+ ✅ --primary updated
453
+ ✅ --secondary updated
454
+ ✅ --font-sans updated
455
+ ✅ --radius updated
456
+
457
+ Updating tailwind.config.ts...
458
+ ✅ Colors extended
459
+ ✅ Font family set
460
+
461
+ Updating registry.json...
462
+ ✅ CSS variables recorded
463
+ ✅ Sync timestamp updated
464
+
465
+ All 12 installed components will now use updated brand values.
466
+
467
+ ═══════════════════════════════════════════════════════════════
468
+ ```
469
+
470
+ ## Integration with Brand Guide
471
+
472
+ ShadCN components automatically use brand values:
473
+
474
+ ```tsx
475
+ // Button uses brand primary color
476
+ <Button>Primary Action</Button>
477
+
478
+ // Card uses brand radius and background
479
+ <Card>
480
+ <CardHeader>
481
+ <CardTitle>Brand-Styled Card</CardTitle>
482
+ </CardHeader>
483
+ </Card>
484
+ ```
485
+
486
+ Theme variables in `globals.css`:
487
+ ```css
488
+ @layer base {
489
+ :root {
490
+ /* From BRAND_GUIDE.md */
491
+ --primary: 350 87% 39%;
492
+ --primary-foreground: 0 0% 100%;
493
+ --radius: 0.5rem;
494
+ /* ... */
495
+ }
496
+ }
497
+ ```
498
+
499
+ ## Examples
500
+
501
+ ```bash
502
+ # Get button documentation
503
+ /shadcn docs button
504
+
505
+ # Install form components for a signup page
506
+ /shadcn add form input button checkbox
507
+
508
+ # Check what's installed
509
+ /shadcn status
510
+
511
+ # Force refresh documentation
512
+ /shadcn docs --refresh
513
+
514
+ # Get theming help
515
+ /shadcn docs theming
516
+ ```
517
+
518
+ ## See Also
519
+
520
+ - `/hustle-brand` - Create brand guide (configures ShadCN theme)
521
+ - `/hustle-ui-create` - Create components using ShadCN
522
+ - Context7 MCP - Documentation source