create-genia-os 2.0.0 → 2.1.1
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 +154 -0
- package/bin/index.js +240 -0
- package/package.json +40 -42
- 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,154 @@
|
|
|
1
|
+
# create-genia-os
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/create-genia-os"><img src="https://img.shields.io/npm/v/create-genia-os.svg?style=flat-square" /></a>
|
|
5
|
+
<img src="https://img.shields.io/badge/Claude%20Code-Compatible-blue?style=flat-square" />
|
|
6
|
+
<img src="https://img.shields.io/badge/Agentes-9%20%2B%20Squads-purple?style=flat-square" />
|
|
7
|
+
<img src="https://img.shields.io/node/v/create-genia-os.svg?style=flat-square" />
|
|
8
|
+
<img src="https://img.shields.io/npm/l/create-genia-os.svg?style=flat-square" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
> **Transforma o Claude Code em um time completo de especialistas.**
|
|
12
|
+
> 9 agentes de desenvolvimento + Squads de negócio, Synapse Engine, governança automática e documentação profissional — tudo em 30 segundos.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Instalação
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx create-genia-os meu-projeto
|
|
20
|
+
cd meu-projeto
|
|
21
|
+
code .
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
O wizard interativo configura nome do projeto, equipe, GitHub, idioma e stack. Em seguida, chame seu primeiro agente:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
@analyst quero criar [seu projeto em uma frase]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## O que você recebe
|
|
33
|
+
|
|
34
|
+
### Sistema 1 — 9 Agentes de Desenvolvimento
|
|
35
|
+
|
|
36
|
+
Um time completo com papéis, personas e autoridades únicas. Cada agente sabe exatamente o que pode e o que não pode fazer.
|
|
37
|
+
|
|
38
|
+
| Agente | Persona | Papel | Autoridade exclusiva |
|
|
39
|
+
|--------|---------|-------|---------------------|
|
|
40
|
+
| `@analyst` | Cypher | Analista de Negócios | Briefing, requisitos, pesquisa |
|
|
41
|
+
| `@pm` | Morpheus | Product Manager | PRD, épicos, roadmap |
|
|
42
|
+
| `@architect` | Trinity | Arquiteta de Sistemas | Arquitetura, **veto técnico** |
|
|
43
|
+
| `@po` | Oracle | Product Owner | **Aprovação de stories** |
|
|
44
|
+
| `@sm` | Mouse | Scrum Master | **Criação exclusiva de stories** |
|
|
45
|
+
| `@dev` | Neo | Desenvolvedor Full Stack | Implementação (sem push) |
|
|
46
|
+
| `@qa` | Smith | QA Engineer | Veredictos de qualidade |
|
|
47
|
+
| `@reviewer` | Switch | Code Reviewer | Aprovação de código |
|
|
48
|
+
| `@devops` | Tank | DevOps Engineer | **git push, PR, releases** |
|
|
49
|
+
|
|
50
|
+
### Sistema 2 — Squads Xquads (negócio e estratégia)
|
|
51
|
+
|
|
52
|
+
Consultores de alto nível disponíveis a qualquer momento. Recomendam — o SQUAD executa.
|
|
53
|
+
|
|
54
|
+
| Squad | Agentes |
|
|
55
|
+
|-------|---------|
|
|
56
|
+
| Advisory Board | `@ray-dalio`, `@charlie-munger`, `@naval-ravikant` |
|
|
57
|
+
| Copy Squad | `@dan-kennedy`, `@david-ogilvy`, `@gary-halbert` |
|
|
58
|
+
| Hormozi Squad | `@hormozi-offer` |
|
|
59
|
+
| Brand Squad | `@brand-chief`, `@marty-neumeier` |
|
|
60
|
+
| C-Level Squad | `@cmo-architect`, `@cto-architect` |
|
|
61
|
+
| Data Squad | `@avinash-kaushik`, `@sean-ellis` |
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
@dan-kennedy escreva o pitch de vendas
|
|
65
|
+
@ray-dalio analise os riscos desta estratégia
|
|
66
|
+
@hormozi-offer monte a estrutura de oferta do plano Enterprise
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Como funciona — o Synapse Engine
|
|
72
|
+
|
|
73
|
+
A cada prompt que você digita, um hook JavaScript (`synapse-engine.cjs`) roda em **menos de 100ms** e injeta o contexto certo automaticamente:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Você digita: "@dev implemente o login"
|
|
77
|
+
│
|
|
78
|
+
▼
|
|
79
|
+
Synapse Engine detecta "@dev"
|
|
80
|
+
│
|
|
81
|
+
▼
|
|
82
|
+
L0 — Constituição (SEMPRE)
|
|
83
|
+
L1 — Global + Contexto do projeto (SEMPRE)
|
|
84
|
+
L2 — Regras específicas do @dev (detectado)
|
|
85
|
+
│
|
|
86
|
+
▼
|
|
87
|
+
Claude recebe prompt + contexto completo
|
|
88
|
+
e responde como Neo, com as regras certas
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Para agentes Xquads, o engine injeta também:
|
|
92
|
+
- Quem é você (`.business/OWNER.md`)
|
|
93
|
+
- Prioridades atuais (`.business/PRIORIDADES.md`)
|
|
94
|
+
- Contexto da empresa
|
|
95
|
+
- Memória do agente (`.claude/agent-memory/squads/`)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Governança automática — 5 hooks
|
|
100
|
+
|
|
101
|
+
| Hook | Quando ativa | O que faz |
|
|
102
|
+
|------|-------------|-----------|
|
|
103
|
+
| `synapse-engine.cjs` | Todo prompt | Injeta contexto em camadas |
|
|
104
|
+
| `enforce-git-push-authority.py` | Antes de Bash | **Bloqueia** push fora do @devops |
|
|
105
|
+
| `sql-governance.py` | Antes de Bash | **Bloqueia** DDL perigoso |
|
|
106
|
+
| `write-path-validation.py` | Antes de Write | Valida paths de arquivo |
|
|
107
|
+
| `precompact-session-digest.cjs` | Antes de compactar | Salva memória da sessão |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Documentação profissional criada automaticamente
|
|
112
|
+
|
|
113
|
+
Todo projeto novo inclui:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
docs/
|
|
117
|
+
├── produto/ PRD.md · ROADMAP.md · CHANGELOG.md
|
|
118
|
+
├── tecnico/ ARQUITETURA.md · STACK.md · SETUP.md · API.md · DEPLOY.md · adr/
|
|
119
|
+
├── comercial/ PITCH.md · PROPOSTA.md · ONBOARDING.md · CASOS-DE-USO.md
|
|
120
|
+
├── stories/ criadas pelo @sm (Mouse)
|
|
121
|
+
└── handover/ atualizado pelo @devops (Tank) a cada sessão
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## A Constituição — regras que não se negociam
|
|
127
|
+
|
|
128
|
+
| Artigo | Regra |
|
|
129
|
+
|--------|-------|
|
|
130
|
+
| I — CLI First | Claude Code é fonte de verdade |
|
|
131
|
+
| II — Autoridade | @devops = único com push; @sm = único cria stories |
|
|
132
|
+
| III — Story-Driven | Zero código sem story aprovada pelo @po |
|
|
133
|
+
| IV — Sem Invenção | Apenas features dos requisitos explícitos |
|
|
134
|
+
| V — Qualidade | Lint + testes + build devem passar |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Requisitos
|
|
139
|
+
|
|
140
|
+
- **Node.js** ≥ 18.0.0
|
|
141
|
+
- **Claude Code** (CLI da Anthropic)
|
|
142
|
+
- **VS Code** (recomendado)
|
|
143
|
+
- **Python 3.8+** (para hooks de governança)
|
|
144
|
+
- **Git**
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Documentação completa
|
|
149
|
+
|
|
150
|
+
[github.com/elidyizzy/GENIA-SQUAD-OS](https://github.com/elidyizzy/GENIA-SQUAD-OS)
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
*GEN.IA OS v2.1 · Criado por **Elidy Izidio** · Founder, GEN.IA SQUAD · 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,42 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-genia-os",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "GEN.IA OS —
|
|
5
|
-
"keywords": [
|
|
6
|
-
"claude-code",
|
|
7
|
-
"ai",
|
|
8
|
-
"artificial-intelligence",
|
|
9
|
-
"desenvolvimento",
|
|
10
|
-
"agentes",
|
|
11
|
-
"squads",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"files": [
|
|
34
|
-
"bin/"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "create-genia-os",
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "GEN.IA OS — Transforma o Claude Code em um time completo de especialistas. 9 agentes de desenvolvimento + Squads Xquads de negócio, Synapse Engine, governança automática e docs profissional obrigatório.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"claude-code",
|
|
7
|
+
"ai",
|
|
8
|
+
"artificial-intelligence",
|
|
9
|
+
"desenvolvimento",
|
|
10
|
+
"agentes",
|
|
11
|
+
"squads",
|
|
12
|
+
"xquads",
|
|
13
|
+
"genia",
|
|
14
|
+
"claude",
|
|
15
|
+
"anthropic",
|
|
16
|
+
"developer-tools",
|
|
17
|
+
"synapse-engine",
|
|
18
|
+
"governance",
|
|
19
|
+
"pt-br"
|
|
20
|
+
],
|
|
21
|
+
"author": "Elidy Izidio <elidyizidio@gmail.com>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"homepage": "https://github.com/elidyizzy/GENIA-SQUAD-OS#readme",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/elidyizzy/GENIA-SQUAD-OS/issues"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/elidyizzy/GENIA-SQUAD-OS.git",
|
|
30
|
+
"directory": "packages/create-genia-os"
|
|
31
|
+
},
|
|
32
|
+
"bin": "./bin/index.js",
|
|
33
|
+
"files": [
|
|
34
|
+
"bin/",
|
|
35
|
+
"template/"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -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_
|