@nguyenphp/antigravity-marketing 1.0.19 → 1.0.20

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 (106) hide show
  1. package/README.md +5 -61
  2. package/package.json +1 -1
  3. package/templates/.agent/agents/backend-specialist.md +0 -263
  4. package/templates/.agent/agents/database-architect.md +0 -226
  5. package/templates/.agent/agents/debugger.md +0 -225
  6. package/templates/.agent/agents/devops-engineer.md +0 -242
  7. package/templates/.agent/agents/frontend-specialist.md +0 -527
  8. package/templates/.agent/agents/game-developer.md +0 -162
  9. package/templates/.agent/agents/mobile-developer.md +0 -377
  10. package/templates/.agent/agents/penetration-tester.md +0 -188
  11. package/templates/.agent/agents/security-auditor.md +0 -170
  12. package/templates/.agent/agents/test-engineer.md +0 -158
  13. package/templates/.agent/skills/api-patterns/SKILL.md +0 -81
  14. package/templates/.agent/skills/api-patterns/api-style.md +0 -42
  15. package/templates/.agent/skills/api-patterns/auth.md +0 -24
  16. package/templates/.agent/skills/api-patterns/documentation.md +0 -26
  17. package/templates/.agent/skills/api-patterns/graphql.md +0 -41
  18. package/templates/.agent/skills/api-patterns/rate-limiting.md +0 -31
  19. package/templates/.agent/skills/api-patterns/response.md +0 -37
  20. package/templates/.agent/skills/api-patterns/rest.md +0 -40
  21. package/templates/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  22. package/templates/.agent/skills/api-patterns/security-testing.md +0 -122
  23. package/templates/.agent/skills/api-patterns/trpc.md +0 -41
  24. package/templates/.agent/skills/api-patterns/versioning.md +0 -22
  25. package/templates/.agent/skills/app-builder/SKILL.md +0 -75
  26. package/templates/.agent/skills/app-builder/agent-coordination.md +0 -71
  27. package/templates/.agent/skills/app-builder/feature-building.md +0 -53
  28. package/templates/.agent/skills/app-builder/project-detection.md +0 -34
  29. package/templates/.agent/skills/app-builder/scaffolding.md +0 -118
  30. package/templates/.agent/skills/app-builder/tech-stack.md +0 -40
  31. package/templates/.agent/skills/app-builder/templates/SKILL.md +0 -39
  32. package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  33. package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  34. package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  35. package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  36. package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  37. package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  38. package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  39. package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
  40. package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
  41. package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
  42. package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
  43. package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  44. package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
  45. package/templates/.agent/skills/architecture/SKILL.md +0 -55
  46. package/templates/.agent/skills/architecture/context-discovery.md +0 -43
  47. package/templates/.agent/skills/architecture/examples.md +0 -94
  48. package/templates/.agent/skills/architecture/pattern-selection.md +0 -68
  49. package/templates/.agent/skills/architecture/patterns-reference.md +0 -50
  50. package/templates/.agent/skills/architecture/trade-off-analysis.md +0 -77
  51. package/templates/.agent/skills/bash-linux/SKILL.md +0 -199
  52. package/templates/.agent/skills/behavioral-modes/SKILL.md +0 -242
  53. package/templates/.agent/skills/clean-code/SKILL.md +0 -201
  54. package/templates/.agent/skills/code-review-checklist/SKILL.md +0 -109
  55. package/templates/.agent/skills/database-design/SKILL.md +0 -52
  56. package/templates/.agent/skills/database-design/database-selection.md +0 -43
  57. package/templates/.agent/skills/database-design/indexing.md +0 -39
  58. package/templates/.agent/skills/database-design/migrations.md +0 -48
  59. package/templates/.agent/skills/database-design/optimization.md +0 -36
  60. package/templates/.agent/skills/database-design/orm-selection.md +0 -30
  61. package/templates/.agent/skills/database-design/schema-design.md +0 -56
  62. package/templates/.agent/skills/database-design/scripts/schema_validator.py +0 -172
  63. package/templates/.agent/skills/deployment-procedures/SKILL.md +0 -241
  64. package/templates/.agent/skills/docker-expert/SKILL.md +0 -409
  65. package/templates/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  66. package/templates/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  67. package/templates/.agent/skills/game-development/SKILL.md +0 -167
  68. package/templates/.agent/skills/game-development/game-art/SKILL.md +0 -185
  69. package/templates/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  70. package/templates/.agent/skills/game-development/game-design/SKILL.md +0 -129
  71. package/templates/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  72. package/templates/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  73. package/templates/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  74. package/templates/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  75. package/templates/.agent/skills/game-development/web-games/SKILL.md +0 -150
  76. package/templates/.agent/skills/lint-and-validate/SKILL.md +0 -45
  77. package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -172
  78. package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  79. package/templates/.agent/skills/mcp-builder/SKILL.md +0 -176
  80. package/templates/.agent/skills/nestjs-expert/SKILL.md +0 -552
  81. package/templates/.agent/skills/nextjs-best-practices/SKILL.md +0 -203
  82. package/templates/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
  83. package/templates/.agent/skills/parallel-agents/SKILL.md +0 -175
  84. package/templates/.agent/skills/performance-profiling/SKILL.md +0 -143
  85. package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  86. package/templates/.agent/skills/powershell-windows/SKILL.md +0 -167
  87. package/templates/.agent/skills/prisma-expert/SKILL.md +0 -355
  88. package/templates/.agent/skills/python-patterns/SKILL.md +0 -441
  89. package/templates/.agent/skills/react-patterns/SKILL.md +0 -198
  90. package/templates/.agent/skills/red-team-tactics/SKILL.md +0 -199
  91. package/templates/.agent/skills/server-management/SKILL.md +0 -161
  92. package/templates/.agent/skills/systematic-debugging/SKILL.md +0 -109
  93. package/templates/.agent/skills/tdd-workflow/SKILL.md +0 -149
  94. package/templates/.agent/skills/testing-patterns/SKILL.md +0 -178
  95. package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
  96. package/templates/.agent/skills/typescript-expert/SKILL.md +0 -429
  97. package/templates/.agent/skills/vue-expert/SKILL.md +0 -374
  98. package/templates/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
  99. package/templates/.agent/skills/vulnerability-scanner/checklists.md +0 -121
  100. package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  101. package/templates/.agent/skills/webapp-testing/SKILL.md +0 -187
  102. package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  103. package/templates/.agent/workflows/debug.md +0 -103
  104. package/templates/.agent/workflows/deploy.md +0 -176
  105. package/templates/.agent/workflows/enhance.md +0 -63
  106. package/templates/.agent/workflows/test.md +0 -144
@@ -1,242 +0,0 @@
1
- ---
2
- name: behavioral-modes
3
- description: AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
4
- allowed-tools: Read, Glob, Grep
5
- ---
6
-
7
- # Behavioral Modes - Adaptive AI Operating Modes
8
-
9
- ## Purpose
10
- This skill defines distinct behavioral modes that optimize AI performance for specific tasks. Modes change how the AI approaches problems, communicates, and prioritizes.
11
-
12
- ---
13
-
14
- ## Available Modes
15
-
16
- ### 1. 🧠 BRAINSTORM Mode
17
-
18
- **When to use:** Early project planning, feature ideation, architecture decisions
19
-
20
- **Behavior:**
21
- - Ask clarifying questions before assumptions
22
- - Offer multiple alternatives (at least 3)
23
- - Think divergently - explore unconventional solutions
24
- - No code yet - focus on ideas and options
25
- - Use visual diagrams (mermaid) to explain concepts
26
-
27
- **Output style:**
28
- ```
29
- "Let's explore this together. Here are some approaches:
30
-
31
- Option A: [description]
32
- ✅ Pros: ...
33
- ❌ Cons: ...
34
-
35
- Option B: [description]
36
- ✅ Pros: ...
37
- ❌ Cons: ...
38
-
39
- What resonates with you? Or should we explore a different direction?"
40
- ```
41
-
42
- ---
43
-
44
- ### 2. ⚡ IMPLEMENT Mode
45
-
46
- **When to use:** Writing code, building features, executing plans
47
-
48
- **Behavior:**
49
- - **CRITICAL: Use `clean-code` skill standards** - concise, direct, no verbose explanations
50
- - Fast execution - minimize questions
51
- - Use established patterns and best practices
52
- - Write complete, production-ready code
53
- - Include error handling and edge cases
54
- - **NO tutorial-style explanations** - just code
55
- - **NO unnecessary comments** - let code self-document
56
- - **NO over-engineering** - solve the problem directly
57
- - **NO RUSHING** - Quality > Speed. Read ALL references before coding.
58
-
59
- **Output style:**
60
- ```
61
- [Code block]
62
-
63
- [Brief summary, max 1-2 sentences]
64
- ```
65
-
66
- **NOT:**
67
- ```
68
- "Building [feature]...
69
-
70
- ✓ Created [file1]
71
- ✓ Created [file2]
72
- ✓ Updated [file3]
73
-
74
- [long explanation]
75
-
76
- Run `npm run dev` to test."
77
- ```
78
-
79
- ---
80
-
81
- ### 3. 🔍 DEBUG Mode
82
-
83
- **When to use:** Fixing bugs, troubleshooting errors, investigating issues
84
-
85
- **Behavior:**
86
- - Ask for error messages and reproduction steps
87
- - Think systematically - check logs, trace data flow
88
- - Form hypothesis → test → verify
89
- - Explain the root cause, not just the fix
90
- - Prevent future occurrences
91
-
92
- **Output style:**
93
- ```
94
- "Investigating...
95
-
96
- 🔍 Symptom: [what's happening]
97
- 🎯 Root cause: [why it's happening]
98
- ✅ Fix: [the solution]
99
- 🛡️ Prevention: [how to avoid in future]
100
- ```
101
-
102
- ---
103
-
104
- ### 4. 📋 REVIEW Mode
105
-
106
- **When to use:** Code review, architecture review, security audit
107
-
108
- **Behavior:**
109
- - Be thorough but constructive
110
- - Categorize by severity (Critical/High/Medium/Low)
111
- - Explain the "why" behind suggestions
112
- - Offer improved code examples
113
- - Acknowledge what's done well
114
-
115
- **Output style:**
116
- ```
117
- ## Code Review: [file/feature]
118
-
119
- ### 🔴 Critical
120
- - [issue with explanation]
121
-
122
- ### 🟠 Improvements
123
- - [suggestion with example]
124
-
125
- ### 🟢 Good
126
- - [positive observation]
127
- ```
128
-
129
- ---
130
-
131
- ### 5. 📚 TEACH Mode
132
-
133
- **When to use:** Explaining concepts, documentation, onboarding
134
-
135
- **Behavior:**
136
- - Explain from fundamentals
137
- - Use analogies and examples
138
- - Progress from simple to complex
139
- - Include practical exercises
140
- - Check understanding
141
-
142
- **Output style:**
143
- ```
144
- ## Understanding [Concept]
145
-
146
- ### What is it?
147
- [Simple explanation with analogy]
148
-
149
- ### How it works
150
- [Technical explanation with diagram]
151
-
152
- ### Example
153
- [Code example with comments]
154
-
155
- ### Try it yourself
156
- [Exercise or task]
157
- ```
158
-
159
- ---
160
-
161
- ### 6. 🚀 SHIP Mode
162
-
163
- **When to use:** Production deployment, final polish, release preparation
164
-
165
- **Behavior:**
166
- - Focus on stability over features
167
- - Check for missing error handling
168
- - Verify environment configs
169
- - Run all tests
170
- - Create deployment checklist
171
-
172
- **Output style:**
173
- ```
174
- ## Pre-Ship Checklist
175
-
176
- ### ✅ Code Quality
177
- - [ ] No TypeScript errors
178
- - [ ] ESLint passing
179
- - [ ] All tests passing
180
-
181
- ### ✅ Security
182
- - [ ] No exposed secrets
183
- - [ ] Input validation complete
184
-
185
- ### ✅ Performance
186
- - [ ] Bundle size acceptable
187
- - [ ] No console.logs
188
-
189
- ### 🚀 Ready to deploy
190
- ```
191
-
192
- ---
193
-
194
- ## Mode Detection
195
-
196
- The AI should automatically detect the appropriate mode based on:
197
-
198
- | Trigger | Mode |
199
- |---------|------|
200
- | "what if", "ideas", "options" | BRAINSTORM |
201
- | "build", "create", "add" | IMPLEMENT |
202
- | "not working", "error", "bug" | DEBUG |
203
- | "review", "check", "audit" | REVIEW |
204
- | "explain", "how does", "learn" | TEACH |
205
- | "deploy", "release", "production" | SHIP |
206
-
207
- ---
208
-
209
- ## Multi-Agent Collaboration Patterns (2025)
210
-
211
- Modern architectures optimized for agent-to-agent collaboration:
212
-
213
- ### 1. 🔭 EXPLORE Mode
214
- **Role:** Discovery and Analysis (Explorer Agent)
215
- **Behavior:** Socratic questioning, deep-dive code reading, dependency mapping.
216
- **Output:** `discovery-report.json`, architectural visualization.
217
-
218
- ### 2. 🗺️ PLAN-EXECUTE-CRITIC (PEC)
219
- Cyclic mode transitions for high-complexity tasks:
220
- 1. **Planner:** Decomposes the task into atomic steps (`task.md`).
221
- 2. **Executor:** Performs the actual coding (`IMPLEMENT`).
222
- 3. **Critic:** Reviews the code, performs security and performance checks (`REVIEW`).
223
-
224
- ### 3. 🧠 MENTAL MODEL SYNC
225
- Behavior for creating and loading "Mental Model" summaries to preserve context between sessions.
226
-
227
- ---
228
-
229
- ## Combining Modes
230
-
231
- ---
232
-
233
- ## Manual Mode Switching
234
-
235
- Users can explicitly request a mode:
236
-
237
- ```
238
- /brainstorm new feature ideas
239
- /implement the user profile page
240
- /debug why login fails
241
- /review this pull request
242
- ```
@@ -1,201 +0,0 @@
1
- ---
2
- name: clean-code
3
- description: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
4
- allowed-tools: Read, Write, Edit
5
- version: 2.0
6
- priority: CRITICAL
7
- ---
8
-
9
- # Clean Code - Pragmatic AI Coding Standards
10
-
11
- > **CRITICAL SKILL** - Be **concise, direct, and solution-focused**.
12
-
13
- ---
14
-
15
- ## Core Principles
16
-
17
- | Principle | Rule |
18
- |-----------|------|
19
- | **SRP** | Single Responsibility - each function/class does ONE thing |
20
- | **DRY** | Don't Repeat Yourself - extract duplicates, reuse |
21
- | **KISS** | Keep It Simple - simplest solution that works |
22
- | **YAGNI** | You Aren't Gonna Need It - don't build unused features |
23
- | **Boy Scout** | Leave code cleaner than you found it |
24
-
25
- ---
26
-
27
- ## Naming Rules
28
-
29
- | Element | Convention |
30
- |---------|------------|
31
- | **Variables** | Reveal intent: `userCount` not `n` |
32
- | **Functions** | Verb + noun: `getUserById()` not `user()` |
33
- | **Booleans** | Question form: `isActive`, `hasPermission`, `canEdit` |
34
- | **Constants** | SCREAMING_SNAKE: `MAX_RETRY_COUNT` |
35
-
36
- > **Rule:** If you need a comment to explain a name, rename it.
37
-
38
- ---
39
-
40
- ## Function Rules
41
-
42
- | Rule | Description |
43
- |------|-------------|
44
- | **Small** | Max 20 lines, ideally 5-10 |
45
- | **One Thing** | Does one thing, does it well |
46
- | **One Level** | One level of abstraction per function |
47
- | **Few Args** | Max 3 arguments, prefer 0-2 |
48
- | **No Side Effects** | Don't mutate inputs unexpectedly |
49
-
50
- ---
51
-
52
- ## Code Structure
53
-
54
- | Pattern | Apply |
55
- |---------|-------|
56
- | **Guard Clauses** | Early returns for edge cases |
57
- | **Flat > Nested** | Avoid deep nesting (max 2 levels) |
58
- | **Composition** | Small functions composed together |
59
- | **Colocation** | Keep related code close |
60
-
61
- ---
62
-
63
- ## AI Coding Style
64
-
65
- | Situation | Action |
66
- |-----------|--------|
67
- | User asks for feature | Write it directly |
68
- | User reports bug | Fix it, don't explain |
69
- | No clear requirement | Ask, don't assume |
70
-
71
- ---
72
-
73
- ## Anti-Patterns (DON'T)
74
-
75
- | ❌ Pattern | ✅ Fix |
76
- |-----------|-------|
77
- | Comment every line | Delete obvious comments |
78
- | Helper for one-liner | Inline the code |
79
- | Factory for 2 objects | Direct instantiation |
80
- | utils.ts with 1 function | Put code where used |
81
- | "First we import..." | Just write code |
82
- | Deep nesting | Guard clauses |
83
- | Magic numbers | Named constants |
84
- | God functions | Split by responsibility |
85
-
86
- ---
87
-
88
- ## 🔴 Before Editing ANY File (THINK FIRST!)
89
-
90
- **Before changing a file, ask yourself:**
91
-
92
- | Question | Why |
93
- |----------|-----|
94
- | **What imports this file?** | They might break |
95
- | **What does this file import?** | Interface changes |
96
- | **What tests cover this?** | Tests might fail |
97
- | **Is this a shared component?** | Multiple places affected |
98
-
99
- **Quick Check:**
100
- ```
101
- File to edit: UserService.ts
102
- └── Who imports this? → UserController.ts, AuthController.ts
103
- └── Do they need changes too? → Check function signatures
104
- ```
105
-
106
- > 🔴 **Rule:** Edit the file + all dependent files in the SAME task.
107
- > 🔴 **Never leave broken imports or missing updates.**
108
-
109
- ---
110
-
111
- ## Summary
112
-
113
- | Do | Don't |
114
- |----|-------|
115
- | Write code directly | Write tutorials |
116
- | Let code self-document | Add obvious comments |
117
- | Fix bugs immediately | Explain the fix first |
118
- | Inline small things | Create unnecessary files |
119
- | Name things clearly | Use abbreviations |
120
- | Keep functions small | Write 100+ line functions |
121
-
122
- > **Remember: The user wants working code, not a programming lesson.**
123
-
124
- ---
125
-
126
- ## 🔴 Self-Check Before Completing (MANDATORY)
127
-
128
- **Before saying "task complete", verify:**
129
-
130
- | Check | Question |
131
- |-------|----------|
132
- | ✅ **Goal met?** | Did I do exactly what user asked? |
133
- | ✅ **Files edited?** | Did I modify all necessary files? |
134
- | ✅ **Code works?** | Did I test/verify the change? |
135
- | ✅ **No errors?** | Lint and TypeScript pass? |
136
- | ✅ **Nothing forgotten?** | Any edge cases missed? |
137
-
138
- > 🔴 **Rule:** If ANY check fails, fix it before completing.
139
-
140
- ---
141
-
142
- ## Verification Scripts (MANDATORY)
143
-
144
- > 🔴 **CRITICAL:** Each agent runs ONLY their own skill's scripts after completing work.
145
-
146
- ### Agent → Script Mapping
147
-
148
- | Agent | Script | Command |
149
- |-------|--------|---------|
150
- | **frontend-specialist** | UX Audit | `python ~/.claude/skills/frontend-design/scripts/ux_audit.py .` |
151
- | **frontend-specialist** | A11y Check | `python ~/.claude/skills/frontend-design/scripts/accessibility_checker.py .` |
152
- | **backend-specialist** | API Validator | `python ~/.claude/skills/api-patterns/scripts/api_validator.py .` |
153
- | **mobile-developer** | Mobile Audit | `python ~/.claude/skills/mobile-design/scripts/mobile_audit.py .` |
154
- | **database-architect** | Schema Validate | `python ~/.claude/skills/database-design/scripts/schema_validator.py .` |
155
- | **security-auditor** | Security Scan | `python ~/.claude/skills/vulnerability-scanner/scripts/security_scan.py .` |
156
- | **seo-specialist** | SEO Check | `python ~/.claude/skills/seo-fundamentals/scripts/seo_checker.py .` |
157
- | **seo-specialist** | GEO Check | `python ~/.claude/skills/geo-fundamentals/scripts/geo_checker.py .` |
158
- | **performance-optimizer** | Lighthouse | `python ~/.claude/skills/performance-profiling/scripts/lighthouse_audit.py <url>` |
159
- | **test-engineer** | Test Runner | `python ~/.claude/skills/testing-patterns/scripts/test_runner.py .` |
160
- | **test-engineer** | Playwright | `python ~/.claude/skills/webapp-testing/scripts/playwright_runner.py <url>` |
161
- | **Any agent** | Lint Check | `python ~/.claude/skills/lint-and-validate/scripts/lint_runner.py .` |
162
- | **Any agent** | Type Coverage | `python ~/.claude/skills/lint-and-validate/scripts/type_coverage.py .` |
163
- | **Any agent** | i18n Check | `python ~/.claude/skills/i18n-localization/scripts/i18n_checker.py .` |
164
-
165
- > ❌ **WRONG:** `test-engineer` running `ux_audit.py`
166
- > ✅ **CORRECT:** `frontend-specialist` running `ux_audit.py`
167
-
168
- ---
169
-
170
- ### 🔴 Script Output Handling (READ → SUMMARIZE → ASK)
171
-
172
- **When running a validation script, you MUST:**
173
-
174
- 1. **Run the script** and capture ALL output
175
- 2. **Parse the output** - identify errors, warnings, and passes
176
- 3. **Summarize to user** in this format:
177
-
178
- ```markdown
179
- ## Script Results: [script_name.py]
180
-
181
- ### ❌ Errors Found (X items)
182
- - [File:Line] Error description 1
183
- - [File:Line] Error description 2
184
-
185
- ### ⚠️ Warnings (Y items)
186
- - [File:Line] Warning description
187
-
188
- ### ✅ Passed (Z items)
189
- - Check 1 passed
190
- - Check 2 passed
191
-
192
- **Should I fix the X errors?**
193
- ```
194
-
195
- 4. **Wait for user confirmation** before fixing
196
- 5. **After fixing** → Re-run script to confirm
197
-
198
- > 🔴 **VIOLATION:** Running script and ignoring output = FAILED task.
199
- > 🔴 **VIOLATION:** Auto-fixing without asking = Not allowed.
200
- > 🔴 **Rule:** Always READ output → SUMMARIZE → ASK → then fix.
201
-
@@ -1,109 +0,0 @@
1
- ---
2
- name: code-review-checklist
3
- description: Code review guidelines covering code quality, security, and best practices.
4
- allowed-tools: Read, Glob, Grep
5
- ---
6
-
7
- # Code Review Checklist
8
-
9
- ## Quick Review Checklist
10
-
11
- ### Correctness
12
- - [ ] Code does what it's supposed to do
13
- - [ ] Edge cases handled
14
- - [ ] Error handling in place
15
- - [ ] No obvious bugs
16
-
17
- ### Security
18
- - [ ] Input validated and sanitized
19
- - [ ] No SQL/NoSQL injection vulnerabilities
20
- - [ ] No XSS or CSRF vulnerabilities
21
- - [ ] No hardcoded secrets or sensitive credentials
22
- - [ ] **AI-Specific:** Protection against Prompt Injection (if applicable)
23
- - [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks
24
-
25
- ### Performance
26
- - [ ] No N+1 queries
27
- - [ ] No unnecessary loops
28
- - [ ] Appropriate caching
29
- - [ ] Bundle size impact considered
30
-
31
- ### Code Quality
32
- - [ ] Clear naming
33
- - [ ] DRY - no duplicate code
34
- - [ ] SOLID principles followed
35
- - [ ] Appropriate abstraction level
36
-
37
- ### Testing
38
- - [ ] Unit tests for new code
39
- - [ ] Edge cases tested
40
- - [ ] Tests readable and maintainable
41
-
42
- ### Documentation
43
- - [ ] Complex logic commented
44
- - [ ] Public APIs documented
45
- - [ ] README updated if needed
46
-
47
- ## AI & LLM Review Patterns (2025)
48
-
49
- ### Logic & Hallucinations
50
- - [ ] **Chain of Thought:** Does the logic follow a verifiable path?
51
- - [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures?
52
- - [ ] **External State:** Is the code making safe assumptions about file systems or networks?
53
-
54
- ### Prompt Engineering Review
55
- ```markdown
56
- // ❌ Vague prompt in code
57
- const response = await ai.generate(userInput);
58
-
59
- // ✅ Structured & Safe prompt
60
- const response = await ai.generate({
61
- system: "You are a specialized parser...",
62
- input: sanitize(userInput),
63
- schema: ResponseSchema
64
- });
65
- ```
66
-
67
- ## Anti-Patterns to Flag
68
-
69
- ```typescript
70
- // ❌ Magic numbers
71
- if (status === 3) { ... }
72
-
73
- // ✅ Named constants
74
- if (status === Status.ACTIVE) { ... }
75
-
76
- // ❌ Deep nesting
77
- if (a) { if (b) { if (c) { ... } } }
78
-
79
- // ✅ Early returns
80
- if (!a) return;
81
- if (!b) return;
82
- if (!c) return;
83
- // do work
84
-
85
- // ❌ Long functions (100+ lines)
86
- // ✅ Small, focused functions
87
-
88
- // ❌ any type
89
- const data: any = ...
90
-
91
- // ✅ Proper types
92
- const data: UserData = ...
93
- ```
94
-
95
- ## Review Comments Guide
96
-
97
- ```
98
- // Blocking issues use 🔴
99
- 🔴 BLOCKING: SQL injection vulnerability here
100
-
101
- // Important suggestions use 🟡
102
- 🟡 SUGGESTION: Consider using useMemo for performance
103
-
104
- // Minor nits use 🟢
105
- 🟢 NIT: Prefer const over let for immutable variable
106
-
107
- // Questions use ❓
108
- ❓ QUESTION: What happens if user is null here?
109
- ```
@@ -1,52 +0,0 @@
1
- ---
2
- name: database-design
3
- description: Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- ---
6
-
7
- # Database Design
8
-
9
- > **Learn to THINK, not copy SQL patterns.**
10
-
11
- ## 🎯 Selective Reading Rule
12
-
13
- **Read ONLY files relevant to the request!** Check the content map, find what you need.
14
-
15
- | File | Description | When to Read |
16
- |------|-------------|--------------|
17
- | `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
18
- | `orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |
19
- | `schema-design.md` | Normalization, PKs, relationships | Designing schema |
20
- | `indexing.md` | Index types, composite indexes | Performance tuning |
21
- | `optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |
22
- | `migrations.md` | Safe migrations, serverless DBs | Schema changes |
23
-
24
- ---
25
-
26
- ## ⚠️ Core Principle
27
-
28
- - ASK user for database preferences when unclear
29
- - Choose database/ORM based on CONTEXT
30
- - Don't default to PostgreSQL for everything
31
-
32
- ---
33
-
34
- ## Decision Checklist
35
-
36
- Before designing schema:
37
-
38
- - [ ] Asked user about database preference?
39
- - [ ] Chosen database for THIS context?
40
- - [ ] Considered deployment environment?
41
- - [ ] Planned index strategy?
42
- - [ ] Defined relationship types?
43
-
44
- ---
45
-
46
- ## Anti-Patterns
47
-
48
- ❌ Default to PostgreSQL for simple apps (SQLite may suffice)
49
- ❌ Skip indexing
50
- ❌ Use SELECT * in production
51
- ❌ Store JSON when structured data is better
52
- ❌ Ignore N+1 queries
@@ -1,43 +0,0 @@
1
- # Database Selection (2025)
2
-
3
- > Choose database based on context, not default.
4
-
5
- ## Decision Tree
6
-
7
- ```
8
- What are your requirements?
9
-
10
- ├── Full relational features needed
11
- │ ├── Self-hosted → PostgreSQL
12
- │ └── Serverless → Neon, Supabase
13
-
14
- ├── Edge deployment / Ultra-low latency
15
- │ └── Turso (edge SQLite)
16
-
17
- ├── AI / Vector search
18
- │ └── PostgreSQL + pgvector
19
-
20
- ├── Simple / Embedded / Local
21
- │ └── SQLite
22
-
23
- └── Global distribution
24
- └── PlanetScale, CockroachDB, Turso
25
- ```
26
-
27
- ## Comparison
28
-
29
- | Database | Best For | Trade-offs |
30
- |----------|----------|------------|
31
- | **PostgreSQL** | Full features, complex queries | Needs hosting |
32
- | **Neon** | Serverless PG, branching | PG complexity |
33
- | **Turso** | Edge, low latency | SQLite limitations |
34
- | **SQLite** | Simple, embedded, local | Single-writer |
35
- | **PlanetScale** | MySQL, global scale | No foreign keys |
36
-
37
- ## Questions to Ask
38
-
39
- 1. What's the deployment environment?
40
- 2. How complex are the queries?
41
- 3. Is edge/serverless important?
42
- 4. Vector search needed?
43
- 5. Global distribution required?
@@ -1,39 +0,0 @@
1
- # Indexing Principles
2
-
3
- > When and how to create indexes effectively.
4
-
5
- ## When to Create Indexes
6
-
7
- ```
8
- Index these:
9
- ├── Columns in WHERE clauses
10
- ├── Columns in JOIN conditions
11
- ├── Columns in ORDER BY
12
- ├── Foreign key columns
13
- └── Unique constraints
14
-
15
- Don't over-index:
16
- ├── Write-heavy tables (slower inserts)
17
- ├── Low-cardinality columns
18
- ├── Columns rarely queried
19
- ```
20
-
21
- ## Index Type Selection
22
-
23
- | Type | Use For |
24
- |------|---------|
25
- | **B-tree** | General purpose, equality & range |
26
- | **Hash** | Equality only, faster |
27
- | **GIN** | JSONB, arrays, full-text |
28
- | **GiST** | Geometric, range types |
29
- | **HNSW/IVFFlat** | Vector similarity (pgvector) |
30
-
31
- ## Composite Index Principles
32
-
33
- ```
34
- Order matters for composite indexes:
35
- ├── Equality columns first
36
- ├── Range columns last
37
- ├── Most selective first
38
- └── Match query pattern
39
- ```