grimoire-framework 1.0.16 → 1.0.18
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/.grimoire/install-manifest.yaml +2 -2
- package/README.md +91 -45
- package/bin/grimoire-cli.js +103 -30
- package/package.json +1 -1
- package/packages/installer/src/updater/index.js +4 -0
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
# - SHA256 hashes for change detection
|
|
8
8
|
# - File types for categorization
|
|
9
9
|
#
|
|
10
|
-
version: 1.0.
|
|
11
|
-
generated_at: "2026-02-
|
|
10
|
+
version: 1.0.18
|
|
11
|
+
generated_at: "2026-02-22T14:00:42.557Z"
|
|
12
12
|
generator: scripts/generate-install-manifest.js
|
|
13
13
|
file_count: 1011
|
|
14
14
|
files:
|
package/README.md
CHANGED
|
@@ -10,74 +10,121 @@
|
|
|
10
10
|
|
|
11
11
|
## 🚀 Início Rápido
|
|
12
12
|
|
|
13
|
-
Nenhuma instalação global necessária — use diretamente via `npx`:
|
|
14
|
-
|
|
15
13
|
```bash
|
|
16
14
|
# Instalar o Grimoire em um projeto existente
|
|
17
|
-
npx grimoire-framework
|
|
18
|
-
|
|
19
|
-
# Ou explicitamente
|
|
20
15
|
npx grimoire-framework install
|
|
16
|
+
|
|
17
|
+
# Atualizar para a versão mais recente (preserva customizações)
|
|
18
|
+
npx grimoire-framework update
|
|
21
19
|
```
|
|
22
20
|
|
|
21
|
+
Após a instalação, abra o **Gemini CLI** no diretório do projeto:
|
|
22
|
+
|
|
23
23
|
```bash
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
gemini
|
|
25
|
+
# 👑 Michelangelo (grimoire-master) pronto para orquestrar!
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
## 🛠️ Comandos
|
|
30
|
+
## 🛠️ Comandos CLI
|
|
31
|
+
|
|
32
|
+
### Gerenciamento do Framework
|
|
31
33
|
|
|
32
34
|
| Comando | Descrição |
|
|
33
35
|
|---|---|
|
|
34
|
-
| `npx grimoire-framework` | Wizard interativo de instalação |
|
|
35
36
|
| `npx grimoire-framework install` | Instalar no projeto atual |
|
|
36
|
-
| `npx grimoire-framework
|
|
37
|
-
| `npx grimoire-framework update` |
|
|
38
|
-
| `npx grimoire-framework
|
|
39
|
-
| `npx grimoire-framework doctor` | Diagnóstico e auto-reparação |
|
|
40
|
-
| `npx grimoire-framework info` | Informações do sistema |
|
|
41
|
-
| `npx grimoire-framework --version` | Versão instalada |
|
|
37
|
+
| `npx grimoire-framework update` | Atualizar preservando customizações |
|
|
38
|
+
| `npx grimoire-framework update --force` | Forçar resync de todos os arquivos |
|
|
39
|
+
| `npx grimoire-framework update --dry-run` | Simular update (sem aplicar) |
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
### Diagnóstico
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
| Comando | Descrição |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `grimoire status` | Saúde do framework + integração IDE |
|
|
46
|
+
| `grimoire doctor` | Diagnóstico detalhado com dicas de fix |
|
|
47
|
+
| `grimoire agents list` | Listar agentes com personas |
|
|
48
|
+
| `grimoire whoami` | Contexto da sessão atual |
|
|
49
|
+
| `grimoire --version` | Versão instalada |
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
> 💡 **CLI vs Agentes:** `grimoire` (terminal) gerencia o framework. `@dev`, `@qa`, `@architect` (chat da IDE) são os agentes de IA — interfaces completamente diferentes.
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🧙 Agentes Disponíveis
|
|
51
56
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
+
Após instalar, ative os agentes diretamente no chat da sua IDE:
|
|
58
|
+
|
|
59
|
+
| Comando | Persona | Especialidade |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `@grimoire-master` | 👑 Michelangelo | Orquestração & framework |
|
|
62
|
+
| `@dev` | 🎨 Da Vinci | Desenvolvimento Full-Stack |
|
|
63
|
+
| `@qa` | 🖌️ Dürer | Quality Assurance & Testes |
|
|
64
|
+
| `@architect` | 🏛️ Gaudí | Arquitetura de Sistemas |
|
|
65
|
+
| `@pm` | 📋 Raphael | Product Manager |
|
|
66
|
+
| `@sm` | 🌊 Monet | Scrum Master |
|
|
67
|
+
| `@devops` | ⚡ Boccioni | DevOps & Infraestrutura |
|
|
68
|
+
| `@data-engineer` | 📊 Escher | Engenharia de Dados |
|
|
69
|
+
| `@analyst` | 🔍 Vermeer | Pesquisa & Análise |
|
|
70
|
+
| `@ux-design-expert` | 🎭 Matisse | UX/UI Design |
|
|
71
|
+
| `@po` | 🎯 Velázquez | Product Owner |
|
|
57
72
|
|
|
58
73
|
---
|
|
59
74
|
|
|
60
|
-
##
|
|
75
|
+
## 💻 Integração com IDEs
|
|
76
|
+
|
|
77
|
+
### Gemini CLI (Recomendado)
|
|
78
|
+
O Grimoire configura automaticamente o arquivo `GEMINI.md` na raiz do projeto. O Michelangelo se apresenta ao abrir o Gemini CLI.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
gemini
|
|
82
|
+
# 👑 Michelangelo (grimoire-master) pronto para orquestrar!
|
|
83
|
+
# Projeto: meu-projeto
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Para ativar um agente especializado:
|
|
87
|
+
```
|
|
88
|
+
@dev ou Da Vinci ou ative o @architect
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Claude Code
|
|
92
|
+
Agentes disponíveis em `.claude/commands/grimoire/`. Use `/dev`, `/qa`, `/architect`.
|
|
61
93
|
|
|
62
|
-
|
|
94
|
+
### Cursor
|
|
95
|
+
Regras instaladas em `.cursor/rules/agents/`. Agentes ativados via contexto do chat.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 🏗️ Estrutura Instalada
|
|
63
100
|
|
|
64
101
|
```
|
|
65
|
-
|
|
66
|
-
├──
|
|
67
|
-
|
|
68
|
-
│ ├──
|
|
69
|
-
│ └──
|
|
70
|
-
├──
|
|
71
|
-
├──
|
|
72
|
-
|
|
102
|
+
projeto/
|
|
103
|
+
├── GEMINI.md ← Config principal do Gemini CLI (Michelangelo)
|
|
104
|
+
├── .gemini/
|
|
105
|
+
│ ├── rules.md ← Compatibilidade com versões antigas do Gemini CLI
|
|
106
|
+
│ └── rules/grimoire/ ← Definições de agentes para Gemini
|
|
107
|
+
├── .codex/agents/ ← Definições de todos os agentes (12 core)
|
|
108
|
+
├── .cursor/rules/agents/ ← Agentes para Cursor
|
|
109
|
+
├── .claude/commands/ ← Comandos para Claude Code
|
|
110
|
+
└── .grimoire/ ← Memória, métricas e configurações
|
|
73
111
|
```
|
|
74
112
|
|
|
75
|
-
|
|
113
|
+
---
|
|
76
114
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
115
|
+
## 🔄 Fluxo de Update
|
|
116
|
+
|
|
117
|
+
O `grimoire update` é inteligente — preserva as suas customizações:
|
|
118
|
+
|
|
119
|
+
- ✅ **Atualiza** arquivos do framework (agentes core, GEMINI.md)
|
|
120
|
+
- 🔒 **Preserva** arquivos que só existem no seu projeto (agentes customizados)
|
|
121
|
+
- ➕ **Adiciona** arquivos novos do framework
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npx grimoire-framework update # Update normal
|
|
125
|
+
npx grimoire-framework update --force # Forçar re-sync completo
|
|
126
|
+
npx grimoire-framework update --dry-run # Ver o que mudaria
|
|
127
|
+
```
|
|
81
128
|
|
|
82
129
|
---
|
|
83
130
|
|
|
@@ -91,6 +138,10 @@ Após a instalação, o Grimoire cria o diretório `.grimoire/` no seu projeto c
|
|
|
91
138
|
|
|
92
139
|
## 🗺️ Roadmap
|
|
93
140
|
|
|
141
|
+
- [x] Smart Update com preservação de customizações
|
|
142
|
+
- [x] Publisher Quality Gate (CI/CD)
|
|
143
|
+
- [x] Integração Gemini CLI via `GEMINI.md`
|
|
144
|
+
- [x] 12 agentes com personas artísticas (Michelangelo, Da Vinci, Dürer...)
|
|
94
145
|
- [ ] **Sistema de Login & Autenticação** — Governança para equipes
|
|
95
146
|
- [ ] **Project Models** — Templates para SaaS, Mobile, API
|
|
96
147
|
- [ ] **Persistent Memory Layer** — Aprendizado de padrões do seu código
|
|
@@ -103,14 +154,9 @@ Após a instalação, o Grimoire cria o diretório `.grimoire/` no seu projeto c
|
|
|
103
154
|
Contribuições são bem-vindas! Veja [CONTRIBUTING.md](CONTRIBUTING.md) para detalhes.
|
|
104
155
|
|
|
105
156
|
```bash
|
|
106
|
-
# Clone o repositório
|
|
107
157
|
git clone https://github.com/gabrielrlima/grimoire.git
|
|
108
158
|
cd grimoire
|
|
109
|
-
|
|
110
|
-
# Instale as dependências
|
|
111
159
|
npm install
|
|
112
|
-
|
|
113
|
-
# Rode os testes
|
|
114
160
|
npm test
|
|
115
161
|
```
|
|
116
162
|
|
package/bin/grimoire-cli.js
CHANGED
|
@@ -132,12 +132,22 @@ function handleStatus() {
|
|
|
132
132
|
const check = (p) => fs.existsSync(p);
|
|
133
133
|
const icon = (v) => v ? '✅' : '❌';
|
|
134
134
|
|
|
135
|
-
// Detect project root (has .codex or .grimoire)
|
|
136
135
|
const hasCodex = check(path.join(cwd, '.codex'));
|
|
137
136
|
const hasGrimoire = check(path.join(cwd, '.grimoire'));
|
|
138
137
|
const hasGemini = check(path.join(cwd, '.gemini'));
|
|
139
138
|
const hasCursor = check(path.join(cwd, '.cursor'));
|
|
140
139
|
const hasClaude = check(path.join(cwd, '.claude'));
|
|
140
|
+
const hasGeminiMd = check(path.join(cwd, 'GEMINI.md'));
|
|
141
|
+
const hasGeminiRules = check(path.join(cwd, '.gemini', 'rules.md'));
|
|
142
|
+
|
|
143
|
+
// Check GEMINI.md has correct persona
|
|
144
|
+
let geminiPersonaOk = false;
|
|
145
|
+
if (hasGeminiMd) {
|
|
146
|
+
try {
|
|
147
|
+
const content = fs.readFileSync(path.join(cwd, 'GEMINI.md'), 'utf8');
|
|
148
|
+
geminiPersonaOk = content.includes('Michelangelo');
|
|
149
|
+
} catch (e) { /* ignore */ }
|
|
150
|
+
}
|
|
141
151
|
|
|
142
152
|
// Hooks check
|
|
143
153
|
const settingsPath = path.join(cwd, '.gemini', 'settings.json');
|
|
@@ -162,44 +172,41 @@ function handleStatus() {
|
|
|
162
172
|
const memDir = path.join(cwd, '.grimoire', 'memory');
|
|
163
173
|
const hasMemory = check(memDir);
|
|
164
174
|
|
|
165
|
-
//
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
if (check(
|
|
169
|
-
try {
|
|
170
|
-
const lines = fs.readFileSync(sessionLog, 'utf8').trim().split('\n');
|
|
171
|
-
const last = lines.filter(l => l.includes('agent:')).pop();
|
|
172
|
-
if (last) lastAgent = last.split('agent:')[1]?.trim();
|
|
173
|
-
} catch (e) { /* ignore */ }
|
|
175
|
+
// Installed version vs package.json
|
|
176
|
+
const installedPkgPath = path.join(cwd, 'node_modules', 'grimoire-framework', 'package.json');
|
|
177
|
+
let installedVersion = null;
|
|
178
|
+
if (check(installedPkgPath)) {
|
|
179
|
+
try { installedVersion = JSON.parse(fs.readFileSync(installedPkgPath, 'utf8')).version; } catch (e) { }
|
|
174
180
|
}
|
|
181
|
+
const versionMatch = installedVersion === packageJson.version;
|
|
175
182
|
|
|
176
183
|
console.log(`
|
|
177
184
|
🔮 Grimoire Framework Status
|
|
178
185
|
${'='.repeat(40)}
|
|
179
|
-
📎 Version: v${packageJson.version}
|
|
180
|
-
📁 Project: ${cwd}
|
|
186
|
+
📎 Version: v${packageJson.version}${installedVersion && !versionMatch ? ` (project has v${installedVersion})` : ''}
|
|
187
|
+
📁 Project: ${path.basename(cwd)}
|
|
181
188
|
|
|
182
189
|
🔧 Core
|
|
183
190
|
${icon(hasCodex)} .codex (agents & config)
|
|
184
191
|
${icon(hasGrimoire)} .grimoire (memory & metrics)
|
|
185
192
|
${icon(agentCount > 0)} Agents: ${agentCount} loaded
|
|
186
193
|
|
|
187
|
-
🪝 Hooks (Gemini CLI)
|
|
188
|
-
${icon(check(settingsPath))} settings.json
|
|
189
|
-
${icon(hooksActive)} Hooks active: ${hooksActive ? hooks.length + ' configured' : 'none found'}
|
|
190
|
-
|
|
191
194
|
💻 IDE Integration
|
|
192
|
-
${icon(
|
|
195
|
+
${icon(hasGeminiMd)} GEMINI.md (Gemini CLI — primary config)
|
|
196
|
+
${icon(geminiPersonaOk)} Michelangelo persona active
|
|
197
|
+
${icon(hasGeminiRules)} .gemini/rules.md (compatibility fallback)
|
|
193
198
|
${icon(hasCursor)} .cursor (Cursor rules)
|
|
194
199
|
${icon(hasClaude)} .claude (Claude commands)
|
|
195
200
|
|
|
201
|
+
🪝 Hooks (Gemini CLI)
|
|
202
|
+
${icon(check(settingsPath))} settings.json
|
|
203
|
+
${icon(hooksActive)} Hooks: ${hooksActive ? hooks.length + ' configured' : 'none'}
|
|
204
|
+
|
|
196
205
|
💾 Memory Layer
|
|
197
206
|
${icon(hasMemory)} Memory store ${hasMemory ? '(active)' : '(not initialized)'}
|
|
198
|
-
${lastAgent ? `
|
|
199
|
-
🧙 Last Agent: @${lastAgent}` : ''}
|
|
200
207
|
|
|
201
|
-
Run 'grimoire agents list' to see all agents.
|
|
202
|
-
Run 'grimoire
|
|
208
|
+
${!hasGeminiMd || !geminiPersonaOk ? '⚠️ Run: npx grimoire-framework update --force to fix missing files\n' : ''} Run 'grimoire agents list' to see all agents.
|
|
209
|
+
Run 'grimoire doctor' for diagnostics with tips.
|
|
203
210
|
`);
|
|
204
211
|
}
|
|
205
212
|
|
|
@@ -276,29 +283,95 @@ ${config.squad ? `👥 Squad: ${config.squad}` : ''}
|
|
|
276
283
|
function handleDoctor() {
|
|
277
284
|
const cwd = process.cwd();
|
|
278
285
|
const check = (p) => fs.existsSync(p);
|
|
279
|
-
const ok = (v, msg) =>
|
|
286
|
+
const ok = (v, msg, hint) => {
|
|
287
|
+
console.log(` ${v ? '✅' : '❌'} ${msg}`);
|
|
288
|
+
if (!v && hint) console.log(` 💡 ${hint}`);
|
|
289
|
+
};
|
|
290
|
+
const warn = (v, msg, hint) => {
|
|
291
|
+
console.log(` ${v ? '✅' : '⚠️ '} ${msg}`);
|
|
292
|
+
if (!v && hint) console.log(` 💡 ${hint}`);
|
|
293
|
+
};
|
|
280
294
|
|
|
281
295
|
console.log('\n🏥 Grimoire Doctor\n' + '='.repeat(40));
|
|
282
296
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
297
|
+
// ── Gemini CLI Integration ──────────────────────────────────────
|
|
298
|
+
console.log('\n💻 Gemini CLI Integration:');
|
|
299
|
+
const geminiMdPath = path.join(cwd, 'GEMINI.md');
|
|
300
|
+
const rulesPath = path.join(cwd, '.gemini', 'rules.md');
|
|
301
|
+
const hasGeminiMd = check(geminiMdPath);
|
|
302
|
+
const hasRulesMd = check(rulesPath);
|
|
303
|
+
|
|
304
|
+
ok(hasGeminiMd, 'GEMINI.md (primary config for modern Gemini CLI)',
|
|
305
|
+
'Run: npx grimoire-framework update --force');
|
|
306
|
+
warn(hasRulesMd, '.gemini/rules.md (compatibility fallback)',
|
|
307
|
+
'Run: npx grimoire-framework update --force');
|
|
288
308
|
|
|
289
|
-
|
|
309
|
+
if (hasGeminiMd) {
|
|
310
|
+
try {
|
|
311
|
+
const content = fs.readFileSync(geminiMdPath, 'utf8');
|
|
312
|
+
ok(content.includes('Michelangelo'), 'Michelangelo persona in GEMINI.md',
|
|
313
|
+
'GEMINI.md may be outdated — run: npx grimoire-framework update --force');
|
|
314
|
+
ok(content.includes('@dev'), 'Agent roster in GEMINI.md',
|
|
315
|
+
'GEMINI.md is missing the agent roster');
|
|
316
|
+
} catch (e) { ok(false, 'GEMINI.md readable'); }
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// ── Agents ─────────────────────────────────────────────────────
|
|
320
|
+
console.log('\n🤖 Agents:');
|
|
321
|
+
const agentsDir = path.join(cwd, '.codex', 'agents');
|
|
322
|
+
ok(check(agentsDir), '.codex/agents directory', 'Run: npx grimoire-framework update --force');
|
|
323
|
+
if (check(agentsDir)) {
|
|
324
|
+
const agents = fs.readdirSync(agentsDir).filter(f => f.endsWith('.md'));
|
|
325
|
+
ok(agents.length >= 10, `Core agents installed (${agents.length} found, need ≥10)`,
|
|
326
|
+
'Run: npx grimoire-framework update --force');
|
|
327
|
+
|
|
328
|
+
const requiredAgents = ['grimoire-master.md', 'dev.md', 'qa.md', 'architect.md', 'pm.md'];
|
|
329
|
+
for (const a of requiredAgents) {
|
|
330
|
+
warn(agents.includes(a), `Agent: ${a.replace('.md', '')}`);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// Check grimoire-master has Michelangelo
|
|
334
|
+
const masterPath = path.join(agentsDir, 'grimoire-master.md');
|
|
335
|
+
if (check(masterPath)) {
|
|
336
|
+
try {
|
|
337
|
+
const content = fs.readFileSync(masterPath, 'utf8');
|
|
338
|
+
ok(content.includes('Michelangelo'), 'grimoire-master has Michelangelo persona',
|
|
339
|
+
'Outdated agent — run: npx grimoire-framework update --force');
|
|
340
|
+
} catch (e) { }
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// ── Framework Package ──────────────────────────────────────────
|
|
345
|
+
console.log('\n📦 Package:');
|
|
290
346
|
const pkgPath = path.join(cwd, 'package.json');
|
|
291
347
|
if (check(pkgPath)) {
|
|
292
348
|
try {
|
|
293
349
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
294
350
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
295
|
-
ok(!!deps['grimoire-framework'], 'grimoire-framework in package.json'
|
|
351
|
+
ok(!!deps['grimoire-framework'], 'grimoire-framework in package.json',
|
|
352
|
+
'Run: npm install grimoire-framework');
|
|
353
|
+
|
|
354
|
+
// Check installed version vs latest
|
|
355
|
+
const installedPkgPath = path.join(cwd, 'node_modules', 'grimoire-framework', 'package.json');
|
|
356
|
+
if (check(installedPkgPath)) {
|
|
357
|
+
try {
|
|
358
|
+
const installedVer = JSON.parse(fs.readFileSync(installedPkgPath, 'utf8')).version;
|
|
359
|
+
const declaredVer = (deps['grimoire-framework'] || '').replace(/[^0-9.]/g, '');
|
|
360
|
+
ok(true, `Installed version: v${installedVer}`);
|
|
361
|
+
} catch (e) { }
|
|
362
|
+
}
|
|
296
363
|
} catch (e) { ok(false, 'package.json readable'); }
|
|
297
364
|
} else {
|
|
298
365
|
ok(false, 'package.json found');
|
|
299
366
|
}
|
|
300
367
|
|
|
301
|
-
|
|
368
|
+
// ── Other IDEs ────────────────────────────────────────────────
|
|
369
|
+
console.log('\n🔗 Other IDE Integration:');
|
|
370
|
+
warn(check(path.join(cwd, '.cursor', 'rules')), '.cursor/rules (Cursor)');
|
|
371
|
+
warn(check(path.join(cwd, '.claude')), '.claude/ (Claude Code)');
|
|
372
|
+
|
|
373
|
+
console.log('\n Run \'grimoire status\' for full framework state.');
|
|
374
|
+
console.log(' Run \'npx grimoire-framework update --force\' to resync all files.\n');
|
|
302
375
|
}
|
|
303
376
|
|
|
304
377
|
function showHelp() {
|
package/package.json
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* @module packages/installer/src/updater
|
|
6
6
|
* @story Epic 7 - CLI Update Command
|
|
7
7
|
* @version 1.0.0
|
|
8
|
+
* @deprecated Use bin/commands/update.js instead.
|
|
9
|
+
* The new smart update command (grimoire-framework@1.0.10+) replaces this class.
|
|
10
|
+
* This file is kept for backwards compatibility of the installer wizard only.
|
|
11
|
+
* DO NOT add new update logic here — use bin/commands/update.js.
|
|
8
12
|
*
|
|
9
13
|
* Features:
|
|
10
14
|
* - Detects installed version vs latest available
|