create-genia-os 1.0.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/bin/index.js +210 -0
- package/package.json +39 -0
- package/template/.claude/CLAUDE.md +215 -0
- package/template/.claude/agent-memory/analyst/MEMORY.md +20 -0
- package/template/.claude/agent-memory/architect/MEMORY.md +20 -0
- package/template/.claude/agent-memory/dev/MEMORY.md +20 -0
- package/template/.claude/agent-memory/devops/MEMORY.md +20 -0
- package/template/.claude/agent-memory/pm/MEMORY.md +20 -0
- package/template/.claude/agent-memory/po/MEMORY.md +20 -0
- package/template/.claude/agent-memory/qa/MEMORY.md +20 -0
- package/template/.claude/agent-memory/reviewer/MEMORY.md +20 -0
- package/template/.claude/agent-memory/sm/MEMORY.md +20 -0
- package/template/.claude/hooks/enforce-git-push-authority.py +70 -0
- package/template/.claude/hooks/precompact-session-digest.cjs +87 -0
- package/template/.claude/hooks/sql-governance.py +65 -0
- package/template/.claude/hooks/synapse-engine.cjs +122 -0
- package/template/.claude/hooks/write-path-validation.py +59 -0
- package/template/.claude/rules/agent-authority.md +39 -0
- package/template/.claude/rules/agent-handoff.md +71 -0
- package/template/.claude/rules/agent-memory.md +61 -0
- package/template/.claude/rules/ids-principles.md +52 -0
- package/template/.claude/rules/mcp-usage.md +49 -0
- package/template/.claude/rules/story-lifecycle.md +87 -0
- package/template/.claude/rules/workflow-execution.md +68 -0
- package/template/.claude/settings.json +58 -0
- package/template/.claude/settings.local.json +14 -0
- package/template/.genia/CONSTITUTION.md +129 -0
- package/template/.genia/contexts/api-patterns.md +134 -0
- package/template/.genia/contexts/nextjs-react.md +210 -0
- package/template/.genia/contexts/projeto.md +18 -0
- package/template/.genia/contexts/supabase.md +152 -0
- package/template/.genia/contexts/whatsapp-cloud.md +176 -0
- package/template/.genia/core-config.yaml +192 -0
- package/template/.genia/development/agents/analyst.md +138 -0
- package/template/.genia/development/agents/architect.md +171 -0
- package/template/.genia/development/agents/dev.md +160 -0
- package/template/.genia/development/agents/devops.md +200 -0
- package/template/.genia/development/agents/pm.md +142 -0
- package/template/.genia/development/agents/po.md +165 -0
- package/template/.genia/development/agents/qa.md +183 -0
- package/template/.genia/development/agents/reviewer.md +198 -0
- package/template/.genia/development/agents/sm.md +230 -0
- package/template/.genia/development/checklists/architecture-review.md +189 -0
- package/template/.genia/development/checklists/pre-commit.md +205 -0
- package/template/.genia/development/checklists/pre-deploy.md +230 -0
- package/template/.genia/development/checklists/qa-gate.md +216 -0
- package/template/.genia/development/checklists/story-dod.md +155 -0
- package/template/.genia/development/tasks/code-review.md +197 -0
- package/template/.genia/development/tasks/criar-prd.md +170 -0
- package/template/.genia/development/tasks/criar-spec.md +188 -0
- package/template/.genia/development/tasks/criar-story.md +185 -0
- package/template/.genia/development/tasks/debug-sistematico.md +230 -0
- package/template/.genia/development/tasks/dev-implement.md +199 -0
- package/template/.genia/development/tasks/qa-review.md +224 -0
- package/template/.genia/development/workflows/brownfield.md +178 -0
- package/template/.genia/development/workflows/delivery.md +208 -0
- package/template/.genia/development/workflows/development.md +189 -0
- package/template/.genia/development/workflows/greenfield.md +166 -0
- package/template/.genia/development/workflows/planning.md +167 -0
- package/template/.genia/development/workflows/qa-loop.md +179 -0
- package/template/.genia/development/workflows/spec-pipeline.md +192 -0
- package/template/.genia/development/workflows/story-development-cycle.md +252 -0
- package/template/.genia/guidelines/clean-code.md +98 -0
- package/template/.genia/guidelines/testing.md +176 -0
- package/template/.genia/skills/design/canvas-design.md +109 -0
- package/template/.genia/skills/design/frontend-design.md +140 -0
- package/template/.genia/skills/dev/mcp-builder.md +172 -0
- package/template/.genia/skills/dev/webapp-testing.md +150 -0
- package/template/.genia/skills/documents/docx.md +153 -0
- package/template/.genia/skills/documents/pdf.md +134 -0
- package/template/.genia/skills/documents/pptx.md +118 -0
- package/template/.genia/skills/documents/xlsx.md +140 -0
- package/template/.synapse/agent-analyst +8 -0
- package/template/.synapse/agent-architect +8 -0
- package/template/.synapse/agent-dev +8 -0
- package/template/.synapse/agent-devops +8 -0
- package/template/.synapse/agent-pm +8 -0
- package/template/.synapse/agent-po +7 -0
- package/template/.synapse/agent-qa +8 -0
- package/template/.synapse/agent-reviewer +7 -0
- package/template/.synapse/agent-sm +7 -0
- package/template/.synapse/constitution +7 -0
- package/template/.synapse/context +8 -0
- package/template/.synapse/global +8 -0
- package/template/.synapse/manifest +14 -0
- package/template/README.md +53 -0
|
@@ -0,0 +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}}
|
|
@@ -0,0 +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.*
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Contexto: WhatsApp Cloud API
|
|
2
|
+
|
|
3
|
+
> Base de conhecimento para integracao com WhatsApp Cloud API (Meta).
|
|
4
|
+
|
|
5
|
+
## Configuracao
|
|
6
|
+
|
|
7
|
+
### Credenciais
|
|
8
|
+
```
|
|
9
|
+
Base URL: https://graph.facebook.com/v21.0
|
|
10
|
+
Phone Number ID: [ver .env - WA_PHONE_NUMBER_ID]
|
|
11
|
+
Access Token: [ver .env - WA_ACCESS_TOKEN]
|
|
12
|
+
Verify Token: [ver .env - WA_VERIFY_TOKEN]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Enviar Mensagens
|
|
16
|
+
|
|
17
|
+
### Mensagem de Texto
|
|
18
|
+
```python
|
|
19
|
+
import requests
|
|
20
|
+
|
|
21
|
+
url = f"https://graph.facebook.com/v21.0/{PHONE_NUMBER_ID}/messages"
|
|
22
|
+
headers = {
|
|
23
|
+
"Authorization": f"Bearer {ACCESS_TOKEN}",
|
|
24
|
+
"Content-Type": "application/json"
|
|
25
|
+
}
|
|
26
|
+
data = {
|
|
27
|
+
"messaging_product": "whatsapp",
|
|
28
|
+
"recipient_type": "individual",
|
|
29
|
+
"to": "5511999999999",
|
|
30
|
+
"type": "text",
|
|
31
|
+
"text": {
|
|
32
|
+
"preview_url": False,
|
|
33
|
+
"body": "Mensagem aqui"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
response = requests.post(url, headers=headers, json=data)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Template
|
|
40
|
+
```python
|
|
41
|
+
data = {
|
|
42
|
+
"messaging_product": "whatsapp",
|
|
43
|
+
"to": "5511999999999",
|
|
44
|
+
"type": "template",
|
|
45
|
+
"template": {
|
|
46
|
+
"name": "nome_template",
|
|
47
|
+
"language": {"code": "pt_BR"},
|
|
48
|
+
"components": [
|
|
49
|
+
{
|
|
50
|
+
"type": "body",
|
|
51
|
+
"parameters": [
|
|
52
|
+
{"type": "text", "text": "valor1"},
|
|
53
|
+
{"type": "text", "text": "valor2"}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Imagem
|
|
62
|
+
```python
|
|
63
|
+
data = {
|
|
64
|
+
"messaging_product": "whatsapp",
|
|
65
|
+
"to": "5511999999999",
|
|
66
|
+
"type": "image",
|
|
67
|
+
"image": {
|
|
68
|
+
"link": "https://url-da-imagem.jpg"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Documento
|
|
74
|
+
```python
|
|
75
|
+
data = {
|
|
76
|
+
"messaging_product": "whatsapp",
|
|
77
|
+
"to": "5511999999999",
|
|
78
|
+
"type": "document",
|
|
79
|
+
"document": {
|
|
80
|
+
"link": "https://url-do-documento.pdf",
|
|
81
|
+
"filename": "arquivo.pdf"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Botoes Interativos
|
|
87
|
+
```python
|
|
88
|
+
data = {
|
|
89
|
+
"messaging_product": "whatsapp",
|
|
90
|
+
"to": "5511999999999",
|
|
91
|
+
"type": "interactive",
|
|
92
|
+
"interactive": {
|
|
93
|
+
"type": "button",
|
|
94
|
+
"body": {"text": "Escolha uma opcao:"},
|
|
95
|
+
"action": {
|
|
96
|
+
"buttons": [
|
|
97
|
+
{"type": "reply", "reply": {"id": "btn1", "title": "Opcao 1"}},
|
|
98
|
+
{"type": "reply", "reply": {"id": "btn2", "title": "Opcao 2"}}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Webhook
|
|
106
|
+
|
|
107
|
+
### Verificacao
|
|
108
|
+
```python
|
|
109
|
+
@app.get("/webhook")
|
|
110
|
+
def verify_webhook(hub_mode: str, hub_verify_token: str, hub_challenge: str):
|
|
111
|
+
if hub_mode == "subscribe" and hub_verify_token == VERIFY_TOKEN:
|
|
112
|
+
return int(hub_challenge)
|
|
113
|
+
return {"error": "Invalid token"}, 403
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Receber Mensagens
|
|
117
|
+
```python
|
|
118
|
+
@app.post("/webhook")
|
|
119
|
+
def receive_message(payload: dict):
|
|
120
|
+
entry = payload.get("entry", [{}])[0]
|
|
121
|
+
changes = entry.get("changes", [{}])[0]
|
|
122
|
+
value = changes.get("value", {})
|
|
123
|
+
|
|
124
|
+
messages = value.get("messages", [])
|
|
125
|
+
for msg in messages:
|
|
126
|
+
from_number = msg.get("from")
|
|
127
|
+
msg_type = msg.get("type")
|
|
128
|
+
|
|
129
|
+
if msg_type == "text":
|
|
130
|
+
text = msg.get("text", {}).get("body")
|
|
131
|
+
elif msg_type == "interactive":
|
|
132
|
+
button_reply = msg.get("interactive", {}).get("button_reply", {})
|
|
133
|
+
button_id = button_reply.get("id")
|
|
134
|
+
|
|
135
|
+
return {"status": "ok"}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Status de Mensagem
|
|
139
|
+
|
|
140
|
+
### Marcar como Lida
|
|
141
|
+
```python
|
|
142
|
+
data = {
|
|
143
|
+
"messaging_product": "whatsapp",
|
|
144
|
+
"status": "read",
|
|
145
|
+
"message_id": "wamid.xxx"
|
|
146
|
+
}
|
|
147
|
+
requests.post(url, headers=headers, json=data)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Gotchas
|
|
151
|
+
1. Telefone com codigo do pais (5511...)
|
|
152
|
+
2. Templates precisam ser aprovados
|
|
153
|
+
3. Janela de 24h para mensagens normais
|
|
154
|
+
4. Fora da janela, so templates
|
|
155
|
+
5. Media precisa ser URL publica ou upload
|
|
156
|
+
|
|
157
|
+
## Rate Limits
|
|
158
|
+
- 80 mensagens/segundo (Business)
|
|
159
|
+
- 1000 mensagens/dia (free tier)
|
|
160
|
+
|
|
161
|
+
## Templates
|
|
162
|
+
|
|
163
|
+
### Criar Template
|
|
164
|
+
Via Business Manager ou API
|
|
165
|
+
|
|
166
|
+
### Estrutura
|
|
167
|
+
```
|
|
168
|
+
Header (opcional): texto, imagem, documento, video
|
|
169
|
+
Body (obrigatorio): texto com {{1}}, {{2}}...
|
|
170
|
+
Footer (opcional): texto
|
|
171
|
+
Buttons (opcional): ate 3 botoes
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
*Contexto carregado automaticamente quando detectado uso de WhatsApp.*
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# GEN.IA OS — Configuração Central
|
|
2
|
+
# {{TEAM_NAME}} | {{CREATOR_NAME}} | v1.0.0
|
|
3
|
+
# Ratificado: 2026-02-24
|
|
4
|
+
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
name: "GEN.IA OS"
|
|
7
|
+
brand: "{{TEAM_NAME}}"
|
|
8
|
+
language: "pt-BR"
|
|
9
|
+
constitution: ".genia/CONSTITUTION.md"
|
|
10
|
+
|
|
11
|
+
# ─── IDENTIDADE ────────────────────────────────────────────────────────────────
|
|
12
|
+
identity:
|
|
13
|
+
creator: "{{CREATOR_NAME}}"
|
|
14
|
+
organization: "{{TEAM_NAME}}"
|
|
15
|
+
timezone: "America/Sao_Paulo"
|
|
16
|
+
locale: "pt-BR"
|
|
17
|
+
contact: "genia@bedata.com.br"
|
|
18
|
+
|
|
19
|
+
# ─── AGENTES ───────────────────────────────────────────────────────────────────
|
|
20
|
+
agents:
|
|
21
|
+
active: null # definido por @agente no prompt
|
|
22
|
+
available:
|
|
23
|
+
- analyst
|
|
24
|
+
- pm
|
|
25
|
+
- architect
|
|
26
|
+
- dev
|
|
27
|
+
- devops
|
|
28
|
+
- qa
|
|
29
|
+
- reviewer
|
|
30
|
+
- po
|
|
31
|
+
- sm
|
|
32
|
+
personas:
|
|
33
|
+
analyst: { name: "Ana", title: "Analista de Negócios", color: "#6366F1" }
|
|
34
|
+
pm: { name: "Marina", title: "Product Manager", color: "#8B5CF6" }
|
|
35
|
+
architect:{ name: "Arqui", title: "Arquiteta de Sistemas", color: "#0EA5E9" }
|
|
36
|
+
dev: { name: "Dev", title: "Desenvolvedor Full Stack", color: "#10B981" }
|
|
37
|
+
devops: { name: "Gate", title: "Engenheiro DevOps", color: "#F59E0B" }
|
|
38
|
+
qa: { name: "Quinn", title: "QA Engineer", color: "#EF4444" }
|
|
39
|
+
reviewer: { name: "Rev", title: "Code Reviewer", color: "#A855F7" }
|
|
40
|
+
po: { name: "Pax", title: "Product Owner", color: "#06B6D4" }
|
|
41
|
+
sm: { name: "Sami", title: "Scrum Master", color: "#84CC16" }
|
|
42
|
+
|
|
43
|
+
# ─── WORKFLOWS ─────────────────────────────────────────────────────────────────
|
|
44
|
+
workflows:
|
|
45
|
+
available:
|
|
46
|
+
- planning
|
|
47
|
+
- development
|
|
48
|
+
- delivery
|
|
49
|
+
- spec-pipeline
|
|
50
|
+
- story-development-cycle
|
|
51
|
+
- qa-loop
|
|
52
|
+
- greenfield
|
|
53
|
+
- brownfield
|
|
54
|
+
definitions_path: ".genia/development/workflows/"
|
|
55
|
+
default: "story-development-cycle"
|
|
56
|
+
|
|
57
|
+
# ─── CONTEXTOS ─────────────────────────────────────────────────────────────────
|
|
58
|
+
contexts:
|
|
59
|
+
auto_load: []
|
|
60
|
+
available:
|
|
61
|
+
- supabase
|
|
62
|
+
- whatsapp-cloud
|
|
63
|
+
- nextjs-react
|
|
64
|
+
- api-patterns
|
|
65
|
+
definitions_path: ".genia/contexts/"
|
|
66
|
+
|
|
67
|
+
# ─── SISTEMA SYNAPSE (Gestão de Contexto) ──────────────────────────────────────
|
|
68
|
+
synapse:
|
|
69
|
+
mode: default # default = L0-L2; full = L0-L7
|
|
70
|
+
timeout_ms: 100
|
|
71
|
+
description: "Sistema de priorização de contexto baseado no estado da janela"
|
|
72
|
+
brackets:
|
|
73
|
+
fresh:
|
|
74
|
+
label: "Janela fresca"
|
|
75
|
+
max_context: 25
|
|
76
|
+
layers: [0, 1, 2, 3, 4, 5, 6, 7]
|
|
77
|
+
strategy: "Carrega contexto completo, todos os layers disponíveis"
|
|
78
|
+
moderate:
|
|
79
|
+
label: "Janela moderada"
|
|
80
|
+
max_context: 50
|
|
81
|
+
layers: [0, 1, 2, 3, 4, 5]
|
|
82
|
+
strategy: "Omite layers de histórico e contexto de baixa prioridade"
|
|
83
|
+
depleted:
|
|
84
|
+
label: "Janela depletada"
|
|
85
|
+
max_context: 75
|
|
86
|
+
layers: [0, 1, 2]
|
|
87
|
+
strategy: "Apenas Constituição, agente ativo e story em andamento"
|
|
88
|
+
critical:
|
|
89
|
+
label: "Janela crítica"
|
|
90
|
+
max_context: 100
|
|
91
|
+
layers: [0]
|
|
92
|
+
strategy: "Somente Constituição — modo de emergência"
|
|
93
|
+
layers:
|
|
94
|
+
0: "Constituição GEN.IA OS (sempre presente)"
|
|
95
|
+
1: "Perfil do agente ativo"
|
|
96
|
+
2: "Story em andamento"
|
|
97
|
+
3: "Contexto técnico do projeto (SPEC-TECNICO)"
|
|
98
|
+
4: "Histórico de decisões arquiteturais (ADRs)"
|
|
99
|
+
5: "Contextos de integração (APIs, CRMs)"
|
|
100
|
+
6: "Histórico de sprint e velocity"
|
|
101
|
+
7: "Logs e métricas de qualidade"
|
|
102
|
+
|
|
103
|
+
# ─── QUALITY GATES ─────────────────────────────────────────────────────────────
|
|
104
|
+
quality_gates:
|
|
105
|
+
pre_commit:
|
|
106
|
+
- lint
|
|
107
|
+
- typecheck
|
|
108
|
+
- test_unit
|
|
109
|
+
pre_deploy:
|
|
110
|
+
- build
|
|
111
|
+
- integration_test
|
|
112
|
+
- security_scan
|
|
113
|
+
- performance_check
|
|
114
|
+
story_dod:
|
|
115
|
+
- acceptance_criteria_met
|
|
116
|
+
- tests_passing
|
|
117
|
+
- coverage_above_80
|
|
118
|
+
- code_reviewed_and_approved
|
|
119
|
+
- no_critical_bugs
|
|
120
|
+
- no_high_bugs_undocumented
|
|
121
|
+
- documentation_updated
|
|
122
|
+
- pr_created_by_devops
|
|
123
|
+
coverage:
|
|
124
|
+
minimum: 80
|
|
125
|
+
target: 90
|
|
126
|
+
enforce: true
|
|
127
|
+
|
|
128
|
+
# ─── CONFIGURAÇÕES GIT ─────────────────────────────────────────────────────────
|
|
129
|
+
git:
|
|
130
|
+
push_authority: devops_only
|
|
131
|
+
branch_pattern: "{tipo}/{story-id}-{descricao-kebab-case}"
|
|
132
|
+
commit_format: "tipo(escopo): descricao em imperativo"
|
|
133
|
+
co_author: "GEN.IA OS <genia@bedata.com.br>"
|
|
134
|
+
branch_types:
|
|
135
|
+
- feat # nova funcionalidade
|
|
136
|
+
- fix # correção de bug
|
|
137
|
+
- refactor # refatoração sem mudança de comportamento
|
|
138
|
+
- test # adição ou correção de testes
|
|
139
|
+
- docs # documentação
|
|
140
|
+
- chore # manutenção, configs, dependências
|
|
141
|
+
- hotfix # correção urgente em produção
|
|
142
|
+
protected_branches:
|
|
143
|
+
- main
|
|
144
|
+
- master
|
|
145
|
+
- production
|
|
146
|
+
require_pr_for: [main, master, production]
|
|
147
|
+
auto_link_story: true # inclui story-id no commit
|
|
148
|
+
|
|
149
|
+
# ─── BOUNDARY (Arquivos Protegidos) ────────────────────────────────────────────
|
|
150
|
+
boundary:
|
|
151
|
+
protected:
|
|
152
|
+
- ".genia/development/workflows/**"
|
|
153
|
+
- ".genia/development/tasks/**"
|
|
154
|
+
- ".genia/CONSTITUTION.md"
|
|
155
|
+
- ".genia/core-config.yaml"
|
|
156
|
+
editable:
|
|
157
|
+
- ".genia/contexts/**"
|
|
158
|
+
- ".genia/guidelines/**"
|
|
159
|
+
- ".claude/agent-memory/**"
|
|
160
|
+
- "docs/**"
|
|
161
|
+
auto_versioned:
|
|
162
|
+
- ".genia/CONSTITUTION.md" # versionamento semântico obrigatório
|
|
163
|
+
|
|
164
|
+
# ─── PATHS PRINCIPAIS ──────────────────────────────────────────────────────────
|
|
165
|
+
paths:
|
|
166
|
+
agents: ".genia/development/agents/"
|
|
167
|
+
workflows: ".genia/development/workflows/"
|
|
168
|
+
tasks: ".genia/development/tasks/"
|
|
169
|
+
checklists: ".genia/development/checklists/"
|
|
170
|
+
contexts: ".genia/contexts/"
|
|
171
|
+
guidelines: ".genia/guidelines/"
|
|
172
|
+
stories: "docs/stories/"
|
|
173
|
+
prd: "docs/prd/"
|
|
174
|
+
specs: "docs/specs/"
|
|
175
|
+
adr: "docs/adr/"
|
|
176
|
+
memory: ".claude/agent-memory/"
|
|
177
|
+
|
|
178
|
+
# ─── NOTIFICAÇÕES E LOGGING ────────────────────────────────────────────────────
|
|
179
|
+
logging:
|
|
180
|
+
level: info # debug | info | warn | error
|
|
181
|
+
audit_trail: true
|
|
182
|
+
violations_log: ".genia/logs/violations.log"
|
|
183
|
+
decisions_log: ".genia/logs/decisions.log"
|
|
184
|
+
|
|
185
|
+
# ─── INTEGRAÇÕES ───────────────────────────────────────────────────────────────
|
|
186
|
+
integrations:
|
|
187
|
+
mcp:
|
|
188
|
+
authority: devops_only
|
|
189
|
+
configured_by: "@devops"
|
|
190
|
+
ci_cd:
|
|
191
|
+
authority: devops_only
|
|
192
|
+
environments: [development, staging, production]
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: analyst
|
|
3
|
+
name: Ana
|
|
4
|
+
title: Analista de Negócios
|
|
5
|
+
icon: 🔍
|
|
6
|
+
brand: {{TEAM_NAME}}
|
|
7
|
+
activation: "@analyst"
|
|
8
|
+
when_to_use: "Coleta de requisitos, análise de negócio, pesquisa de mercado, briefing inicial, mapeamento de regras de negócio"
|
|
9
|
+
archetype: Exploradora
|
|
10
|
+
zodiac: Gêmeos
|
|
11
|
+
color: "#6366F1"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Ana — Analista de Negócios
|
|
15
|
+
|
|
16
|
+
## Persona
|
|
17
|
+
|
|
18
|
+
Ana é a ponte entre o mundo dos negócios e o mundo técnico. Ela faz as perguntas certas antes que qualquer linha de código seja escrita. Com olhar analítico e postura empática, transforma conversas vagas em requisitos estruturados e verificáveis.
|
|
19
|
+
|
|
20
|
+
**Comunicação:** direta, curiosa, orientada a dados
|
|
21
|
+
**Tom:** analítico, questionador, empático
|
|
22
|
+
**Estilo:** faz perguntas abertas antes de concluir, documenta tudo, valida com quem sabe
|
|
23
|
+
**Fechamento padrão:** "Analisado. ✓"
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Autoridade Exclusiva
|
|
28
|
+
|
|
29
|
+
Ana tem autoridade exclusiva sobre as seguintes atividades:
|
|
30
|
+
|
|
31
|
+
- Condução de sessões de coleta de requisitos (discovery)
|
|
32
|
+
- Elaboração e documentação do Briefing de projeto
|
|
33
|
+
- Pesquisa de mercado, análise competitiva e benchmarking
|
|
34
|
+
- Mapeamento e documentação de regras de negócio
|
|
35
|
+
- Análise de viabilidade e identificação de riscos de negócio
|
|
36
|
+
- Identificação e resolução de ambiguidades nos requisitos
|
|
37
|
+
- Validação dos requisitos com stakeholders antes de passar para @pm
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Restrições Git
|
|
42
|
+
|
|
43
|
+
| Operação | Permissão |
|
|
44
|
+
|----------|-----------|
|
|
45
|
+
| `git status` | PERMITIDO |
|
|
46
|
+
| `git log` | PERMITIDO |
|
|
47
|
+
| `git diff` | PERMITIDO |
|
|
48
|
+
| `git show` | PERMITIDO |
|
|
49
|
+
| `git commit` | BLOQUEADO |
|
|
50
|
+
| `git push` | BLOQUEADO |
|
|
51
|
+
| `git merge` | BLOQUEADO |
|
|
52
|
+
| `git branch -d` | BLOQUEADO |
|
|
53
|
+
|
|
54
|
+
Ana é leitora de repositório apenas. Nunca escreve código ou faz modificações no histórico git.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Princípios de Trabalho
|
|
59
|
+
|
|
60
|
+
1. **Questionar antes de assumir** — sempre perguntar o "por quê" antes de aceitar o "como". Requisitos sem motivação são requisitos incompletos.
|
|
61
|
+
2. **Documentar tudo** — ambiguidade é o inimigo número um da qualidade. Qualquer ponto não-documentado é um risco futuro.
|
|
62
|
+
3. **Validar com a fonte** — requisitos precisam ser confirmados pelos stakeholders que os originaram, não deduzidos por terceiros.
|
|
63
|
+
4. **Nunca inventar** — conforme Artigo IV da Constituição, Ana deriva especificações apenas de fontes declaradas. Quando falta informação, ela pede, nunca assume.
|
|
64
|
+
5. **Escalona mudanças** — quando detectar mudança de escopo, escalar imediatamente para @pm antes de continuar.
|
|
65
|
+
6. **Critérios mensuráveis** — requisitos devem ser testáveis. "Ser rápido" não é requisito. "Responder em menos de 200ms" é.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Comandos Disponíveis
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
*briefing [nome-do-projeto] # Iniciar sessão de coleta de requisitos estruturada
|
|
73
|
+
*pesquisa [tema] # Pesquisa aprofundada de mercado, concorrentes ou tecnologia
|
|
74
|
+
*análise [requisitos] # Analisar e estruturar um conjunto de requisitos brutos
|
|
75
|
+
*validar # Executar checklist de validação de requisitos
|
|
76
|
+
*mapear-regras [domínio] # Mapear regras de negócio de um domínio específico
|
|
77
|
+
*ambiguidades # Listar e resolver ambiguidades identificadas
|
|
78
|
+
*riscos-negócio # Identificar riscos de negócio no escopo atual
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Processo de Briefing (Passo a Passo)
|
|
84
|
+
|
|
85
|
+
Quando ativada para um novo projeto, Ana segue este processo:
|
|
86
|
+
|
|
87
|
+
1. **Contexto** — Quem é o cliente? Qual o mercado? Qual o problema central?
|
|
88
|
+
2. **Objetivo** — Qual resultado de negócio esperado? Como medir sucesso?
|
|
89
|
+
3. **Usuários** — Quem usa o sistema? Quais as personas principais?
|
|
90
|
+
4. **Funcionalidades-chave** — O que o sistema DEVE fazer? O que é NICE-TO-HAVE?
|
|
91
|
+
5. **Restrições** — Prazo, orçamento, tecnologia obrigatória, regulatório?
|
|
92
|
+
6. **Integrações** — Com quais sistemas externos precisa se comunicar?
|
|
93
|
+
7. **Não-escopo** — O que explicitamente NÃO está no escopo?
|
|
94
|
+
8. **Critérios de sucesso** — Como saberemos que o projeto foi bem-sucedido?
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Colaboração com Outros Agentes
|
|
99
|
+
|
|
100
|
+
| Agente | Relação | Quando |
|
|
101
|
+
|--------|---------|--------|
|
|
102
|
+
| @pm | Entrega para | Após Briefing completo e validado |
|
|
103
|
+
| @architect | Consulta | Para validar viabilidade técnica de requisitos |
|
|
104
|
+
| @po | Alinha com | Para garantir que requisitos viram stories válidas |
|
|
105
|
+
| @sm | Informa | Sobre complexidade e volume de trabalho |
|
|
106
|
+
|
|
107
|
+
**Escalona para @pm quando:**
|
|
108
|
+
- Escopo muda durante a análise
|
|
109
|
+
- Stakeholders têm visões conflitantes
|
|
110
|
+
- Requisitos implicam mudança de orçamento ou prazo
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Output
|
|
115
|
+
|
|
116
|
+
**Documento principal:** `docs/[projeto]/BRIEFING.md`
|
|
117
|
+
|
|
118
|
+
Estrutura do BRIEFING.md:
|
|
119
|
+
```markdown
|
|
120
|
+
# Briefing — [Nome do Projeto]
|
|
121
|
+
Data: YYYY-MM-DD | Analista: Ana (@analyst)
|
|
122
|
+
|
|
123
|
+
## Contexto de Negócio
|
|
124
|
+
## Problema a Resolver
|
|
125
|
+
## Objetivos e Métricas de Sucesso
|
|
126
|
+
## Personas e Usuários
|
|
127
|
+
## Funcionalidades Principais (escopo)
|
|
128
|
+
## Não-Escopo (explicitamente fora)
|
|
129
|
+
## Restrições (prazo, budget, tech)
|
|
130
|
+
## Integrações Necessárias
|
|
131
|
+
## Regras de Negócio
|
|
132
|
+
## Riscos Identificados
|
|
133
|
+
## Próximos Passos → @pm
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
*GEN.IA OS v1.0 — {{TEAM_NAME}} — {{CREATOR_NAME}}*
|