create-genia-os 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -11
- package/bin/index.js +92 -0
- package/package.json +4 -2
- package/template/.claude/CLAUDE.md +215 -215
- package/template/.claude/agent-memory/analyst/MEMORY.md +20 -20
- package/template/.claude/agent-memory/architect/MEMORY.md +20 -20
- package/template/.claude/agent-memory/dev/MEMORY.md +20 -20
- package/template/.claude/agent-memory/devops/MEMORY.md +20 -20
- package/template/.claude/agent-memory/pm/MEMORY.md +20 -20
- package/template/.claude/agent-memory/po/MEMORY.md +20 -20
- package/template/.claude/agent-memory/qa/MEMORY.md +20 -20
- package/template/.claude/agent-memory/reviewer/MEMORY.md +20 -20
- package/template/.claude/agent-memory/sm/MEMORY.md +20 -20
- package/template/.claude/hooks/enforce-git-push-authority.py +70 -70
- package/template/.claude/hooks/metrics-tracker.cjs +65 -0
- package/template/.claude/hooks/precompact-session-digest.cjs +87 -87
- package/template/.claude/hooks/sql-governance.py +65 -65
- package/template/.claude/hooks/synapse-engine.cjs +122 -122
- package/template/.claude/hooks/write-path-validation.py +59 -59
- package/template/.claude/rules/agent-authority.md +39 -39
- package/template/.claude/rules/agent-handoff.md +71 -71
- package/template/.claude/rules/agent-memory.md +61 -61
- package/template/.claude/rules/ids-principles.md +52 -52
- package/template/.claude/rules/mcp-usage.md +49 -49
- package/template/.claude/rules/new-project.md +157 -0
- package/template/.claude/rules/story-lifecycle.md +87 -87
- package/template/.claude/rules/workflow-execution.md +68 -68
- package/template/.claude/settings.json +58 -58
- package/template/.claude/settings.local.json +14 -14
- package/template/.genia/CONSTITUTION.md +129 -129
- package/template/.genia/contexts/api-patterns.md +134 -134
- package/template/.genia/contexts/nextjs-react.md +210 -210
- package/template/.genia/contexts/projeto.md +18 -18
- package/template/.genia/contexts/supabase.md +152 -152
- package/template/.genia/contexts/whatsapp-cloud.md +176 -176
- package/template/.genia/core-config.yaml +192 -192
- package/template/.genia/development/agents/analyst.md +138 -138
- package/template/.genia/development/agents/architect.md +171 -171
- package/template/.genia/development/agents/dev.md +160 -160
- package/template/.genia/development/agents/devops.md +200 -200
- package/template/.genia/development/agents/pm.md +142 -142
- package/template/.genia/development/agents/po.md +165 -165
- package/template/.genia/development/agents/qa.md +183 -183
- package/template/.genia/development/agents/reviewer.md +198 -198
- package/template/.genia/development/agents/sm.md +230 -230
- package/template/.genia/development/checklists/architecture-review.md +189 -189
- package/template/.genia/development/checklists/pre-commit.md +205 -205
- package/template/.genia/development/checklists/pre-deploy.md +230 -230
- package/template/.genia/development/checklists/qa-gate.md +216 -216
- package/template/.genia/development/checklists/story-dod.md +155 -155
- package/template/.genia/development/tasks/code-review.md +197 -197
- package/template/.genia/development/tasks/criar-prd.md +170 -170
- package/template/.genia/development/tasks/criar-spec.md +188 -188
- package/template/.genia/development/tasks/criar-story.md +185 -185
- package/template/.genia/development/tasks/debug-sistematico.md +230 -230
- package/template/.genia/development/tasks/dev-implement.md +199 -199
- package/template/.genia/development/tasks/qa-review.md +224 -224
- package/template/.genia/development/workflows/brownfield.md +178 -178
- package/template/.genia/development/workflows/delivery.md +208 -208
- package/template/.genia/development/workflows/development.md +189 -189
- package/template/.genia/development/workflows/greenfield.md +166 -166
- package/template/.genia/development/workflows/planning.md +167 -167
- package/template/.genia/development/workflows/qa-loop.md +179 -179
- package/template/.genia/development/workflows/spec-pipeline.md +192 -192
- package/template/.genia/development/workflows/story-development-cycle.md +252 -252
- package/template/.genia/guidelines/clean-code.md +98 -98
- package/template/.genia/guidelines/testing.md +176 -176
- package/template/.genia/skills/design/canvas-design.md +109 -109
- package/template/.genia/skills/design/frontend-design.md +140 -140
- package/template/.genia/skills/dev/mcp-builder.md +172 -172
- package/template/.genia/skills/dev/webapp-testing.md +150 -150
- package/template/.genia/skills/documents/docx.md +153 -153
- package/template/.genia/skills/documents/pdf.md +134 -134
- package/template/.genia/skills/documents/pptx.md +118 -118
- package/template/.genia/skills/documents/xlsx.md +140 -140
- package/template/.synapse/agent-analyst +8 -8
- package/template/.synapse/agent-architect +8 -8
- package/template/.synapse/agent-dev +8 -8
- package/template/.synapse/agent-devops +8 -8
- package/template/.synapse/agent-pm +8 -8
- package/template/.synapse/agent-po +7 -7
- package/template/.synapse/agent-qa +8 -8
- package/template/.synapse/agent-reviewer +7 -7
- package/template/.synapse/agent-sm +7 -7
- package/template/.synapse/constitution +7 -7
- package/template/.synapse/context +8 -8
- package/template/.synapse/global +8 -8
- package/template/.synapse/manifest +14 -14
- package/template/README.md +53 -53
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# Contexto: {{PROJECT_NAME}}
|
|
2
|
-
|
|
3
|
-
> Carregue com: `@load-context {{PROJECT_NAME}}`
|
|
4
|
-
|
|
5
|
-
## Sobre o Projeto
|
|
6
|
-
|
|
7
|
-
- **Nome**: {{PROJECT_NAME}}
|
|
8
|
-
- **Equipe**: {{TEAM_NAME}}
|
|
9
|
-
- **Stack**: {{STACK}}
|
|
10
|
-
|
|
11
|
-
## Recursos Principais
|
|
12
|
-
|
|
13
|
-
_Adicione aqui as informações de contexto do seu projeto:_
|
|
14
|
-
_APIs, autenticação, endpoints, banco de dados, etc._
|
|
15
|
-
|
|
16
|
-
## Links Úteis
|
|
17
|
-
|
|
18
|
-
- GitHub: https://github.com/{{GITHUB_USER}}/{{GITHUB_REPO}}
|
|
1
|
+
# Contexto: {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
> Carregue com: `@load-context {{PROJECT_NAME}}`
|
|
4
|
+
|
|
5
|
+
## Sobre o Projeto
|
|
6
|
+
|
|
7
|
+
- **Nome**: {{PROJECT_NAME}}
|
|
8
|
+
- **Equipe**: {{TEAM_NAME}}
|
|
9
|
+
- **Stack**: {{STACK}}
|
|
10
|
+
|
|
11
|
+
## Recursos Principais
|
|
12
|
+
|
|
13
|
+
_Adicione aqui as informações de contexto do seu projeto:_
|
|
14
|
+
_APIs, autenticação, endpoints, banco de dados, etc._
|
|
15
|
+
|
|
16
|
+
## Links Úteis
|
|
17
|
+
|
|
18
|
+
- GitHub: https://github.com/{{GITHUB_USER}}/{{GITHUB_REPO}}
|
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
# Contexto: Supabase
|
|
2
|
-
|
|
3
|
-
> Base de conhecimento para integracao com Supabase.
|
|
4
|
-
|
|
5
|
-
## Configuracao
|
|
6
|
-
|
|
7
|
-
### Credenciais
|
|
8
|
-
```
|
|
9
|
-
URL: [ver .env - SUPABASE_URL]
|
|
10
|
-
API Key: [ver .env - SUPABASE_KEY]
|
|
11
|
-
Service Key: [ver .env - SUPABASE_SERVICE_KEY]
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Cliente Python
|
|
15
|
-
|
|
16
|
-
### Instalacao
|
|
17
|
-
```bash
|
|
18
|
-
pip install supabase
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Inicializacao
|
|
22
|
-
```python
|
|
23
|
-
from supabase import create_client
|
|
24
|
-
|
|
25
|
-
supabase = create_client(
|
|
26
|
-
supabase_url=os.getenv("SUPABASE_URL"),
|
|
27
|
-
supabase_key=os.getenv("SUPABASE_KEY")
|
|
28
|
-
)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Operacoes CRUD
|
|
32
|
-
|
|
33
|
-
### Select
|
|
34
|
-
```python
|
|
35
|
-
# Todos os registros
|
|
36
|
-
data = supabase.table("tabela").select("*").execute()
|
|
37
|
-
|
|
38
|
-
# Com filtro
|
|
39
|
-
data = supabase.table("tabela").select("*").eq("coluna", valor).execute()
|
|
40
|
-
|
|
41
|
-
# Com ordenacao
|
|
42
|
-
data = supabase.table("tabela").select("*").order("coluna", desc=True).execute()
|
|
43
|
-
|
|
44
|
-
# Com limite
|
|
45
|
-
data = supabase.table("tabela").select("*").limit(10).execute()
|
|
46
|
-
|
|
47
|
-
# Colunas especificas
|
|
48
|
-
data = supabase.table("tabela").select("id, nome, email").execute()
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Insert
|
|
52
|
-
```python
|
|
53
|
-
data = supabase.table("tabela").insert({
|
|
54
|
-
"coluna1": "valor1",
|
|
55
|
-
"coluna2": "valor2"
|
|
56
|
-
}).execute()
|
|
57
|
-
|
|
58
|
-
# Bulk insert
|
|
59
|
-
data = supabase.table("tabela").insert([
|
|
60
|
-
{"col": "val1"},
|
|
61
|
-
{"col": "val2"}
|
|
62
|
-
]).execute()
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Update
|
|
66
|
-
```python
|
|
67
|
-
data = supabase.table("tabela").update({
|
|
68
|
-
"coluna": "novo_valor"
|
|
69
|
-
}).eq("id", 123).execute()
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Delete
|
|
73
|
-
```python
|
|
74
|
-
data = supabase.table("tabela").delete().eq("id", 123).execute()
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Filtros
|
|
78
|
-
|
|
79
|
-
| Metodo | SQL | Uso |
|
|
80
|
-
|--------|-----|-----|
|
|
81
|
-
| eq | = | .eq("col", val) |
|
|
82
|
-
| neq | != | .neq("col", val) |
|
|
83
|
-
| gt | > | .gt("col", val) |
|
|
84
|
-
| gte | >= | .gte("col", val) |
|
|
85
|
-
| lt | < | .lt("col", val) |
|
|
86
|
-
| lte | <= | .lte("col", val) |
|
|
87
|
-
| like | LIKE | .like("col", "%val%") |
|
|
88
|
-
| ilike | ILIKE | .ilike("col", "%val%") |
|
|
89
|
-
| in_ | IN | .in_("col", [1,2,3]) |
|
|
90
|
-
| is_ | IS | .is_("col", None) |
|
|
91
|
-
|
|
92
|
-
## RPC (Functions)
|
|
93
|
-
|
|
94
|
-
```python
|
|
95
|
-
# Chamar funcao
|
|
96
|
-
data = supabase.rpc("nome_funcao", {"param": "valor"}).execute()
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Storage
|
|
100
|
-
|
|
101
|
-
```python
|
|
102
|
-
# Upload
|
|
103
|
-
supabase.storage.from_("bucket").upload("path/file.pdf", file_content)
|
|
104
|
-
|
|
105
|
-
# Download
|
|
106
|
-
data = supabase.storage.from_("bucket").download("path/file.pdf")
|
|
107
|
-
|
|
108
|
-
# URL publica
|
|
109
|
-
url = supabase.storage.from_("bucket").get_public_url("path/file.pdf")
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Auth
|
|
113
|
-
|
|
114
|
-
```python
|
|
115
|
-
# Sign up
|
|
116
|
-
supabase.auth.sign_up({"email": "...", "password": "..."})
|
|
117
|
-
|
|
118
|
-
# Sign in
|
|
119
|
-
supabase.auth.sign_in_with_password({"email": "...", "password": "..."})
|
|
120
|
-
|
|
121
|
-
# Sign out
|
|
122
|
-
supabase.auth.sign_out()
|
|
123
|
-
|
|
124
|
-
# Get user
|
|
125
|
-
user = supabase.auth.get_user()
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Gotchas
|
|
129
|
-
1. Usar service key para operacoes admin
|
|
130
|
-
2. RLS (Row Level Security) afeta queries com api key
|
|
131
|
-
3. Timestamps em ISO 8601
|
|
132
|
-
4. UUIDs para IDs
|
|
133
|
-
|
|
134
|
-
## Patterns
|
|
135
|
-
|
|
136
|
-
### Upsert
|
|
137
|
-
```python
|
|
138
|
-
data = supabase.table("tabela").upsert({
|
|
139
|
-
"id": 123,
|
|
140
|
-
"coluna": "valor"
|
|
141
|
-
}).execute()
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Count
|
|
145
|
-
```python
|
|
146
|
-
count = supabase.table("tabela").select("*", count="exact").execute()
|
|
147
|
-
print(count.count)
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
*Contexto carregado automaticamente quando detectado uso de Supabase.*
|
|
1
|
+
# Contexto: Supabase
|
|
2
|
+
|
|
3
|
+
> Base de conhecimento para integracao com Supabase.
|
|
4
|
+
|
|
5
|
+
## Configuracao
|
|
6
|
+
|
|
7
|
+
### Credenciais
|
|
8
|
+
```
|
|
9
|
+
URL: [ver .env - SUPABASE_URL]
|
|
10
|
+
API Key: [ver .env - SUPABASE_KEY]
|
|
11
|
+
Service Key: [ver .env - SUPABASE_SERVICE_KEY]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Cliente Python
|
|
15
|
+
|
|
16
|
+
### Instalacao
|
|
17
|
+
```bash
|
|
18
|
+
pip install supabase
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Inicializacao
|
|
22
|
+
```python
|
|
23
|
+
from supabase import create_client
|
|
24
|
+
|
|
25
|
+
supabase = create_client(
|
|
26
|
+
supabase_url=os.getenv("SUPABASE_URL"),
|
|
27
|
+
supabase_key=os.getenv("SUPABASE_KEY")
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Operacoes CRUD
|
|
32
|
+
|
|
33
|
+
### Select
|
|
34
|
+
```python
|
|
35
|
+
# Todos os registros
|
|
36
|
+
data = supabase.table("tabela").select("*").execute()
|
|
37
|
+
|
|
38
|
+
# Com filtro
|
|
39
|
+
data = supabase.table("tabela").select("*").eq("coluna", valor).execute()
|
|
40
|
+
|
|
41
|
+
# Com ordenacao
|
|
42
|
+
data = supabase.table("tabela").select("*").order("coluna", desc=True).execute()
|
|
43
|
+
|
|
44
|
+
# Com limite
|
|
45
|
+
data = supabase.table("tabela").select("*").limit(10).execute()
|
|
46
|
+
|
|
47
|
+
# Colunas especificas
|
|
48
|
+
data = supabase.table("tabela").select("id, nome, email").execute()
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Insert
|
|
52
|
+
```python
|
|
53
|
+
data = supabase.table("tabela").insert({
|
|
54
|
+
"coluna1": "valor1",
|
|
55
|
+
"coluna2": "valor2"
|
|
56
|
+
}).execute()
|
|
57
|
+
|
|
58
|
+
# Bulk insert
|
|
59
|
+
data = supabase.table("tabela").insert([
|
|
60
|
+
{"col": "val1"},
|
|
61
|
+
{"col": "val2"}
|
|
62
|
+
]).execute()
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Update
|
|
66
|
+
```python
|
|
67
|
+
data = supabase.table("tabela").update({
|
|
68
|
+
"coluna": "novo_valor"
|
|
69
|
+
}).eq("id", 123).execute()
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Delete
|
|
73
|
+
```python
|
|
74
|
+
data = supabase.table("tabela").delete().eq("id", 123).execute()
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Filtros
|
|
78
|
+
|
|
79
|
+
| Metodo | SQL | Uso |
|
|
80
|
+
|--------|-----|-----|
|
|
81
|
+
| eq | = | .eq("col", val) |
|
|
82
|
+
| neq | != | .neq("col", val) |
|
|
83
|
+
| gt | > | .gt("col", val) |
|
|
84
|
+
| gte | >= | .gte("col", val) |
|
|
85
|
+
| lt | < | .lt("col", val) |
|
|
86
|
+
| lte | <= | .lte("col", val) |
|
|
87
|
+
| like | LIKE | .like("col", "%val%") |
|
|
88
|
+
| ilike | ILIKE | .ilike("col", "%val%") |
|
|
89
|
+
| in_ | IN | .in_("col", [1,2,3]) |
|
|
90
|
+
| is_ | IS | .is_("col", None) |
|
|
91
|
+
|
|
92
|
+
## RPC (Functions)
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
# Chamar funcao
|
|
96
|
+
data = supabase.rpc("nome_funcao", {"param": "valor"}).execute()
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Storage
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
# Upload
|
|
103
|
+
supabase.storage.from_("bucket").upload("path/file.pdf", file_content)
|
|
104
|
+
|
|
105
|
+
# Download
|
|
106
|
+
data = supabase.storage.from_("bucket").download("path/file.pdf")
|
|
107
|
+
|
|
108
|
+
# URL publica
|
|
109
|
+
url = supabase.storage.from_("bucket").get_public_url("path/file.pdf")
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Auth
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
# Sign up
|
|
116
|
+
supabase.auth.sign_up({"email": "...", "password": "..."})
|
|
117
|
+
|
|
118
|
+
# Sign in
|
|
119
|
+
supabase.auth.sign_in_with_password({"email": "...", "password": "..."})
|
|
120
|
+
|
|
121
|
+
# Sign out
|
|
122
|
+
supabase.auth.sign_out()
|
|
123
|
+
|
|
124
|
+
# Get user
|
|
125
|
+
user = supabase.auth.get_user()
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Gotchas
|
|
129
|
+
1. Usar service key para operacoes admin
|
|
130
|
+
2. RLS (Row Level Security) afeta queries com api key
|
|
131
|
+
3. Timestamps em ISO 8601
|
|
132
|
+
4. UUIDs para IDs
|
|
133
|
+
|
|
134
|
+
## Patterns
|
|
135
|
+
|
|
136
|
+
### Upsert
|
|
137
|
+
```python
|
|
138
|
+
data = supabase.table("tabela").upsert({
|
|
139
|
+
"id": 123,
|
|
140
|
+
"coluna": "valor"
|
|
141
|
+
}).execute()
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Count
|
|
145
|
+
```python
|
|
146
|
+
count = supabase.table("tabela").select("*", count="exact").execute()
|
|
147
|
+
print(count.count)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
*Contexto carregado automaticamente quando detectado uso de Supabase.*
|