@mikulgohil/ai-kit 1.3.0 → 1.3.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 (2) hide show
  1. package/README.md +221 -84
  2. package/package.json +5 -1
package/README.md CHANGED
@@ -1,36 +1,177 @@
1
- # ai-kit
1
+ <p align="center">
2
+ <h1 align="center">AI Kit</h1>
3
+ <p align="center">
4
+ Make AI coding assistants actually useful.<br/>
5
+ One command. Project-aware AI from the first conversation.
6
+ </p>
7
+ </p>
2
8
 
3
- AI-assisted development setup kit. Auto-detects your tech stack and generates tailored CLAUDE.md, .cursorrules, hooks, agents, context modes, slash commands, and developer guides.
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/@mikulgohil/ai-kit"><img src="https://img.shields.io/npm/v/@mikulgohil/ai-kit.svg" alt="npm version" /></a>
11
+ <a href="https://www.npmjs.com/package/@mikulgohil/ai-kit"><img src="https://img.shields.io/npm/dm/@mikulgohil/ai-kit.svg" alt="npm downloads" /></a>
12
+ <a href="https://github.com/mikulgohil/ai-kit/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@mikulgohil/ai-kit.svg" alt="license" /></a>
13
+ <a href="https://mikulgohil.github.io/ai-kit-docs"><img src="https://img.shields.io/badge/docs-ai--kit--docs-blue" alt="documentation" /></a>
14
+ </p>
4
15
 
5
- ## Installation
16
+ ---
17
+
18
+ ## The Problem
19
+
20
+ AI coding tools are powerful, but they start every project from zero:
21
+
22
+ - **Wrong patterns** — The AI writes Pages Router code when you use App Router, CSS when you use Tailwind
23
+ - **No standards** — No docs, no tests, no JSDoc, no error boundaries unless you explicitly ask every time
24
+ - **Repeated context** — You explain the same conventions in every conversation, every day
25
+ - **Inconsistent output** — Developer A gets different AI behavior than Developer B on the same project
26
+ - **No quality gates** — AI-generated code goes straight to PR without validation
27
+ - **Same mistakes** — No system to track what went wrong, so the team keeps hitting the same issues
28
+
29
+ **The result:** Teams spend more time fixing AI output than they save generating it.
30
+
31
+ ## The Solution
6
32
 
7
33
  ```bash
8
34
  npx @mikulgohil/ai-kit init
9
35
  ```
10
36
 
11
- Requires Node >= 18.
37
+ One command. 30 seconds. Your AI assistant goes from generic to project-aware.
38
+
39
+ AI Kit scans your project, detects your tech stack, and generates tailored rules, skills, agents, hooks, and guides — so every AI interaction follows your standards, from the first conversation.
40
+
41
+ ---
42
+
43
+ ## What You Get
44
+
45
+ | Generated | What It Does |
46
+ |-----------|-------------|
47
+ | **CLAUDE.md** | Project-aware rules for Claude Code — your stack, conventions, and patterns |
48
+ | **.cursorrules** + `.cursor/rules/*.mdc` | Same rules formatted for Cursor AI with scoped file matching |
49
+ | **39 Skills** | Auto-discovered workflows — `/review`, `/new-component`, `/security-check`, `/pre-pr`, and 35 more |
50
+ | **8 Agents** | Specialized AI assistants for delegation — planner, reviewer, security, E2E, build-resolver, and more |
51
+ | **3 Context Modes** | Switch between dev (build fast), review (check quality), and research (understand code) |
52
+ | **Automated Hooks** | Auto-format, TypeScript checks, console.log warnings, mistakes auto-capture, git safety |
53
+ | **6 Guides** | Developer playbooks for prompts, tokens, hooks, agents, Figma workflow |
54
+ | **Doc Scaffolds** | Mistakes log, decisions log, time log — structured knowledge tracking |
55
+ | **Component Docs** | Auto-generated `.ai.md` files per component with health scores and Sitecore integration |
56
+
57
+ ---
58
+
59
+ ## Key Features
60
+
61
+ ### Auto Stack Detection
62
+
63
+ Scans your `package.json`, config files, and directory structure to detect your exact stack — then generates rules tailored to it.
64
+
65
+ | What It Detects | What the AI Learns |
66
+ |---|---|
67
+ | Next.js 15 with App Router | Server Components, Server Actions, `app/` routing patterns |
68
+ | Sitecore XM Cloud | `<Text>`, `<RichText>`, `<Image>` field helpers, placeholder patterns |
69
+ | Tailwind CSS v4 | `@theme` tokens, utility class patterns, responsive prefixes |
70
+ | TypeScript strict mode | No `any`, proper null checks, discriminated unions |
71
+ | Turborepo monorepo | Workspace conventions, cross-package imports |
72
+ | Figma + design tokens | Token mapping, design-to-code workflow |
73
+
74
+ ### 39 Pre-Built Skills
75
+
76
+ Skills are structured AI workflows that get applied automatically — you don't type a command, the AI recognizes what you're doing and loads the right skill.
77
+
78
+ | Category | Skills |
79
+ |---|---|
80
+ | **Getting Started** | `prompt-help`, `understand` |
81
+ | **Building** | `new-component`, `new-page`, `api-route`, `error-boundary`, `extract-hook`, `figma-to-code`, `design-tokens`, `schema-gen`, `storybook-gen` |
82
+ | **Quality & Review** | `review`, `pre-pr`, `test`, `accessibility-audit`, `security-check`, `responsive-check`, `type-fix`, `perf-audit`, `bundle-check`, `i18n-check` |
83
+ | **Maintenance** | `fix-bug`, `refactor`, `optimize`, `migrate`, `dep-check`, `sitecore-debug` |
84
+ | **Workflow** | `document`, `commit-msg`, `env-setup`, `changelog`, `release` |
85
+ | **Session** | `save-session`, `resume-session`, `checkpoint` |
86
+ | **Orchestration** | `orchestrate`, `quality-gate`, `harness-audit` |
12
87
 
13
- ## What Gets Generated
88
+ ### 8 Specialized Agents
14
89
 
15
- Running `init` scans your project and produces:
90
+ Agents handle delegated tasks with focused expertise:
16
91
 
17
- - **CLAUDE.md** Project-aware rules and conventions for Claude Code
18
- - **.cursorrules** — Equivalent rules for Cursor AI
19
- - **.cursor/rules/*.mdc** Modular rule files for Cursor
20
- - **.claude/skills/** 39 slash commands across 7 categories
21
- - **.claude/agents/** 8 specialized AI agents for delegation (planner, reviewer, security, E2E, build-resolver, doc-updater, refactor-cleaner, sitecore-specialist)
22
- - **.claude/contexts/** 3 context modes (dev, review, research)
23
- - **.claude/settings.local.json** Automated hooks (auto-format, typecheck, console.log warnings, git safety)
24
- - **ai-kit/guides/** 6 developer guides
25
- - **docs/**3 doc scaffolds: mistakes-log, decisions-log, time-log
92
+ | Agent | Purpose | Conditional |
93
+ |---|---|---|
94
+ | `planner` | Break features into implementation plans | No |
95
+ | `code-reviewer` | Deep quality and security review | No |
96
+ | `security-reviewer` | OWASP Top 10, XSS, CSRF, secrets detection | No |
97
+ | `build-resolver` | Diagnose and fix build/type errors | No |
98
+ | `doc-updater` | Keep documentation in sync with code | No |
99
+ | `refactor-cleaner` | Find and remove dead code | No |
100
+ | `e2e-runner` | Playwright tests with Page Object Model | Yes only if Playwright installed |
101
+ | `sitecore-specialist` | Sitecore XM Cloud patterns and debugging | Yes — only if Sitecore detected |
102
+
103
+ ### Automated Quality Hooks
104
+
105
+ Hooks run automatically as you code. Choose a profile during init:
106
+
107
+ | Profile | What Runs |
108
+ |---|---|
109
+ | **Minimal** | Auto-format + git push safety |
110
+ | **Standard** | + TypeScript type-check + console.log warnings + mistakes auto-capture |
111
+ | **Strict** | + ESLint check + stop-time console.log audit |
112
+
113
+ **Mistakes auto-capture** — When a build or lint command fails, the hook automatically logs the error to `docs/mistakes-log.md` with a timestamp and error preview. Your mistakes log builds itself over time.
114
+
115
+ ### Component Scanner & Docs
116
+
117
+ Discovers all React components and generates `.ai.md` documentation files with:
118
+
119
+ - Props table with types and required flags
120
+ - Health score (0-100) based on tests, stories, docs, and Sitecore integration
121
+ - Sitecore integration details (datasource fields, rendering params, placeholders, GraphQL queries)
122
+ - Smart merge — updates auto-generated sections while preserving manual edits
123
+
124
+ ### Project Health Dashboard
125
+
126
+ ```bash
127
+ npx @mikulgohil/ai-kit health
128
+ ```
129
+
130
+ One-glance view of your project's AI setup health across 5 sections: setup integrity, security, stack detection, tools/MCP status, and documentation. Outputs an A-F grade with actionable recommendations.
131
+
132
+ ### Security Audit
133
+
134
+ ```bash
135
+ npx @mikulgohil/ai-kit audit
136
+ ```
137
+
138
+ Scans for secrets in CLAUDE.md, MCP config security, .env gitignore status, hook validity, agent configuration, and more. Outputs an A-F health grade.
139
+
140
+ ### Token Tracking & Cost Estimates
141
+
142
+ ```bash
143
+ npx @mikulgohil/ai-kit tokens
144
+ ```
145
+
146
+ - Period summaries (today, this week, this month)
147
+ - Budget progress with alerts at 50%, 75%, 90%
148
+ - Per-project cost breakdown
149
+ - Week-over-week trends
150
+ - Model recommendations (Sonnet vs Opus optimization)
151
+ - ROI estimate (time saved vs cost)
152
+
153
+ ### Multi-Tool Support
154
+
155
+ Generate configs once, use across 5+ AI tools:
156
+
157
+ | Tool | Output |
158
+ |---|---|
159
+ | **Claude Code** | `CLAUDE.md` + skills + agents + contexts + hooks |
160
+ | **Cursor** | `.cursorrules` + `.cursor/rules/*.mdc` + skills |
161
+ | **Windsurf** | `.windsurfrules` (via `ai-kit export`) |
162
+ | **Aider** | `.aider.conf.yml` (via `ai-kit export`) |
163
+ | **Cline** | `.clinerules` (via `ai-kit export`) |
164
+
165
+ ---
26
166
 
27
167
  ## CLI Commands
28
168
 
29
169
  | Command | Description |
30
- |---------|-------------|
170
+ |---|---|
31
171
  | `ai-kit init [path]` | Scan project and generate all configs |
32
172
  | `ai-kit update [path]` | Re-scan and update existing generated files |
33
173
  | `ai-kit reset [path]` | Remove all AI Kit generated files |
174
+ | `ai-kit health [path]` | One-glance project health dashboard |
34
175
  | `ai-kit audit [path]` | Security and configuration health audit |
35
176
  | `ai-kit doctor [path]` | Diagnose setup issues |
36
177
  | `ai-kit diff [path]` | Preview what would change on update (dry run) |
@@ -40,106 +181,102 @@ Running `init` scans your project and produces:
40
181
 
41
182
  `path` defaults to the current directory if omitted.
42
183
 
43
- ## Features
184
+ ---
44
185
 
45
- ### Hooks (Automated Quality Checks)
186
+ ## Supported Tech Stacks
46
187
 
47
- Hooks run automatically as you code — no manual invocation needed. Choose a profile during init:
188
+ | Category | Technologies |
189
+ |---|---|
190
+ | **Frameworks** | Next.js (App Router, Pages Router, Hybrid), React |
191
+ | **CMS** | Sitecore XM Cloud (Content SDK v2), Sitecore JSS |
192
+ | **Styling** | Tailwind CSS (v3 + v4), SCSS, CSS Modules, styled-components |
193
+ | **Language** | TypeScript (with strict mode detection) |
194
+ | **Formatters** | Prettier, Biome (auto-detected for hooks) |
195
+ | **Monorepos** | Turborepo, Nx, Lerna, pnpm workspaces |
196
+ | **Design** | Figma MCP, Figma Code CLI, design tokens, visual tests |
197
+ | **Testing** | Playwright, Storybook, axe-core |
198
+ | **Quality** | ESLint, Snyk, Knip, @next/bundle-analyzer |
199
+ | **Package Managers** | npm, pnpm, yarn, bun |
48
200
 
49
- | Profile | What Runs |
50
- |---------|-----------|
51
- | **Minimal** | Auto-format + git push safety |
52
- | **Standard** | + TypeScript type-check + console.log warnings |
53
- | **Strict** | + ESLint check + stop-time console.log audit |
201
+ ---
54
202
 
55
- Auto-detects your formatter (Prettier or Biome) and generates the right hook.
203
+ ## Quick Start
56
204
 
57
- ### Agents (Specialized AI Assistants)
58
-
59
- Agents live in `.claude/agents/` and handle delegated tasks:
60
-
61
- | Agent | Purpose |
62
- |-------|---------|
63
- | `planner` | Break features into implementation plans |
64
- | `code-reviewer` | Deep quality and security review |
65
- | `security-reviewer` | OWASP Top 10, XSS, CSRF, secrets detection |
66
- | `e2e-runner` | Playwright tests with Page Object Model |
67
- | `build-resolver` | Diagnose and fix build/type errors |
68
- | `doc-updater` | Keep documentation in sync with code |
69
- | `refactor-cleaner` | Find and remove dead code |
70
- | `sitecore-specialist` | Sitecore XM Cloud patterns and debugging |
71
-
72
- Conditional agents are only generated when their tools are detected (e.g., `e2e-runner` requires Playwright, `sitecore-specialist` requires Sitecore).
73
-
74
- ### Context Modes
75
-
76
- Three modes change how the AI approaches work:
77
-
78
- | Mode | Focus |
79
- |------|-------|
80
- | **dev** | Building features — implementation over perfection |
81
- | **review** | Checking quality — security, a11y, types, performance |
82
- | **research** | Understanding code — read-only exploration and analysis |
205
+ ```bash
206
+ # 1. Run in any project directory
207
+ npx @mikulgohil/ai-kit init
83
208
 
84
- ### Session Management
209
+ # 2. Follow the interactive prompts (30 seconds)
85
210
 
86
- | Skill | Purpose |
87
- |-------|---------|
88
- | `/save-session` | Persist session context for later |
89
- | `/resume-session` | Restore and continue previous work |
90
- | `/checkpoint` | Snapshot all quality checks |
211
+ # 3. Check your project health
212
+ npx @mikulgohil/ai-kit health
91
213
 
92
- ### Multi-Agent Orchestration
214
+ # 4. Open in Claude Code or Cursor — AI now knows your project
215
+ ```
93
216
 
94
- | Skill | Purpose |
95
- |-------|---------|
96
- | `/orchestrate` | Coordinate multiple agents on complex tasks |
97
- | `/quality-gate` | Run all checks: types, lint, format, tests, a11y, security |
98
- | `/harness-audit` | Check AI configuration health |
217
+ ### Updating
99
218
 
100
- ### Security Audit
219
+ When your project evolves (new dependencies, framework upgrades):
101
220
 
102
221
  ```bash
103
- npx @mikulgohil/ai-kit audit
222
+ npx @mikulgohil/ai-kit update
104
223
  ```
105
224
 
106
- Checks for secrets in CLAUDE.md, MCP config security, .env gitignore, hook validity, agent frontmatter, and more. Outputs an A-F health grade.
225
+ Only content between `AI-KIT:START/END` markers is refreshed. Your custom rules and manual edits are preserved.
107
226
 
108
- ## Supported Stacks
227
+ ---
109
228
 
110
- **Frameworks** Next.js (App Router, Pages Router, Hybrid), React
229
+ ## Who Is This For?
111
230
 
112
- **CMS** — Sitecore XM Cloud, Sitecore JSS
231
+ **Individual developers** — Stop re-explaining context. Let AI Kit teach the AI your project once. Every conversation starts informed.
113
232
 
114
- **Styling** — Tailwind CSS, SCSS, CSS Modules, styled-components
233
+ **Tech leads** — Enforce coding standards through AI tools instead of code review comments. Standards are followed automatically, not policed manually.
115
234
 
116
- **Language** — TypeScript (with strict mode detection)
235
+ **Teams** — Same AI experience across every developer and every project. New hires get the same AI context as senior engineers.
117
236
 
118
- **Formatters** — Prettier, Biome (auto-detected for hooks)
237
+ **Enterprise** — Consistent AI governance across projects. Security audit, token tracking, and quality hooks provide visibility and control.
119
238
 
120
- **Monorepos** — Turborepo, Nx, Lerna, pnpm workspaces
239
+ ---
121
240
 
122
- **Design** Figma MCP, design tokens, visual tests
241
+ ## The Impact
123
242
 
124
- **Testing** Playwright, Storybook, axe-core
243
+ | Metric | Before AI Kit | After AI Kit |
244
+ |---|---|---|
245
+ | Context setup per conversation | 5-10 min | 0 min (auto-loaded) |
246
+ | Code review cycles per PR | 2-4 rounds | 1-2 rounds |
247
+ | Component creation time | 30-60 min | 10-15 min |
248
+ | New developer onboarding | 1-2 weeks | 2-3 days |
249
+ | Security issues caught | At PR review or production | At development time |
250
+ | Knowledge retention | Lost when developers leave | Logged in decisions, mistakes, and time logs |
251
+ | AI tool switching cost | Start over from scratch | Zero — same rules across 5+ tools |
125
252
 
126
- **Package managers** — npm, pnpm, yarn, bun
253
+ ---
127
254
 
128
- ## Updating
255
+ ## Documentation
129
256
 
130
- ```bash
131
- npx @mikulgohil/ai-kit update
132
- ```
257
+ Full documentation is available at **[mikulgohil.github.io/ai-kit-docs](https://mikulgohil.github.io/ai-kit-docs)**
258
+
259
+ | Page | What You'll Learn |
260
+ |---|---|
261
+ | [Getting Started](https://mikulgohil.github.io/ai-kit-docs/getting-started) | Step-by-step setup walkthrough |
262
+ | [CLI Reference](https://mikulgohil.github.io/ai-kit-docs/cli-reference) | All 10 commands with examples |
263
+ | [Skills & Commands](https://mikulgohil.github.io/ai-kit-docs/slash-commands) | All 39 skills with usage guides |
264
+ | [Hooks](https://mikulgohil.github.io/ai-kit-docs/hooks) | Hook profiles and configuration |
265
+ | [Agents](https://mikulgohil.github.io/ai-kit-docs/agents) | 8 specialized agents |
266
+ | [What Gets Generated](https://mikulgohil.github.io/ai-kit-docs/what-gets-generated) | Detailed breakdown of every generated file |
267
+ | [Changelog](https://mikulgohil.github.io/ai-kit-docs/changelog) | Version history and release notes |
133
268
 
134
- Re-scans your project and refreshes all generated files — CLAUDE.md, skills, agents, contexts, and hooks.
269
+ ---
135
270
 
136
- ## Further Reading
271
+ ## Requirements
137
272
 
138
- Detailed usage is covered in the generated guides under `ai-kit/guides/` after running `init`. Start with `getting-started.md`.
273
+ - **Node.js 18+**
274
+ - **A project with `package.json`**
275
+ - **Claude Code or Cursor** (at least one AI tool installed)
139
276
 
140
277
  ## Repository
141
278
 
142
- [https://github.com/mikulgohil/ai-kit](https://github.com/mikulgohil/ai-kit)
279
+ [github.com/mikulgohil/ai-kit](https://github.com/mikulgohil/ai-kit)
143
280
 
144
281
  ## License
145
282
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikulgohil/ai-kit",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "AI-assisted development setup kit. Auto-detects your tech stack and generates tailored CLAUDE.md, .cursorrules, hooks, agents, context modes, slash commands, and developer guides.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,10 +45,14 @@
45
45
  ],
46
46
  "author": "Mikul Gohil",
47
47
  "license": "MIT",
48
+ "homepage": "https://mikulgohil.github.io/ai-kit-docs",
48
49
  "repository": {
49
50
  "type": "git",
50
51
  "url": "https://github.com/mikulgohil/ai-kit.git"
51
52
  },
53
+ "bugs": {
54
+ "url": "https://github.com/mikulgohil/ai-kit/issues"
55
+ },
52
56
  "engines": {
53
57
  "node": ">=18.0.0"
54
58
  },