create-genia-os 1.0.1 → 2.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.
Files changed (87) hide show
  1. package/bin/create.js +181 -0
  2. package/package.json +12 -7
  3. package/bin/index.js +0 -210
  4. package/template/.claude/CLAUDE.md +0 -215
  5. package/template/.claude/agent-memory/analyst/MEMORY.md +0 -20
  6. package/template/.claude/agent-memory/architect/MEMORY.md +0 -20
  7. package/template/.claude/agent-memory/dev/MEMORY.md +0 -20
  8. package/template/.claude/agent-memory/devops/MEMORY.md +0 -20
  9. package/template/.claude/agent-memory/pm/MEMORY.md +0 -20
  10. package/template/.claude/agent-memory/po/MEMORY.md +0 -20
  11. package/template/.claude/agent-memory/qa/MEMORY.md +0 -20
  12. package/template/.claude/agent-memory/reviewer/MEMORY.md +0 -20
  13. package/template/.claude/agent-memory/sm/MEMORY.md +0 -20
  14. package/template/.claude/hooks/enforce-git-push-authority.py +0 -70
  15. package/template/.claude/hooks/precompact-session-digest.cjs +0 -87
  16. package/template/.claude/hooks/sql-governance.py +0 -65
  17. package/template/.claude/hooks/synapse-engine.cjs +0 -122
  18. package/template/.claude/hooks/write-path-validation.py +0 -59
  19. package/template/.claude/rules/agent-authority.md +0 -39
  20. package/template/.claude/rules/agent-handoff.md +0 -71
  21. package/template/.claude/rules/agent-memory.md +0 -61
  22. package/template/.claude/rules/ids-principles.md +0 -52
  23. package/template/.claude/rules/mcp-usage.md +0 -49
  24. package/template/.claude/rules/story-lifecycle.md +0 -87
  25. package/template/.claude/rules/workflow-execution.md +0 -68
  26. package/template/.claude/settings.json +0 -58
  27. package/template/.claude/settings.local.json +0 -14
  28. package/template/.genia/CONSTITUTION.md +0 -129
  29. package/template/.genia/contexts/api-patterns.md +0 -134
  30. package/template/.genia/contexts/nextjs-react.md +0 -210
  31. package/template/.genia/contexts/projeto.md +0 -18
  32. package/template/.genia/contexts/supabase.md +0 -152
  33. package/template/.genia/contexts/whatsapp-cloud.md +0 -176
  34. package/template/.genia/core-config.yaml +0 -192
  35. package/template/.genia/development/agents/analyst.md +0 -138
  36. package/template/.genia/development/agents/architect.md +0 -171
  37. package/template/.genia/development/agents/dev.md +0 -160
  38. package/template/.genia/development/agents/devops.md +0 -200
  39. package/template/.genia/development/agents/pm.md +0 -142
  40. package/template/.genia/development/agents/po.md +0 -165
  41. package/template/.genia/development/agents/qa.md +0 -183
  42. package/template/.genia/development/agents/reviewer.md +0 -198
  43. package/template/.genia/development/agents/sm.md +0 -230
  44. package/template/.genia/development/checklists/architecture-review.md +0 -189
  45. package/template/.genia/development/checklists/pre-commit.md +0 -205
  46. package/template/.genia/development/checklists/pre-deploy.md +0 -230
  47. package/template/.genia/development/checklists/qa-gate.md +0 -216
  48. package/template/.genia/development/checklists/story-dod.md +0 -155
  49. package/template/.genia/development/tasks/code-review.md +0 -197
  50. package/template/.genia/development/tasks/criar-prd.md +0 -170
  51. package/template/.genia/development/tasks/criar-spec.md +0 -188
  52. package/template/.genia/development/tasks/criar-story.md +0 -185
  53. package/template/.genia/development/tasks/debug-sistematico.md +0 -230
  54. package/template/.genia/development/tasks/dev-implement.md +0 -199
  55. package/template/.genia/development/tasks/qa-review.md +0 -224
  56. package/template/.genia/development/workflows/brownfield.md +0 -178
  57. package/template/.genia/development/workflows/delivery.md +0 -208
  58. package/template/.genia/development/workflows/development.md +0 -189
  59. package/template/.genia/development/workflows/greenfield.md +0 -166
  60. package/template/.genia/development/workflows/planning.md +0 -167
  61. package/template/.genia/development/workflows/qa-loop.md +0 -179
  62. package/template/.genia/development/workflows/spec-pipeline.md +0 -192
  63. package/template/.genia/development/workflows/story-development-cycle.md +0 -252
  64. package/template/.genia/guidelines/clean-code.md +0 -98
  65. package/template/.genia/guidelines/testing.md +0 -176
  66. package/template/.genia/skills/design/canvas-design.md +0 -109
  67. package/template/.genia/skills/design/frontend-design.md +0 -140
  68. package/template/.genia/skills/dev/mcp-builder.md +0 -172
  69. package/template/.genia/skills/dev/webapp-testing.md +0 -150
  70. package/template/.genia/skills/documents/docx.md +0 -153
  71. package/template/.genia/skills/documents/pdf.md +0 -134
  72. package/template/.genia/skills/documents/pptx.md +0 -118
  73. package/template/.genia/skills/documents/xlsx.md +0 -140
  74. package/template/.synapse/agent-analyst +0 -8
  75. package/template/.synapse/agent-architect +0 -8
  76. package/template/.synapse/agent-dev +0 -8
  77. package/template/.synapse/agent-devops +0 -8
  78. package/template/.synapse/agent-pm +0 -8
  79. package/template/.synapse/agent-po +0 -7
  80. package/template/.synapse/agent-qa +0 -8
  81. package/template/.synapse/agent-reviewer +0 -7
  82. package/template/.synapse/agent-sm +0 -7
  83. package/template/.synapse/constitution +0 -7
  84. package/template/.synapse/context +0 -8
  85. package/template/.synapse/global +0 -8
  86. package/template/.synapse/manifest +0 -14
  87. package/template/README.md +0 -53
package/bin/create.js ADDED
@@ -0,0 +1,181 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ /**
5
+ * create-genia-os v2.0.0
6
+ * Instala o GEN.IA OS diretamente do repositório oficial.
7
+ * Cross-platform: Windows, macOS, Linux.
8
+ * Uso: npx create-genia-os [pasta-destino]
9
+ */
10
+
11
+ const { execSync } = require('child_process');
12
+ const path = require('path');
13
+ const os = require('os');
14
+ const fse = require('fs-extra');
15
+
16
+ // ─── Cores no terminal ───────────────────────────────────────────────────────
17
+ const c = {
18
+ reset: '\x1b[0m',
19
+ bold: '\x1b[1m',
20
+ cyan: '\x1b[36m',
21
+ green: '\x1b[32m',
22
+ yellow: '\x1b[33m',
23
+ red: '\x1b[31m',
24
+ gray: '\x1b[90m',
25
+ };
26
+
27
+ const ok = (msg) => console.log(`${c.green}✅ ${msg}${c.reset}`);
28
+ const info = (msg) => console.log(`${c.cyan} ${msg}${c.reset}`);
29
+ const fail = (msg) => { console.error(`${c.red}❌ ${msg}${c.reset}`); process.exit(1); };
30
+ const warn = (msg) => console.log(`${c.yellow}⚠ ${msg}${c.reset}`);
31
+
32
+ // ─── Banner ──────────────────────────────────────────────────────────────────
33
+ function banner() {
34
+ console.log('');
35
+ console.log(`${c.cyan}${c.bold}╔════════════════════════════════════════════╗${c.reset}`);
36
+ console.log(`${c.cyan}${c.bold}║ GEN.IA OS v2.0 — Instalador Oficial ║${c.reset}`);
37
+ console.log(`${c.cyan}${c.bold}║ 9 agentes • Synapse Engine • Governança ║${c.reset}`);
38
+ console.log(`${c.cyan}${c.bold}╚════════════════════════════════════════════╝${c.reset}`);
39
+ console.log('');
40
+ }
41
+
42
+ // ─── Verificar git disponível ────────────────────────────────────────────────
43
+ function checkGit() {
44
+ try {
45
+ execSync('git --version', { stdio: 'ignore' });
46
+ } catch {
47
+ fail('git não encontrado. Instale o Git e tente novamente: https://git-scm.com');
48
+ }
49
+ }
50
+
51
+ // ─── Clonar repositório ──────────────────────────────────────────────────────
52
+ function cloneRepo(repo, tempDir) {
53
+ info(`Clonando ${repo}...`);
54
+ if (fse.existsSync(tempDir)) {
55
+ fse.removeSync(tempDir);
56
+ }
57
+ try {
58
+ execSync(`git clone --depth=1 ${repo} "${tempDir}"`, { stdio: 'inherit' });
59
+ } catch {
60
+ fail(`Falha ao clonar ${repo}. Verifique sua conexão e se o repositório é público.`);
61
+ }
62
+ }
63
+
64
+ // ─── Copiar pastas do GEN.IA OS ──────────────────────────────────────────────
65
+ function copyFolders(tempDir, destDir) {
66
+ const folders = ['.claude', '.genia', '.synapse', '.business'];
67
+ let copied = 0;
68
+
69
+ for (const folder of folders) {
70
+ const src = path.join(tempDir, folder);
71
+ const dst = path.join(destDir, folder);
72
+
73
+ if (fse.existsSync(src)) {
74
+ fse.copySync(src, dst, { overwrite: true });
75
+ ok(`${folder} instalado`);
76
+ copied++;
77
+ } else {
78
+ warn(`${folder} não encontrado no repositório — ignorando`);
79
+ }
80
+ }
81
+
82
+ if (copied === 0) {
83
+ fail('Nenhuma pasta do GEN.IA OS encontrada. Repositório pode estar incorreto.');
84
+ }
85
+ }
86
+
87
+ // ─── Verificar instalação ────────────────────────────────────────────────────
88
+ function verify(destDir) {
89
+ const claudeMd = path.join(destDir, '.claude', 'CLAUDE.md');
90
+
91
+ if (!fse.existsSync(claudeMd)) {
92
+ fail('Instalação falhou: .claude/CLAUDE.md não encontrado.');
93
+ }
94
+
95
+ const content = fse.readFileSync(claudeMd, 'utf-8');
96
+ const agentes = ['Cypher', 'Morpheus', 'Trinity', 'Neo', 'Tank', 'Oracle', 'Mouse', 'Smith', 'Switch'];
97
+ const found = agentes.filter((a) => content.includes(a));
98
+
99
+ if (found.length === agentes.length) {
100
+ ok('GEN.IA OS v2.0 instalado com sucesso!');
101
+ ok('Agentes verificados: ' + found.join(', '));
102
+ } else {
103
+ const missing = agentes.filter((a) => !content.includes(a));
104
+ fail(`Agentes ausentes no CLAUDE.md: ${missing.join(', ')}. Reinstale.`);
105
+ }
106
+ }
107
+
108
+ // ─── Resumo final ────────────────────────────────────────────────────────────
109
+ function summary(destDir) {
110
+ console.log('');
111
+ console.log(`${c.green}${c.bold}╔════════════════════════════════════════════╗${c.reset}`);
112
+ console.log(`${c.green}${c.bold}║ GEN.IA OS pronto para uso! 🚀 ║${c.reset}`);
113
+ console.log(`${c.green}${c.bold}╚════════════════════════════════════════════╝${c.reset}`);
114
+ console.log('');
115
+ console.log(`${c.bold}Próximos passos:${c.reset}`);
116
+ console.log('');
117
+ console.log(` ${c.cyan}1.${c.reset} Abra a pasta no VS Code com Claude Code:`);
118
+ console.log(` ${c.gray}code "${destDir}"${c.reset}`);
119
+ console.log('');
120
+ console.log(` ${c.cyan}2.${c.reset} Preencha o contexto de negócio:`);
121
+ console.log(` ${c.gray}Edite .business/OWNER.md com suas informações${c.reset}`);
122
+ console.log('');
123
+ console.log(` ${c.cyan}3.${c.reset} Inicie uma conversa e chame um agente:`);
124
+ console.log(` ${c.gray}"@sm crie a primeira story do projeto"${c.reset}`);
125
+ console.log('');
126
+ console.log(`${c.yellow}${c.bold}NOTA:${c.reset} Copie o .business/ do seu GENIA-SQUAD-OS para`);
127
+ console.log(`este projeto para que os agentes conheçam o contexto`);
128
+ console.log('de negócio (OWNER.md, PRIORIDADES.md, etc.).');
129
+ console.log('');
130
+ console.log(`${c.gray}Documentação: https://github.com/elidyizzy/GENIA-SQUAD-OS${c.reset}`);
131
+ console.log('');
132
+ }
133
+
134
+ // ─── Main ────────────────────────────────────────────────────────────────────
135
+ async function main() {
136
+ banner();
137
+
138
+ const REPO = 'https://github.com/elidyizzy/GENIA-SQUAD-OS';
139
+ const TEMP = path.join(os.tmpdir(), `genia-os-tmp-${Date.now()}`);
140
+
141
+ const targetArg = process.argv[2] || '.';
142
+ const dest = targetArg === '.' ? process.cwd() : path.resolve(process.cwd(), targetArg);
143
+
144
+ // Criar destino se necessário
145
+ if (targetArg !== '.') {
146
+ fse.mkdirpSync(dest);
147
+ info(`Instalando em: ${dest}`);
148
+ } else {
149
+ info(`Instalando no diretório atual: ${dest}`);
150
+ }
151
+
152
+ console.log('');
153
+ console.log(`🚀 GEN.IA OS v2.0 — instalando do repositório oficial...`);
154
+ console.log('');
155
+
156
+ checkGit();
157
+ cloneRepo(REPO, TEMP);
158
+
159
+ console.log('');
160
+ info('Copiando estrutura do GEN.IA OS...');
161
+ console.log('');
162
+
163
+ copyFolders(TEMP, dest);
164
+
165
+ // Limpar temp
166
+ try {
167
+ fse.removeSync(TEMP);
168
+ } catch {
169
+ warn(`Não foi possível remover pasta temporária: ${TEMP}`);
170
+ }
171
+
172
+ console.log('');
173
+ info('Verificando integridade da instalação...');
174
+ verify(dest);
175
+ summary(dest);
176
+ }
177
+
178
+ main().catch((e) => {
179
+ console.error(`\n${c.red}Erro inesperado:${c.reset}`, e.message);
180
+ process.exit(1);
181
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-genia-os",
3
- "version": "1.0.1",
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.",
3
+ "version": "2.0.0",
4
+ "description": "GEN.IA OS — Sistema operacional de desenvolvimento com IA para Claude Code. Instala 9 agentes especializados, Synapse Engine e governança automática direto do repositório oficial.",
5
5
  "keywords": [
6
6
  "claude-code",
7
7
  "ai",
@@ -13,7 +13,8 @@
13
13
  "claude",
14
14
  "anthropic",
15
15
  "developer-tools",
16
- "pt-br"
16
+ "pt-br",
17
+ "create"
17
18
  ],
18
19
  "author": "Elidy Izidio <elidyizidio@gmail.com>",
19
20
  "license": "MIT",
@@ -24,13 +25,17 @@
24
25
  "repository": {
25
26
  "type": "git",
26
27
  "url": "git+https://github.com/elidyizzy/GENIA-SQUAD-OS.git",
27
- "directory": "packages/create-genia-os"
28
+ "directory": ".Apps/create-genia-os"
29
+ },
30
+ "bin": {
31
+ "create-genia-os": "./bin/create.js"
28
32
  },
29
- "bin": "./bin/index.js",
30
33
  "files": [
31
- "bin/",
32
- "template/"
34
+ "bin/"
33
35
  ],
36
+ "dependencies": {
37
+ "fs-extra": "^11.2.0"
38
+ },
34
39
  "engines": {
35
40
  "node": ">=18.0.0"
36
41
  }
package/bin/index.js DELETED
@@ -1,210 +0,0 @@
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.0 ║${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/stories/ e .genia/session/ ──
163
- fs.mkdirSync(path.join(targetDir, 'docs', 'stories'), { recursive: true });
164
- fs.writeFileSync(path.join(targetDir, 'docs', 'stories', '.gitkeep'), '');
165
- fs.mkdirSync(path.join(targetDir, '.genia', 'session'), { recursive: true });
166
- fs.mkdirSync(path.join(targetDir, '.genia', 'session-digests'), { recursive: true });
167
- fs.writeFileSync(path.join(targetDir, '.genia', 'session', '.gitkeep'), '');
168
- fs.writeFileSync(path.join(targetDir, '.genia', 'session-digests', '.gitkeep'), '');
169
- ok('Diretórios de sessão e stories criados');
170
-
171
- // ── Git init ──
172
- if (initGit.toLowerCase() !== 'n') {
173
- try {
174
- const { execSync } = require('child_process');
175
- execSync('git init', { cwd: targetDir, stdio: 'ignore' });
176
- execSync('git add .', { cwd: targetDir, stdio: 'ignore' });
177
- execSync(`git commit -m "chore: GEN.IA OS v1.0 — setup inicial\n\nCo-Authored-By: GEN.IA OS <genia@bedata.com.br>"`, {
178
- cwd: targetDir, stdio: 'ignore',
179
- });
180
- ok('Repositório git inicializado com commit inicial');
181
- } catch {
182
- warn('Git init falhou. Inicialize manualmente: git init && git add . && git commit');
183
- }
184
- }
185
-
186
- // ── Sucesso ──
187
- log('');
188
- log(`${c.green}${c.bold}╔═══════════════════════════════════════════╗${c.reset}`);
189
- log(`${c.green}${c.bold}║ GEN.IA OS pronto para uso! 🚀 ║${c.reset}`);
190
- log(`${c.green}${c.bold}╚═══════════════════════════════════════════╝${c.reset}`);
191
- log('');
192
- log(bold('Próximos passos:'));
193
- log('');
194
- log(` ${c.cyan}1.${c.reset} Abra o projeto no VS Code com Claude Code:`);
195
- log(` ${c.gray}cd ${projectName} && code .${c.reset}`);
196
- log('');
197
- log(` ${c.cyan}2.${c.reset} Inicie uma conversa e chame um agente:`);
198
- log(` ${c.gray}"@sm crie a primeira story do projeto"${c.reset}`);
199
- log('');
200
- log(` ${c.cyan}3.${c.reset} Leia a documentação:`);
201
- log(` ${c.gray}README.md${c.reset}`);
202
- log('');
203
- log(`${c.gray}Documentação: https://github.com/elidyizzy/GENIA-SQUAD-OS${c.reset}`);
204
- log('');
205
- }
206
-
207
- main().catch((e) => {
208
- console.error(e);
209
- process.exit(1);
210
- });
@@ -1,215 +0,0 @@
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_
@@ -1,20 +0,0 @@
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._
@@ -1,20 +0,0 @@
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._