@riligar/agents-kit 1.4.0 → 1.5.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/.agent/skills/riligar-business-startup-analyst/SKILL.md +546 -0
- package/.agent/skills/riligar-business-startup-financial/SKILL.md +392 -0
- package/.agent/skills/riligar-business-startup-market/SKILL.md +266 -0
- package/.agent/skills/riligar-dev-api/SKILL.md +21 -20
- package/.agent/skills/riligar-dev-architecture/SKILL.md +12 -12
- package/.agent/skills/riligar-dev-clean-code/SKILL.md +81 -78
- package/.agent/skills/riligar-dev-code-review/SKILL.md +12 -4
- package/.agent/skills/riligar-dev-database/SKILL.md +10 -10
- package/.agent/skills/riligar-dev-react/SKILL.md +64 -64
- package/.agent/skills/riligar-marketing-email/SKILL.md +1051 -0
- package/.agent/skills/riligar-marketing-seo/SKILL.md +351 -0
- package/.agent/skills/riligar-plan-writing/SKILL.md +32 -21
- package/README.md +7 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: api
|
|
2
|
+
name: riligar-dev-api
|
|
3
3
|
description: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
5
|
---
|
|
@@ -17,28 +17,28 @@ allowed-tools: Read, Write, Edit, Glob, Grep
|
|
|
17
17
|
|
|
18
18
|
## 📑 Content Map
|
|
19
19
|
|
|
20
|
-
| File
|
|
21
|
-
|
|
22
|
-
| `api-style.md`
|
|
23
|
-
| `rest.md`
|
|
24
|
-
| `response.md`
|
|
25
|
-
| `graphql.md`
|
|
26
|
-
| `trpc.md`
|
|
27
|
-
| `versioning.md`
|
|
28
|
-
| `auth.md`
|
|
29
|
-
| `rate-limiting.md`
|
|
30
|
-
| `documentation.md`
|
|
31
|
-
| `security-testing.md` | OWASP API Top 10, auth/authz testing
|
|
20
|
+
| File | Description | When to Read |
|
|
21
|
+
| --------------------- | ------------------------------------------- | ---------------------- |
|
|
22
|
+
| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |
|
|
23
|
+
| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |
|
|
24
|
+
| `response.md` | Envelope pattern, error format, pagination | Response structure |
|
|
25
|
+
| `graphql.md` | Schema design, when to use, security | Considering GraphQL |
|
|
26
|
+
| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |
|
|
27
|
+
| `versioning.md` | URI/Header/Query versioning | API evolution planning |
|
|
28
|
+
| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |
|
|
29
|
+
| `rate-limiting.md` | Token bucket, sliding window | API protection |
|
|
30
|
+
| `documentation.md` | OpenAPI/Swagger best practices | Documentation |
|
|
31
|
+
| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
35
|
## 🔗 Related Skills
|
|
36
36
|
|
|
37
|
-
| Need
|
|
38
|
-
|
|
37
|
+
| Need | Skill |
|
|
38
|
+
| ------------------ | ------------------------------- |
|
|
39
39
|
| API implementation | `@[skills/backend-development]` |
|
|
40
|
-
| Data structure
|
|
41
|
-
| Security details
|
|
40
|
+
| Data structure | `@[skills/database-design]` |
|
|
41
|
+
| Security details | `@[skills/security-hardening]` |
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
@@ -59,6 +59,7 @@ Before designing an API:
|
|
|
59
59
|
## ❌ Anti-Patterns
|
|
60
60
|
|
|
61
61
|
**DON'T:**
|
|
62
|
+
|
|
62
63
|
- Default to REST for everything
|
|
63
64
|
- Use verbs in REST endpoints (/getUsers)
|
|
64
65
|
- Return inconsistent response formats
|
|
@@ -66,6 +67,7 @@ Before designing an API:
|
|
|
66
67
|
- Skip rate limiting
|
|
67
68
|
|
|
68
69
|
**DO:**
|
|
70
|
+
|
|
69
71
|
- Choose API style based on context
|
|
70
72
|
- Ask about client requirements
|
|
71
73
|
- Document thoroughly
|
|
@@ -75,7 +77,6 @@ Before designing an API:
|
|
|
75
77
|
|
|
76
78
|
## Script
|
|
77
79
|
|
|
78
|
-
| Script
|
|
79
|
-
|
|
80
|
+
| Script | Purpose | Command |
|
|
81
|
+
| -------------------------- | ----------------------- | ------------------------------------------------ |
|
|
80
82
|
| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |
|
|
81
|
-
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: architecture
|
|
2
|
+
name: riligar-dev-architecture
|
|
3
3
|
description: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
|
|
4
4
|
allowed-tools: Read, Glob, Grep
|
|
5
5
|
---
|
|
@@ -12,22 +12,22 @@ allowed-tools: Read, Glob, Grep
|
|
|
12
12
|
|
|
13
13
|
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
14
14
|
|
|
15
|
-
| File
|
|
16
|
-
|
|
17
|
-
| `context-discovery.md`
|
|
18
|
-
| `trade-off-analysis.md` | ADR templates, trade-off framework
|
|
19
|
-
| `pattern-selection.md`
|
|
20
|
-
| `examples.md`
|
|
21
|
-
| `patterns-reference.md` | Quick lookup for patterns
|
|
15
|
+
| File | Description | When to Read |
|
|
16
|
+
| ----------------------- | ---------------------------------------- | ---------------------------- |
|
|
17
|
+
| `context-discovery.md` | Questions to ask, project classification | Starting architecture design |
|
|
18
|
+
| `trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |
|
|
19
|
+
| `pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |
|
|
20
|
+
| `examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |
|
|
21
|
+
| `patterns-reference.md` | Quick lookup for patterns | Pattern comparison |
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
## 🔗 Related Skills
|
|
26
26
|
|
|
27
|
-
| Skill
|
|
28
|
-
|
|
29
|
-
| `@[skills/database-design]`
|
|
30
|
-
| `@[skills/api-patterns]`
|
|
27
|
+
| Skill | Use For |
|
|
28
|
+
| --------------------------------- | ----------------------- |
|
|
29
|
+
| `@[skills/database-design]` | Database schema design |
|
|
30
|
+
| `@[skills/api-patterns]` | API design patterns |
|
|
31
31
|
| `@[skills/deployment-procedures]` | Deployment architecture |
|
|
32
32
|
|
|
33
33
|
---
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: clean-code
|
|
2
|
+
name: riligar-dev-clean-code
|
|
3
3
|
description: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
|
|
4
4
|
allowed-tools: Read, Write, Edit
|
|
5
5
|
version: 2.0
|
|
@@ -14,24 +14,24 @@ priority: CRITICAL
|
|
|
14
14
|
|
|
15
15
|
## Core Principles
|
|
16
16
|
|
|
17
|
-
| Principle
|
|
18
|
-
|
|
19
|
-
| **SRP**
|
|
20
|
-
| **DRY**
|
|
21
|
-
| **KISS**
|
|
22
|
-
| **YAGNI**
|
|
23
|
-
| **Boy Scout** | Leave code cleaner than you found it
|
|
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
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
27
|
## Naming Rules
|
|
28
28
|
|
|
29
|
-
| Element
|
|
30
|
-
|
|
31
|
-
| **Variables** | Reveal intent: `userCount` not `n`
|
|
32
|
-
| **Functions** | Verb + noun: `getUserById()` not `user()`
|
|
33
|
-
| **Booleans**
|
|
34
|
-
| **Constants** | SCREAMING_SNAKE: `MAX_RETRY_COUNT`
|
|
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
35
|
|
|
36
36
|
> **Rule:** If you need a comment to explain a name, rename it.
|
|
37
37
|
|
|
@@ -39,49 +39,49 @@ priority: CRITICAL
|
|
|
39
39
|
|
|
40
40
|
## Function Rules
|
|
41
41
|
|
|
42
|
-
| Rule
|
|
43
|
-
|
|
44
|
-
| **Small**
|
|
45
|
-
| **One Thing**
|
|
46
|
-
| **One Level**
|
|
47
|
-
| **Few Args**
|
|
48
|
-
| **No Side Effects** | Don't mutate inputs unexpectedly
|
|
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
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
52
52
|
## Code Structure
|
|
53
53
|
|
|
54
|
-
| Pattern
|
|
55
|
-
|
|
56
|
-
| **Guard Clauses** | Early returns for edge cases
|
|
54
|
+
| Pattern | Apply |
|
|
55
|
+
| ----------------- | --------------------------------- |
|
|
56
|
+
| **Guard Clauses** | Early returns for edge cases |
|
|
57
57
|
| **Flat > Nested** | Avoid deep nesting (max 2 levels) |
|
|
58
|
-
| **Composition**
|
|
59
|
-
| **Colocation**
|
|
58
|
+
| **Composition** | Small functions composed together |
|
|
59
|
+
| **Colocation** | Keep related code close |
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
63
63
|
## AI Coding Style
|
|
64
64
|
|
|
65
|
-
| Situation
|
|
66
|
-
|
|
67
|
-
| User asks for feature | Write it directly
|
|
68
|
-
| User reports bug
|
|
69
|
-
| No clear requirement
|
|
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
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
73
|
## Anti-Patterns (DON'T)
|
|
74
74
|
|
|
75
|
-
| ❌ Pattern
|
|
76
|
-
|
|
77
|
-
| Comment every line
|
|
78
|
-
| Helper for one-liner
|
|
79
|
-
| Factory for 2 objects
|
|
80
|
-
| utils.ts with 1 function | Put code where used
|
|
81
|
-
| "First we import..."
|
|
82
|
-
| Deep nesting
|
|
83
|
-
| Magic numbers
|
|
84
|
-
| God functions
|
|
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
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
@@ -89,14 +89,15 @@ priority: CRITICAL
|
|
|
89
89
|
|
|
90
90
|
**Before changing a file, ask yourself:**
|
|
91
91
|
|
|
92
|
-
| Question
|
|
93
|
-
|
|
94
|
-
| **What imports this file?**
|
|
95
|
-
| **What does this file import?** | Interface changes
|
|
96
|
-
| **What tests cover this?**
|
|
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
97
|
| **Is this a shared component?** | Multiple places affected |
|
|
98
98
|
|
|
99
99
|
**Quick Check:**
|
|
100
|
+
|
|
100
101
|
```
|
|
101
102
|
File to edit: UserService.ts
|
|
102
103
|
└── Who imports this? → UserController.ts, AuthController.ts
|
|
@@ -110,14 +111,14 @@ File to edit: UserService.ts
|
|
|
110
111
|
|
|
111
112
|
## Summary
|
|
112
113
|
|
|
113
|
-
| Do
|
|
114
|
-
|
|
115
|
-
| Write code directly
|
|
116
|
-
| Let code self-document | Add obvious comments
|
|
117
|
-
| Fix bugs immediately
|
|
118
|
-
| Inline small things
|
|
119
|
-
| Name things clearly
|
|
120
|
-
| Keep functions small
|
|
114
|
+
| Do | Don't |
|
|
115
|
+
| ---------------------- | ------------------------- |
|
|
116
|
+
| Write code directly | Write tutorials |
|
|
117
|
+
| Let code self-document | Add obvious comments |
|
|
118
|
+
| Fix bugs immediately | Explain the fix first |
|
|
119
|
+
| Inline small things | Create unnecessary files |
|
|
120
|
+
| Name things clearly | Use abbreviations |
|
|
121
|
+
| Keep functions small | Write 100+ line functions |
|
|
121
122
|
|
|
122
123
|
> **Remember: The user wants working code, not a programming lesson.**
|
|
123
124
|
|
|
@@ -127,13 +128,13 @@ File to edit: UserService.ts
|
|
|
127
128
|
|
|
128
129
|
**Before saying "task complete", verify:**
|
|
129
130
|
|
|
130
|
-
| Check
|
|
131
|
-
|
|
132
|
-
| ✅ **Goal met?**
|
|
133
|
-
| ✅ **Files edited?**
|
|
134
|
-
| ✅ **Code works?**
|
|
135
|
-
| ✅ **No errors?**
|
|
136
|
-
| ✅ **Nothing forgotten?** | Any edge cases missed?
|
|
131
|
+
| Check | Question |
|
|
132
|
+
| ------------------------- | --------------------------------- |
|
|
133
|
+
| ✅ **Goal met?** | Did I do exactly what user asked? |
|
|
134
|
+
| ✅ **Files edited?** | Did I modify all necessary files? |
|
|
135
|
+
| ✅ **Code works?** | Did I test/verify the change? |
|
|
136
|
+
| ✅ **No errors?** | Lint and TypeScript pass? |
|
|
137
|
+
| ✅ **Nothing forgotten?** | Any edge cases missed? |
|
|
137
138
|
|
|
138
139
|
> 🔴 **Rule:** If ANY check fails, fix it before completing.
|
|
139
140
|
|
|
@@ -145,22 +146,22 @@ File to edit: UserService.ts
|
|
|
145
146
|
|
|
146
147
|
### Agent → Script Mapping
|
|
147
148
|
|
|
148
|
-
| Agent
|
|
149
|
-
|
|
150
|
-
| **frontend-specialist**
|
|
151
|
-
| **frontend-specialist**
|
|
152
|
-
| **backend-specialist**
|
|
153
|
-
| **mobile-developer**
|
|
154
|
-
| **database-architect**
|
|
155
|
-
| **security-auditor**
|
|
156
|
-
| **seo-specialist**
|
|
157
|
-
| **seo-specialist**
|
|
158
|
-
| **performance-optimizer** | Lighthouse
|
|
159
|
-
| **test-engineer**
|
|
160
|
-
| **test-engineer**
|
|
161
|
-
| **Any agent**
|
|
162
|
-
| **Any agent**
|
|
163
|
-
| **Any agent**
|
|
149
|
+
| Agent | Script | Command |
|
|
150
|
+
| ------------------------- | --------------- | ------------------------------------------------------------------------------ |
|
|
151
|
+
| **frontend-specialist** | UX Audit | `python .agent/skills/frontend-design/scripts/ux_audit.py .` |
|
|
152
|
+
| **frontend-specialist** | A11y Check | `python .agent/skills/frontend-design/scripts/accessibility_checker.py .` |
|
|
153
|
+
| **backend-specialist** | API Validator | `python .agent/skills/api-patterns/scripts/api_validator.py .` |
|
|
154
|
+
| **mobile-developer** | Mobile Audit | `python .agent/skills/mobile-design/scripts/mobile_audit.py .` |
|
|
155
|
+
| **database-architect** | Schema Validate | `python .agent/skills/database-design/scripts/schema_validator.py .` |
|
|
156
|
+
| **security-auditor** | Security Scan | `python .agent/skills/vulnerability-scanner/scripts/security_scan.py .` |
|
|
157
|
+
| **seo-specialist** | SEO Check | `python .agent/skills/seo-fundamentals/scripts/seo_checker.py .` |
|
|
158
|
+
| **seo-specialist** | GEO Check | `python .agent/skills/geo-fundamentals/scripts/geo_checker.py .` |
|
|
159
|
+
| **performance-optimizer** | Lighthouse | `python .agent/skills/performance-profiling/scripts/lighthouse_audit.py <url>` |
|
|
160
|
+
| **test-engineer** | Test Runner | `python .agent/skills/testing-patterns/scripts/test_runner.py .` |
|
|
161
|
+
| **test-engineer** | Playwright | `python .agent/skills/webapp-testing/scripts/playwright_runner.py <url>` |
|
|
162
|
+
| **Any agent** | Lint Check | `python .agent/skills/lint-and-validate/scripts/lint_runner.py .` |
|
|
163
|
+
| **Any agent** | Type Coverage | `python .agent/skills/lint-and-validate/scripts/type_coverage.py .` |
|
|
164
|
+
| **Any agent** | i18n Check | `python .agent/skills/i18n-localization/scripts/i18n_checker.py .` |
|
|
164
165
|
|
|
165
166
|
> ❌ **WRONG:** `test-engineer` running `ux_audit.py`
|
|
166
167
|
> ✅ **CORRECT:** `frontend-specialist` running `ux_audit.py`
|
|
@@ -179,13 +180,16 @@ File to edit: UserService.ts
|
|
|
179
180
|
## Script Results: [script_name.py]
|
|
180
181
|
|
|
181
182
|
### ❌ Errors Found (X items)
|
|
183
|
+
|
|
182
184
|
- [File:Line] Error description 1
|
|
183
185
|
- [File:Line] Error description 2
|
|
184
186
|
|
|
185
187
|
### ⚠️ Warnings (Y items)
|
|
188
|
+
|
|
186
189
|
- [File:Line] Warning description
|
|
187
190
|
|
|
188
191
|
### ✅ Passed (Z items)
|
|
192
|
+
|
|
189
193
|
- Check 1 passed
|
|
190
194
|
- Check 2 passed
|
|
191
195
|
|
|
@@ -198,4 +202,3 @@ File to edit: UserService.ts
|
|
|
198
202
|
> 🔴 **VIOLATION:** Running script and ignoring output = FAILED task.
|
|
199
203
|
> 🔴 **VIOLATION:** Auto-fixing without asking = Not allowed.
|
|
200
204
|
> 🔴 **Rule:** Always READ output → SUMMARIZE → ASK → then fix.
|
|
201
|
-
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: code-review
|
|
2
|
+
name: riligar-dev-code-review
|
|
3
3
|
description: Code review guidelines covering code quality, security, and best practices.
|
|
4
4
|
allowed-tools: Read, Glob, Grep
|
|
5
5
|
---
|
|
@@ -9,12 +9,14 @@ allowed-tools: Read, Glob, Grep
|
|
|
9
9
|
## Quick Review Checklist
|
|
10
10
|
|
|
11
11
|
### Correctness
|
|
12
|
+
|
|
12
13
|
- [ ] Code does what it's supposed to do
|
|
13
14
|
- [ ] Edge cases handled
|
|
14
15
|
- [ ] Error handling in place
|
|
15
16
|
- [ ] No obvious bugs
|
|
16
17
|
|
|
17
18
|
### Security
|
|
19
|
+
|
|
18
20
|
- [ ] Input validated and sanitized
|
|
19
21
|
- [ ] No SQL/NoSQL injection vulnerabilities
|
|
20
22
|
- [ ] No XSS or CSRF vulnerabilities
|
|
@@ -23,23 +25,27 @@ allowed-tools: Read, Glob, Grep
|
|
|
23
25
|
- [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks
|
|
24
26
|
|
|
25
27
|
### Performance
|
|
28
|
+
|
|
26
29
|
- [ ] No N+1 queries
|
|
27
30
|
- [ ] No unnecessary loops
|
|
28
31
|
- [ ] Appropriate caching
|
|
29
32
|
- [ ] Bundle size impact considered
|
|
30
33
|
|
|
31
34
|
### Code Quality
|
|
35
|
+
|
|
32
36
|
- [ ] Clear naming
|
|
33
37
|
- [ ] DRY - no duplicate code
|
|
34
38
|
- [ ] SOLID principles followed
|
|
35
39
|
- [ ] Appropriate abstraction level
|
|
36
40
|
|
|
37
41
|
### Testing
|
|
42
|
+
|
|
38
43
|
- [ ] Unit tests for new code
|
|
39
44
|
- [ ] Edge cases tested
|
|
40
45
|
- [ ] Tests readable and maintainable
|
|
41
46
|
|
|
42
47
|
### Documentation
|
|
48
|
+
|
|
43
49
|
- [ ] Complex logic commented
|
|
44
50
|
- [ ] Public APIs documented
|
|
45
51
|
- [ ] README updated if needed
|
|
@@ -47,20 +53,22 @@ allowed-tools: Read, Glob, Grep
|
|
|
47
53
|
## AI & LLM Review Patterns (2025)
|
|
48
54
|
|
|
49
55
|
### Logic & Hallucinations
|
|
56
|
+
|
|
50
57
|
- [ ] **Chain of Thought:** Does the logic follow a verifiable path?
|
|
51
58
|
- [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures?
|
|
52
59
|
- [ ] **External State:** Is the code making safe assumptions about file systems or networks?
|
|
53
60
|
|
|
54
61
|
### Prompt Engineering Review
|
|
62
|
+
|
|
55
63
|
```markdown
|
|
56
64
|
// ❌ Vague prompt in code
|
|
57
65
|
const response = await ai.generate(userInput);
|
|
58
66
|
|
|
59
67
|
// ✅ Structured & Safe prompt
|
|
60
68
|
const response = await ai.generate({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
system: "You are a specialized parser...",
|
|
70
|
+
input: sanitize(userInput),
|
|
71
|
+
schema: ResponseSchema
|
|
64
72
|
});
|
|
65
73
|
```
|
|
66
74
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: database
|
|
2
|
+
name: riligar-dev-database
|
|
3
3
|
description: Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
5
|
---
|
|
@@ -12,14 +12,14 @@ allowed-tools: Read, Write, Edit, Glob, Grep
|
|
|
12
12
|
|
|
13
13
|
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
14
14
|
|
|
15
|
-
| File
|
|
16
|
-
|
|
17
|
-
| `database-selection.md` | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database
|
|
18
|
-
| `orm-selection.md`
|
|
19
|
-
| `schema-design.md`
|
|
20
|
-
| `indexing.md`
|
|
21
|
-
| `optimization.md`
|
|
22
|
-
| `migrations.md`
|
|
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
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -47,6 +47,6 @@ Before designing schema:
|
|
|
47
47
|
|
|
48
48
|
❌ Default to PostgreSQL for simple apps (SQLite may suffice)
|
|
49
49
|
❌ Skip indexing
|
|
50
|
-
❌ Use SELECT
|
|
50
|
+
❌ Use SELECT \* in production
|
|
51
51
|
❌ Store JSON when structured data is better
|
|
52
52
|
❌ Ignore N+1 queries
|