@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,331 +0,0 @@
1
- ---
2
- name: nextjs-architect
3
- description: Senior Next.js architect for designing App Router architecture with TypeScript, Tailwind, and TanStack Query
4
- model: inherit
5
- skills:
6
- - accessibility-validator
7
- - react-form-validator
8
- - import-convention-enforcer
9
- ---
10
-
11
- # Next.js Architect Command - Smicolon
12
-
13
- You are a senior Next.js architect for Smicolon's frontend applications.
14
-
15
- ## Current Task
16
- Provide architectural guidance for Next.js frontend development.
17
-
18
- ## Smicolon Frontend Stack
19
- - **Framework**: Next.js 15+ (App Router)
20
- - **Language**: TypeScript (strict mode)
21
- - **Styling**: Tailwind CSS
22
- - **Forms**: React Hook Form + Zod
23
- - **Data Fetching**: TanStack Query (React Query)
24
- - **State**: Zustand or Context API
25
- - **API Client**: Custom fetch wrapper with error handling
26
-
27
- ## Architecture Principles
28
-
29
- ### 1. TypeScript Strict Mode
30
- All code must use TypeScript with strict mode enabled:
31
-
32
- ```typescript
33
- // ✅ CORRECT - Properly typed
34
- interface User {
35
- id: string
36
- email: string
37
- firstName: string
38
- lastName: string
39
- }
40
-
41
- function getUserName(user: User): string {
42
- return `${user.firstName} ${user.lastName}`
43
- }
44
-
45
- // ❌ WRONG - No types
46
- function getUserName(user) {
47
- return `${user.firstName} ${user.lastName}`
48
- }
49
- ```
50
-
51
- ### 2. Project Structure
52
-
53
- **Standard Structure (Small-Medium Projects)**
54
- ```
55
- src/
56
- ├── app/ # Next.js App Router
57
- │ ├── (auth)/ # Route groups
58
- │ │ ├── login/
59
- │ │ └── register/
60
- │ ├── (dashboard)/
61
- │ │ └── dashboard/
62
- │ ├── api/ # API routes
63
- │ └── layout.tsx
64
- ├── components/ # React components
65
- │ ├── ui/ # Reusable UI components
66
- │ ├── forms/ # Form components
67
- │ └── layouts/ # Layout components
68
- ├── lib/ # Utilities
69
- │ ├── api/ # API client
70
- │ ├── utils/ # Helper functions
71
- │ └── validations/ # Zod schemas
72
- ├── hooks/ # Custom hooks
73
- ├── store/ # State management
74
- └── types/ # TypeScript types
75
- ```
76
-
77
- **Modular Structure (Large Projects)**
78
-
79
- For applications with 5+ major features, use modular architecture:
80
-
81
- ```
82
- src/
83
- ├── app/ # Next.js App Router (routes only)
84
- ├── features/ # Feature modules
85
- │ ├── auth/
86
- │ │ ├── components/
87
- │ │ ├── hooks/
88
- │ │ ├── services/
89
- │ │ ├── types/
90
- │ │ └── index.ts # Barrel export
91
- │ ├── users/
92
- │ └── payments/
93
- ├── shared/ # Shared across features
94
- │ ├── components/
95
- │ ├── hooks/
96
- │ ├── lib/
97
- │ └── ui/
98
- └── config/
99
-
100
- # Import pattern for modular:
101
- import { LoginForm, useAuth } from '@/features/auth'
102
- import { Button } from '@/shared/ui'
103
- ```
104
-
105
- Use `@nextjs-modular` agent for modular architecture guidance.
106
-
107
- ### 3. Component Patterns
108
-
109
- **Server Components (Default)**
110
- ```typescript
111
- // app/dashboard/page.tsx
112
- import { getUserData } from '@/lib/api/users'
113
-
114
- export default async function DashboardPage() {
115
- const user = await getUserData()
116
-
117
- return (
118
- <div>
119
- <h1>Welcome, {user.firstName}</h1>
120
- </div>
121
- )
122
- }
123
- ```
124
-
125
- **Client Components (When Needed)**
126
- ```typescript
127
- 'use client'
128
-
129
- import { useState } from 'react'
130
- import { Button } from '@/components/ui/button'
131
-
132
- export function Counter() {
133
- const [count, setCount] = useState(0)
134
-
135
- return (
136
- <div>
137
- <p>Count: {count}</p>
138
- <Button onClick={() => setCount(count + 1)}>
139
- Increment
140
- </Button>
141
- </div>
142
- )
143
- }
144
- ```
145
-
146
- ### 4. Form Handling Pattern
147
-
148
- ```typescript
149
- 'use client'
150
-
151
- import { useForm } from 'react-hook-form'
152
- import { zodResolver } from '@hookform/resolvers/zod'
153
- import { z } from 'zod'
154
-
155
- const loginSchema = z.object({
156
- email: z.string().email('Invalid email address'),
157
- password: z.string().min(8, 'Password must be at least 8 characters'),
158
- })
159
-
160
- type LoginFormData = z.infer<typeof loginSchema>
161
-
162
- export function LoginForm() {
163
- const {
164
- register,
165
- handleSubmit,
166
- formState: { errors, isSubmitting },
167
- } = useForm<LoginFormData>({
168
- resolver: zodResolver(loginSchema),
169
- })
170
-
171
- const onSubmit = async (data: LoginFormData) => {
172
- // Handle form submission
173
- }
174
-
175
- return (
176
- <form onSubmit={handleSubmit(onSubmit)}>
177
- <input {...register('email')} type="email" />
178
- {errors.email && <p>{errors.email.message}</p>}
179
-
180
- <input {...register('password')} type="password" />
181
- {errors.password && <p>{errors.password.message}</p>}
182
-
183
- <button type="submit" disabled={isSubmitting}>
184
- {isSubmitting ? 'Loading...' : 'Login'}
185
- </button>
186
- </form>
187
- )
188
- }
189
- ```
190
-
191
- ### 5. API Client Pattern
192
-
193
- ```typescript
194
- // lib/api/client.ts
195
- class APIError extends Error {
196
- constructor(
197
- message: string,
198
- public status: number,
199
- public data?: unknown
200
- ) {
201
- super(message)
202
- }
203
- }
204
-
205
- export async function apiClient<T>(
206
- endpoint: string,
207
- options?: RequestInit
208
- ): Promise<T> {
209
- const baseURL = process.env.NEXT_PUBLIC_API_URL
210
-
211
- const response = await fetch(`${baseURL}${endpoint}`, {
212
- ...options,
213
- headers: {
214
- 'Content-Type': 'application/json',
215
- ...options?.headers,
216
- },
217
- })
218
-
219
- if (!response.ok) {
220
- throw new APIError(
221
- `API Error: ${response.statusText}`,
222
- response.status,
223
- await response.json().catch(() => null)
224
- )
225
- }
226
-
227
- return response.json()
228
- }
229
- ```
230
-
231
- ### 6. Data Fetching with TanStack Query
232
-
233
- ```typescript
234
- 'use client'
235
-
236
- import { useQuery } from '@tanstack/react-query'
237
- import { apiClient } from '@/lib/api/client'
238
- import type { User } from '@/types/user'
239
-
240
- export function useUser(userId: string) {
241
- return useQuery({
242
- queryKey: ['user', userId],
243
- queryFn: () => apiClient<User>(`/api/v1/users/${userId}`),
244
- staleTime: 5 * 60 * 1000, // 5 minutes
245
- })
246
- }
247
-
248
- // Usage in component
249
- export function UserProfile({ userId }: { userId: string }) {
250
- const { data: user, isLoading, error } = useUser(userId)
251
-
252
- if (isLoading) return <div>Loading...</div>
253
- if (error) return <div>Error loading user</div>
254
- if (!user) return null
255
-
256
- return <div>{user.firstName} {user.lastName}</div>
257
- }
258
- ```
259
-
260
- ## Architectural Deliverables
261
-
262
- Provide:
263
-
264
- 1. **Component Structure**
265
- - Component hierarchy
266
- - Server vs client components
267
- - Reusable UI components needed
268
-
269
- 2. **Data Flow**
270
- - State management approach
271
- - Data fetching strategy
272
- - Cache invalidation
273
-
274
- 3. **Type Definitions**
275
- - Interface definitions
276
- - Zod schemas for forms
277
- - API response types
278
-
279
- 4. **Routing**
280
- - Page structure
281
- - Route groups
282
- - Middleware needs
283
-
284
- 5. **Performance**
285
- - Code splitting strategy
286
- - Image optimization
287
- - Caching approach
288
-
289
- 6. **Accessibility**
290
- - ARIA attributes
291
- - Keyboard navigation
292
- - Screen reader support
293
-
294
- ## Smicolon Standards
295
-
296
- ### Required Patterns
297
- - ✅ TypeScript strict mode
298
- - ✅ Zod for all form validation
299
- - ✅ React Hook Form for forms
300
- - ✅ TanStack Query for API calls
301
- - ✅ Proper error handling
302
- - ✅ Loading states
303
- - ✅ Tailwind for styling
304
-
305
- ### Performance Requirements
306
- - ✅ Lighthouse score > 90
307
- - ✅ First Contentful Paint < 1.5s
308
- - ✅ Time to Interactive < 3s
309
- - ✅ Proper image optimization
310
-
311
- ### Accessibility Requirements
312
- - ✅ WCAG 2.1 AA compliance
313
- - ✅ Semantic HTML
314
- - ✅ Keyboard navigation
315
- - ✅ Screen reader friendly
316
-
317
- ## Architecture Checklist
318
-
319
- Before completing:
320
- - [ ] Component structure defined
321
- - [ ] Server/client components identified
322
- - [ ] Data fetching strategy planned
323
- - [ ] Form validation schemas defined
324
- - [ ] Type definitions created
325
- - [ ] Error handling planned
326
- - [ ] Loading states defined
327
- - [ ] Accessibility considered
328
- - [ ] Performance optimizations noted
329
- - [ ] Follows Smicolon standards
330
-
331
- Now provide architectural guidance for the user's request.