@smicolon/ai-kit 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +73 -40
  2. package/dist/index.js +312 -127
  3. package/package.json +5 -5
  4. package/.claude-plugin/marketplace.json +0 -369
  5. package/packs/architect/CHANGELOG.md +0 -17
  6. package/packs/architect/README.md +0 -58
  7. package/packs/architect/agents/system-architect.md +0 -768
  8. package/packs/architect/commands/diagram-create.md +0 -300
  9. package/packs/better-auth/.mcp.json +0 -14
  10. package/packs/better-auth/CHANGELOG.md +0 -26
  11. package/packs/better-auth/README.md +0 -125
  12. package/packs/better-auth/agents/auth-architect.md +0 -278
  13. package/packs/better-auth/commands/auth-provider-add.md +0 -265
  14. package/packs/better-auth/commands/auth-setup.md +0 -298
  15. package/packs/better-auth/skills/auth-security/SKILL.md +0 -425
  16. package/packs/better-auth/skills/better-auth-patterns/SKILL.md +0 -455
  17. package/packs/dev-loop/CHANGELOG.md +0 -69
  18. package/packs/dev-loop/README.md +0 -155
  19. package/packs/dev-loop/commands/cancel-dev.md +0 -21
  20. package/packs/dev-loop/commands/dev-loop.md +0 -72
  21. package/packs/dev-loop/commands/dev-plan.md +0 -351
  22. package/packs/dev-loop/hooks/hooks.json +0 -15
  23. package/packs/dev-loop/hooks/stop-hook.sh +0 -178
  24. package/packs/dev-loop/scripts/setup-dev-loop.sh +0 -194
  25. package/packs/dev-loop/skills/tdd-planner/SKILL.md +0 -249
  26. package/packs/dev-loop/skills/tdd-planner/references/framework-patterns.md +0 -874
  27. package/packs/dev-loop/skills/tdd-planner/references/good-example.md +0 -260
  28. package/packs/dev-loop/skills/tdd-planner/references/plan-template.md +0 -275
  29. package/packs/django/CHANGELOG.md +0 -39
  30. package/packs/django/README.md +0 -92
  31. package/packs/django/agents/django-architect.md +0 -182
  32. package/packs/django/agents/django-builder.md +0 -250
  33. package/packs/django/agents/django-feature-based.md +0 -420
  34. package/packs/django/agents/django-reviewer.md +0 -253
  35. package/packs/django/agents/django-tester.md +0 -230
  36. package/packs/django/commands/api-endpoint.md +0 -285
  37. package/packs/django/commands/model-create.md +0 -178
  38. package/packs/django/commands/test-generate.md +0 -325
  39. package/packs/django/rules/migrations.md +0 -138
  40. package/packs/django/rules/models.md +0 -167
  41. package/packs/django/rules/serializers.md +0 -126
  42. package/packs/django/rules/services.md +0 -131
  43. package/packs/django/rules/tests.md +0 -140
  44. package/packs/django/rules/views.md +0 -102
  45. package/packs/django/skills/import-convention-enforcer/SKILL.md +0 -226
  46. package/packs/django/skills/import-convention-enforcer/patterns/django-imports.md +0 -343
  47. package/packs/django/skills/migration-safety-checker/SKILL.md +0 -375
  48. package/packs/django/skills/model-entity-validator/SKILL.md +0 -298
  49. package/packs/django/skills/performance-optimizer/SKILL.md +0 -447
  50. package/packs/django/skills/red-phase-verifier/SKILL.md +0 -180
  51. package/packs/django/skills/security-first-validator/SKILL.md +0 -435
  52. package/packs/django/skills/test-coverage-advisor/SKILL.md +0 -394
  53. package/packs/django/skills/test-validity-checker/SKILL.md +0 -194
  54. package/packs/failure-log/CHANGELOG.md +0 -20
  55. package/packs/failure-log/README.md +0 -168
  56. package/packs/failure-log/commands/failure-add.md +0 -106
  57. package/packs/failure-log/commands/failure-list.md +0 -89
  58. package/packs/failure-log/hooks/hooks.json +0 -16
  59. package/packs/failure-log/hooks/scripts/inject-failures.sh +0 -64
  60. package/packs/failure-log/skills/failure-log-manager/SKILL.md +0 -164
  61. package/packs/flutter/CHANGELOG.md +0 -19
  62. package/packs/flutter/README.md +0 -170
  63. package/packs/flutter/agents/flutter-architect.md +0 -166
  64. package/packs/flutter/agents/flutter-builder.md +0 -303
  65. package/packs/flutter/agents/release-manager.md +0 -355
  66. package/packs/flutter/commands/fastlane-setup.md +0 -188
  67. package/packs/flutter/commands/flutter-build.md +0 -90
  68. package/packs/flutter/commands/flutter-deploy.md +0 -133
  69. package/packs/flutter/commands/flutter-test.md +0 -117
  70. package/packs/flutter/commands/signing-setup.md +0 -209
  71. package/packs/flutter/hooks/hooks.json +0 -17
  72. package/packs/flutter/skills/fastlane-knowledge/SKILL.md +0 -193
  73. package/packs/flutter/skills/flutter-architecture/SKILL.md +0 -127
  74. package/packs/flutter/skills/store-publishing/SKILL.md +0 -163
  75. package/packs/hono/CHANGELOG.md +0 -19
  76. package/packs/hono/README.md +0 -143
  77. package/packs/hono/agents/hono-architect.md +0 -240
  78. package/packs/hono/agents/hono-builder.md +0 -285
  79. package/packs/hono/agents/hono-reviewer.md +0 -279
  80. package/packs/hono/agents/hono-tester.md +0 -346
  81. package/packs/hono/commands/middleware-create.md +0 -223
  82. package/packs/hono/commands/project-init.md +0 -306
  83. package/packs/hono/commands/route-create.md +0 -153
  84. package/packs/hono/commands/rpc-client.md +0 -263
  85. package/packs/hono/skills/cloudflare-bindings/SKILL.md +0 -408
  86. package/packs/hono/skills/hono-patterns/SKILL.md +0 -309
  87. package/packs/hono/skills/rpc-typesafe/SKILL.md +0 -388
  88. package/packs/hono/skills/zod-validation/SKILL.md +0 -332
  89. package/packs/nestjs/CHANGELOG.md +0 -29
  90. package/packs/nestjs/README.md +0 -75
  91. package/packs/nestjs/agents/nestjs-architect.md +0 -402
  92. package/packs/nestjs/agents/nestjs-builder.md +0 -301
  93. package/packs/nestjs/agents/nestjs-tester.md +0 -437
  94. package/packs/nestjs/commands/module-create.md +0 -369
  95. package/packs/nestjs/rules/controllers.md +0 -92
  96. package/packs/nestjs/rules/dto.md +0 -124
  97. package/packs/nestjs/rules/entities.md +0 -102
  98. package/packs/nestjs/rules/services.md +0 -106
  99. package/packs/nestjs/skills/barrel-export-manager/SKILL.md +0 -389
  100. package/packs/nestjs/skills/import-convention-enforcer/SKILL.md +0 -365
  101. package/packs/nextjs/CHANGELOG.md +0 -36
  102. package/packs/nextjs/README.md +0 -76
  103. package/packs/nextjs/agents/frontend-tester.md +0 -680
  104. package/packs/nextjs/agents/frontend-visual.md +0 -820
  105. package/packs/nextjs/agents/nextjs-architect.md +0 -331
  106. package/packs/nextjs/agents/nextjs-modular.md +0 -433
  107. package/packs/nextjs/commands/component-create.md +0 -398
  108. package/packs/nextjs/rules/api-routes.md +0 -129
  109. package/packs/nextjs/rules/components.md +0 -106
  110. package/packs/nextjs/rules/hooks.md +0 -132
  111. package/packs/nextjs/skills/accessibility-validator/SKILL.md +0 -445
  112. package/packs/nextjs/skills/import-convention-enforcer/SKILL.md +0 -399
  113. package/packs/nextjs/skills/react-form-validator/SKILL.md +0 -569
  114. package/packs/nuxtjs/CHANGELOG.md +0 -30
  115. package/packs/nuxtjs/README.md +0 -56
  116. package/packs/nuxtjs/agents/frontend-tester.md +0 -680
  117. package/packs/nuxtjs/agents/frontend-visual.md +0 -820
  118. package/packs/nuxtjs/agents/nuxtjs-architect.md +0 -537
  119. package/packs/nuxtjs/commands/component-create.md +0 -223
  120. package/packs/nuxtjs/rules/components.md +0 -101
  121. package/packs/nuxtjs/rules/composables.md +0 -118
  122. package/packs/nuxtjs/rules/server-routes.md +0 -127
  123. package/packs/nuxtjs/skills/accessibility-validator/SKILL.md +0 -183
  124. package/packs/nuxtjs/skills/import-convention-enforcer/SKILL.md +0 -196
  125. package/packs/nuxtjs/skills/veevalidate-form-validator/SKILL.md +0 -190
  126. package/packs/onboard/CHANGELOG.md +0 -22
  127. package/packs/onboard/README.md +0 -103
  128. package/packs/onboard/agents/onboard-guide.md +0 -118
  129. package/packs/onboard/commands/onboard.md +0 -313
  130. package/packs/onboard/skills/onboard-context-provider/SKILL.md +0 -98
  131. package/packs/tanstack-router/CHANGELOG.md +0 -30
  132. package/packs/tanstack-router/README.md +0 -113
  133. package/packs/tanstack-router/agents/tanstack-architect.md +0 -173
  134. package/packs/tanstack-router/agents/tanstack-builder.md +0 -360
  135. package/packs/tanstack-router/agents/tanstack-tester.md +0 -454
  136. package/packs/tanstack-router/commands/form-create.md +0 -313
  137. package/packs/tanstack-router/commands/query-create.md +0 -263
  138. package/packs/tanstack-router/commands/route-create.md +0 -190
  139. package/packs/tanstack-router/commands/table-create.md +0 -413
  140. package/packs/tanstack-router/skills/ai-patterns/SKILL.md +0 -370
  141. package/packs/tanstack-router/skills/db-patterns/SKILL.md +0 -346
  142. package/packs/tanstack-router/skills/devtools-patterns/SKILL.md +0 -415
  143. package/packs/tanstack-router/skills/form-patterns/SKILL.md +0 -425
  144. package/packs/tanstack-router/skills/pacer-patterns/SKILL.md +0 -341
  145. package/packs/tanstack-router/skills/query-patterns/SKILL.md +0 -359
  146. package/packs/tanstack-router/skills/router-patterns/SKILL.md +0 -285
  147. package/packs/tanstack-router/skills/store-patterns/SKILL.md +0 -351
  148. package/packs/tanstack-router/skills/table-patterns/SKILL.md +0 -531
  149. package/packs/tanstack-router/skills/tanstack-conventions/SKILL.md +0 -428
  150. package/packs/tanstack-router/skills/virtual-patterns/SKILL.md +0 -490
  151. package/packs/worktree/CHANGELOG.md +0 -45
  152. package/packs/worktree/README.md +0 -219
  153. package/packs/worktree/commands/wt.md +0 -93
  154. package/packs/worktree/scripts/wt.sh +0 -957
  155. package/packs/worktree/skills/worktree-manager/SKILL.md +0 -113
@@ -1,428 +0,0 @@
1
- ---
2
- name: TanStack Conventions
3
- description: >-
4
- Auto-enforce cross-cutting TanStack conventions and import patterns. Activates
5
- on all TanStack development to ensure consistent project structure, imports,
6
- and integration patterns across Router, Query, Form, Table, and Virtual.
7
- version: 1.0.0
8
- ---
9
-
10
- # TanStack Conventions
11
-
12
- This skill enforces cross-cutting conventions across all TanStack libraries for consistent, maintainable React SPA development.
13
-
14
- ## Project Structure
15
-
16
- ### Feature-Based Organization
17
- ```
18
- src/
19
- ├── features/
20
- │ ├── posts/
21
- │ │ ├── components/
22
- │ │ │ ├── PostList.tsx
23
- │ │ │ ├── PostCard.tsx
24
- │ │ │ ├── PostForm.tsx
25
- │ │ │ └── index.ts # Barrel export
26
- │ │ ├── hooks/
27
- │ │ │ ├── useCreatePost.ts
28
- │ │ │ ├── useUpdatePost.ts
29
- │ │ │ ├── useDeletePost.ts
30
- │ │ │ └── index.ts
31
- │ │ ├── queries/
32
- │ │ │ ├── postQueries.ts # Query options factories
33
- │ │ │ └── index.ts
34
- │ │ ├── api/
35
- │ │ │ └── postApi.ts # API client functions
36
- │ │ ├── types.ts # Feature-specific types
37
- │ │ └── index.ts # Feature barrel export
38
- │ └── users/
39
- │ └── ...
40
- ├── routes/
41
- │ ├── __root.tsx
42
- │ ├── index.tsx
43
- │ ├── posts.tsx
44
- │ ├── posts.index.tsx
45
- │ └── posts.$postId.tsx
46
- ├── lib/
47
- │ ├── query-client.ts # Query client setup
48
- │ ├── query-keys.ts # Query key factory
49
- │ └── router.ts # Router setup
50
- ├── components/
51
- │ └── ui/ # Shared UI components
52
- ├── hooks/ # Shared hooks
53
- ├── types/ # Global types
54
- └── main.tsx
55
- ```
56
-
57
- ## Import Conventions
58
-
59
- ### Always Use Path Aliases
60
- ```typescript
61
- // ✅ CORRECT: Path aliases
62
- import { PostList } from '@/features/posts/components'
63
- import { useCreatePost } from '@/features/posts/hooks'
64
- import { postQueryOptions } from '@/features/posts/queries'
65
- import { queryKeys } from '@/lib/query-keys'
66
- import { Button } from '@/components/ui'
67
-
68
- // ❌ WRONG: Relative imports across features
69
- import { User } from '../../users/types'
70
- import { queryClient } from '../../../lib/query-client'
71
-
72
- // ❌ WRONG: Deep imports bypassing barrels
73
- import { PostCard } from '@/features/posts/components/PostCard'
74
- ```
75
-
76
- ### Barrel Export Pattern
77
- ```typescript
78
- // features/posts/components/index.ts
79
- export { PostList } from './PostList'
80
- export { PostCard } from './PostCard'
81
- export { PostForm } from './PostForm'
82
-
83
- // features/posts/index.ts
84
- export * from './components'
85
- export * from './hooks'
86
- export * from './queries'
87
- export * from './types'
88
- ```
89
-
90
- ### Import Order
91
- ```typescript
92
- // 1. React and external libraries
93
- import { useState, useRef } from 'react'
94
- import { useQuery, useMutation } from '@tanstack/react-query'
95
- import { Link, useNavigate } from '@tanstack/react-router'
96
-
97
- // 2. Internal aliases (@/)
98
- import { PostCard } from '@/features/posts/components'
99
- import { queryKeys } from '@/lib/query-keys'
100
- import { Button } from '@/components/ui'
101
-
102
- // 3. Relative imports (same feature only)
103
- import { postSchema } from './schemas'
104
- import type { PostFormData } from './types'
105
- ```
106
-
107
- ## TypeScript Configuration
108
-
109
- ### tsconfig.json Path Aliases
110
- ```json
111
- {
112
- "compilerOptions": {
113
- "strict": true,
114
- "noUncheckedIndexedAccess": true,
115
- "baseUrl": ".",
116
- "paths": {
117
- "@/*": ["./src/*"]
118
- }
119
- }
120
- }
121
- ```
122
-
123
- ### Vite Configuration
124
- ```typescript
125
- // vite.config.ts
126
- import { defineConfig } from 'vite'
127
- import react from '@vitejs/plugin-react'
128
- import { TanStackRouterVite } from '@tanstack/router-plugin/vite'
129
- import tsconfigPaths from 'vite-tsconfig-paths'
130
-
131
- export default defineConfig({
132
- plugins: [
133
- TanStackRouterVite(),
134
- react(),
135
- tsconfigPaths(),
136
- ],
137
- })
138
- ```
139
-
140
- ## App Setup
141
-
142
- ### Main Entry Point
143
- ```typescript
144
- // main.tsx
145
- import { StrictMode } from 'react'
146
- import { createRoot } from 'react-dom/client'
147
- import { QueryClientProvider } from '@tanstack/react-query'
148
- import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
149
- import { RouterProvider } from '@tanstack/react-router'
150
- import { createQueryClient } from '@/lib/query-client'
151
- import { router } from '@/lib/router'
152
-
153
- const queryClient = createQueryClient()
154
-
155
- createRoot(document.getElementById('root')!).render(
156
- <StrictMode>
157
- <QueryClientProvider client={queryClient}>
158
- <RouterProvider router={router} context={{ queryClient }} />
159
- <ReactQueryDevtools />
160
- </QueryClientProvider>
161
- </StrictMode>
162
- )
163
- ```
164
-
165
- ### Router Setup
166
- ```typescript
167
- // lib/router.ts
168
- import { createRouter } from '@tanstack/react-router'
169
- import { routeTree } from '@/routeTree.gen'
170
- import type { QueryClient } from '@tanstack/react-query'
171
-
172
- export interface RouterContext {
173
- queryClient: QueryClient
174
- }
175
-
176
- export const router = createRouter({
177
- routeTree,
178
- context: {
179
- queryClient: undefined!, // Set in main.tsx
180
- },
181
- defaultPreload: 'intent',
182
- defaultPreloadStaleTime: 0,
183
- })
184
-
185
- declare module '@tanstack/react-router' {
186
- interface Register {
187
- router: typeof router
188
- }
189
- }
190
- ```
191
-
192
- ### Query Client Setup
193
- ```typescript
194
- // lib/query-client.ts
195
- import { QueryClient } from '@tanstack/react-query'
196
-
197
- export function createQueryClient() {
198
- return new QueryClient({
199
- defaultOptions: {
200
- queries: {
201
- staleTime: 60 * 1000,
202
- gcTime: 5 * 60 * 1000,
203
- retry: 1,
204
- refetchOnWindowFocus: false,
205
- },
206
- mutations: {
207
- retry: 0,
208
- },
209
- },
210
- })
211
- }
212
- ```
213
-
214
- ## Error Handling
215
-
216
- ### API Error Type
217
- ```typescript
218
- // types/api.ts
219
- export interface ApiError {
220
- message: string
221
- code: string
222
- status: number
223
- details?: Record<string, string[]>
224
- }
225
-
226
- export function isApiError(error: unknown): error is ApiError {
227
- return (
228
- typeof error === 'object' &&
229
- error !== null &&
230
- 'message' in error &&
231
- 'status' in error
232
- )
233
- }
234
- ```
235
-
236
- ### Query Error Handler
237
- ```typescript
238
- // lib/query-client.ts
239
- import { QueryClient } from '@tanstack/react-query'
240
- import { toast } from '@/components/ui/toast'
241
-
242
- export function createQueryClient() {
243
- return new QueryClient({
244
- defaultOptions: {
245
- queries: {
246
- retry: (failureCount, error) => {
247
- if (isApiError(error) && error.status === 404) return false
248
- return failureCount < 2
249
- },
250
- },
251
- mutations: {
252
- onError: (error) => {
253
- if (isApiError(error)) {
254
- toast.error(error.message)
255
- }
256
- },
257
- },
258
- },
259
- })
260
- }
261
- ```
262
-
263
- ### Route Error Boundaries
264
- ```typescript
265
- // routes/__root.tsx
266
- export const Route = createRootRouteWithContext<RouterContext>()({
267
- component: RootComponent,
268
- errorComponent: ({ error }) => (
269
- <div className="error-page">
270
- <h1>Something went wrong</h1>
271
- <p>{error.message}</p>
272
- <Link to="/">Go home</Link>
273
- </div>
274
- ),
275
- notFoundComponent: () => (
276
- <div className="not-found-page">
277
- <h1>404 - Page not found</h1>
278
- <Link to="/">Go home</Link>
279
- </div>
280
- ),
281
- })
282
- ```
283
-
284
- ## Loading States
285
-
286
- ### Route Pending
287
- ```typescript
288
- export const Route = createFileRoute('/posts/$postId')({
289
- loader: ({ context: { queryClient }, params }) =>
290
- queryClient.ensureQueryData(postQueryOptions(params.postId)),
291
- pendingComponent: () => <PostDetailSkeleton />,
292
- pendingMinMs: 200,
293
- component: PostDetailPage,
294
- })
295
- ```
296
-
297
- ### Query Loading
298
- ```typescript
299
- function PostList() {
300
- const { data, isLoading, error } = useQuery(postsQueryOptions())
301
-
302
- if (isLoading) return <PostListSkeleton />
303
- if (error) return <ErrorMessage error={error} />
304
-
305
- return (
306
- <ul>
307
- {data.map((post) => (
308
- <PostCard key={post.id} post={post} />
309
- ))}
310
- </ul>
311
- )
312
- }
313
- ```
314
-
315
- ## API Client Pattern
316
-
317
- ```typescript
318
- // features/posts/api/postApi.ts
319
- import { apiClient } from '@/lib/api-client'
320
- import type { Post, CreatePostInput, UpdatePostInput } from '../types'
321
-
322
- export const postApi = {
323
- getPosts: async (filters?: PostFilters): Promise<Post[]> => {
324
- const response = await apiClient.get('/posts', { params: filters })
325
- return response.data
326
- },
327
-
328
- getPost: async (id: string): Promise<Post> => {
329
- const response = await apiClient.get(`/posts/${id}`)
330
- return response.data
331
- },
332
-
333
- createPost: async (input: CreatePostInput): Promise<Post> => {
334
- const response = await apiClient.post('/posts', input)
335
- return response.data
336
- },
337
-
338
- updatePost: async ({ id, ...input }: UpdatePostInput): Promise<Post> => {
339
- const response = await apiClient.patch(`/posts/${id}`, input)
340
- return response.data
341
- },
342
-
343
- deletePost: async (id: string): Promise<void> => {
344
- await apiClient.delete(`/posts/${id}`)
345
- },
346
- }
347
- ```
348
-
349
- ## Type Definitions
350
-
351
- ```typescript
352
- // features/posts/types.ts
353
- export interface Post {
354
- id: string
355
- title: string
356
- content: string
357
- authorId: string
358
- published: boolean
359
- createdAt: string
360
- updatedAt: string
361
- }
362
-
363
- export interface CreatePostInput {
364
- title: string
365
- content: string
366
- published?: boolean
367
- }
368
-
369
- export interface UpdatePostInput extends Partial<CreatePostInput> {
370
- id: string
371
- }
372
-
373
- export interface PostFilters {
374
- page?: number
375
- pageSize?: number
376
- search?: string
377
- authorId?: string
378
- published?: boolean
379
- }
380
- ```
381
-
382
- ## Bun Commands
383
-
384
- ```bash
385
- # Install dependencies
386
- bun install
387
-
388
- # Add TanStack packages
389
- bun add @tanstack/react-router @tanstack/react-query @tanstack/react-form @tanstack/react-table @tanstack/react-virtual
390
- bun add -D @tanstack/router-plugin @tanstack/react-query-devtools
391
-
392
- # Dev server
393
- bun run dev
394
-
395
- # Build
396
- bun run build
397
-
398
- # Type check
399
- bun run typecheck
400
-
401
- # Generate routes
402
- bun run routes:generate
403
- ```
404
-
405
- ## Package Scripts
406
-
407
- ```json
408
- {
409
- "scripts": {
410
- "dev": "vite",
411
- "build": "tsc -b && vite build",
412
- "preview": "vite preview",
413
- "typecheck": "tsc --noEmit",
414
- "routes:generate": "tsr generate"
415
- }
416
- }
417
- ```
418
-
419
- ## Conventions Summary
420
-
421
- 1. **Feature-based structure** - Group by feature, not by type
422
- 2. **Path aliases** - Always use `@/` for imports
423
- 3. **Barrel exports** - Export through index.ts files
424
- 4. **Query key factory** - Centralized in `lib/query-keys.ts`
425
- 5. **Type safety** - Strict TypeScript, no `any`
426
- 6. **Error boundaries** - Route and component level
427
- 7. **Loading states** - Skeletons, not spinners
428
- 8. **Bun runtime** - Use bun for all commands