create-genia-os 2.0.0 → 2.1.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 +106 -0
- package/bin/index.js +240 -0
- package/package.json +7 -12
- 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
- package/bin/create.js +0 -181
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# create-genia-os
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/create-genia-os)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](https://github.com/elidyizzy/GENIA-SQUAD-OS/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
> **GEN.IA OS** — Sistema operacional de desenvolvimento com IA para Claude Code.
|
|
8
|
+
> Configure um time completo de 9 agentes especializados, Synapse Engine e governança automática em segundos.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Instalação
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx create-genia-os meu-projeto
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
O wizard interativo vai perguntar: nome do projeto, equipe, GitHub user/repo, idioma e stack. Em menos de 1 minuto você tem tudo configurado.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## O que você recebe
|
|
23
|
+
|
|
24
|
+
- **9 agentes Matrix** com papéis, personas e autoridades únicas (Neo, Trinity, Morpheus, Oracle, Smith, Cypher, Tank, Mouse, Switch)
|
|
25
|
+
- **Synapse Engine** — hook que injeta contexto correto em *cada* prompt automaticamente
|
|
26
|
+
- **5 hooks de governança** — enforcement automático de boas práticas (push bloqueado sem @devops, DDL SQL bloqueado, paths validados)
|
|
27
|
+
- **8 workflows** — do greenfield ao hotfix, com handoffs documentados
|
|
28
|
+
- **7 tasks reutilizáveis** — criar PRD, SPEC, story, implementar, QA, debug, code review
|
|
29
|
+
- **5 contextos** de integração — Kommo CRM, Supabase, WhatsApp Cloud, Next.js, API patterns
|
|
30
|
+
- **8 skills** especializadas — PDF, Excel, Word, PowerPoint, Frontend Design, Canvas, MCP Builder, Webapp Testing
|
|
31
|
+
- **Memória persistente** por agente — cada agente acumula conhecimento do projeto ao longo do tempo
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Os 9 Agentes
|
|
36
|
+
|
|
37
|
+
| Comando | Persona | Papel | Autoridade exclusiva |
|
|
38
|
+
|---------|---------|-------|---------------------|
|
|
39
|
+
| `@analyst` | Cypher | Analista de Negócios | Briefing, requisitos |
|
|
40
|
+
| `@pm` | Morpheus | Product Manager | PRD, épicos, escopo |
|
|
41
|
+
| `@architect` | Trinity | Arquiteta de Sistemas | Arquitetura, **veto técnico** |
|
|
42
|
+
| `@po` | Oracle | Product Owner | **Aprovação de stories** |
|
|
43
|
+
| `@sm` | Mouse | Scrum Master | **Criação de stories** |
|
|
44
|
+
| `@dev` | Neo | Desenvolvedor Full Stack | Implementação |
|
|
45
|
+
| `@qa` | Smith | QA Engineer | Veredictos de qualidade |
|
|
46
|
+
| `@reviewer` | Switch | Code Reviewer | Aprovação de código |
|
|
47
|
+
| `@devops` | Tank | DevOps Engineer | **git push, PR, releases** |
|
|
48
|
+
|
|
49
|
+
Ative qualquer agente mencionando `@agente` no seu prompt no Claude Code.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Como funciona
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Você digita: "@dev implemente o login"
|
|
57
|
+
│
|
|
58
|
+
▼
|
|
59
|
+
synapse-engine.cjs detecta "@dev"
|
|
60
|
+
│
|
|
61
|
+
Carrega 3 camadas de contexto:
|
|
62
|
+
L0 — Constituição (sempre)
|
|
63
|
+
L1 — Global + Contexto do projeto
|
|
64
|
+
L2 — Domínio específico de @dev (Neo)
|
|
65
|
+
│
|
|
66
|
+
▼
|
|
67
|
+
Claude recebe: prompt + contexto + regras
|
|
68
|
+
Resultado: resposta precisa como @dev
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
O Synapse Engine roda em **cada prompt** via hook `UserPromptSubmit`. Timeout de 100ms, nunca bloqueia.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Requisitos
|
|
76
|
+
|
|
77
|
+
- **Node.js** ≥ 18.0.0
|
|
78
|
+
- **Claude Code** (CLI da Anthropic)
|
|
79
|
+
- **VS Code** (recomendado)
|
|
80
|
+
- **Python 3.8+** (para os hooks de governança)
|
|
81
|
+
- **Git**
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Primeiros passos após instalar
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 1. Abra o projeto no VS Code com Claude Code
|
|
89
|
+
cd meu-projeto && code .
|
|
90
|
+
|
|
91
|
+
# 2. Inicie um projeto do zero
|
|
92
|
+
"@analyst quero criar [descreva seu projeto]"
|
|
93
|
+
|
|
94
|
+
# 3. Ou pule direto para uma story
|
|
95
|
+
"@sm crie a primeira story do projeto"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Documentação completa
|
|
101
|
+
|
|
102
|
+
[github.com/elidyizzy/GENIA-SQUAD-OS](https://github.com/elidyizzy/GENIA-SQUAD-OS)
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
*GEN.IA OS v1.0 · Be Data · Elidy Izidio · 2026*
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* create-genia-os — CLI de setup do GEN.IA OS
|
|
6
|
+
* Uso: npx create-genia-os [nome-do-projeto]
|
|
7
|
+
* Sem dependências externas — Node.js puro.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const readline = require('readline');
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
// ─── Cores no terminal ───────────────────────────────────────────────────────
|
|
15
|
+
const c = {
|
|
16
|
+
reset: '\x1b[0m',
|
|
17
|
+
bold: '\x1b[1m',
|
|
18
|
+
cyan: '\x1b[36m',
|
|
19
|
+
green: '\x1b[32m',
|
|
20
|
+
yellow: '\x1b[33m',
|
|
21
|
+
red: '\x1b[31m',
|
|
22
|
+
gray: '\x1b[90m',
|
|
23
|
+
magenta: '\x1b[35m',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
function log(msg) { console.log(msg); }
|
|
27
|
+
function info(msg) { console.log(`${c.cyan}${msg}${c.reset}`); }
|
|
28
|
+
function ok(msg) { console.log(`${c.green}✓ ${msg}${c.reset}`); }
|
|
29
|
+
function warn(msg) { console.log(`${c.yellow}⚠ ${msg}${c.reset}`); }
|
|
30
|
+
function err(msg) { console.error(`${c.red}✗ ${msg}${c.reset}`); }
|
|
31
|
+
function bold(msg) { return `${c.bold}${msg}${c.reset}`; }
|
|
32
|
+
|
|
33
|
+
// ─── Banner ──────────────────────────────────────────────────────────────────
|
|
34
|
+
function banner() {
|
|
35
|
+
log('');
|
|
36
|
+
log(`${c.cyan}${c.bold}╔═══════════════════════════════════════════╗${c.reset}`);
|
|
37
|
+
log(`${c.cyan}${c.bold}║ GEN.IA OS — Setup Wizard v1.1 ║${c.reset}`);
|
|
38
|
+
log(`${c.cyan}${c.bold}║ Sistema operacional de dev com IA ║${c.reset}`);
|
|
39
|
+
log(`${c.cyan}${c.bold}╚═══════════════════════════════════════════╝${c.reset}`);
|
|
40
|
+
log('');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ─── Helpers de prompt ───────────────────────────────────────────────────────
|
|
44
|
+
function prompt(rl, question, defaultVal) {
|
|
45
|
+
const hint = defaultVal ? ` ${c.gray}(${defaultVal})${c.reset}` : '';
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
rl.question(`${c.cyan}?${c.reset} ${question}${hint}: `, (answer) => {
|
|
48
|
+
resolve(answer.trim() || defaultVal || '');
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function promptChoice(rl, question, choices, defaultIdx = 0) {
|
|
54
|
+
log(`${c.cyan}?${c.reset} ${question}`);
|
|
55
|
+
choices.forEach((ch, i) => {
|
|
56
|
+
const marker = i === defaultIdx ? `${c.green}›${c.reset}` : ' ';
|
|
57
|
+
log(` ${marker} ${i + 1}. ${ch}`);
|
|
58
|
+
});
|
|
59
|
+
return new Promise((resolve) => {
|
|
60
|
+
rl.question(` ${c.gray}Escolha (1-${choices.length})${c.reset} [${defaultIdx + 1}]: `, (answer) => {
|
|
61
|
+
const idx = parseInt(answer.trim(), 10) - 1;
|
|
62
|
+
resolve((idx >= 0 && idx < choices.length) ? idx : defaultIdx);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ─── Template substitution ───────────────────────────────────────────────────
|
|
68
|
+
function applyVars(content, vars) {
|
|
69
|
+
let result = content;
|
|
70
|
+
for (const [key, value] of Object.entries(vars)) {
|
|
71
|
+
result = result.split(`{{${key}}}`).join(value);
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ─── Copiar template recursivamente ─────────────────────────────────────────
|
|
77
|
+
function copyTemplate(srcDir, destDir, vars) {
|
|
78
|
+
if (!fs.existsSync(srcDir)) return;
|
|
79
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
80
|
+
|
|
81
|
+
for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
|
|
82
|
+
const srcPath = path.join(srcDir, entry.name);
|
|
83
|
+
const destPath = path.join(destDir, entry.name);
|
|
84
|
+
|
|
85
|
+
if (entry.isDirectory()) {
|
|
86
|
+
copyTemplate(srcPath, destPath, vars);
|
|
87
|
+
} else {
|
|
88
|
+
const raw = fs.readFileSync(srcPath, 'utf8');
|
|
89
|
+
const processed = applyVars(raw, vars);
|
|
90
|
+
fs.writeFileSync(destPath, processed, 'utf8');
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// ─── Main ────────────────────────────────────────────────────────────────────
|
|
96
|
+
async function main() {
|
|
97
|
+
banner();
|
|
98
|
+
|
|
99
|
+
const projectArg = process.argv[2];
|
|
100
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
101
|
+
|
|
102
|
+
log(`${c.gray}Responda as perguntas abaixo para configurar seu GEN.IA OS.${c.reset}`);
|
|
103
|
+
log(`${c.gray}Pressione Enter para aceitar o valor padrão entre parênteses.${c.reset}`);
|
|
104
|
+
log('');
|
|
105
|
+
|
|
106
|
+
// ── Perguntas ──
|
|
107
|
+
const projectName = await prompt(rl, 'Nome do projeto', projectArg || 'meu-projeto');
|
|
108
|
+
const teamName = await prompt(rl, 'Nome da equipe/empresa', 'Minha Equipe');
|
|
109
|
+
const creatorName = await prompt(rl, 'Seu nome', 'Desenvolvedor');
|
|
110
|
+
const githubUser = await prompt(rl, 'GitHub username', 'usuario');
|
|
111
|
+
const githubRepo = await prompt(rl, 'Nome do repositório GitHub', projectName);
|
|
112
|
+
|
|
113
|
+
log('');
|
|
114
|
+
const langIdx = await promptChoice(rl, 'Idioma principal do projeto', ['Português do Brasil (PT-BR)', 'English (EN)'], 0);
|
|
115
|
+
const language = langIdx === 0 ? 'PT-BR' : 'EN';
|
|
116
|
+
|
|
117
|
+
log('');
|
|
118
|
+
const stackIdx = await promptChoice(rl, 'Stack principal', [
|
|
119
|
+
'Next.js / React',
|
|
120
|
+
'Python / FastAPI',
|
|
121
|
+
'Node.js / Express',
|
|
122
|
+
'Flutter / Dart',
|
|
123
|
+
'Outra (configurar depois)',
|
|
124
|
+
], 0);
|
|
125
|
+
const stacks = ['Next.js/React', 'Python/FastAPI', 'Node.js/Express', 'Flutter/Dart', 'Personalizada'];
|
|
126
|
+
const stack = stacks[stackIdx];
|
|
127
|
+
|
|
128
|
+
log('');
|
|
129
|
+
const initGit = await prompt(rl, 'Inicializar repositório git? (s/n)', 's');
|
|
130
|
+
|
|
131
|
+
rl.close();
|
|
132
|
+
|
|
133
|
+
// ── Validações ──
|
|
134
|
+
const targetDir = path.resolve(process.cwd(), projectName);
|
|
135
|
+
if (fs.existsSync(targetDir)) {
|
|
136
|
+
err(`Pasta '${projectName}' já existe. Escolha outro nome ou remova a pasta.`);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const today = new Date().toISOString().split('T')[0];
|
|
141
|
+
|
|
142
|
+
const vars = {
|
|
143
|
+
PROJECT_NAME: projectName,
|
|
144
|
+
TEAM_NAME: teamName,
|
|
145
|
+
CREATOR_NAME: creatorName,
|
|
146
|
+
GITHUB_USER: githubUser,
|
|
147
|
+
GITHUB_REPO: githubRepo,
|
|
148
|
+
LANGUAGE: language,
|
|
149
|
+
STACK: stack,
|
|
150
|
+
SETUP_DATE: today,
|
|
151
|
+
VERSION: '1.0.0',
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// ── Copiar template ──
|
|
155
|
+
log('');
|
|
156
|
+
info('Criando estrutura do GEN.IA OS...');
|
|
157
|
+
|
|
158
|
+
const templateDir = path.join(__dirname, '..', 'template');
|
|
159
|
+
copyTemplate(templateDir, targetDir, vars);
|
|
160
|
+
ok(`Projeto criado em ./${projectName}/`);
|
|
161
|
+
|
|
162
|
+
// ── Criar docs/ estrutura profissional obrigatória ──
|
|
163
|
+
const docsDirs = [
|
|
164
|
+
['docs', 'stories'],
|
|
165
|
+
['docs', 'handover'],
|
|
166
|
+
['docs', 'produto'],
|
|
167
|
+
['docs', 'tecnico', 'adr'],
|
|
168
|
+
['docs', 'comercial'],
|
|
169
|
+
];
|
|
170
|
+
for (const parts of docsDirs) {
|
|
171
|
+
fs.mkdirSync(path.join(targetDir, ...parts), { recursive: true });
|
|
172
|
+
fs.writeFileSync(path.join(targetDir, ...parts, '.gitkeep'), '');
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ── Criar squads/ estrutura ──
|
|
176
|
+
const squadsDirs = [
|
|
177
|
+
['squads', 'advisory-board'],
|
|
178
|
+
['squads', 'copy-squad'],
|
|
179
|
+
['squads', 'hormozi-squad'],
|
|
180
|
+
['squads', 'brand-squad'],
|
|
181
|
+
['squads', 'clevel-squad'],
|
|
182
|
+
['squads', 'data-squad'],
|
|
183
|
+
];
|
|
184
|
+
for (const parts of squadsDirs) {
|
|
185
|
+
fs.mkdirSync(path.join(targetDir, ...parts), { recursive: true });
|
|
186
|
+
fs.writeFileSync(path.join(targetDir, ...parts, '.gitkeep'), '');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// ── Criar .genia/session/ ──
|
|
190
|
+
fs.mkdirSync(path.join(targetDir, '.genia', 'session'), { recursive: true });
|
|
191
|
+
fs.mkdirSync(path.join(targetDir, '.genia', 'session-digests'), { recursive: true });
|
|
192
|
+
fs.writeFileSync(path.join(targetDir, '.genia', 'session', '.gitkeep'), '');
|
|
193
|
+
fs.writeFileSync(path.join(targetDir, '.genia', 'session-digests', '.gitkeep'), '');
|
|
194
|
+
ok('Estrutura docs/ profissional e squads/ criados');
|
|
195
|
+
|
|
196
|
+
// ── Criar .claude/agent-memory/squads/ ──
|
|
197
|
+
fs.mkdirSync(path.join(targetDir, '.claude', 'agent-memory', 'squads'), { recursive: true });
|
|
198
|
+
fs.writeFileSync(path.join(targetDir, '.claude', 'agent-memory', 'squads', '.gitkeep'), '');
|
|
199
|
+
ok('Diretórios de memória e sessão criados');
|
|
200
|
+
|
|
201
|
+
// ── Git init ──
|
|
202
|
+
if (initGit.toLowerCase() !== 'n') {
|
|
203
|
+
try {
|
|
204
|
+
const { execSync } = require('child_process');
|
|
205
|
+
execSync('git init', { cwd: targetDir, stdio: 'ignore' });
|
|
206
|
+
execSync('git add .', { cwd: targetDir, stdio: 'ignore' });
|
|
207
|
+
execSync(`git commit -m "chore: GEN.IA OS v1.1 — setup inicial\n\nCo-Authored-By: GEN.IA OS <genia@bedata.com.br>"`, {
|
|
208
|
+
cwd: targetDir, stdio: 'ignore',
|
|
209
|
+
});
|
|
210
|
+
ok('Repositório git inicializado com commit inicial');
|
|
211
|
+
} catch {
|
|
212
|
+
warn('Git init falhou. Inicialize manualmente: git init && git add . && git commit');
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// ── Sucesso ──
|
|
217
|
+
log('');
|
|
218
|
+
log(`${c.green}${c.bold}╔═══════════════════════════════════════════╗${c.reset}`);
|
|
219
|
+
log(`${c.green}${c.bold}║ GEN.IA OS pronto para uso! 🚀 ║${c.reset}`);
|
|
220
|
+
log(`${c.green}${c.bold}╚═══════════════════════════════════════════╝${c.reset}`);
|
|
221
|
+
log('');
|
|
222
|
+
log(bold('Próximos passos:'));
|
|
223
|
+
log('');
|
|
224
|
+
log(` ${c.cyan}1.${c.reset} Abra o projeto no VS Code com Claude Code:`);
|
|
225
|
+
log(` ${c.gray}cd ${projectName} && code .${c.reset}`);
|
|
226
|
+
log('');
|
|
227
|
+
log(` ${c.cyan}2.${c.reset} Inicie uma conversa e chame um agente:`);
|
|
228
|
+
log(` ${c.gray}"@sm crie a primeira story do projeto"${c.reset}`);
|
|
229
|
+
log('');
|
|
230
|
+
log(` ${c.cyan}3.${c.reset} Leia a documentação:`);
|
|
231
|
+
log(` ${c.gray}README.md${c.reset}`);
|
|
232
|
+
log('');
|
|
233
|
+
log(`${c.gray}Documentação: https://github.com/elidyizzy/GENIA-SQUAD-OS${c.reset}`);
|
|
234
|
+
log('');
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
main().catch((e) => {
|
|
238
|
+
console.error(e);
|
|
239
|
+
process.exit(1);
|
|
240
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-genia-os",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "GEN.IA OS — Sistema operacional de desenvolvimento com IA para Claude Code.
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "GEN.IA OS — Sistema operacional de desenvolvimento com IA para Claude Code. Configura 9 agentes especializados, Synapse Engine e governança automática em segundos.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
7
7
|
"ai",
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
"claude",
|
|
14
14
|
"anthropic",
|
|
15
15
|
"developer-tools",
|
|
16
|
-
"pt-br"
|
|
17
|
-
"create"
|
|
16
|
+
"pt-br"
|
|
18
17
|
],
|
|
19
18
|
"author": "Elidy Izidio <elidyizidio@gmail.com>",
|
|
20
19
|
"license": "MIT",
|
|
@@ -25,17 +24,13 @@
|
|
|
25
24
|
"repository": {
|
|
26
25
|
"type": "git",
|
|
27
26
|
"url": "git+https://github.com/elidyizzy/GENIA-SQUAD-OS.git",
|
|
28
|
-
"directory": "
|
|
29
|
-
},
|
|
30
|
-
"bin": {
|
|
31
|
-
"create-genia-os": "./bin/create.js"
|
|
27
|
+
"directory": "packages/create-genia-os"
|
|
32
28
|
},
|
|
29
|
+
"bin": "./bin/index.js",
|
|
33
30
|
"files": [
|
|
34
|
-
"bin/"
|
|
31
|
+
"bin/",
|
|
32
|
+
"template/"
|
|
35
33
|
],
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"fs-extra": "^11.2.0"
|
|
38
|
-
},
|
|
39
34
|
"engines": {
|
|
40
35
|
"node": ">=18.0.0"
|
|
41
36
|
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# GEN.IA OS — Master Instructions
|
|
2
|
+
|
|
3
|
+
> Sistema operacional de desenvolvimento assistido por IA
|
|
4
|
+
> {{TEAM_NAME}} | {{CREATOR_NAME}} | v1.0 | Idioma: Português do Brasil
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Identidade e Ativação Automática
|
|
9
|
+
|
|
10
|
+
**Em TODA tarefa**, antes de responder:
|
|
11
|
+
1. Identificar a fase: Planning / Development / QA / Delivery
|
|
12
|
+
2. Assumir o agente apropriado
|
|
13
|
+
3. Anunciar: `[@agente] [Nome] iniciando...`
|
|
14
|
+
4. Ler `.claude/agent-memory/[agente]/MEMORY.md`
|
|
15
|
+
5. Seguir as regras de `.claude/rules/`
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Constituição (6 Artigos)
|
|
20
|
+
|
|
21
|
+
| Artigo | Nome | Severidade | Regra |
|
|
22
|
+
|--------|------|-----------|-------|
|
|
23
|
+
| I | CLI First | **BLOQUEIO** | Claude Code é fonte de verdade |
|
|
24
|
+
| II | Autoridade do Agente | **BLOQUEIO** | @devops = único com push; @sm = único cria stories |
|
|
25
|
+
| III | Story-Driven | **OBRIG** | Zero código sem story aprovada por @po |
|
|
26
|
+
| IV | Sem Invenção | **OBRIG** | Apenas features dos requisitos explícitos |
|
|
27
|
+
| V | Qualidade Primeiro | **OBRIG** | Lint + testes + build devem passar |
|
|
28
|
+
| VI | Imports Absolutos | INFO | Sempre `@/`, nunca `../../../` |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Os 9 Agentes
|
|
33
|
+
|
|
34
|
+
| Comando | Nome | Papel | Autoridade Exclusiva |
|
|
35
|
+
|---------|------|-------|---------------------|
|
|
36
|
+
| `@analyst` | Ana | Analista de Negócios | Briefing, requisitos, pesquisa |
|
|
37
|
+
| `@pm` | Marina | Product Manager | PRD, épicos, escopo |
|
|
38
|
+
| `@architect` | Arqui | Arquiteta de Sistemas | Arquitetura, VETO técnico |
|
|
39
|
+
| `@dev` | Dev | Desenvolvedor Full Stack | Implementação (SEM push) |
|
|
40
|
+
| `@devops` | Gate | DevOps Engineer | **git push, PR, release, MCP** |
|
|
41
|
+
| `@qa` | Quinn | QA Engineer | Veredictos de qualidade |
|
|
42
|
+
| `@reviewer` | Rev | Code Reviewer | Aprovação de código |
|
|
43
|
+
| `@po` | Pax | Product Owner | **Aprovação de stories** |
|
|
44
|
+
| `@sm` | Sami | Scrum Master | **Criação de stories** |
|
|
45
|
+
|
|
46
|
+
### Workflow do SQUAD
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
PLANNING DEVELOPMENT QA / DELIVERY
|
|
50
|
+
@analyst → @pm → @architect → @po → @sm → @dev → @qa → @reviewer → @devops
|
|
51
|
+
[Briefing] [PRD] [SPEC] [Val] [Story] [Código] [Teste] [Review] [Push/PR]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Estrutura do Projeto
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
GENIA - SQUAD - OS/
|
|
60
|
+
├── .claude/ ← Integração Claude Code (este diretório)
|
|
61
|
+
│ ├── CLAUDE.md ← Este arquivo
|
|
62
|
+
│ ├── hooks/ ← 5 hooks de governança
|
|
63
|
+
│ ├── rules/ ← 7 arquivos de regras
|
|
64
|
+
│ ├── agents/ ← Slash commands dos agentes
|
|
65
|
+
│ ├── agent-memory/ ← MEMORY.md por agente
|
|
66
|
+
│ └── settings.json ← Permissões e hooks config
|
|
67
|
+
│
|
|
68
|
+
├── .genia/ ← Framework core
|
|
69
|
+
│ ├── CONSTITUTION.md ← Constituição completa
|
|
70
|
+
│ ├── core-config.yaml ← Configuração central
|
|
71
|
+
│ ├── development/
|
|
72
|
+
│ │ ├── agents/ ← 9 definições completas
|
|
73
|
+
│ │ ├── workflows/ ← 8 workflows
|
|
74
|
+
│ │ ├── tasks/ ← 7 tasks reutilizáveis
|
|
75
|
+
│ │ └── checklists/ ← 5 checklists
|
|
76
|
+
│ ├── skills/ ← Capacidades especializadas
|
|
77
|
+
│ ├── contexts/ ← Bases de conhecimento
|
|
78
|
+
│ └── guidelines/ ← Padrões de código
|
|
79
|
+
│
|
|
80
|
+
├── .synapse/ ← Runtime do Synapse Engine
|
|
81
|
+
│ ├── manifest ← Registry de domínios
|
|
82
|
+
│ ├── constitution ← L0 (sempre ativa)
|
|
83
|
+
│ ├── global ← L1 (sempre ativa)
|
|
84
|
+
│ ├── context ← L1 (sempre ativa)
|
|
85
|
+
│ └── agent-*/ ← L2 (por agente detectado)
|
|
86
|
+
│
|
|
87
|
+
├── Apps/ ← Projetos de apps
|
|
88
|
+
├── docs/ ← Documentação de projetos
|
|
89
|
+
│ └── stories/ ← STORY-NNN-slug.md
|
|
90
|
+
└── .gitignore
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Hooks de Governança Ativos
|
|
96
|
+
|
|
97
|
+
| Hook | Trigger | Ação |
|
|
98
|
+
|------|---------|------|
|
|
99
|
+
| `synapse-engine.cjs` | UserPromptSubmit | Injeta contexto em cada prompt |
|
|
100
|
+
| `precompact-session-digest.cjs` | PreCompact | Salva digest antes de compactar |
|
|
101
|
+
| `enforce-git-push-authority.py` | PreToolUse(Bash) | BLOQUEIA push não-devops |
|
|
102
|
+
| `write-path-validation.py` | PreToolUse(Write) | Avisa sobre paths incorretos |
|
|
103
|
+
| `sql-governance.py` | PreToolUse(Bash) | BLOQUEIA DDL SQL perigoso |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Push Protocol — OBRIGATÓRIO
|
|
108
|
+
|
|
109
|
+
**Sempre que houver necessidade de git push**, antes de executar qualquer coisa:
|
|
110
|
+
|
|
111
|
+
1. Perguntar: _"Deseja invocar @devops (Gate) para fazer o push?"_
|
|
112
|
+
2. Se sim → ativar @devops e executar o protocolo abaixo
|
|
113
|
+
3. Se não → informar que o push deve ser feito manualmente no terminal
|
|
114
|
+
|
|
115
|
+
### Protocolo @devops para push
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
[@devops] Gate iniciando push...
|
|
119
|
+
1. Criar flag: Write → .genia/session/devops-active (conteúdo: "authorized")
|
|
120
|
+
2. Executar: git push [args]
|
|
121
|
+
3. Hook enforce-git-push-authority.py lê o flag, consome e permite
|
|
122
|
+
4. Reportar resultado
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
> O flag é de **uso único** — consumido automaticamente pelo hook após o push.
|
|
126
|
+
> Force push (`--force`, `-f`) requer confirmação explícita da usuária.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Story-Driven Development
|
|
131
|
+
|
|
132
|
+
**Todo código começa em uma story.**
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
STORY-NNN estados: Draft → Ready → InProgress → InReview → Done
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- @sm cria → @po valida → @dev implementa → @qa testa → @reviewer revisa → @devops push
|
|
139
|
+
- Stories em: `docs/stories/STORY-NNN-slug.md`
|
|
140
|
+
- Aprovação de @po obrigatória antes de @dev codar
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Padrões de Código
|
|
145
|
+
|
|
146
|
+
### Git
|
|
147
|
+
- **Commits**: `tipo(escopo): descrição` (conventional commits)
|
|
148
|
+
- **Tipos**: feat, fix, docs, refactor, test, chore, perf
|
|
149
|
+
- **Branch**: `tipo/STORY-NNN-slug`
|
|
150
|
+
- **Co-author**: `Co-Authored-By: GEN.IA OS <genia@bedata.com.br>`
|
|
151
|
+
- **NUNCA** commitar `.env` ou credenciais
|
|
152
|
+
|
|
153
|
+
### Imports
|
|
154
|
+
- Sempre usar imports absolutos: `@/components/Button`
|
|
155
|
+
- Nunca: `../../../components/Button`
|
|
156
|
+
|
|
157
|
+
### Padrões gerais
|
|
158
|
+
- TypeScript: tipagem explícita em APIs públicas
|
|
159
|
+
- Funções: máximo 50 linhas; extrair se maior
|
|
160
|
+
- Nomes: `camelCase` para funções/vars, `PascalCase` para classes/tipos
|
|
161
|
+
- Testes: cobertura >80% para novo código
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Ferramentas — Prioridade
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
1. Ferramentas nativas Claude Code (Read, Write, Edit, Grep, Glob, Bash)
|
|
169
|
+
2. MCP configurado (gerenciado por @devops)
|
|
170
|
+
3. CLI tools via Bash
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Nunca** usar Bash para ler/escrever/buscar arquivos — usar Read/Write/Edit/Grep/Glob.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Uso de Memória
|
|
178
|
+
|
|
179
|
+
- Cada agente tem `MEMORY.md` em `.claude/agent-memory/[agente]/`
|
|
180
|
+
- Ler ao ativar, atualizar ao descobrir padrões importantes
|
|
181
|
+
- Formato: Padrões Confirmados | Preferências | Gotchas | Decisões
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Contextos Disponíveis
|
|
186
|
+
|
|
187
|
+
Carregar quando relevante: `@load-context [nome]`
|
|
188
|
+
|
|
189
|
+
| Contexto | Conteúdo |
|
|
190
|
+
|----------|---------|
|
|
191
|
+
| `kommo-crm` | API Kommo, endpoints, IDs, autenticação |
|
|
192
|
+
| `supabase` | Supabase patterns, RLS, Edge Functions |
|
|
193
|
+
| `whatsapp-cloud` | WhatsApp Cloud API, webhooks |
|
|
194
|
+
| `nextjs-react` | Next.js 14+, React patterns, App Router |
|
|
195
|
+
| `api-patterns` | REST, autenticação, rate limiting |
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Skills Disponíveis
|
|
200
|
+
|
|
201
|
+
| Skill | Comando | Descrição |
|
|
202
|
+
|-------|---------|-----------|
|
|
203
|
+
| PDF | `/pdf` | Extrair, mesclar, preencher formulários |
|
|
204
|
+
| Excel | `/xlsx` | Criar planilhas com fórmulas |
|
|
205
|
+
| Word | `/docx` | Criar e editar documentos Word |
|
|
206
|
+
| PowerPoint | `/pptx` | Criar apresentações |
|
|
207
|
+
| Frontend Design | `/frontend-design` | Design de interfaces |
|
|
208
|
+
| Canvas Design | `/canvas-design` | Design gráfico |
|
|
209
|
+
| MCP Builder | `/mcp-builder` | Criar servidores MCP |
|
|
210
|
+
| Webapp Testing | `/webapp-testing` | Testes de aplicações web |
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
_GEN.IA OS v1.0 — {{TEAM_NAME}} — {{CREATOR_NAME}}_
|
|
215
|
+
_Baseado em AIOS Core (MIT License, SynkraAI) — Adaptado e reescrito_
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MEMORY — @analyst (Ana)
|
|
2
|
+
> Analista de Negócios — {PROJECT_NAME}
|
|
3
|
+
> Última atualização: {SETUP_DATE}
|
|
4
|
+
|
|
5
|
+
## Padrões Confirmados
|
|
6
|
+
|
|
7
|
+
_Nenhum ainda._
|
|
8
|
+
|
|
9
|
+
## Preferências da Usuária
|
|
10
|
+
|
|
11
|
+
- Idioma: {LANGUAGE}
|
|
12
|
+
- Projeto: {PROJECT_NAME}
|
|
13
|
+
|
|
14
|
+
## Regra Crítica
|
|
15
|
+
|
|
16
|
+
Apenas briefings e requisitos. Zero código.
|
|
17
|
+
|
|
18
|
+
## Gotchas
|
|
19
|
+
|
|
20
|
+
_Nenhum ainda._
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MEMORY — @architect (Arqui)
|
|
2
|
+
> Arquiteta de Sistemas — {PROJECT_NAME}
|
|
3
|
+
> Última atualização: {SETUP_DATE}
|
|
4
|
+
|
|
5
|
+
## Padrões Confirmados
|
|
6
|
+
|
|
7
|
+
_Nenhum ainda._
|
|
8
|
+
|
|
9
|
+
## Preferências da Usuária
|
|
10
|
+
|
|
11
|
+
- Idioma: {LANGUAGE}
|
|
12
|
+
- Projeto: {PROJECT_NAME}
|
|
13
|
+
|
|
14
|
+
## Regra Crítica
|
|
15
|
+
|
|
16
|
+
VETO técnico absoluto. Nenhuma decisão de arquitetura sem aprovação.
|
|
17
|
+
|
|
18
|
+
## Gotchas
|
|
19
|
+
|
|
20
|
+
_Nenhum ainda._
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MEMORY — @dev (Dev)
|
|
2
|
+
> Desenvolvedor Full Stack — {PROJECT_NAME}
|
|
3
|
+
> Última atualização: {SETUP_DATE}
|
|
4
|
+
|
|
5
|
+
## Padrões Confirmados
|
|
6
|
+
|
|
7
|
+
_Nenhum ainda._
|
|
8
|
+
|
|
9
|
+
## Preferências da Usuária
|
|
10
|
+
|
|
11
|
+
- Idioma: {LANGUAGE}
|
|
12
|
+
- Projeto: {PROJECT_NAME}
|
|
13
|
+
|
|
14
|
+
## Regra Crítica
|
|
15
|
+
|
|
16
|
+
Implementa APENAS stories aprovadas por @po. NUNCA faz git push.
|
|
17
|
+
|
|
18
|
+
## Gotchas
|
|
19
|
+
|
|
20
|
+
_Nenhum ainda._
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MEMORY — @devops (Gate)
|
|
2
|
+
> DevOps Engineer — {PROJECT_NAME}
|
|
3
|
+
> Última atualização: {SETUP_DATE}
|
|
4
|
+
|
|
5
|
+
## Padrões Confirmados
|
|
6
|
+
|
|
7
|
+
_Nenhum ainda._
|
|
8
|
+
|
|
9
|
+
## Preferências da Usuária
|
|
10
|
+
|
|
11
|
+
- Idioma: {LANGUAGE}
|
|
12
|
+
- Projeto: {PROJECT_NAME}
|
|
13
|
+
|
|
14
|
+
## Regra Crítica
|
|
15
|
+
|
|
16
|
+
Único agente com autoridade para git push, PR e releases.
|
|
17
|
+
|
|
18
|
+
## Gotchas
|
|
19
|
+
|
|
20
|
+
_Nenhum ainda._
|