@riligar/agents-kit 1.14.0 → 1.16.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-dev-clean-code/SKILL.md → rules/clean-code.md} +3 -51
- package/.agent/skills/riligar-design-system/SKILL.md +1 -0
- package/.agent/skills/riligar-dev-auth-elysia/SKILL.md +2 -2
- package/.agent/skills/riligar-dev-dashboard/SKILL.md +582 -0
- package/.agent/skills/riligar-dev-dashboard/references/dependencies.md +44 -0
- package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/SKILL.md +13 -9
- package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/SKILL.md +1 -1
- package/.agent/skills/{riligar-dev-seo → riligar-dev-website-seo}/SKILL.md +1 -1
- package/.agent/skills/riligar-infra-cloudfare/SKILL.md +437 -0
- package/.agent/skills/riligar-infra-cloudfare/references/cloudflare-api.md +139 -0
- package/.agent/skills/riligar-infra-cloudfare/references/email-routing.md +262 -0
- package/.agent/skills/riligar-infra-cloudfare/references/r2-storage.md +333 -0
- package/.agent/skills/{riligar-infrastructure → riligar-infra-fly}/SKILL.md +38 -1
- package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/SKILL.md +3 -4
- package/.agent/skills/skill-creator/SKILL.md +1 -1
- package/package.json +1 -1
- package/.agent/skills/riligar-dev-architecture/SKILL.md +0 -54
- package/.agent/skills/riligar-dev-architecture/references/context-discovery.md +0 -43
- package/.agent/skills/riligar-dev-architecture/references/examples.md +0 -94
- package/.agent/skills/riligar-dev-architecture/references/pattern-selection.md +0 -68
- package/.agent/skills/riligar-dev-architecture/references/patterns-reference.md +0 -50
- package/.agent/skills/riligar-dev-architecture/references/trade-off-analysis.md +0 -77
- package/.agent/skills/riligar-dev-autopilot/SKILL.md +0 -59
- package/.agent/skills/riligar-dev-code-review/SKILL.md +0 -116
- package/.agent/skills/riligar-dev-database/SKILL.md +0 -51
- package/.agent/skills/riligar-dev-database/references/database-selection.md +0 -43
- package/.agent/skills/riligar-dev-database/references/indexing.md +0 -39
- package/.agent/skills/riligar-dev-database/references/migrations.md +0 -48
- package/.agent/skills/riligar-dev-database/references/optimization.md +0 -36
- package/.agent/skills/riligar-dev-database/references/orm-selection.md +0 -30
- package/.agent/skills/riligar-dev-database/references/schema-design.md +0 -56
- package/.agent/skills/riligar-dev-database/scripts/schema_validator.py +0 -172
- package/.agent/skills/riligar-dev-frontend/SKILL.md +0 -215
- package/.agent/skills/riligar-plan-writing/SKILL.md +0 -162
- package/.agent/skills/riligar-tech-stack/SKILL.md +0 -110
- package/.agent/skills/riligar-tech-stack/references/tech-stack.md +0 -131
- /package/.agent/skills/riligar-dev-auth-elysia/assets/{server-snippets.ts → server-snippets.js} +0 -0
- /package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/references/elysia-basics.md +0 -0
- /package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/references/elysia-lifecycle.md +0 -0
- /package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/references/elysia-patterns.md +0 -0
- /package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/references/elysia-plugins.md +0 -0
- /package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/references/elysia-validation.md +0 -0
- /package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/scripts/api_validator.py +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-2a03320f967a884fd2ad275d788f32e5.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-481d7179109272dcaff2516fef62b718.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-56d848520060ca714456601d1a7417cd.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-93104cd260129cd6b76dac4119622eaf.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-c5d259b0497cec98c36c48fc33ebbde6.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-e865b2464fdf5ca567af716e1ed4fd16.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-f1459f5315f0045705c2ca4937204146.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/original-f67954754fdc2fc57009369fd3437205.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/screencapture-caddaddy-app-2025-11-03-20_16_14.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/screencapture-ciromaciel-click-2026-01-06-17_08_01.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/screencapture-notionsecondbrain-2026-01-06-16_07_56.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/assets/screencapture-skillsmp-2026-01-16-14_40_22.webp +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/references/conversion-framework.md +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/references/copywriting-guide.md +0 -0
- /package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/references/section-blueprints.md +0 -0
- /package/.agent/skills/{riligar-dev-seo → riligar-dev-website-seo}/references/checklist.md +0 -0
- /package/.agent/skills/{riligar-dev-seo → riligar-dev-website-seo}/references/implementation.md +0 -0
- /package/.agent/skills/{riligar-dev-seo → riligar-dev-website-seo}/references/structured-data.md +0 -0
- /package/.agent/skills/{riligar-infrastructure → riligar-infra-fly}/references/infrastructure.md +0 -0
- /package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/assets/stripe-client.js +0 -0
- /package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/assets/stripe-server.js +0 -0
- /package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/references/stripe-database.md +0 -0
- /package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/references/stripe-elysia.md +0 -0
- /package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/references/stripe-react.md +0 -0
- /package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/references/stripe-webhooks.md +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: riligar-dev-architecture
|
|
3
|
-
description: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Architecture Decision Framework
|
|
7
|
-
|
|
8
|
-
> "Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale."
|
|
9
|
-
|
|
10
|
-
## 🎯 Selective Reading Rule
|
|
11
|
-
|
|
12
|
-
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
13
|
-
|
|
14
|
-
| File | Description | When to Read |
|
|
15
|
-
| ----------------------------------- | ---------------------------------------- | ---------------------------- |
|
|
16
|
-
| `references/context-discovery.md` | Questions to ask, project classification | Starting architecture design |
|
|
17
|
-
| `references/trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |
|
|
18
|
-
| `references/pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |
|
|
19
|
-
| `references/examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |
|
|
20
|
-
| `references/patterns-reference.md` | Quick lookup for patterns | Pattern comparison |
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## 🔗 Related Skills
|
|
25
|
-
|
|
26
|
-
| Skill | Use For |
|
|
27
|
-
| --------------------------------- | ----------------------- |
|
|
28
|
-
| `@[skills/database-design]` | Database schema design |
|
|
29
|
-
| `@[skills/api-patterns]` | API design patterns |
|
|
30
|
-
| `@[skills/deployment-procedures]` | Deployment architecture |
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Core Principle
|
|
35
|
-
|
|
36
|
-
**"Simplicity is the ultimate sophistication."**
|
|
37
|
-
|
|
38
|
-
- Start simple
|
|
39
|
-
- Add complexity ONLY when proven necessary
|
|
40
|
-
- You can always add patterns later
|
|
41
|
-
- Removing complexity is MUCH harder than adding it
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Validation Checklist
|
|
46
|
-
|
|
47
|
-
Before finalizing architecture:
|
|
48
|
-
|
|
49
|
-
- [ ] Requirements clearly understood
|
|
50
|
-
- [ ] Constraints identified
|
|
51
|
-
- [ ] Each decision has trade-off analysis
|
|
52
|
-
- [ ] Simpler alternatives considered
|
|
53
|
-
- [ ] ADRs written for significant decisions
|
|
54
|
-
- [ ] Team expertise matches chosen patterns
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Context Discovery
|
|
2
|
-
|
|
3
|
-
> Before suggesting any architecture, gather context.
|
|
4
|
-
|
|
5
|
-
## Question Hierarchy (Ask User FIRST)
|
|
6
|
-
|
|
7
|
-
1. **Scale**
|
|
8
|
-
- How many users? (10, 1K, 100K, 1M+)
|
|
9
|
-
- Data volume? (MB, GB, TB)
|
|
10
|
-
- Transaction rate? (per second/minute)
|
|
11
|
-
|
|
12
|
-
2. **Team**
|
|
13
|
-
- Solo developer or team?
|
|
14
|
-
- Team size and expertise?
|
|
15
|
-
- Distributed or co-located?
|
|
16
|
-
|
|
17
|
-
3. **Timeline**
|
|
18
|
-
- MVP/Prototype or long-term product?
|
|
19
|
-
- Time to market pressure?
|
|
20
|
-
|
|
21
|
-
4. **Domain**
|
|
22
|
-
- CRUD-heavy or business logic complex?
|
|
23
|
-
- Real-time requirements?
|
|
24
|
-
- Compliance/regulations?
|
|
25
|
-
|
|
26
|
-
5. **Constraints**
|
|
27
|
-
- Budget limitations?
|
|
28
|
-
- Legacy systems to integrate?
|
|
29
|
-
- Technology stack preferences?
|
|
30
|
-
|
|
31
|
-
## Project Classification Matrix
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
MVP SaaS Enterprise
|
|
35
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
36
|
-
│ Scale │ <1K │ 1K-100K │ 100K+ │
|
|
37
|
-
│ Team │ Solo │ 2-10 │ 10+ │
|
|
38
|
-
│ Timeline │ Fast (weeks) │ Medium (months)│ Long (years)│
|
|
39
|
-
│ Architecture │ Simple │ Modular │ Distributed │
|
|
40
|
-
│ Patterns │ Minimal │ Selective │ Comprehensive│
|
|
41
|
-
│ Example │ Next.js API │ NestJS │ Microservices│
|
|
42
|
-
└─────────────────────────────────────────────────────────────┘
|
|
43
|
-
```
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# Architecture Examples
|
|
2
|
-
|
|
3
|
-
> Real-world architecture decisions by project type.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Example 1: MVP E-commerce (Solo Developer)
|
|
8
|
-
|
|
9
|
-
```yaml
|
|
10
|
-
Requirements:
|
|
11
|
-
- <1000 users initially
|
|
12
|
-
- Solo developer
|
|
13
|
-
- Fast to market (8 weeks)
|
|
14
|
-
- Budget-conscious
|
|
15
|
-
|
|
16
|
-
Architecture Decisions:
|
|
17
|
-
App Structure: Monolith (simpler for solo)
|
|
18
|
-
Framework: Next.js (full-stack, fast)
|
|
19
|
-
Data Layer: Prisma direct (no over-abstraction)
|
|
20
|
-
Authentication: JWT (simpler than OAuth)
|
|
21
|
-
Payment: Stripe (hosted solution)
|
|
22
|
-
Database: PostgreSQL (ACID for orders)
|
|
23
|
-
|
|
24
|
-
Trade-offs Accepted:
|
|
25
|
-
- Monolith → Can't scale independently (team doesn't justify it)
|
|
26
|
-
- No Repository → Less testable (simple CRUD doesn't need it)
|
|
27
|
-
- JWT → No social login initially (can add later)
|
|
28
|
-
|
|
29
|
-
Future Migration Path:
|
|
30
|
-
- Users > 10K → Extract payment service
|
|
31
|
-
- Team > 3 → Add Repository pattern
|
|
32
|
-
- Social login requested → Add OAuth
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Example 2: SaaS Product (5-10 Developers)
|
|
38
|
-
|
|
39
|
-
```yaml
|
|
40
|
-
Requirements:
|
|
41
|
-
- 1K-100K users
|
|
42
|
-
- 5-10 developers
|
|
43
|
-
- Long-term (12+ months)
|
|
44
|
-
- Multiple domains (billing, users, core)
|
|
45
|
-
|
|
46
|
-
Architecture Decisions:
|
|
47
|
-
App Structure: Modular Monolith (team size optimal)
|
|
48
|
-
Framework: NestJS (modular by design)
|
|
49
|
-
Data Layer: Repository pattern (testing, flexibility)
|
|
50
|
-
Domain Model: Partial DDD (rich entities)
|
|
51
|
-
Authentication: OAuth + JWT
|
|
52
|
-
Caching: Redis
|
|
53
|
-
Database: PostgreSQL
|
|
54
|
-
|
|
55
|
-
Trade-offs Accepted:
|
|
56
|
-
- Modular Monolith → Some module coupling (microservices not justified)
|
|
57
|
-
- Partial DDD → No full aggregates (no domain experts)
|
|
58
|
-
- RabbitMQ later → Initial synchronous (add when proven needed)
|
|
59
|
-
|
|
60
|
-
Migration Path:
|
|
61
|
-
- Team > 10 → Consider microservices
|
|
62
|
-
- Domains conflict → Extract bounded contexts
|
|
63
|
-
- Read performance issues → Add CQRS
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Example 3: Enterprise (100K+ Users)
|
|
69
|
-
|
|
70
|
-
```yaml
|
|
71
|
-
Requirements:
|
|
72
|
-
- 100K+ users
|
|
73
|
-
- 10+ developers
|
|
74
|
-
- Multiple business domains
|
|
75
|
-
- Different scaling needs
|
|
76
|
-
- 24/7 availability
|
|
77
|
-
|
|
78
|
-
Architecture Decisions:
|
|
79
|
-
App Structure: Microservices (independent scale)
|
|
80
|
-
API Gateway: Kong/AWS API GW
|
|
81
|
-
Domain Model: Full DDD
|
|
82
|
-
Consistency: Event-driven (eventual OK)
|
|
83
|
-
Message Bus: Kafka
|
|
84
|
-
Authentication: OAuth + SAML (enterprise SSO)
|
|
85
|
-
Database: Polyglot (right tool per job)
|
|
86
|
-
CQRS: Selected services
|
|
87
|
-
|
|
88
|
-
Operational Requirements:
|
|
89
|
-
- Service mesh (Istio/Linkerd)
|
|
90
|
-
- Distributed tracing (Jaeger/Tempo)
|
|
91
|
-
- Centralized logging (ELK/Loki)
|
|
92
|
-
- Circuit breakers (Resilience4j)
|
|
93
|
-
- Kubernetes/Helm
|
|
94
|
-
```
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Pattern Selection Guidelines
|
|
2
|
-
|
|
3
|
-
> Decision trees for choosing architectural patterns.
|
|
4
|
-
|
|
5
|
-
## Main Decision Tree
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
START: What's your MAIN concern?
|
|
9
|
-
|
|
10
|
-
┌─ Data Access Complexity?
|
|
11
|
-
│ ├─ HIGH (complex queries, testing needed)
|
|
12
|
-
│ │ → Repository Pattern + Unit of Work
|
|
13
|
-
│ │ VALIDATE: Will data source change frequently?
|
|
14
|
-
│ │ ├─ YES → Repository worth the indirection
|
|
15
|
-
│ │ └─ NO → Consider simpler ORM direct access
|
|
16
|
-
│ └─ LOW (simple CRUD, single database)
|
|
17
|
-
│ → ORM directly (Prisma, Drizzle)
|
|
18
|
-
│ Simpler = Better, Faster
|
|
19
|
-
│
|
|
20
|
-
├─ Business Rules Complexity?
|
|
21
|
-
│ ├─ HIGH (domain logic, rules vary by context)
|
|
22
|
-
│ │ → Domain-Driven Design
|
|
23
|
-
│ │ VALIDATE: Do you have domain experts on team?
|
|
24
|
-
│ │ ├─ YES → Full DDD (Aggregates, Value Objects)
|
|
25
|
-
│ │ └─ NO → Partial DDD (rich entities, clear boundaries)
|
|
26
|
-
│ └─ LOW (mostly CRUD, simple validation)
|
|
27
|
-
│ → Transaction Script pattern
|
|
28
|
-
│ Simpler = Better, Faster
|
|
29
|
-
│
|
|
30
|
-
├─ Independent Scaling Needed?
|
|
31
|
-
│ ├─ YES (different components scale differently)
|
|
32
|
-
│ │ → Microservices WORTH the complexity
|
|
33
|
-
│ │ REQUIREMENTS (ALL must be true):
|
|
34
|
-
│ │ - Clear domain boundaries
|
|
35
|
-
│ │ - Team > 10 developers
|
|
36
|
-
│ │ - Different scaling needs per service
|
|
37
|
-
│ │ IF NOT ALL MET → Modular Monolith instead
|
|
38
|
-
│ └─ NO (everything scales together)
|
|
39
|
-
│ → Modular Monolith
|
|
40
|
-
│ Can extract services later when proven needed
|
|
41
|
-
│
|
|
42
|
-
└─ Real-time Requirements?
|
|
43
|
-
├─ HIGH (immediate updates, multi-user sync)
|
|
44
|
-
│ → Event-Driven Architecture
|
|
45
|
-
│ → Message Queue (RabbitMQ, Redis, Kafka)
|
|
46
|
-
│ VALIDATE: Can you handle eventual consistency?
|
|
47
|
-
│ ├─ YES → Event-driven valid
|
|
48
|
-
│ └─ NO → Synchronous with polling
|
|
49
|
-
└─ LOW (eventual consistency acceptable)
|
|
50
|
-
→ Synchronous (REST/GraphQL)
|
|
51
|
-
Simpler = Better, Faster
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## The 3 Questions (Before ANY Pattern)
|
|
55
|
-
|
|
56
|
-
1. **Problem Solved**: What SPECIFIC problem does this pattern solve?
|
|
57
|
-
2. **Simpler Alternative**: Is there a simpler solution?
|
|
58
|
-
3. **Deferred Complexity**: Can we add this LATER when needed?
|
|
59
|
-
|
|
60
|
-
## Red Flags (Anti-patterns)
|
|
61
|
-
|
|
62
|
-
| Pattern | Anti-pattern | Simpler Alternative |
|
|
63
|
-
|---------|-------------|-------------------|
|
|
64
|
-
| Microservices | Premature splitting | Start monolith, extract later |
|
|
65
|
-
| Clean/Hexagonal | Over-abstraction | Concrete first, interfaces later |
|
|
66
|
-
| Event Sourcing | Over-engineering | Append-only audit log |
|
|
67
|
-
| CQRS | Unnecessary complexity | Single model |
|
|
68
|
-
| Repository | YAGNI for simple CRUD | ORM direct access |
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Architecture Patterns Reference
|
|
2
|
-
|
|
3
|
-
> Quick reference for common patterns with usage guidance.
|
|
4
|
-
|
|
5
|
-
## Data Access Patterns
|
|
6
|
-
|
|
7
|
-
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
8
|
-
|---------|-------------|-----------------|------------|
|
|
9
|
-
| **Active Record** | Simple CRUD, rapid prototyping | Complex queries, multiple sources | Low |
|
|
10
|
-
| **Repository** | Testing needed, multiple sources | Simple CRUD, single database | Medium |
|
|
11
|
-
| **Unit of Work** | Complex transactions | Simple operations | High |
|
|
12
|
-
| **Data Mapper** | Complex domain, performance | Simple CRUD, rapid dev | High |
|
|
13
|
-
|
|
14
|
-
## Domain Logic Patterns
|
|
15
|
-
|
|
16
|
-
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
17
|
-
|---------|-------------|-----------------|------------|
|
|
18
|
-
| **Transaction Script** | Simple CRUD, procedural | Complex business rules | Low |
|
|
19
|
-
| **Table Module** | Record-based logic | Rich behavior needed | Low |
|
|
20
|
-
| **Domain Model** | Complex business logic | Simple CRUD | Medium |
|
|
21
|
-
| **DDD (Full)** | Complex domain, domain experts | Simple domain, no experts | High |
|
|
22
|
-
|
|
23
|
-
## Distributed System Patterns
|
|
24
|
-
|
|
25
|
-
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
26
|
-
|---------|-------------|-----------------|------------|
|
|
27
|
-
| **Modular Monolith** | Small teams, unclear boundaries | Clear contexts, different scales | Medium |
|
|
28
|
-
| **Microservices** | Different scales, large teams | Small teams, simple domain | Very High |
|
|
29
|
-
| **Event-Driven** | Real-time, loose coupling | Simple workflows, strong consistency | High |
|
|
30
|
-
| **CQRS** | Read/write performance diverges | Simple CRUD, same model | High |
|
|
31
|
-
| **Saga** | Distributed transactions | Single database, simple ACID | High |
|
|
32
|
-
|
|
33
|
-
## API Patterns
|
|
34
|
-
|
|
35
|
-
| Pattern | When to Use | When NOT to Use | Complexity |
|
|
36
|
-
|---------|-------------|-----------------|------------|
|
|
37
|
-
| **REST** | Standard CRUD, resources | Real-time, complex queries | Low |
|
|
38
|
-
| **GraphQL** | Flexible queries, multiple clients | Simple CRUD, caching needs | Medium |
|
|
39
|
-
| **gRPC** | Internal services, performance | Public APIs, browser clients | Medium |
|
|
40
|
-
| **WebSocket** | Real-time updates | Simple request/response | Medium |
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Simplicity Principle
|
|
45
|
-
|
|
46
|
-
**"Start simple, add complexity only when proven necessary."**
|
|
47
|
-
|
|
48
|
-
- You can always add patterns later
|
|
49
|
-
- Removing complexity is MUCH harder than adding it
|
|
50
|
-
- When in doubt, choose simpler option
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Trade-off Analysis & ADR
|
|
2
|
-
|
|
3
|
-
> Document every architectural decision with trade-offs.
|
|
4
|
-
|
|
5
|
-
## Decision Framework
|
|
6
|
-
|
|
7
|
-
For EACH architectural component, document:
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
## Architecture Decision Record
|
|
11
|
-
|
|
12
|
-
### Context
|
|
13
|
-
- **Problem**: [What problem are we solving?]
|
|
14
|
-
- **Constraints**: [Team size, scale, timeline, budget]
|
|
15
|
-
|
|
16
|
-
### Options Considered
|
|
17
|
-
|
|
18
|
-
| Option | Pros | Cons | Complexity | When Valid |
|
|
19
|
-
|--------|------|------|------------|-----------|
|
|
20
|
-
| Option A | Benefit 1 | Cost 1 | Low | [Conditions] |
|
|
21
|
-
| Option B | Benefit 2 | Cost 2 | High | [Conditions] |
|
|
22
|
-
|
|
23
|
-
### Decision
|
|
24
|
-
**Chosen**: [Option B]
|
|
25
|
-
|
|
26
|
-
### Rationale
|
|
27
|
-
1. [Reason 1 - tied to constraints]
|
|
28
|
-
2. [Reason 2 - tied to requirements]
|
|
29
|
-
|
|
30
|
-
### Trade-offs Accepted
|
|
31
|
-
- [What we're giving up]
|
|
32
|
-
- [Why this is acceptable]
|
|
33
|
-
|
|
34
|
-
### Consequences
|
|
35
|
-
- **Positive**: [Benefits we gain]
|
|
36
|
-
- **Negative**: [Costs/risks we accept]
|
|
37
|
-
- **Mitigation**: [How we'll address negatives]
|
|
38
|
-
|
|
39
|
-
### Revisit Trigger
|
|
40
|
-
- [When to reconsider this decision]
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## ADR Template
|
|
44
|
-
|
|
45
|
-
```markdown
|
|
46
|
-
# ADR-[XXX]: [Decision Title]
|
|
47
|
-
|
|
48
|
-
## Status
|
|
49
|
-
Proposed | Accepted | Deprecated | Superseded by [ADR-YYY]
|
|
50
|
-
|
|
51
|
-
## Context
|
|
52
|
-
[What problem? What constraints?]
|
|
53
|
-
|
|
54
|
-
## Decision
|
|
55
|
-
[What we chose - be specific]
|
|
56
|
-
|
|
57
|
-
## Rationale
|
|
58
|
-
[Why - tie to requirements and constraints]
|
|
59
|
-
|
|
60
|
-
## Trade-offs
|
|
61
|
-
[What we're giving up - be honest]
|
|
62
|
-
|
|
63
|
-
## Consequences
|
|
64
|
-
- **Positive**: [Benefits]
|
|
65
|
-
- **Negative**: [Costs]
|
|
66
|
-
- **Mitigation**: [How to address]
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## ADR Storage
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
docs/
|
|
73
|
-
└── architecture/
|
|
74
|
-
├── adr-001-use-nextjs.md
|
|
75
|
-
├── adr-002-postgresql-over-mongodb.md
|
|
76
|
-
└── adr-003-adopt-repository-pattern.md
|
|
77
|
-
```
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: riligar-dev-autopilot
|
|
3
|
-
description: Automação do ciclo de vida de desenvolvimento. Validação com Bun, Auto-correção, Commit Semântico e Deploy. Use para garantir código funcional e entregue em produção.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# RiLiGar Dev-Autopilot Expert
|
|
7
|
-
|
|
8
|
-
Você é responsável por garantir que cada interação do chat resulte em código funcional e entregue. Sua missão é fechar o ciclo entre o "escrever código" e o "código em produção".
|
|
9
|
-
|
|
10
|
-
## 1. Filosofia do Loop
|
|
11
|
-
|
|
12
|
-
- **Confiança:** O código não é considerado pronto até ser validado.
|
|
13
|
-
- **Autonomia:** Corrigir erros triviais (lint, build, testes simples) sem onerar o usuário.
|
|
14
|
-
- **Velocidade:** Uso intensivo do Bun para ciclos de feedback instantâneos.
|
|
15
|
-
- **Transparência:** Commits claros que explicam a evolução da história/bug.
|
|
16
|
-
|
|
17
|
-
## 2. Fluxo de Trabalho Obrigatório
|
|
18
|
-
|
|
19
|
-
Toda vez que uma alteração de código for finalizada, você deve seguir este fluxo:
|
|
20
|
-
|
|
21
|
-
### Passo 1: Validação (Bun)
|
|
22
|
-
|
|
23
|
-
- **Check:** Executar `bun run lint` ou `bun x eslint .` para garantir padrões.
|
|
24
|
-
<!-- - **Testes:** Rodar testes unitários/integração com `bun test`. -->
|
|
25
|
-
<!-- - **Build:** Se for um projeto compilado (Vite), rodar `bun run build`. -->
|
|
26
|
-
- **Auto-Correção:** Se houver erros, ANALISE a stack trace, CORRIJA o código e RE-VALIDE. Tente até 2 vezes antes de pedir ajuda ao usuário.
|
|
27
|
-
|
|
28
|
-
### Passo 2: Versionamento (Commit Semântico)
|
|
29
|
-
|
|
30
|
-
- Se a validação passar, gere uma mensagem de commit seguindo o padrão **Conventional Commits**:
|
|
31
|
-
- `feat:` para novas histórias.
|
|
32
|
-
- `fix:` para correções de bugs.
|
|
33
|
-
- `refactor:` para melhorias de código sem mudança de comportamento.
|
|
34
|
-
- `docs:` para documentação.
|
|
35
|
-
|
|
36
|
-
### Passo 3: Publicação & Deploy
|
|
37
|
-
|
|
38
|
-
- **Push:** Executar o comando `git-publish` (ou o atalho `gcp`).
|
|
39
|
-
- **Deploy:**
|
|
40
|
-
- Se for infra Fly.io: Executar `fly deploy`.
|
|
41
|
-
- Se for via GitHub Actions: O push para a branch principal deve disparar o fluxo.
|
|
42
|
-
|
|
43
|
-
## 3. Regras de Interface com o Usuário
|
|
44
|
-
|
|
45
|
-
Ao concluir o loop com sucesso, apresente um resumo:
|
|
46
|
-
|
|
47
|
-
- ✅ **Validado:** [Comando executado] (ex: `bun test` passou).
|
|
48
|
-
- 📦 **Commit:** `[mensagem de commit]`
|
|
49
|
-
- 🚀 **Status:** Deploy iniciado/concluído.
|
|
50
|
-
|
|
51
|
-
Se falhar após as tentativas de auto-correção:
|
|
52
|
-
|
|
53
|
-
- ❌ **Erro:** Explique detalhadamente o que falhou e mostre o log.
|
|
54
|
-
- 💡 **Ação:** Pergunte como o usuário deseja proceder.
|
|
55
|
-
|
|
56
|
-
## 4. Integração com Tech Stack
|
|
57
|
-
|
|
58
|
-
- **Bun First:** Sempre prefira `bun` como gerenciador de pacotes e runtime.
|
|
59
|
-
- **Mantine/React:** Verifique se as novas bibliotecas seguem o `riligar-design-system`.
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: riligar-dev-code-review
|
|
3
|
-
description: Code review guidelines covering code quality, security, and best practices. Use when reviewing code or creating review checklists.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Code Review Checklist
|
|
7
|
-
|
|
8
|
-
## Quick Review Checklist
|
|
9
|
-
|
|
10
|
-
### Correctness
|
|
11
|
-
|
|
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
|
-
|
|
19
|
-
- [ ] Input validated and sanitized
|
|
20
|
-
- [ ] No SQL/NoSQL injection vulnerabilities
|
|
21
|
-
- [ ] No XSS or CSRF vulnerabilities
|
|
22
|
-
- [ ] No hardcoded secrets or sensitive credentials
|
|
23
|
-
- [ ] **AI-Specific:** Protection against Prompt Injection (if applicable)
|
|
24
|
-
- [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks
|
|
25
|
-
|
|
26
|
-
### Performance
|
|
27
|
-
|
|
28
|
-
- [ ] No N+1 queries
|
|
29
|
-
- [ ] No unnecessary loops
|
|
30
|
-
- [ ] Appropriate caching
|
|
31
|
-
- [ ] Bundle size impact considered
|
|
32
|
-
|
|
33
|
-
### Code Quality
|
|
34
|
-
|
|
35
|
-
- [ ] Clear naming
|
|
36
|
-
- [ ] DRY - no duplicate code
|
|
37
|
-
- [ ] SOLID principles followed
|
|
38
|
-
- [ ] Appropriate abstraction level
|
|
39
|
-
|
|
40
|
-
### Testing
|
|
41
|
-
|
|
42
|
-
- [ ] Unit tests for new code
|
|
43
|
-
- [ ] Edge cases tested
|
|
44
|
-
- [ ] Tests readable and maintainable
|
|
45
|
-
|
|
46
|
-
### Documentation
|
|
47
|
-
|
|
48
|
-
- [ ] Complex logic commented
|
|
49
|
-
- [ ] Public APIs documented
|
|
50
|
-
- [ ] README updated if needed
|
|
51
|
-
|
|
52
|
-
## AI & LLM Review Patterns (2025)
|
|
53
|
-
|
|
54
|
-
### Logic & Hallucinations
|
|
55
|
-
|
|
56
|
-
- [ ] **Chain of Thought:** Does the logic follow a verifiable path?
|
|
57
|
-
- [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures?
|
|
58
|
-
- [ ] **External State:** Is the code making safe assumptions about file systems or networks?
|
|
59
|
-
|
|
60
|
-
### Prompt Engineering Review
|
|
61
|
-
|
|
62
|
-
```markdown
|
|
63
|
-
// ❌ Vague prompt in code
|
|
64
|
-
const response = await ai.generate(userInput);
|
|
65
|
-
|
|
66
|
-
// ✅ Structured & Safe prompt
|
|
67
|
-
const response = await ai.generate({
|
|
68
|
-
system: "You are a specialized parser...",
|
|
69
|
-
input: sanitize(userInput),
|
|
70
|
-
schema: ResponseSchema
|
|
71
|
-
});
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Anti-Patterns to Flag
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
// ❌ Magic numbers
|
|
78
|
-
if (status === 3) { ... }
|
|
79
|
-
|
|
80
|
-
// ✅ Named constants
|
|
81
|
-
if (status === Status.ACTIVE) { ... }
|
|
82
|
-
|
|
83
|
-
// ❌ Deep nesting
|
|
84
|
-
if (a) { if (b) { if (c) { ... } } }
|
|
85
|
-
|
|
86
|
-
// ✅ Early returns
|
|
87
|
-
if (!a) return;
|
|
88
|
-
if (!b) return;
|
|
89
|
-
if (!c) return;
|
|
90
|
-
// do work
|
|
91
|
-
|
|
92
|
-
// ❌ Long functions (100+ lines)
|
|
93
|
-
// ✅ Small, focused functions
|
|
94
|
-
|
|
95
|
-
// ❌ any type
|
|
96
|
-
const data: any = ...
|
|
97
|
-
|
|
98
|
-
// ✅ Proper types
|
|
99
|
-
const data: UserData = ...
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Review Comments Guide
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
// Blocking issues use 🔴
|
|
106
|
-
🔴 BLOCKING: SQL injection vulnerability here
|
|
107
|
-
|
|
108
|
-
// Important suggestions use 🟡
|
|
109
|
-
🟡 SUGGESTION: Consider using useMemo for performance
|
|
110
|
-
|
|
111
|
-
// Minor nits use 🟢
|
|
112
|
-
🟢 NIT: Prefer const over let for immutable variable
|
|
113
|
-
|
|
114
|
-
// Questions use ❓
|
|
115
|
-
❓ QUESTION: What happens if user is null here?
|
|
116
|
-
```
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: riligar-dev-database
|
|
3
|
-
description: Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases. Use when designing schemas or optimizing database performance.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Database Design
|
|
7
|
-
|
|
8
|
-
> **Learn to THINK, not copy SQL patterns.**
|
|
9
|
-
|
|
10
|
-
## 🎯 Selective Reading Rule
|
|
11
|
-
|
|
12
|
-
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
13
|
-
|
|
14
|
-
| File | Description | When to Read |
|
|
15
|
-
| --------------------------------- | ------------------------------------- | ------------------ |
|
|
16
|
-
| `references/database-selection.md`| PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
|
|
17
|
-
| `references/orm-selection.md` | Drizzle vs Prisma vs Kysely | Choosing ORM |
|
|
18
|
-
| `references/schema-design.md` | Normalization, PKs, relationships | Designing schema |
|
|
19
|
-
| `references/indexing.md` | Index types, composite indexes | Performance tuning |
|
|
20
|
-
| `references/optimization.md` | N+1, EXPLAIN ANALYZE | Query optimization |
|
|
21
|
-
| `references/migrations.md` | Safe migrations, serverless DBs | Schema changes |
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## ⚠️ Core Principle
|
|
26
|
-
|
|
27
|
-
- ASK user for database preferences when unclear
|
|
28
|
-
- Choose database/ORM based on CONTEXT
|
|
29
|
-
- Don't default to PostgreSQL for everything
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Decision Checklist
|
|
34
|
-
|
|
35
|
-
Before designing schema:
|
|
36
|
-
|
|
37
|
-
- [ ] Asked user about database preference?
|
|
38
|
-
- [ ] Chosen database for THIS context?
|
|
39
|
-
- [ ] Considered deployment environment?
|
|
40
|
-
- [ ] Planned index strategy?
|
|
41
|
-
- [ ] Defined relationship types?
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Anti-Patterns
|
|
46
|
-
|
|
47
|
-
❌ Default to PostgreSQL for simple apps (SQLite may suffice)
|
|
48
|
-
❌ Skip indexing
|
|
49
|
-
❌ Use SELECT \* in production
|
|
50
|
-
❌ Store JSON when structured data is better
|
|
51
|
-
❌ 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?
|