@mikulgohil/ai-kit 1.6.1 → 1.8.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.
@@ -0,0 +1,284 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://ai-kit.mikul.me/schema/ai-kit.config.schema.json",
4
+ "title": "AI Kit Configuration",
5
+ "description": "Configuration file generated by @mikulgohil/ai-kit. Auto-detected project settings, templates, commands, and tooling preferences.",
6
+ "type": "object",
7
+ "required": [
8
+ "version",
9
+ "scanResult",
10
+ "generatedAt",
11
+ "templates",
12
+ "commands",
13
+ "guides",
14
+ "agents",
15
+ "contexts",
16
+ "hooks",
17
+ "hookProfile",
18
+ "strictness",
19
+ "customFragments",
20
+ "tools"
21
+ ],
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "$schema": {
25
+ "type": "string",
26
+ "description": "Pointer to the JSON Schema for editor validation and autocompletion."
27
+ },
28
+ "version": {
29
+ "type": "string",
30
+ "description": "The ai-kit version that generated this configuration."
31
+ },
32
+ "scanResult": {
33
+ "$ref": "#/definitions/ProjectScan",
34
+ "description": "Auto-detected project metadata from the scan phase."
35
+ },
36
+ "generatedAt": {
37
+ "type": "string",
38
+ "description": "ISO 8601 timestamp of when this configuration was generated."
39
+ },
40
+ "templates": {
41
+ "type": "array",
42
+ "items": { "type": "string" },
43
+ "description": "List of template identifiers selected for this project."
44
+ },
45
+ "commands": {
46
+ "type": "array",
47
+ "items": { "type": "string" },
48
+ "description": "Slash commands generated for the project."
49
+ },
50
+ "guides": {
51
+ "type": "array",
52
+ "items": { "type": "string" },
53
+ "description": "Developer guides generated for the project."
54
+ },
55
+ "agents": {
56
+ "type": "array",
57
+ "items": { "type": "string" },
58
+ "description": "AI agent configurations generated for the project."
59
+ },
60
+ "contexts": {
61
+ "type": "array",
62
+ "items": { "type": "string" },
63
+ "description": "Context mode files generated for the project."
64
+ },
65
+ "hooks": {
66
+ "type": "boolean",
67
+ "description": "Whether Claude Code hooks are enabled."
68
+ },
69
+ "hookProfile": {
70
+ "type": "string",
71
+ "enum": ["minimal", "standard", "strict"],
72
+ "description": "The hook strictness profile controlling which hooks are generated."
73
+ },
74
+ "strictness": {
75
+ "type": "string",
76
+ "enum": ["strict", "standard", "relaxed"],
77
+ "description": "Overall strictness level for generated rules and guidelines."
78
+ },
79
+ "teamProfile": {
80
+ "type": "string",
81
+ "enum": ["solo-dev", "small-team", "enterprise"],
82
+ "description": "Optional team size profile that tailors generated content."
83
+ },
84
+ "customFragments": {
85
+ "type": "array",
86
+ "items": { "type": "string" },
87
+ "description": "User-provided custom rule fragments merged into generated output."
88
+ },
89
+ "tools": {
90
+ "type": "object",
91
+ "description": "Which AI coding tools to generate configuration files for.",
92
+ "required": ["claude", "cursor"],
93
+ "properties": {
94
+ "claude": {
95
+ "type": "boolean",
96
+ "description": "Generate CLAUDE.md and related Claude Code configuration."
97
+ },
98
+ "cursor": {
99
+ "type": "boolean",
100
+ "description": "Generate .cursorrules and related Cursor configuration."
101
+ }
102
+ }
103
+ }
104
+ },
105
+ "definitions": {
106
+ "ProjectScan": {
107
+ "type": "object",
108
+ "description": "Result of the automatic project scan, capturing framework, CMS, styling, tooling, and other detected metadata.",
109
+ "required": [
110
+ "framework",
111
+ "cms",
112
+ "styling",
113
+ "typescript",
114
+ "monorepo",
115
+ "figma",
116
+ "designTokens",
117
+ "staticSite",
118
+ "aiIgnorePatterns",
119
+ "tools",
120
+ "mcpServers",
121
+ "packageManager",
122
+ "projectName",
123
+ "projectPath",
124
+ "scripts"
125
+ ],
126
+ "properties": {
127
+ "framework": {
128
+ "type": "string",
129
+ "enum": ["nextjs", "react", "unknown"]
130
+ },
131
+ "nextjsVersion": {
132
+ "type": "string"
133
+ },
134
+ "routerType": {
135
+ "type": "string",
136
+ "enum": ["app", "pages", "hybrid"]
137
+ },
138
+ "cms": {
139
+ "type": "string",
140
+ "enum": ["sitecore-xmc-v2", "sitecore-xmc", "sitecore-jss", "none"]
141
+ },
142
+ "sitecorejssVersion": {
143
+ "type": "string"
144
+ },
145
+ "sitecoreContentSdkVersion": {
146
+ "type": "string"
147
+ },
148
+ "styling": {
149
+ "type": "array",
150
+ "items": {
151
+ "type": "string",
152
+ "enum": ["tailwind", "css-modules", "styled-components", "scss"]
153
+ }
154
+ },
155
+ "tailwindVersion": {
156
+ "type": "string"
157
+ },
158
+ "typescript": {
159
+ "type": "boolean"
160
+ },
161
+ "typescriptStrict": {
162
+ "type": "boolean"
163
+ },
164
+ "monorepo": {
165
+ "type": "boolean"
166
+ },
167
+ "monorepoTool": {
168
+ "type": "string",
169
+ "enum": ["turborepo", "nx", "lerna", "pnpm-workspaces"]
170
+ },
171
+ "figma": {
172
+ "type": "object",
173
+ "required": ["detected", "figmaMcp", "figmaCodeCli", "designTokens", "tokenFormat", "visualTests"],
174
+ "properties": {
175
+ "detected": { "type": "boolean" },
176
+ "figmaMcp": { "type": "boolean" },
177
+ "figmaCodeCli": { "type": "boolean" },
178
+ "designTokens": { "type": "boolean" },
179
+ "tokenFormat": {
180
+ "type": "string",
181
+ "enum": ["tailwind-v4", "tailwind-v3", "css-variables", "none"]
182
+ },
183
+ "visualTests": { "type": "boolean" }
184
+ }
185
+ },
186
+ "designTokens": {
187
+ "type": "object",
188
+ "required": ["detected", "colors", "spacing", "fonts", "breakpoints", "source"],
189
+ "properties": {
190
+ "detected": { "type": "boolean" },
191
+ "colors": {
192
+ "type": "array",
193
+ "items": { "type": "string" }
194
+ },
195
+ "spacing": {
196
+ "type": "array",
197
+ "items": { "type": "string" }
198
+ },
199
+ "fonts": {
200
+ "type": "array",
201
+ "items": { "type": "string" }
202
+ },
203
+ "breakpoints": {
204
+ "type": "array",
205
+ "items": { "type": "string" }
206
+ },
207
+ "source": {
208
+ "type": "string",
209
+ "enum": ["tailwind-config", "css-variables", "theme-inline", "none"]
210
+ }
211
+ }
212
+ },
213
+ "staticSite": {
214
+ "type": "object",
215
+ "required": ["isStatic", "hasGenerateStaticParams", "hasRevalidate", "hasStaticExport"],
216
+ "properties": {
217
+ "isStatic": { "type": "boolean" },
218
+ "outputMode": {
219
+ "type": "string",
220
+ "enum": ["export", "isr", "ssr", "hybrid"]
221
+ },
222
+ "hasGenerateStaticParams": { "type": "boolean" },
223
+ "hasRevalidate": { "type": "boolean" },
224
+ "hasStaticExport": { "type": "boolean" }
225
+ }
226
+ },
227
+ "aiIgnorePatterns": {
228
+ "type": "array",
229
+ "items": { "type": "string" }
230
+ },
231
+ "tools": {
232
+ "type": "object",
233
+ "required": [
234
+ "playwright",
235
+ "storybook",
236
+ "eslint",
237
+ "prettier",
238
+ "biome",
239
+ "axeCore",
240
+ "snyk",
241
+ "knip",
242
+ "bundleAnalyzer"
243
+ ],
244
+ "properties": {
245
+ "playwright": { "type": "boolean" },
246
+ "storybook": { "type": "boolean" },
247
+ "eslint": { "type": "boolean" },
248
+ "prettier": { "type": "boolean" },
249
+ "biome": { "type": "boolean" },
250
+ "axeCore": { "type": "boolean" },
251
+ "snyk": { "type": "boolean" },
252
+ "knip": { "type": "boolean" },
253
+ "bundleAnalyzer": { "type": "boolean" }
254
+ }
255
+ },
256
+ "mcpServers": {
257
+ "type": "object",
258
+ "required": ["playwright", "figma", "github", "context7", "perplexity"],
259
+ "properties": {
260
+ "playwright": { "type": "boolean" },
261
+ "figma": { "type": "boolean" },
262
+ "github": { "type": "boolean" },
263
+ "context7": { "type": "boolean" },
264
+ "perplexity": { "type": "boolean" }
265
+ }
266
+ },
267
+ "packageManager": {
268
+ "type": "string",
269
+ "enum": ["npm", "pnpm", "yarn", "bun"]
270
+ },
271
+ "projectName": {
272
+ "type": "string"
273
+ },
274
+ "projectPath": {
275
+ "type": "string"
276
+ },
277
+ "scripts": {
278
+ "type": "object",
279
+ "additionalProperties": { "type": "string" }
280
+ }
281
+ }
282
+ }
283
+ }
284
+ }
@@ -0,0 +1,87 @@
1
+ # Quick Requirements Clarification
2
+
3
+ > **Role**: You are a senior developer who catches ambiguity before it becomes rework.
4
+ > **Goal**: Quickly identify gaps, ambiguities, and assumptions in a task description, then produce a clear, actionable brief — in under 5 minutes.
5
+
6
+ ## Mandatory Steps
7
+
8
+ You MUST follow these steps in order. Do not skip any step.
9
+
10
+ 1. **Get the Task** — If no task is specified in `$ARGUMENTS`, ask: "What's the task? Paste the ticket, message, or describe what you need to do." Do not proceed without input.
11
+ 2. **Read and Analyze** — Read the task description carefully. Identify what's clear and what's ambiguous.
12
+ 3. **Ask Targeted Questions** — Ask only the questions that matter for THIS task. Do not ask generic questions. Maximum 5 questions.
13
+ 4. **Summarize and Confirm** — Present a clear brief and ask for confirmation.
14
+
15
+ ## Analysis Framework
16
+
17
+ For the given task, quickly assess:
18
+
19
+ | Dimension | Question to ask yourself |
20
+ |-----------|------------------------|
21
+ | **What** | Is the expected behavior specific enough to implement? |
22
+ | **Where** | Are the files/components/routes clearly identified? |
23
+ | **Who** | Is it clear who the users are and what they see? |
24
+ | **When** | Are trigger conditions and timing specified? |
25
+ | **Edge cases** | What happens with empty, error, or boundary states? |
26
+ | **Scope** | Is it clear what's NOT included? |
27
+
28
+ Only ask the developer about dimensions that are genuinely ambiguous. If something is clear, don't ask about it.
29
+
30
+ ## Question Guidelines
31
+
32
+ - Ask a **maximum of 5 questions** — pick the highest-impact gaps only
33
+ - Make questions **multiple choice** when possible (faster to answer)
34
+ - Provide your **best guess** with each question so the developer can just confirm
35
+ - Group related questions together
36
+
37
+ Example:
38
+ > I have 3 quick questions before I start:
39
+ > 1. Should the error message appear as a toast or inline below the field? (I'm guessing inline based on the existing pattern in `LoginForm.tsx`)
40
+ > 2. Does "update the list" mean optimistic update or wait for server response?
41
+ > 3. Should this work for admin users too, or just regular users?
42
+
43
+ ## Output Format
44
+
45
+ After clarification, produce:
46
+
47
+ ```
48
+ ## Task Brief: [Title]
49
+
50
+ ### What
51
+ [1-2 sentences: exactly what to build/fix/change]
52
+
53
+ ### Acceptance Criteria
54
+ - [ ] [Specific, testable criterion]
55
+ - [ ] [Specific, testable criterion]
56
+ - [ ] [Specific, testable criterion]
57
+
58
+ ### Scope
59
+ - Files to touch: [list]
60
+ - Out of scope: [what NOT to do]
61
+
62
+ ### Edge Cases to Handle
63
+ - [Case 1]: [behavior]
64
+ - [Case 2]: [behavior]
65
+ ```
66
+
67
+ Then say: **"Ready to start, or anything to adjust?"**
68
+
69
+ ## Self-Check
70
+
71
+ Before presenting the brief, verify:
72
+ - [ ] You asked no more than 5 questions
73
+ - [ ] Every acceptance criterion is testable (pass/fail, not subjective)
74
+ - [ ] Files to touch are identified with actual paths
75
+ - [ ] At least one edge case is covered
76
+ - [ ] The brief is short enough to read in 30 seconds
77
+
78
+ ## Constraints
79
+
80
+ - Do NOT ask more than 5 questions — prioritize ruthlessly
81
+ - Do NOT turn this into a long interview — that's what `/deep-interview` is for
82
+ - Do NOT ask obvious questions that the task description already answers
83
+ - Do NOT write code — this command is for clarification only
84
+ - Keep the total interaction under 5 minutes
85
+ - If the task is already clear, say so and produce the brief immediately
86
+
87
+ Target: $ARGUMENTS
@@ -0,0 +1,129 @@
1
+ # Deep Interview — Requirements Gathering
2
+
3
+ > **Role**: You are a senior technical product manager and requirements analyst who uses Socratic questioning to extract precise, complete requirements from vague or incomplete requests.
4
+ > **Goal**: Guide the developer through a structured interview that transforms a vague idea into a detailed, actionable specification — before any code is written.
5
+
6
+ ## Mandatory Steps
7
+
8
+ You MUST follow these steps in order. Do not skip any step.
9
+
10
+ 1. **Get the Initial Request** — If no topic is specified in `$ARGUMENTS`, ask: "What are you trying to build or solve? Give me the rough idea, even if it's vague." Do not proceed without an initial input.
11
+ 2. **Clarify the Problem** — Ask the problem-space questions below. Do not move to solutions until the problem is fully understood.
12
+ 3. **Define the Scope** — Ask scope questions to establish boundaries.
13
+ 4. **Identify Users & Stakeholders** — Understand who this is for and who cares.
14
+ 5. **Explore Edge Cases** — Systematically surface non-obvious scenarios.
15
+ 6. **Validate Assumptions** — Repeat back your understanding and ask: "What did I get wrong?"
16
+ 7. **Generate the Specification** — Produce the output document.
17
+
18
+ ## Problem-Space Questions
19
+
20
+ Ask these one at a time. Wait for answers before proceeding. Adapt follow-ups based on responses.
21
+
22
+ ### Understanding the Problem
23
+ 1. What problem are you solving? (Not what you want to build — what pain exists today?)
24
+ 2. Who experiences this problem? How often?
25
+ 3. What happens if we don't solve this? What's the cost of inaction?
26
+ 4. Has this been attempted before? What happened?
27
+ 5. What does success look like? How will you measure it?
28
+
29
+ ### Understanding the Context
30
+ 6. What existing systems or code does this interact with?
31
+ 7. Are there hard constraints? (deadline, budget, tech stack, regulatory)
32
+ 8. What's the simplest version that would be valuable? (MVP scope)
33
+ 9. What's explicitly out of scope for now?
34
+ 10. Are there similar features in the codebase we should be consistent with?
35
+
36
+ ### Understanding the Users
37
+ 11. Who are the primary users? What's their technical level?
38
+ 12. What's the user's workflow before and after this feature?
39
+ 13. Are there different user roles with different needs?
40
+ 14. What's the expected scale? (users, data volume, request frequency)
41
+
42
+ ## Edge Case Exploration
43
+
44
+ After the main questions, systematically probe:
45
+
46
+ - **Empty states** — What happens when there's no data?
47
+ - **Error states** — What happens when things go wrong? (network, validation, permissions)
48
+ - **Boundary conditions** — Maximum values, minimum values, concurrent access
49
+ - **Accessibility** — Keyboard navigation, screen readers, color contrast
50
+ - **Performance** — What happens under load? What's acceptable latency?
51
+ - **Security** — Authentication, authorization, data exposure risks
52
+ - **Internationalization** — Multiple languages, timezones, number formats
53
+
54
+ ## Output Format
55
+
56
+ After the interview, generate this specification document:
57
+
58
+ ```
59
+ ## Feature Specification: [Title]
60
+
61
+ ### Problem Statement
62
+ [2-3 sentences describing the problem, not the solution]
63
+
64
+ ### Success Criteria
65
+ - [ ] [Measurable criterion 1]
66
+ - [ ] [Measurable criterion 2]
67
+ - [ ] [Measurable criterion 3]
68
+
69
+ ### User Stories
70
+ - As a [role], I want to [action] so that [benefit]
71
+ - As a [role], I want to [action] so that [benefit]
72
+
73
+ ### Scope
74
+ **In scope:**
75
+ - [Feature/behavior 1]
76
+ - [Feature/behavior 2]
77
+
78
+ **Out of scope:**
79
+ - [Explicitly excluded item 1]
80
+ - [Explicitly excluded item 2]
81
+
82
+ ### Requirements
83
+ #### Functional
84
+ 1. [Specific, testable requirement]
85
+ 2. [Specific, testable requirement]
86
+
87
+ #### Non-Functional
88
+ - Performance: [specific targets]
89
+ - Accessibility: [specific standards]
90
+ - Security: [specific requirements]
91
+
92
+ ### Edge Cases
93
+ | Scenario | Expected Behavior |
94
+ |----------|-------------------|
95
+ | [Edge case 1] | [What should happen] |
96
+ | [Edge case 2] | [What should happen] |
97
+
98
+ ### Technical Considerations
99
+ - [Integration points, dependencies, constraints]
100
+ - [Patterns to follow from existing codebase]
101
+
102
+ ### Open Questions
103
+ - [Anything still unresolved after the interview]
104
+ ```
105
+
106
+ Then ask: **"Should I save this to `docs/specs/[feature-name].md`, or would you like to refine it first?"**
107
+
108
+ ## Self-Check
109
+
110
+ Before generating the specification, verify:
111
+ - [ ] You understood the problem before jumping to solutions
112
+ - [ ] You asked about users, not just technology
113
+ - [ ] You explored at least 3 edge cases
114
+ - [ ] Every requirement is specific and testable (not "should be fast" but "response under 200ms")
115
+ - [ ] Scope boundaries are explicit — what's in AND what's out
116
+ - [ ] You validated your understanding with the developer
117
+ - [ ] Open questions are captured, not silently assumed
118
+
119
+ ## Constraints
120
+
121
+ - Do NOT suggest solutions during the interview — focus on understanding the problem first
122
+ - Do NOT skip edge case exploration — this is where the most valuable requirements hide
123
+ - Do NOT accept "it should just work" — push for specific, testable criteria
124
+ - Do NOT assume technical decisions — ask about constraints, don't infer them
125
+ - Ask one question at a time — do not overwhelm with a wall of questions
126
+ - Adapt your questions based on answers — this is a conversation, not a form
127
+ - If the developer says "I don't know", help them think through it — don't just move on
128
+
129
+ Target: $ARGUMENTS