@riligar/agents-kit 1.13.0 → 1.15.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 -52
- package/.agent/skills/riligar-business-startup/SKILL.md +0 -1
- package/.agent/skills/riligar-design-system/SKILL.md +0 -1
- package/.agent/skills/riligar-dev-auth-elysia/SKILL.md +7 -3
- package/.agent/skills/riligar-dev-auth-react/SKILL.md +5 -3
- package/.agent/skills/riligar-dev-dashboard/SKILL.md +252 -0
- package/.agent/skills/{riligar-dev-backend → riligar-dev-manager}/SKILL.md +0 -1
- package/.agent/skills/{riligar-tech-stack → riligar-dev-stack}/SKILL.md +0 -1
- package/.agent/skills/{riligar-dev-landing-page → riligar-dev-website}/SKILL.md +0 -1
- package/.agent/skills/{riligar-dev-seo → riligar-dev-website-seo}/SKILL.md +6 -3
- package/.agent/skills/riligar-infra-cloudfare/.gitkeep +0 -0
- package/.agent/skills/{riligar-infrastructure → riligar-infra-fly}/SKILL.md +0 -1
- package/.agent/skills/{riligar-dev-stripe → riligar-infra-stripe}/SKILL.md +1 -1
- package/.agent/skills/riligar-marketing-copy/SKILL.md +0 -1
- package/.agent/skills/riligar-marketing-email/SKILL.md +0 -1
- package/.agent/skills/riligar-marketing-seo/SKILL.md +0 -1
- package/.agent/skills/skill-creator/SKILL.md +1 -3
- package/package.json +1 -1
- package/.agent/skills/riligar-dev-architecture/SKILL.md +0 -55
- package/.agent/skills/riligar-dev-architecture/context-discovery.md +0 -43
- package/.agent/skills/riligar-dev-architecture/examples.md +0 -94
- package/.agent/skills/riligar-dev-architecture/pattern-selection.md +0 -68
- package/.agent/skills/riligar-dev-architecture/patterns-reference.md +0 -50
- package/.agent/skills/riligar-dev-architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/riligar-dev-autopilot/SKILL.md +0 -60
- package/.agent/skills/riligar-dev-code-review/SKILL.md +0 -117
- package/.agent/skills/riligar-dev-database/SKILL.md +0 -52
- package/.agent/skills/riligar-dev-database/database-selection.md +0 -43
- package/.agent/skills/riligar-dev-database/indexing.md +0 -39
- package/.agent/skills/riligar-dev-database/migrations.md +0 -48
- package/.agent/skills/riligar-dev-database/optimization.md +0 -36
- package/.agent/skills/riligar-dev-database/orm-selection.md +0 -30
- package/.agent/skills/riligar-dev-database/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 -216
- package/.agent/skills/riligar-plan-writing/SKILL.md +0 -163
- /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-tech-stack → riligar-dev-stack}/references/tech-stack.md +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,26 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
name: riligar-dev-clean-code
|
|
3
|
-
type: development
|
|
4
|
-
description: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments. CRITICAL skill that defines RiLiGar coding standards. Use when writing or reviewing any code.
|
|
5
|
-
---
|
|
1
|
+
# Clean Code
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
> **CRITICAL SKILL** - Be **concise, direct, and solution-focused**.
|
|
10
|
-
|
|
11
|
-
## Rules Reference
|
|
12
|
-
|
|
13
|
-
This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
14
|
-
|
|
15
|
-
| Rule File | Content |
|
|
16
|
-
| --- | --- |
|
|
17
|
-
| [code-style.md](../../rules/code-style.md) | Prettier formatting (4 spaces, no semi, single quotes) |
|
|
18
|
-
| [javascript-only.md](../../rules/javascript-only.md) | ES6+ only, no TypeScript |
|
|
19
|
-
| [naming-conventions.md](../../rules/naming-conventions.md) | PascalCase, camelCase, SCREAMING_SNAKE |
|
|
20
|
-
| [conventional-commits.md](../../rules/conventional-commits.md) | Commit message format |
|
|
21
|
-
| [pr-guidelines.md](../../rules/pr-guidelines.md) | Pull request standards |
|
|
22
|
-
|
|
23
|
-
---
|
|
3
|
+
Pragmatic coding standards — concise, direct, no over-engineering.
|
|
24
4
|
|
|
25
5
|
## Core Principles
|
|
26
6
|
|
|
@@ -32,8 +12,6 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
32
12
|
| **YAGNI** | You Aren't Gonna Need It - don't build unused features |
|
|
33
13
|
| **Boy Scout** | Leave code cleaner than you found it |
|
|
34
14
|
|
|
35
|
-
---
|
|
36
|
-
|
|
37
15
|
## Function Rules
|
|
38
16
|
|
|
39
17
|
| Rule | Description |
|
|
@@ -45,8 +23,6 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
45
23
|
| **No Side Effects** | Don't mutate inputs unexpectedly |
|
|
46
24
|
| **Async/Await** | Prefer `async/await` over `.then()` chains |
|
|
47
25
|
|
|
48
|
-
---
|
|
49
|
-
|
|
50
26
|
## Code Structure
|
|
51
27
|
|
|
52
28
|
| Pattern | Apply |
|
|
@@ -56,8 +32,6 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
56
32
|
| **Composition** | Small functions composed together |
|
|
57
33
|
| **Colocation** | Keep related code close |
|
|
58
34
|
|
|
59
|
-
---
|
|
60
|
-
|
|
61
35
|
## Component & Framework Rules (React/Elysia)
|
|
62
36
|
|
|
63
37
|
| Situation | Action |
|
|
@@ -68,8 +42,6 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
68
42
|
| **API Endpoints** | Extract complex handler logic to `services/` |
|
|
69
43
|
| **Early Returns** | Use Guard Clauses to avoid deep nesting |
|
|
70
44
|
|
|
71
|
-
---
|
|
72
|
-
|
|
73
45
|
## AI Coding Style
|
|
74
46
|
|
|
75
47
|
| Situation | Action |
|
|
@@ -78,8 +50,6 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
78
50
|
| User reports bug | Fix it, don't explain |
|
|
79
51
|
| No clear requirement | Ask, don't assume |
|
|
80
52
|
|
|
81
|
-
---
|
|
82
|
-
|
|
83
53
|
## Anti-Patterns (DON'T)
|
|
84
54
|
|
|
85
55
|
| Pattern | Fix |
|
|
@@ -93,8 +63,6 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
93
63
|
| Magic numbers | Named constants |
|
|
94
64
|
| God functions | Split by responsibility |
|
|
95
65
|
|
|
96
|
-
---
|
|
97
|
-
|
|
98
66
|
## Before Editing ANY File
|
|
99
67
|
|
|
100
68
|
**Ask yourself:**
|
|
@@ -105,9 +73,7 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
105
73
|
| **What does this file import?** | Interface changes |
|
|
106
74
|
| **Is this a shared component?** | Multiple places affected |
|
|
107
75
|
|
|
108
|
-
>
|
|
109
|
-
|
|
110
|
-
---
|
|
76
|
+
> Edit the file + all dependent files in the SAME task.
|
|
111
77
|
|
|
112
78
|
## Self-Check Before Completing (MANDATORY)
|
|
113
79
|
|
|
@@ -118,18 +84,3 @@ This skill builds on the foundational rules defined in `.agent/rules/`:
|
|
|
118
84
|
| **Code works?** | Did I test/verify the change? |
|
|
119
85
|
| **No TypeScript?** | Verified no `.ts` or type syntax? |
|
|
120
86
|
| **Formatting?** | 4 spaces, no semi, single quotes? |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Summary
|
|
125
|
-
|
|
126
|
-
| Do | Don't |
|
|
127
|
-
| --- | --- |
|
|
128
|
-
| Write code directly | Write tutorials |
|
|
129
|
-
| Let code self-document | Add obvious comments |
|
|
130
|
-
| Fix bugs immediately | Explain the fix first |
|
|
131
|
-
| Inline small things | Create unnecessary files |
|
|
132
|
-
| Name things clearly | Use abbreviations |
|
|
133
|
-
| Keep functions small | Write 100+ line functions |
|
|
134
|
-
|
|
135
|
-
> **Remember: The user wants working code, not a programming lesson.**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-business-startup
|
|
3
|
-
type: business
|
|
4
3
|
description: Comprehensive startup planning toolkit. Use for business cases, financial projections (3-5 year models), and market opportunity analysis (TAM/SAM/SOM). Covers investor-ready documentation, fundraising strategy, and go-to-market planning.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-design-system
|
|
3
|
-
type: design
|
|
4
3
|
description: Especialista no Sistema Visual da RiLiGar. Use para: (1) Criação de interfaces web e mobile (Light/Dark Mode), (2) Implementação de componentes UI (Mantine Only), (3) Garantir estética minimalista "Content-First", (4) Aplicar tokens de design via Mantine Theme.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-auth-elysia
|
|
3
|
-
type: development
|
|
4
3
|
description: 'Comprehensive guide for integrating the Riligar Auth Elysia SDK into backend servers. Use when a user needs to: (1) Set up a backend auth plugin, (2) Configure Elysia with Riligar Secret Key, (3) Protect API routes or groups, (4) Access authenticated user data in handlers, (5) Perform manual JWT verification.'
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -20,13 +19,18 @@ npm install @riligar/auth-elysia
|
|
|
20
19
|
|
|
21
20
|
### 2. Environment Variables
|
|
22
21
|
|
|
23
|
-
Set up your Secret Key and URLs in your
|
|
22
|
+
Set up your Secret Key and URLs in your environment files.
|
|
24
23
|
|
|
25
24
|
> [!CAUTION]
|
|
26
25
|
> Backend integration requires the **Secret Key** (`sk_...`). Never share this key or include it in client-side code.
|
|
27
26
|
|
|
28
27
|
```bash
|
|
29
|
-
# .env
|
|
28
|
+
# .env.development
|
|
29
|
+
AUTH_API_URL=https://manager.myauth.click
|
|
30
|
+
AUTH_API_SECRET=sk_test_your_secret_key
|
|
31
|
+
AUTH_JWKS_URL=https://manager.myauth.click/.well-known/jwks.json
|
|
32
|
+
|
|
33
|
+
# .env.production
|
|
30
34
|
AUTH_API_URL=https://manager.myauth.click
|
|
31
35
|
AUTH_API_SECRET=sk_live_your_secret_key
|
|
32
36
|
AUTH_JWKS_URL=https://manager.myauth.click/.well-known/jwks.json
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-auth-react
|
|
3
|
-
type: development
|
|
4
3
|
description: 'Comprehensive guide for integrating the Riligar Auth React SDK into web applications. Use when a user needs to: (1) Set up authentication from scratch, (2) Configure AuthProvider, (3) Implement route protection, (4) Use auth hooks or pre-built UI components, (5) Handle login/signup/profile/magic links in React.'
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -20,13 +19,16 @@ bun add @riligar/auth-react
|
|
|
20
19
|
|
|
21
20
|
### 2. Environment Variables
|
|
22
21
|
|
|
23
|
-
Set up your Public Key in your
|
|
22
|
+
Set up your Public Key in your environment files.
|
|
24
23
|
|
|
25
24
|
> [!IMPORTANT]
|
|
26
25
|
> Always use the **Public Key** (`pk_...`) in the frontend. Never expose your Secret Key.
|
|
27
26
|
|
|
28
27
|
```bash
|
|
29
|
-
# .env.
|
|
28
|
+
# .env.development
|
|
29
|
+
VITE_AUTH_API_KEY=pk_test_your_public_key
|
|
30
|
+
|
|
31
|
+
# .env.production
|
|
30
32
|
VITE_AUTH_API_KEY=pk_live_your_public_key
|
|
31
33
|
```
|
|
32
34
|
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: riligar-dev-dashboard
|
|
3
|
+
description: Padrões React específicos do RiLiGar. Zustand, i18n, estrutura de arquivos, composição de componentes. Use quando construindo componentes, gerenciando estado ou implementando UI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Front-End — Padrões do RiLiGar
|
|
7
|
+
|
|
8
|
+
> Regras concretas baseadas na arquitetura real dos projetos. Não são genéricas — são do código que existe.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Referências obrigatórias
|
|
13
|
+
|
|
14
|
+
> [!IMPORTANT]
|
|
15
|
+
> Sempre respeite também:
|
|
16
|
+
> - @[.agent/skills/riligar-design-system] — UI exclusivo via Mantine, zero CSS
|
|
17
|
+
> - Rules em `.agent/rules/` — clean-code, naming-conventions, code-style, javascript-only
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. Estrutura de arquivos
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
src/
|
|
25
|
+
├── components/ # Componentes reutilizáveis
|
|
26
|
+
│ ├── Sidebar.jsx # PascalCase (SEMPRE)
|
|
27
|
+
│ ├── RichEditor.jsx
|
|
28
|
+
│ └── MediaLibrary.jsx
|
|
29
|
+
├── pages/ # Uma pasta por página/feature
|
|
30
|
+
│ ├── home.jsx # Arquivo raiz da página: kebab-case
|
|
31
|
+
│ ├── editor/
|
|
32
|
+
│ │ └── index.jsx
|
|
33
|
+
│ └── feeds/
|
|
34
|
+
│ ├── index.jsx
|
|
35
|
+
│ └── FeedConfig.jsx # Sub-componentes: PascalCase
|
|
36
|
+
├── store/ # Zustand stores — um arquivo por domínio
|
|
37
|
+
│ ├── auth-store.js
|
|
38
|
+
│ ├── feed-store.js
|
|
39
|
+
│ └── post-store.js
|
|
40
|
+
├── services/ # Chamadas HTTP — um arquivo por domínio
|
|
41
|
+
│ ├── api.js # Instância base do cliente HTTP
|
|
42
|
+
│ ├── feeds.js
|
|
43
|
+
│ └── posts.js
|
|
44
|
+
├── constants/ # Constantes estáticas do app
|
|
45
|
+
├── i18n/ # Internacionalização
|
|
46
|
+
│ ├── index.js
|
|
47
|
+
│ └── locales/
|
|
48
|
+
└── hooks/ # Custom hooks compartilhados
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Regras de naming de arquivos
|
|
52
|
+
|
|
53
|
+
| Tipo | Convenção | Exemplo |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| Componentes (reutilizáveis) | PascalCase | `MediaLibrary.jsx` |
|
|
56
|
+
| Página raiz | kebab-case | `home.jsx`, `index.jsx` |
|
|
57
|
+
| Sub-componentes de página | PascalCase | `FeedConfig.jsx` |
|
|
58
|
+
| Stores | kebab-case + sufixo `-store` | `feed-store.js` |
|
|
59
|
+
| Services | kebab-case | `feeds.js` |
|
|
60
|
+
| Hooks | camelCase com prefixo `use` | `useDebounce.js` |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 2. Estado — Zustand (não é opcional)
|
|
65
|
+
|
|
66
|
+
Estado global **sempre** Zustand. Sem Context para estado compartilhado. Sem Redux.
|
|
67
|
+
|
|
68
|
+
### Padrão de store
|
|
69
|
+
|
|
70
|
+
```javascript
|
|
71
|
+
import { create } from 'zustand'
|
|
72
|
+
import { feedsService } from '../services/feeds'
|
|
73
|
+
|
|
74
|
+
const useFeedStore = create((set, get) => ({
|
|
75
|
+
feeds: [],
|
|
76
|
+
activeFeed: null,
|
|
77
|
+
isLoading: false,
|
|
78
|
+
|
|
79
|
+
fetchFeeds: async () => {
|
|
80
|
+
set({ isLoading: true })
|
|
81
|
+
const feeds = await feedsService.getAll()
|
|
82
|
+
set({ feeds, isLoading: false })
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
setActiveFeed: (feed) => set({ activeFeed: feed }),
|
|
86
|
+
}))
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Regras
|
|
90
|
+
|
|
91
|
+
- **Sem getters JavaScript** (`get isTrialing() {}`) — não são reativos no Zustand. Derive no componente ou use um selector.
|
|
92
|
+
- **Persistência:** use `persist` middleware apenas quando necessário (ex: `activeFeed`).
|
|
93
|
+
- **Sem lógica de UI** dentro do store. Stores são dados + chamadas de API.
|
|
94
|
+
- **Selectors granulares:** `useStore((state) => state.feeds)` — não `useStore()` inteiro.
|
|
95
|
+
|
|
96
|
+
### Errado vs Certo
|
|
97
|
+
|
|
98
|
+
```javascript
|
|
99
|
+
// ❌ Getter não-reativo — nunca vai atualizar o componente
|
|
100
|
+
const useSubscriptionStore = create((set) => ({
|
|
101
|
+
subscription: null,
|
|
102
|
+
get isTrialing() { return this.subscription?.status === 'trialing' }
|
|
103
|
+
}))
|
|
104
|
+
|
|
105
|
+
// ✅ Derive no componente
|
|
106
|
+
const subscription = useSubscriptionStore((s) => s.subscription)
|
|
107
|
+
const isTrialing = subscription?.status === 'trialing'
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 3. i18n — Todas as strings visíveis devem usar `t()`
|
|
113
|
+
|
|
114
|
+
O projeto usa **i18next** com 3 idiomas (pt-BR, en, es). Nenhuma string visível ao usuário pode ser hardcoded.
|
|
115
|
+
|
|
116
|
+
### Como usar
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
import { useTranslation } from 'react-i18next'
|
|
120
|
+
|
|
121
|
+
const MyComponent = () => {
|
|
122
|
+
const { t } = useTranslation()
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<Button onClick={handleSave}>{t('common.save')}</Button>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Regras
|
|
131
|
+
|
|
132
|
+
- **Sempre importar `useTranslation`** antes de usar `t()`. Sem isso, crash em runtime.
|
|
133
|
+
- Strings de UI: `t('namespace.key')` — nunca hardcode.
|
|
134
|
+
- Strings técnicas (logs, variável interna): podem ser em inglês, não precisam de `t()`.
|
|
135
|
+
- Chaves de namespace: domínio da feature (`feeds.`, `posts.`, `media.`) + `common.` para compartilhados.
|
|
136
|
+
- Mensagens de erro da API já vêm traduzidas do backend — não duplique.
|
|
137
|
+
|
|
138
|
+
### Errado
|
|
139
|
+
|
|
140
|
+
```javascript
|
|
141
|
+
// ❌ String hardcoded visível ao usuário
|
|
142
|
+
<Button>Salvar Alterações</Button>
|
|
143
|
+
<Text>Nenhuma mídia encontrada.</Text>
|
|
144
|
+
|
|
145
|
+
// ❌ t() sem import — crash
|
|
146
|
+
const handleSave = async () => {
|
|
147
|
+
showNotification({ title: t('common.success') }) // ReferenceError
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Certo
|
|
152
|
+
|
|
153
|
+
```javascript
|
|
154
|
+
// ✅
|
|
155
|
+
import { useTranslation } from 'react-i18next'
|
|
156
|
+
|
|
157
|
+
const { t } = useTranslation()
|
|
158
|
+
<Button>{t('common.save')}</Button>
|
|
159
|
+
<Text>{t('media.empty')}</Text>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 4. Services — camada de HTTP
|
|
165
|
+
|
|
166
|
+
Todas as chamadas de API vão por `services/`. Componentes e stores não chamam HTTP diretamente.
|
|
167
|
+
|
|
168
|
+
### Padrão
|
|
169
|
+
|
|
170
|
+
```javascript
|
|
171
|
+
// services/feeds.js
|
|
172
|
+
import { api } from './api'
|
|
173
|
+
|
|
174
|
+
export const feedsService = {
|
|
175
|
+
getAll: () => api.get('feeds').json(),
|
|
176
|
+
getById: (id) => api.get(`feeds/${id}`).json(),
|
|
177
|
+
create: (data) => api.post('feeds', { json: data }).json(),
|
|
178
|
+
update: (id, data) => api.put(`feeds/${id}`, { json: data }).json(),
|
|
179
|
+
remove: (id) => api.delete(`feeds/${id}`).json(),
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
- `api.js` tem a instância base com token de auth e tratamento de erro.
|
|
184
|
+
- **Não duplique `API_URL`** — já está no `api.js`. Nunca redefina em outro arquivo.
|
|
185
|
+
- Services são funções puras de chamada HTTP. Sem lógica de estado.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 5. Componentes — regras práticas
|
|
190
|
+
|
|
191
|
+
### Composição
|
|
192
|
+
|
|
193
|
+
- Um componente, uma responsabilidade.
|
|
194
|
+
- Se um componente ultrapassar ~100 linhas, divide.
|
|
195
|
+
- Props down, events up. Sem drilling profundo — usa store.
|
|
196
|
+
|
|
197
|
+
### Interação com usuário
|
|
198
|
+
|
|
199
|
+
- **Confirmação de exclusão:** sempre usar `HoldButton` / `ButtonDelete` do `components/Buttons.jsx`. Nunca usar `confirm()` nativo.
|
|
200
|
+
- **Hover/focus:** usar props do Mantine (`styles`, `withBorder`, hover via `&:hover` no `styles`). Nunca manipular DOM diretamente via `e.currentTarget.style`.
|
|
201
|
+
|
|
202
|
+
```javascript
|
|
203
|
+
// ❌ Manipulação direta de DOM
|
|
204
|
+
onMouseEnter={(e) => e.currentTarget.style.background = '#eee'}
|
|
205
|
+
|
|
206
|
+
// ✅ Mantine styles prop
|
|
207
|
+
styles={{ root: { '&:hover': { backgroundColor: 'var(--mantine-color-dimmed)' } } }}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Não redefina componentes do Mantine
|
|
211
|
+
|
|
212
|
+
Se você precisa de um `Center`, `TextInput`, `Button` — use o do Mantine. Nunca crie um local com o mesmo nome, isso gera shadow e confusão.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 6. Constantes e valores fixos
|
|
217
|
+
|
|
218
|
+
- Strings de config (phone numbers, mensagens template, URLs externas) vão em `constants/` ou `.env`.
|
|
219
|
+
- Nunca hardcode dentro de componentes.
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
// ❌
|
|
223
|
+
const message = `Olá, preciso de ajuda com meu plano.`
|
|
224
|
+
|
|
225
|
+
// ✅ constants/whatsapp.js
|
|
226
|
+
export const WHATSAPP_SUPPORT_NUMBER = '...'
|
|
227
|
+
export const WHATSAPP_SUPPORT_MESSAGE = '...' // ou via i18n se traduzível
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## 7. Anti-patterns (do código real)
|
|
233
|
+
|
|
234
|
+
| ❌ Problema real encontrado | ✅ Como resolver |
|
|
235
|
+
|---|---|
|
|
236
|
+
| `slugify` duplicado em 2 arquivos | Extrair para `utils/slugify.js` |
|
|
237
|
+
| `stripHtml` duplicado em 2 arquivos | Extrair para `utils/stripHtml.js` |
|
|
238
|
+
| `API_URL` redefinido fora do `api.js` | Importar do `services/api.js` |
|
|
239
|
+
| `t()` usado sem `useTranslation` importado | Sempre verificar import |
|
|
240
|
+
| Componente Mantine shadowed por local | Deletar o local, usar Mantine |
|
|
241
|
+
| Código comentado espalhado | Deletar. Se precisa, usa git. |
|
|
242
|
+
| `confirm()` misturado com HoldButton | Usa HoldButton sempre |
|
|
243
|
+
| `<style>` tag com CSS raw | Usa `styles` prop do Mantine (exceção: libs externas como ProseMirror que precisam de CSS global) |
|
|
244
|
+
| Getters no Zustand store | Derive no componente |
|
|
245
|
+
| `onMouseEnter` manipulando style diretamente | Usa `styles` prop do Mantine |
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Related Skills
|
|
250
|
+
|
|
251
|
+
- @[.agent/skills/riligar-design-system]
|
|
252
|
+
- @[.agent/skills/riligar-dev-stack]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-landing-page
|
|
3
|
-
type: development
|
|
4
3
|
description: Specialist in High-Conversion Landing Pages using RiLiGar Design System. Use for: (1) Creating marketing/sales pages, (2) Structuring conversion flows (AIDA/PAS), (3) Implementing high-trust components (Hero, Social Proof, Pricing), (4) Writing persuasive copy.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-seo
|
|
3
|
-
type: development
|
|
4
3
|
description: Implementação de infraestrutura de SEO técnico seguindo a stack RiLiGar (React, Vite, Bun, Elysia). Use para configurar sitemaps, robots.txt, meta tags, OpenGraph, dados estruturados (JSON-LD) e URLs canônicas.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -177,10 +176,14 @@ app.get('/*', async ({ path }) => {
|
|
|
177
176
|
|
|
178
177
|
# Part 4: Variáveis de Ambiente
|
|
179
178
|
|
|
180
|
-
Sempre configure a URL base:
|
|
179
|
+
Sempre configure a URL base nos arquivos de ambiente:
|
|
181
180
|
|
|
182
181
|
```bash
|
|
183
|
-
# .env
|
|
182
|
+
# .env.development
|
|
183
|
+
VITE_SITE_URL=http://localhost:5173
|
|
184
|
+
SITE_URL=http://localhost:3000
|
|
185
|
+
|
|
186
|
+
# .env.production
|
|
184
187
|
VITE_SITE_URL=https://riligar.com
|
|
185
188
|
SITE_URL=https://riligar.com
|
|
186
189
|
```
|
|
File without changes
|
|
@@ -252,6 +252,6 @@ stripe trigger checkout.session.completed
|
|
|
252
252
|
## Related Skills
|
|
253
253
|
|
|
254
254
|
- @[.agent/skills/riligar-dev-backend]
|
|
255
|
-
- @[.agent/skills/riligar-dev-
|
|
255
|
+
- @[.agent/skills/riligar-dev-dashboard]
|
|
256
256
|
- @[.agent/skills/riligar-dev-auth-elysia]
|
|
257
257
|
- @[.agent/skills/riligar-tech-stack]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-marketing-copy
|
|
3
|
-
type: marketing
|
|
4
3
|
description: Generate compelling marketing copy using the Elevated Direct Response framework. Use when creating landing pages, headlines, email campaigns, ad copy, CTAs, value propositions, or any persuasive marketing content.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-marketing-email
|
|
3
|
-
type: marketing
|
|
4
3
|
description: Email sequence design and optimization. Use when creating drip campaigns, automated flows, nurture sequences, onboarding emails, welcome sequences, re-engagement emails, or lifecycle email programs.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-marketing-seo
|
|
3
|
-
type: marketing
|
|
4
3
|
description: Design and evaluate programmatic SEO strategies for creating SEO-driven pages at scale. Use when working with programmatic SEO, template pages, directory pages, location pages, or keyword-pattern page generation.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-creator
|
|
3
|
-
type: meta
|
|
4
3
|
description: Guide for creating effective skills. Use when creating a new skill or updating an existing skill that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -79,7 +78,7 @@ Every skill must have a `type` field that categorizes it. This enables organizat
|
|
|
79
78
|
|
|
80
79
|
- Directory name MUST match the `name` field in frontmatter
|
|
81
80
|
- Use pattern: `riligar-{type}-{specific-name}`
|
|
82
|
-
- Examples: `riligar-dev-
|
|
81
|
+
- Examples: `riligar-dev-dashboard`, `riligar-marketing-copy`, `riligar-business-startup-analyst`
|
|
83
82
|
|
|
84
83
|
#### SKILL.md (required)
|
|
85
84
|
|
|
@@ -337,7 +336,6 @@ Write the YAML frontmatter with `name`, `type`, and `description`:
|
|
|
337
336
|
```yaml
|
|
338
337
|
---
|
|
339
338
|
name: riligar-dev-example
|
|
340
|
-
type: development
|
|
341
339
|
description: Brief description of what the skill does. Use when [specific triggers].
|
|
342
340
|
---
|
|
343
341
|
```
|
package/package.json
CHANGED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: riligar-dev-architecture
|
|
3
|
-
type: development
|
|
4
|
-
description: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Architecture Decision Framework
|
|
8
|
-
|
|
9
|
-
> "Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale."
|
|
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
|
-
| `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
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 🔗 Related Skills
|
|
26
|
-
|
|
27
|
-
| Skill | Use For |
|
|
28
|
-
| --------------------------------- | ----------------------- |
|
|
29
|
-
| `@[skills/database-design]` | Database schema design |
|
|
30
|
-
| `@[skills/api-patterns]` | API design patterns |
|
|
31
|
-
| `@[skills/deployment-procedures]` | Deployment architecture |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Core Principle
|
|
36
|
-
|
|
37
|
-
**"Simplicity is the ultimate sophistication."**
|
|
38
|
-
|
|
39
|
-
- Start simple
|
|
40
|
-
- Add complexity ONLY when proven necessary
|
|
41
|
-
- You can always add patterns later
|
|
42
|
-
- Removing complexity is MUCH harder than adding it
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Validation Checklist
|
|
47
|
-
|
|
48
|
-
Before finalizing architecture:
|
|
49
|
-
|
|
50
|
-
- [ ] Requirements clearly understood
|
|
51
|
-
- [ ] Constraints identified
|
|
52
|
-
- [ ] Each decision has trade-off analysis
|
|
53
|
-
- [ ] Simpler alternatives considered
|
|
54
|
-
- [ ] ADRs written for significant decisions
|
|
55
|
-
- [ ] 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
|
-
```
|