@mikulgohil/ai-kit 1.11.0 → 2.1.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.
- package/README.md +45 -30
- package/agents/{api-designer.md → kit-api-designer.md} +1 -1
- package/agents/{architect.md → kit-architect.md} +1 -1
- package/agents/{build-resolver.md → kit-build-resolver.md} +1 -1
- package/agents/{ci-debugger.md → kit-ci-debugger.md} +1 -1
- package/agents/{code-reviewer.md → kit-code-reviewer.md} +1 -1
- package/agents/{data-scientist.md → kit-data-scientist.md} +1 -1
- package/agents/{dependency-auditor.md → kit-dependency-auditor.md} +1 -1
- package/agents/{doc-updater.md → kit-doc-updater.md} +1 -1
- package/agents/{e2e-runner.md → kit-e2e-runner.md} +1 -1
- package/agents/{migration-specialist.md → kit-migration-specialist.md} +1 -1
- package/agents/{performance-profiler.md → kit-performance-profiler.md} +1 -1
- package/agents/{planner.md → kit-planner.md} +1 -1
- package/agents/{refactor-cleaner.md → kit-refactor-cleaner.md} +1 -1
- package/agents/{security-reviewer.md → kit-security-reviewer.md} +1 -1
- package/agents/{sitecore-specialist.md → kit-sitecore-specialist.md} +1 -1
- package/agents/{tdd-guide.md → kit-tdd-guide.md} +1 -1
- package/commands/{clarify-requirements.md → kit-clarify-requirements.md} +1 -1
- package/commands/{harness-audit.md → kit-harness-audit.md} +1 -1
- package/commands/{orchestrate.md → kit-orchestrate.md} +11 -11
- package/commands/{resume-session.md → kit-resume-session.md} +1 -1
- package/commands/{token-tips.md → kit-token-tips.md} +4 -4
- package/dist/index.js +46 -15
- package/dist/index.js.map +1 -1
- package/guides/figma-workflow.md +5 -5
- package/guides/getting-started.md +33 -31
- package/guides/hooks-and-agents.md +19 -19
- package/guides/prompt-playbook.md +1 -1
- package/guides/token-saving-tips.md +3 -3
- package/package.json +1 -1
- package/templates/claude-md/base.md +27 -27
- package/templates/claude-md/behavioral.md +86 -0
- package/templates/cursorrules/behavioral.md +30 -0
- /package/commands/{accessibility-audit.md → kit-accessibility-audit.md} +0 -0
- /package/commands/{api-route.md → kit-api-route.md} +0 -0
- /package/commands/{bundle-check.md → kit-bundle-check.md} +0 -0
- /package/commands/{changelog.md → kit-changelog.md} +0 -0
- /package/commands/{checkpoint.md → kit-checkpoint.md} +0 -0
- /package/commands/{commit-msg.md → kit-commit-msg.md} +0 -0
- /package/commands/{deep-interview.md → kit-deep-interview.md} +0 -0
- /package/commands/{dep-check.md → kit-dep-check.md} +0 -0
- /package/commands/{design-tokens.md → kit-design-tokens.md} +0 -0
- /package/commands/{document.md → kit-document.md} +0 -0
- /package/commands/{env-setup.md → kit-env-setup.md} +0 -0
- /package/commands/{error-boundary.md → kit-error-boundary.md} +0 -0
- /package/commands/{extract-hook.md → kit-extract-hook.md} +0 -0
- /package/commands/{fetch-docs.md → kit-fetch-docs.md} +0 -0
- /package/commands/{figma-to-code.md → kit-figma-to-code.md} +0 -0
- /package/commands/{fix-bug.md → kit-fix-bug.md} +0 -0
- /package/commands/{i18n-check.md → kit-i18n-check.md} +0 -0
- /package/commands/{learn-from-pr.md → kit-learn-from-pr.md} +0 -0
- /package/commands/{middleware.md → kit-middleware.md} +0 -0
- /package/commands/{migrate.md → kit-migrate.md} +0 -0
- /package/commands/{new-component.md → kit-new-component.md} +0 -0
- /package/commands/{new-page.md → kit-new-page.md} +0 -0
- /package/commands/{optimize.md → kit-optimize.md} +0 -0
- /package/commands/{perf-audit.md → kit-perf-audit.md} +0 -0
- /package/commands/{pr-description.md → kit-pr-description.md} +0 -0
- /package/commands/{pre-pr.md → kit-pre-pr.md} +0 -0
- /package/commands/{prompt-help.md → kit-prompt-help.md} +0 -0
- /package/commands/{quality-gate-check.md → kit-quality-gate-check.md} +0 -0
- /package/commands/{quality-gate.md → kit-quality-gate.md} +0 -0
- /package/commands/{refactor.md → kit-refactor.md} +0 -0
- /package/commands/{release-notes.md → kit-release-notes.md} +0 -0
- /package/commands/{release.md → kit-release.md} +0 -0
- /package/commands/{responsive-check.md → kit-responsive-check.md} +0 -0
- /package/commands/{review.md → kit-review.md} +0 -0
- /package/commands/{save-session.md → kit-save-session.md} +0 -0
- /package/commands/{scaffold-spec.md → kit-scaffold-spec.md} +0 -0
- /package/commands/{schema-gen.md → kit-schema-gen.md} +0 -0
- /package/commands/{search-first.md → kit-search-first.md} +0 -0
- /package/commands/{security-check.md → kit-security-check.md} +0 -0
- /package/commands/{server-action.md → kit-server-action.md} +0 -0
- /package/commands/{sitecore-debug.md → kit-sitecore-debug.md} +0 -0
- /package/commands/{standup.md → kit-standup.md} +0 -0
- /package/commands/{storybook-gen.md → kit-storybook-gen.md} +0 -0
- /package/commands/{test-gaps.md → kit-test-gaps.md} +0 -0
- /package/commands/{test.md → kit-test.md} +0 -0
- /package/commands/{type-fix.md → kit-type-fix.md} +0 -0
- /package/commands/{understand.md → kit-understand.md} +0 -0
- /package/commands/{upgrade.md → kit-upgrade.md} +0 -0
package/guides/figma-workflow.md
CHANGED
|
@@ -14,7 +14,7 @@ Developer: Spends 2 hours manually fixing tokens and spacing
|
|
|
14
14
|
## The Right Way (With ai-kit)
|
|
15
15
|
|
|
16
16
|
```
|
|
17
|
-
Developer: /figma-to-code
|
|
17
|
+
Developer: /kit-figma-to-code
|
|
18
18
|
AI: Asks targeted questions → extracts Figma context via MCP →
|
|
19
19
|
maps to project tokens → reuses existing components →
|
|
20
20
|
generates clean code → verifies visually
|
|
@@ -67,7 +67,7 @@ A good link looks like:
|
|
|
67
67
|
https://www.figma.com/design/ABC123/MyProject?node-id=1234-5678
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
### Step 2: Use /figma-to-code
|
|
70
|
+
### Step 2: Use /kit-figma-to-code
|
|
71
71
|
|
|
72
72
|
Run the slash command. It will:
|
|
73
73
|
1. Ask what you're building (component, page, update)
|
|
@@ -101,8 +101,8 @@ The output should use correct design tokens, reuse existing components, and foll
|
|
|
101
101
|
|
|
102
102
|
| Scenario | Tool |
|
|
103
103
|
|----------|------|
|
|
104
|
-
| Single component from Figma | `/figma-to-code` in Claude Code |
|
|
105
|
-
| Quick design token extraction | `/design-tokens` in Claude Code |
|
|
104
|
+
| Single component from Figma | `/kit-figma-to-code` in Claude Code |
|
|
105
|
+
| Quick design token extraction | `/kit-design-tokens` in Claude Code |
|
|
106
106
|
| Full page with 5+ components | `figma-code-cli` pipeline |
|
|
107
107
|
| Sitecore component + YML items | `figma-code-cli` (4-gate pipeline) |
|
|
108
108
|
| Brand implementation from scratch | `figma-code-cli` + reference ssd-figma-code |
|
|
@@ -120,7 +120,7 @@ The output should use correct design tokens, reuse existing components, and foll
|
|
|
120
120
|
|
|
121
121
|
4. **Skipping mobile verification** — Never assume mobile is just "desktop but smaller". Check mobile designs in Figma separately.
|
|
122
122
|
|
|
123
|
-
5. **Not reading design tokens first** — Run `/design-tokens` before starting Figma work. Know what tokens are available.
|
|
123
|
+
5. **Not reading design tokens first** — Run `/kit-design-tokens` before starting Figma work. Know what tokens are available.
|
|
124
124
|
|
|
125
125
|
---
|
|
126
126
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Getting Started with AI Kit
|
|
2
2
|
|
|
3
|
+
> **Upgrading from v1.x?** All skills and agents now use a `kit-` prefix (e.g., `/kit-review` instead of `/review`). Run `ai-kit update` to migrate automatically.
|
|
4
|
+
|
|
3
5
|
## What Just Happened?
|
|
4
6
|
|
|
5
7
|
`ai-kit init` scanned your project and generated AI configuration files tailored to your tech stack. Here's what was created:
|
|
@@ -19,10 +21,10 @@
|
|
|
19
21
|
## First Thing to Do
|
|
20
22
|
|
|
21
23
|
### If you use Claude Code:
|
|
22
|
-
Run the `/prompt-help` command. It's an interactive prompt builder that asks you all the right questions before generating a perfect prompt.
|
|
24
|
+
Run the `/kit-prompt-help` command. It's an interactive prompt builder that asks you all the right questions before generating a perfect prompt.
|
|
23
25
|
|
|
24
26
|
```
|
|
25
|
-
/prompt-help
|
|
27
|
+
/kit-prompt-help
|
|
26
28
|
```
|
|
27
29
|
|
|
28
30
|
### If you use Cursor:
|
|
@@ -33,36 +35,36 @@ Open any file and use Cmd+K or the chat panel. The `.cursorrules` file is automa
|
|
|
33
35
|
### Getting Started
|
|
34
36
|
| Skill | What it does |
|
|
35
37
|
|-------|-------------|
|
|
36
|
-
| `/prompt-help` | Interactive prompt builder — **start here** |
|
|
37
|
-
| `/understand` | Explain code in detail |
|
|
38
|
-
| `/token-tips` | Token usage optimization |
|
|
38
|
+
| `/kit-prompt-help` | Interactive prompt builder — **start here** |
|
|
39
|
+
| `/kit-understand` | Explain code in detail |
|
|
40
|
+
| `/kit-token-tips` | Token usage optimization |
|
|
39
41
|
|
|
40
42
|
### Building
|
|
41
43
|
| Skill | What it does |
|
|
42
44
|
|-------|-------------|
|
|
43
|
-
| `/new-component` | Scaffold a new component |
|
|
44
|
-
| `/new-page` | Create a new page/route |
|
|
45
|
-
| `/api-route` | Scaffold an API route |
|
|
46
|
-
| `/figma-to-code` | Implement Figma designs |
|
|
45
|
+
| `/kit-new-component` | Scaffold a new component |
|
|
46
|
+
| `/kit-new-page` | Create a new page/route |
|
|
47
|
+
| `/kit-api-route` | Scaffold an API route |
|
|
48
|
+
| `/kit-figma-to-code` | Implement Figma designs |
|
|
47
49
|
|
|
48
50
|
### Quality & Review
|
|
49
51
|
| Skill | What it does |
|
|
50
52
|
|-------|-------------|
|
|
51
|
-
| `/review` | Deep code review |
|
|
52
|
-
| `/fix-bug` | Guided bug fix workflow |
|
|
53
|
-
| `/test` | Generate tests |
|
|
54
|
-
| `/quality-gate` | Run ALL quality checks at once |
|
|
55
|
-
| `/security-check` | Security vulnerability scan |
|
|
56
|
-
| `/accessibility-audit` | WCAG 2.1 AA audit |
|
|
53
|
+
| `/kit-review` | Deep code review |
|
|
54
|
+
| `/kit-fix-bug` | Guided bug fix workflow |
|
|
55
|
+
| `/kit-test` | Generate tests |
|
|
56
|
+
| `/kit-quality-gate` | Run ALL quality checks at once |
|
|
57
|
+
| `/kit-security-check` | Security vulnerability scan |
|
|
58
|
+
| `/kit-accessibility-audit` | WCAG 2.1 AA audit |
|
|
57
59
|
|
|
58
60
|
### Session & Learning (NEW in v1.2.0)
|
|
59
61
|
| Skill | What it does |
|
|
60
62
|
|-------|-------------|
|
|
61
|
-
| `/save-session` | Save current session for later resumption |
|
|
62
|
-
| `/resume-session` | Pick up where you left off |
|
|
63
|
-
| `/checkpoint` | Snapshot all quality check results |
|
|
64
|
-
| `/orchestrate` | Coordinate multiple agents on complex tasks |
|
|
65
|
-
| `/harness-audit` | Check AI configuration health |
|
|
63
|
+
| `/kit-save-session` | Save current session for later resumption |
|
|
64
|
+
| `/kit-resume-session` | Pick up where you left off |
|
|
65
|
+
| `/kit-checkpoint` | Snapshot all quality check results |
|
|
66
|
+
| `/kit-orchestrate` | Coordinate multiple agents on complex tasks |
|
|
67
|
+
| `/kit-harness-audit` | Check AI configuration health |
|
|
66
68
|
|
|
67
69
|
## Hooks (Automated Checks)
|
|
68
70
|
|
|
@@ -83,24 +85,24 @@ Specialized AI assistants live in `.claude/agents/` and can be delegated to:
|
|
|
83
85
|
|
|
84
86
|
| Agent | Specialization |
|
|
85
87
|
|-------|---------------|
|
|
86
|
-
| `planner` | Implementation planning |
|
|
87
|
-
| `code-reviewer` | Quality review |
|
|
88
|
-
| `security-reviewer` | Security audit |
|
|
89
|
-
| `build-resolver` | Fix build errors |
|
|
90
|
-
| `e2e-runner` | Playwright E2E tests |
|
|
91
|
-
| `doc-updater` | Documentation sync |
|
|
92
|
-
| `refactor-cleaner` | Dead code cleanup |
|
|
93
|
-
| `sitecore-specialist` | Sitecore XM Cloud patterns |
|
|
88
|
+
| `kit-planner` | Implementation planning |
|
|
89
|
+
| `kit-code-reviewer` | Quality review |
|
|
90
|
+
| `kit-security-reviewer` | Security audit |
|
|
91
|
+
| `kit-build-resolver` | Fix build errors |
|
|
92
|
+
| `kit-e2e-runner` | Playwright E2E tests |
|
|
93
|
+
| `kit-doc-updater` | Documentation sync |
|
|
94
|
+
| `kit-refactor-cleaner` | Dead code cleanup |
|
|
95
|
+
| `kit-sitecore-specialist` | Sitecore XM Cloud patterns |
|
|
94
96
|
|
|
95
97
|
## Tips
|
|
96
98
|
|
|
97
|
-
1. **Always start with `/prompt-help`** if you're unsure how to ask for something
|
|
99
|
+
1. **Always start with `/kit-prompt-help`** if you're unsure how to ask for something
|
|
98
100
|
2. **Be specific about files** — mention paths like `src/components/Header.tsx`
|
|
99
101
|
3. **Don't start from scratch** — ask the AI to read existing code first
|
|
100
102
|
4. **One task per conversation** — keep conversations focused
|
|
101
103
|
5. **Review AI output** — always read what it generates before accepting
|
|
102
|
-
6. **Use `/checkpoint`** before and after major changes to track quality
|
|
103
|
-
7. **Use `/save-session`** before ending a long session
|
|
104
|
+
6. **Use `/kit-checkpoint`** before and after major changes to track quality
|
|
105
|
+
7. **Use `/kit-save-session`** before ending a long session
|
|
104
106
|
|
|
105
107
|
## CLI Commands
|
|
106
108
|
|
|
@@ -44,30 +44,30 @@ Agents are specialized AI assistants that can be delegated to for specific tasks
|
|
|
44
44
|
|
|
45
45
|
| Agent | What It Does |
|
|
46
46
|
|-------|-------------|
|
|
47
|
-
| **planner** | Breaks down features into implementation plans |
|
|
48
|
-
| **code-reviewer** | Deep code review for quality, patterns, and security |
|
|
49
|
-
| **security-reviewer** | Focused security audit (XSS, CSRF, OWASP Top 10) |
|
|
50
|
-
| **build-resolver** | Diagnoses and fixes build/type errors |
|
|
51
|
-
| **e2e-runner** | Generates and runs Playwright E2E tests |
|
|
52
|
-
| **doc-updater** | Syncs documentation with code changes |
|
|
53
|
-
| **refactor-cleaner** | Finds and removes dead code |
|
|
54
|
-
| **sitecore-specialist** | Sitecore XM Cloud patterns and debugging |
|
|
47
|
+
| **kit-planner** | Breaks down features into implementation plans |
|
|
48
|
+
| **kit-code-reviewer** | Deep code review for quality, patterns, and security |
|
|
49
|
+
| **kit-security-reviewer** | Focused security audit (XSS, CSRF, OWASP Top 10) |
|
|
50
|
+
| **kit-build-resolver** | Diagnoses and fixes build/type errors |
|
|
51
|
+
| **kit-e2e-runner** | Generates and runs Playwright E2E tests |
|
|
52
|
+
| **kit-doc-updater** | Syncs documentation with code changes |
|
|
53
|
+
| **kit-refactor-cleaner** | Finds and removes dead code |
|
|
54
|
+
| **kit-sitecore-specialist** | Sitecore XM Cloud patterns and debugging |
|
|
55
55
|
|
|
56
56
|
### How to Use Agents
|
|
57
57
|
|
|
58
58
|
In Claude Code, agents are automatically available for delegation. You can also invoke them directly:
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
@planner Plan the implementation for adding dark mode support
|
|
62
|
-
@code-reviewer Review the changes in src/components/Header.tsx
|
|
63
|
-
@e2e-runner Write E2E tests for the checkout flow
|
|
61
|
+
@kit-planner Plan the implementation for adding dark mode support
|
|
62
|
+
@kit-code-reviewer Review the changes in src/components/Header.tsx
|
|
63
|
+
@kit-e2e-runner Write E2E tests for the checkout flow
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
### Conditional Agents
|
|
67
67
|
|
|
68
68
|
Some agents are only generated when their tools are detected:
|
|
69
|
-
- **e2e-runner** — only if Playwright is installed
|
|
70
|
-
- **sitecore-specialist** — only if Sitecore XM Cloud is detected
|
|
69
|
+
- **kit-e2e-runner** — only if Playwright is installed
|
|
70
|
+
- **kit-sitecore-specialist** — only if Sitecore XM Cloud is detected
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
@@ -99,17 +99,17 @@ New skills help you persist context across sessions:
|
|
|
99
99
|
|
|
100
100
|
| Skill | What It Does |
|
|
101
101
|
|-------|-------------|
|
|
102
|
-
| `/save-session` | Save current session state and decisions |
|
|
103
|
-
| `/resume-session` | Restore context from a previous session |
|
|
104
|
-
| `/checkpoint` | Run all quality checks and record results |
|
|
102
|
+
| `/kit-save-session` | Save current session state and decisions |
|
|
103
|
+
| `/kit-resume-session` | Restore context from a previous session |
|
|
104
|
+
| `/kit-checkpoint` | Run all quality checks and record results |
|
|
105
105
|
|
|
106
106
|
### Quality & Orchestration
|
|
107
107
|
|
|
108
108
|
| Skill | What It Does |
|
|
109
109
|
|-------|-------------|
|
|
110
|
-
| `/quality-gate` | Run all checks: types, lint, format, tests, a11y, security |
|
|
111
|
-
| `/orchestrate` | Coordinate multiple agents for complex tasks |
|
|
112
|
-
| `/harness-audit` | Check AI configuration health |
|
|
110
|
+
| `/kit-quality-gate` | Run all checks: types, lint, format, tests, a11y, security |
|
|
111
|
+
| `/kit-orchestrate` | Coordinate multiple agents for complex tasks |
|
|
112
|
+
| `/kit-harness-audit` | Check AI configuration health |
|
|
113
113
|
|
|
114
114
|
---
|
|
115
115
|
|
|
@@ -8,7 +8,7 @@ Tokens = cost. Here's how to use fewer tokens while getting better results.
|
|
|
8
8
|
|-------|-----------|-----|
|
|
9
9
|
| Pasting entire files into chat | 🔴 Very High | Point AI to file paths instead |
|
|
10
10
|
| Long back-and-forth conversations | 🔴 Very High | Start new conversations per task |
|
|
11
|
-
| Vague prompts that need clarification | 🟡 Medium | Use `/prompt-help` to get it right first time |
|
|
11
|
+
| Vague prompts that need clarification | 🟡 Medium | Use `/kit-prompt-help` to get it right first time |
|
|
12
12
|
| Asking AI to read the whole codebase | 🔴 Very High | Be specific about which files |
|
|
13
13
|
| Not using existing patterns | 🟡 Medium | Reference existing files: "follow the pattern in X" |
|
|
14
14
|
|
|
@@ -26,11 +26,11 @@ Each new message includes ALL previous context. A 20-message conversation sends
|
|
|
26
26
|
### 3. Be Specific Upfront
|
|
27
27
|
```
|
|
28
28
|
❌ "Make a form" → AI asks 5 questions → 10 messages → 5000 tokens wasted
|
|
29
|
-
✅ Use /prompt-help → 1 structured prompt → done in 2 messages
|
|
29
|
+
✅ Use /kit-prompt-help → 1 structured prompt → done in 2 messages
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
### 4. Use Slash Commands
|
|
33
|
-
Commands include pre-built context. `/new-component Button` is more efficient than typing all the instructions manually.
|
|
33
|
+
Commands include pre-built context. `/kit-new-component Button` is more efficient than typing all the instructions manually.
|
|
34
34
|
|
|
35
35
|
### 5. Point to Patterns
|
|
36
36
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikulgohil/ai-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "AI-assisted development setup kit. Auto-detects your tech stack (Next.js, Sitecore XM Cloud, Optimizely SaaS CMS, Tailwind, TypeScript, Turborepo) and generates tailored CLAUDE.md, .cursorrules, hooks, agents, context modes, slash commands, design token rules, component registries, developer guides, and spec-first workflows. Migrate existing projects, auto-backup on update, and rollback support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -158,43 +158,43 @@ AI training data has a cutoff date. When working with framework APIs, **verify y
|
|
|
158
158
|
## Skills & Commands
|
|
159
159
|
Available as auto-discovered skills (`.claude/skills/`, `.cursor/skills/`) and legacy commands (`.claude/commands/`).
|
|
160
160
|
|
|
161
|
-
AI will auto-discover and apply these when your task matches. You can also invoke them manually with `/skill-name`.
|
|
161
|
+
AI will auto-discover and apply these when your task matches. You can also invoke them manually with `/kit-skill-name`. All ai-kit skills use the `kit-` prefix to avoid conflicts with global or built-in skills.
|
|
162
162
|
|
|
163
163
|
**Getting Started**
|
|
164
|
-
- `/prompt-help` — Interactive prompt builder (start here if unsure how to ask)
|
|
165
|
-
- `/understand` — Explain code in detail
|
|
164
|
+
- `/kit-prompt-help` — Interactive prompt builder (start here if unsure how to ask)
|
|
165
|
+
- `/kit-understand` — Explain code in detail
|
|
166
166
|
|
|
167
167
|
**Building**
|
|
168
|
-
- `/new-component` — Scaffold a new component with proper structure
|
|
169
|
-
- `/new-page` — Scaffold a new page/route
|
|
170
|
-
- `/api-route` — Scaffold an API route with validation, error handling, and auth
|
|
171
|
-
- `/error-boundary` — Generate error boundaries, loading states, and fallback UI
|
|
172
|
-
- `/extract-hook` — Extract component logic into a reusable custom hook
|
|
173
|
-
- `/figma-to-code` — Structured Figma-to-code implementation workflow
|
|
174
|
-
- `/design-tokens` — Design token management and mapping
|
|
168
|
+
- `/kit-new-component` — Scaffold a new component with proper structure
|
|
169
|
+
- `/kit-new-page` — Scaffold a new page/route
|
|
170
|
+
- `/kit-api-route` — Scaffold an API route with validation, error handling, and auth
|
|
171
|
+
- `/kit-error-boundary` — Generate error boundaries, loading states, and fallback UI
|
|
172
|
+
- `/kit-extract-hook` — Extract component logic into a reusable custom hook
|
|
173
|
+
- `/kit-figma-to-code` — Structured Figma-to-code implementation workflow
|
|
174
|
+
- `/kit-design-tokens` — Design token management and mapping
|
|
175
175
|
|
|
176
176
|
**Quality & Review**
|
|
177
|
-
- `/review` — Deep code review following team standards
|
|
178
|
-
- `/pre-pr` — Pre-PR checklist (type safety, console cleanup, a11y, security)
|
|
179
|
-
- `/test` — Generate tests for a file or function
|
|
180
|
-
- `/accessibility-audit` — WCAG 2.1 AA compliance check
|
|
181
|
-
- `/security-check` — XSS, injection, secrets, and OWASP Top 10 review
|
|
182
|
-
- `/responsive-check` — Responsive design audit (breakpoints, touch targets, overflow)
|
|
183
|
-
- `/type-fix` — Fix TypeScript issues (replace `any`, add null checks, generate types)
|
|
177
|
+
- `/kit-review` — Deep code review following team standards
|
|
178
|
+
- `/kit-pre-pr` — Pre-PR checklist (type safety, console cleanup, a11y, security)
|
|
179
|
+
- `/kit-test` — Generate tests for a file or function
|
|
180
|
+
- `/kit-accessibility-audit` — WCAG 2.1 AA compliance check
|
|
181
|
+
- `/kit-security-check` — XSS, injection, secrets, and OWASP Top 10 review
|
|
182
|
+
- `/kit-responsive-check` — Responsive design audit (breakpoints, touch targets, overflow)
|
|
183
|
+
- `/kit-type-fix` — Fix TypeScript issues (replace `any`, add null checks, generate types)
|
|
184
184
|
|
|
185
185
|
**Maintenance**
|
|
186
|
-
- `/fix-bug` — Guided bug fix workflow
|
|
187
|
-
- `/refactor` — Safe refactoring (split components, extract hooks, remove duplication)
|
|
188
|
-
- `/optimize` — Performance optimization review
|
|
189
|
-
- `/migrate` — Guided migration helper (Next.js, Tailwind, Sitecore upgrades)
|
|
190
|
-
- `/dep-check` — Dependency audit (unused, outdated, security, bundle size)
|
|
191
|
-
- `/sitecore-debug` — Sitecore XM Cloud debugging (placeholders, fields, GraphQL)
|
|
186
|
+
- `/kit-fix-bug` — Guided bug fix workflow
|
|
187
|
+
- `/kit-refactor` — Safe refactoring (split components, extract hooks, remove duplication)
|
|
188
|
+
- `/kit-optimize` — Performance optimization review
|
|
189
|
+
- `/kit-migrate` — Guided migration helper (Next.js, Tailwind, Sitecore upgrades)
|
|
190
|
+
- `/kit-dep-check` — Dependency audit (unused, outdated, security, bundle size)
|
|
191
|
+
- `/kit-sitecore-debug` — Sitecore XM Cloud debugging (placeholders, fields, GraphQL)
|
|
192
192
|
|
|
193
193
|
**Workflow**
|
|
194
|
-
- `/document` — Generate documentation for existing code
|
|
195
|
-
- `/commit-msg` — Generate conventional commit message from staged changes
|
|
196
|
-
- `/env-setup` — Generate .env.example and validate environment variables
|
|
197
|
-
- `/fetch-docs` — Pre-load current docs for your tech stack (run at session start)
|
|
194
|
+
- `/kit-document` — Generate documentation for existing code
|
|
195
|
+
- `/kit-commit-msg` — Generate conventional commit message from staged changes
|
|
196
|
+
- `/kit-env-setup` — Generate .env.example and validate environment variables
|
|
197
|
+
- `/kit-fetch-docs` — Pre-load current docs for your tech stack (run at session start)
|
|
198
198
|
|
|
199
199
|
## Scripts
|
|
200
200
|
{{scripts}}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Behavioral Guardrails
|
|
2
|
+
|
|
3
|
+
Rules for how you approach work — not what code to write, but how to think about it.
|
|
4
|
+
|
|
5
|
+
_Inspired by [Andrej Karpathy's LLM coding guidelines](https://github.com/forrestchang/andrej-karpathy-skills)._
|
|
6
|
+
|
|
7
|
+
## Think Before Coding
|
|
8
|
+
|
|
9
|
+
Do not assume. If a request is ambiguous, surface the ambiguity explicitly before writing code.
|
|
10
|
+
|
|
11
|
+
### When You're Unsure
|
|
12
|
+
- **State your interpretation** — "I'm reading this as X. Is that right?"
|
|
13
|
+
- **Present alternatives** — "This could mean A or B — which do you want?"
|
|
14
|
+
- **Push back when warranted** — "Doing X would break Y. Should I proceed anyway?"
|
|
15
|
+
- **Ask, don't guess** — a 10-second question prevents 10 minutes of wrong output
|
|
16
|
+
|
|
17
|
+
### Hidden Assumption Check
|
|
18
|
+
Before starting any non-trivial change, briefly list the assumptions you're making:
|
|
19
|
+
- What the user wants changed
|
|
20
|
+
- What should NOT change
|
|
21
|
+
- Which existing patterns to follow
|
|
22
|
+
- What the success criteria are
|
|
23
|
+
|
|
24
|
+
If any of these are unclear, ask before coding.
|
|
25
|
+
|
|
26
|
+
## Simplicity First
|
|
27
|
+
|
|
28
|
+
Write the minimum code that solves the stated problem. Nothing more.
|
|
29
|
+
|
|
30
|
+
### Rules
|
|
31
|
+
- No speculative features — don't add caching, retry logic, analytics, or configuration options unless specifically asked
|
|
32
|
+
- No premature abstractions — if a pattern is used once, inline it. Three similar lines of code is better than a premature helper
|
|
33
|
+
- No over-engineering — ask yourself: "Would a senior engineer say this is overcomplicated for what it does?" If yes, simplify
|
|
34
|
+
- Match the existing abstraction level — if the codebase uses simple functions, don't introduce a Strategy pattern
|
|
35
|
+
|
|
36
|
+
### The Senior Engineer Test
|
|
37
|
+
After writing code, review it as if you're a senior engineer on the team:
|
|
38
|
+
- Does this solve exactly what was asked?
|
|
39
|
+
- Is there code here that wasn't requested?
|
|
40
|
+
- Could this be simpler without losing functionality?
|
|
41
|
+
|
|
42
|
+
If the answer to the last two questions is "yes" — simplify before presenting.
|
|
43
|
+
|
|
44
|
+
## Surgical Changes
|
|
45
|
+
|
|
46
|
+
Touch only what is necessary. Every changed line must trace back to the user's request.
|
|
47
|
+
|
|
48
|
+
### Rules
|
|
49
|
+
- **Do not "improve" adjacent code** — if you're fixing a bug in function A, don't refactor function B even if it's ugly
|
|
50
|
+
- **Do not change formatting** — don't fix quotes, spacing, semicolons, or trailing commas in lines you didn't need to touch
|
|
51
|
+
- **Do not add type annotations** — to existing code that wasn't part of the request
|
|
52
|
+
- **Do not remove comments** — unless the comment describes code you're removing
|
|
53
|
+
- **Match existing style** — if the file uses single quotes, use single quotes. If it uses 4-space indent, use 4-space indent
|
|
54
|
+
- **Orphan cleanup only** — only remove imports, variables, or types that YOUR changes made unused. Never clean up pre-existing unused code unless asked
|
|
55
|
+
|
|
56
|
+
### The Diff Test
|
|
57
|
+
Before presenting changes, mentally review the diff:
|
|
58
|
+
- Does every changed line relate to the task?
|
|
59
|
+
- Would a reviewer question why any line was touched?
|
|
60
|
+
|
|
61
|
+
If a line change can't be justified by the task, revert it.
|
|
62
|
+
|
|
63
|
+
## Goal-Driven Execution
|
|
64
|
+
|
|
65
|
+
Transform vague tasks into verifiable goals. Then work toward those goals with explicit checkpoints.
|
|
66
|
+
|
|
67
|
+
### How to Apply
|
|
68
|
+
1. **Convert tasks to goals** — "Fix the bug" becomes "Write a test that reproduces the bug, then make it pass"
|
|
69
|
+
2. **Plan in steps** — break non-trivial work into 3-5 concrete steps with verification at each step
|
|
70
|
+
3. **Verify, don't assume** — after each step, confirm it worked before proceeding to the next
|
|
71
|
+
4. **State what done looks like** — before starting, define the success criteria:
|
|
72
|
+
- What should work after the change?
|
|
73
|
+
- What should NOT break?
|
|
74
|
+
- How can the developer verify?
|
|
75
|
+
|
|
76
|
+
### When Stuck
|
|
77
|
+
- If an approach fails, diagnose WHY before trying something different
|
|
78
|
+
- If it fails twice with the same root cause, switch strategies
|
|
79
|
+
- Present what you tried and what you learned — don't silently retry
|
|
80
|
+
- Ask the developer for direction when genuinely blocked
|
|
81
|
+
|
|
82
|
+
## Knowing When to Apply These Rules
|
|
83
|
+
|
|
84
|
+
These behavioral guardrails are calibrated for **non-trivial work** — feature implementation, bug fixes, refactors, and architectural changes.
|
|
85
|
+
|
|
86
|
+
For trivial tasks (typo fixes, one-line changes, obvious corrections), apply proportionally — a quick fix doesn't need a full assumption audit. Use judgment.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Behavioral Guardrails
|
|
2
|
+
|
|
3
|
+
_Inspired by [Andrej Karpathy's LLM coding guidelines](https://github.com/forrestchang/andrej-karpathy-skills)._
|
|
4
|
+
|
|
5
|
+
## Think Before Coding
|
|
6
|
+
- If a request is ambiguous, state your interpretation and ask — don't guess
|
|
7
|
+
- Present alternatives when multiple valid approaches exist
|
|
8
|
+
- Push back when the requested change would break something
|
|
9
|
+
- Before non-trivial changes: list assumptions (what changes, what doesn't, success criteria)
|
|
10
|
+
|
|
11
|
+
## Simplicity First
|
|
12
|
+
- Write the minimum code that solves the stated problem — nothing more
|
|
13
|
+
- No speculative features (caching, config options, analytics) unless asked
|
|
14
|
+
- No premature abstractions — three similar lines > premature helper
|
|
15
|
+
- Match existing abstraction level — don't over-engineer beyond what the codebase does
|
|
16
|
+
- The "senior engineer test": would they say this is overcomplicated? If yes, simplify
|
|
17
|
+
|
|
18
|
+
## Surgical Changes
|
|
19
|
+
- Every changed line must trace back to the user's request
|
|
20
|
+
- Don't improve adjacent code, fix formatting, add types, or remove comments outside scope
|
|
21
|
+
- Match existing style (quotes, indentation, patterns)
|
|
22
|
+
- Only remove imports/variables that YOUR changes made unused — don't clean pre-existing debt
|
|
23
|
+
- Review the diff: if a reviewer would question why a line was touched, revert it
|
|
24
|
+
|
|
25
|
+
## Goal-Driven Execution
|
|
26
|
+
- Convert tasks to verifiable goals ("fix bug" → "write test that reproduces it, then pass it")
|
|
27
|
+
- Plan non-trivial work in 3-5 steps with verification at each step
|
|
28
|
+
- Define success criteria before starting: what works, what must not break, how to verify
|
|
29
|
+
- If an approach fails twice with the same root cause, switch strategies
|
|
30
|
+
- When stuck, present what you tried and ask — don't silently retry
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|