grimoire-framework 1.0.18 → 1.0.21
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/bin/commands/agent.js +216 -0
- package/bin/commands/memory.js +131 -25
- package/bin/commands/metrics.js +213 -55
- package/bin/commands/sync.js +203 -0
- package/bin/commands/update.js +1 -0
- package/bin/grimoire-cli.js +95 -1
- package/package.json +2 -1
- package/packages/installer/src/utils/grimoire-colors.js +65 -36
- package/squads/.gitkeep +2 -0
- package/squads/README.md +25 -0
- package/squads/devops/squad.yaml +9 -0
- package/squads/devops/workflows/deploy-pipeline.md +22 -0
- package/squads/fullstack/squad.yaml +11 -0
- package/squads/fullstack/workflows/code-review.md +22 -0
- package/squads/fullstack/workflows/new-feature.md +24 -0
- package/squads/planning/squad.yaml +10 -0
- package/squads/planning/workflows/prd-to-stories.md +20 -0
|
@@ -19,73 +19,73 @@ const colors = {
|
|
|
19
19
|
// ============================================
|
|
20
20
|
// CORE BRAND COLORS
|
|
21
21
|
// ============================================
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
/**
|
|
24
24
|
* Primary brand color - ClickUp-inspired purple
|
|
25
25
|
* Usage: Main questions, headers, CTAs, primary actions
|
|
26
26
|
*/
|
|
27
27
|
primary: chalk.hex('#8B5CF6'),
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
/**
|
|
30
30
|
* Secondary brand color - Magenta accent from logo gradient
|
|
31
31
|
* Usage: Important highlights, special emphasis, key information
|
|
32
32
|
*/
|
|
33
33
|
secondary: chalk.hex('#EC4899'),
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
/**
|
|
36
36
|
* Tertiary brand color - Blue accent from logo gradient
|
|
37
37
|
* Usage: Secondary actions, links, complementary elements
|
|
38
38
|
*/
|
|
39
39
|
tertiary: chalk.hex('#3B82F6'),
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
// ============================================
|
|
42
42
|
// FUNCTIONAL COLORS
|
|
43
43
|
// ============================================
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
/**
|
|
46
46
|
* Success state color
|
|
47
47
|
* Usage: Checkmarks, completed steps, success messages
|
|
48
48
|
*/
|
|
49
49
|
success: chalk.hex('#10B981'),
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
/**
|
|
52
52
|
* Warning state color - Orange from logo gradient
|
|
53
53
|
* Usage: Warnings, confirmations, caution states
|
|
54
54
|
*/
|
|
55
55
|
warning: chalk.hex('#F59E0B'),
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
/**
|
|
58
58
|
* Error state color
|
|
59
59
|
* Usage: Errors, critical alerts, validation failures
|
|
60
60
|
*/
|
|
61
61
|
error: chalk.hex('#EF4444'),
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
/**
|
|
64
64
|
* Info state color - Cyan-blue from logo gradient
|
|
65
65
|
* Usage: Info messages, tips, helper text, additional context
|
|
66
66
|
*/
|
|
67
67
|
info: chalk.hex('#06B6D4'),
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
// ============================================
|
|
70
70
|
// NEUTRAL COLORS
|
|
71
71
|
// ============================================
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
/**
|
|
74
74
|
* Muted text color
|
|
75
75
|
* Usage: Subtle text, disabled states, secondary content
|
|
76
76
|
*/
|
|
77
77
|
muted: chalk.hex('#94A3B8'),
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
/**
|
|
80
80
|
* Dim text color
|
|
81
81
|
* Usage: Secondary text, muted content, less important info
|
|
82
82
|
*/
|
|
83
83
|
dim: chalk.hex('#64748B'),
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
// ============================================
|
|
86
86
|
// GRADIENT SYSTEM
|
|
87
87
|
// ============================================
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
/**
|
|
90
90
|
* Brand gradient colors for animations and special effects
|
|
91
91
|
* Matches grimoire logo gradient: magenta → purple → blue
|
|
@@ -93,28 +93,28 @@ const colors = {
|
|
|
93
93
|
gradient: {
|
|
94
94
|
/** Gradient start - Magenta (logo top) */
|
|
95
95
|
start: chalk.hex('#EC4899'),
|
|
96
|
-
|
|
96
|
+
|
|
97
97
|
/** Gradient middle - Purple (brand) */
|
|
98
98
|
middle: chalk.hex('#8B5CF6'),
|
|
99
|
-
|
|
99
|
+
|
|
100
100
|
/** Gradient end - Blue (logo bottom) */
|
|
101
101
|
end: chalk.hex('#3B82F6'),
|
|
102
102
|
},
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
// ============================================
|
|
105
105
|
// SEMANTIC SHORTCUTS
|
|
106
106
|
// ============================================
|
|
107
|
-
|
|
107
|
+
|
|
108
108
|
/**
|
|
109
109
|
* Highlighted text - Bold magenta for key information
|
|
110
110
|
*/
|
|
111
111
|
highlight: chalk.hex('#EC4899').bold,
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
/**
|
|
114
114
|
* Primary branding - Bold purple for grimoire brand moments
|
|
115
115
|
*/
|
|
116
116
|
brandPrimary: chalk.hex('#8B5CF6').bold,
|
|
117
|
-
|
|
117
|
+
|
|
118
118
|
/**
|
|
119
119
|
* Secondary branding - Cyan for supporting brand elements
|
|
120
120
|
*/
|
|
@@ -127,25 +127,25 @@ const colors = {
|
|
|
127
127
|
const status = {
|
|
128
128
|
/** Success indicator: ✓ (green) */
|
|
129
129
|
success: (text) => `${colors.success('✓')} ${text}`,
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
/** Error indicator: ✗ (red) */
|
|
132
132
|
error: (text) => `${colors.error('✗')} ${text}`,
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
/** Warning indicator: ⚠️ (orange) */
|
|
135
135
|
warning: (text) => `${colors.warning('⚠️')} ${text}`,
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
/** Info indicator: ℹ (cyan) */
|
|
138
138
|
info: (text) => `${colors.info('ℹ')} ${text}`,
|
|
139
|
-
|
|
139
|
+
|
|
140
140
|
/** Loading indicator: ⏳ (cyan) */
|
|
141
141
|
loading: (text) => `${colors.info('⏳')} ${text}`,
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
/** Skipped indicator: ⊘ (muted) */
|
|
144
144
|
skipped: (text) => `${colors.muted('⊘')} ${text}`,
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
/** Tip indicator: 💡 (info) */
|
|
147
147
|
tip: (text) => `${colors.info('💡')} ${text}`,
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
/** Party indicator: 🎉 (brand primary) */
|
|
150
150
|
celebrate: (text) => `${colors.brandPrimary('🎉')} ${text}`,
|
|
151
151
|
};
|
|
@@ -156,13 +156,13 @@ const status = {
|
|
|
156
156
|
const headings = {
|
|
157
157
|
/** H1 - Brand primary, bold, large spacing */
|
|
158
158
|
h1: (text) => `\n${colors.brandPrimary(text)}\n`,
|
|
159
|
-
|
|
159
|
+
|
|
160
160
|
/** H2 - Primary color, bold */
|
|
161
161
|
h2: (text) => `\n${colors.primary.bold(text)}\n`,
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
/** H3 - Primary color */
|
|
164
164
|
h3: (text) => colors.primary(text),
|
|
165
|
-
|
|
165
|
+
|
|
166
166
|
/** Section divider */
|
|
167
167
|
divider: () => colors.dim('─'.repeat(50)),
|
|
168
168
|
};
|
|
@@ -173,10 +173,10 @@ const headings = {
|
|
|
173
173
|
const lists = {
|
|
174
174
|
/** Bullet point (primary) */
|
|
175
175
|
bullet: (text) => `${colors.primary('•')} ${text}`,
|
|
176
|
-
|
|
176
|
+
|
|
177
177
|
/** Numbered item (primary) */
|
|
178
178
|
numbered: (num, text) => `${colors.primary(`${num}.`)} ${text}`,
|
|
179
|
-
|
|
179
|
+
|
|
180
180
|
/** Checkbox unchecked */
|
|
181
181
|
checkbox: (text, checked = false) => {
|
|
182
182
|
const icon = checked ? colors.success('☑') : colors.muted('☐');
|
|
@@ -192,31 +192,60 @@ const examples = {
|
|
|
192
192
|
console.log(headings.h1('🎉 Welcome to grimoire v4 Installer!'));
|
|
193
193
|
console.log(colors.info('Let\'s configure your project in just a few steps...\n'));
|
|
194
194
|
},
|
|
195
|
-
|
|
195
|
+
|
|
196
196
|
question: () => {
|
|
197
197
|
console.log(colors.primary('? Select your project type:'));
|
|
198
198
|
console.log(lists.bullet('Greenfield (new project)'));
|
|
199
199
|
console.log(lists.bullet('Brownfield (existing project)'));
|
|
200
200
|
},
|
|
201
|
-
|
|
201
|
+
|
|
202
202
|
progress: () => {
|
|
203
203
|
console.log(status.loading('Installing dependencies...'));
|
|
204
204
|
console.log(status.success('Dependencies installed'));
|
|
205
205
|
console.log(status.loading('Configuring environment...'));
|
|
206
206
|
},
|
|
207
|
-
|
|
207
|
+
|
|
208
208
|
feedback: () => {
|
|
209
209
|
console.log(status.success('Configuration complete!'));
|
|
210
210
|
console.log(status.warning('Existing .env found. Overwrite?'));
|
|
211
211
|
console.log(status.error('Invalid path provided'));
|
|
212
212
|
console.log(status.tip('You can change this later in settings'));
|
|
213
213
|
},
|
|
214
|
-
|
|
215
|
-
complete: () => {
|
|
214
|
+
|
|
215
|
+
complete: (projectDir) => {
|
|
216
216
|
console.log('\n' + headings.divider());
|
|
217
217
|
console.log(status.celebrate('Installation Complete!'));
|
|
218
218
|
console.log(colors.info('Your grimoire project is ready to use.'));
|
|
219
219
|
console.log(headings.divider() + '\n');
|
|
220
|
+
|
|
221
|
+
// First-Run Next Steps
|
|
222
|
+
const path = require('path');
|
|
223
|
+
const fs = require('fs');
|
|
224
|
+
const cwd = projectDir || process.cwd();
|
|
225
|
+
const hasGemini = fs.existsSync(path.join(cwd, 'GEMINI.md'));
|
|
226
|
+
const hasClaude = fs.existsSync(path.join(cwd, '.claude'));
|
|
227
|
+
const hasCursor = fs.existsSync(path.join(cwd, '.cursor'));
|
|
228
|
+
|
|
229
|
+
let ideStep = ' 2. Abra o Gemini CLI: gemini → Michelangelo te recebe';
|
|
230
|
+
if (hasClaude) ideStep = ' 2. Abra o Claude Code — use /dev, /qa, /architect';
|
|
231
|
+
else if (hasCursor) ideStep = ' 2. Abra o Cursor — @dev, @qa, @architect no chat';
|
|
232
|
+
else if (hasGemini) ideStep = ' 2. Abra o Gemini CLI: gemini → Michelangelo te recebe';
|
|
233
|
+
|
|
234
|
+
const agentsDir = path.join(cwd, '.codex', 'agents');
|
|
235
|
+
const agentCount = fs.existsSync(agentsDir)
|
|
236
|
+
? fs.readdirSync(agentsDir).filter(f => f.endsWith('.md')).length : 0;
|
|
237
|
+
|
|
238
|
+
console.log(`🎯 Próximos passos:
|
|
239
|
+
1. Verifique a instalação: grimoire status
|
|
240
|
+
${ideStep}
|
|
241
|
+
3. Liste os agentes: grimoire agents list
|
|
242
|
+
4. Diagnóstico completo: grimoire doctor
|
|
243
|
+
|
|
244
|
+
💡 Dica: Diga "@dev implementa o login" no chat da sua IDE.
|
|
245
|
+
Você tem ${agentCount} agentes prontos: @dev @qa @architect @grimoire-master...
|
|
246
|
+
|
|
247
|
+
📚 Docs: https://github.com/gabrielrlima/grimoire#readme
|
|
248
|
+
`);
|
|
220
249
|
},
|
|
221
250
|
};
|
|
222
251
|
|
package/squads/.gitkeep
ADDED
package/squads/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Grimoire Squads
|
|
2
|
+
|
|
3
|
+
Este diretório contém os squads pré-configurados para organizar o fluxo de trabalho dos agentes.
|
|
4
|
+
|
|
5
|
+
## Squads Disponíveis
|
|
6
|
+
|
|
7
|
+
### 1. Full Stack Development
|
|
8
|
+
**Agentes:** @dev, @qa, @architect
|
|
9
|
+
**Foco:** Planejamento técnico, codificação e testes.
|
|
10
|
+
|
|
11
|
+
### 2. Planning & Strategy
|
|
12
|
+
**Agentes:** @analyst, @pm, @architect, @ux-design-expert
|
|
13
|
+
**Foco:** Transformar ideias em PRDs e arquitetura.
|
|
14
|
+
|
|
15
|
+
### 3. DevOps & Management
|
|
16
|
+
**Agentes:** @devops, @sm, @po
|
|
17
|
+
**Foco:** Backlog, sprints e pipelines de deploy.
|
|
18
|
+
|
|
19
|
+
## Como Usar
|
|
20
|
+
Para carregar um squad durante a instalação ou re-setup, selecione as opções correspondentes no CLI do Grimoire.
|
|
21
|
+
|
|
22
|
+
## Como Criar Squads Customizados
|
|
23
|
+
1. Crie uma nova pasta dentro de `squads/`.
|
|
24
|
+
2. Adicione um arquivo `squad.yaml` com nome, descrição e a lista de agentes (referenciando arquivos em `.codex/agents/`).
|
|
25
|
+
3. Adicione fluxos de trabalho em uma pasta `workflows/` opcional.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Workflow: Pipeline de Deploy (Deploy Pipeline)
|
|
2
|
+
|
|
3
|
+
**Objetivo:** Garantir a entrega segura e automatizada do software.
|
|
4
|
+
|
|
5
|
+
## Etapas do Fluxo
|
|
6
|
+
|
|
7
|
+
### 1. Quality Gate
|
|
8
|
+
- **Agente:** @devops
|
|
9
|
+
- **Ação:** Rodar lint, testes e build no CI antes do push.
|
|
10
|
+
|
|
11
|
+
### 2. Versionamento
|
|
12
|
+
- **Agente:** @devops
|
|
13
|
+
- **Ação:** Realizar o bump de versão e criar tags de release.
|
|
14
|
+
|
|
15
|
+
### 3. Promoção de Ambiente
|
|
16
|
+
- **Agente:** @devops
|
|
17
|
+
- **Ação:** Orquestrar o deploy para staging ou produção.
|
|
18
|
+
|
|
19
|
+
## Ferramentas
|
|
20
|
+
- GitHub Actions
|
|
21
|
+
- Semantic Release
|
|
22
|
+
- Quality Gate Hooks
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: "Full Stack Development Squad"
|
|
2
|
+
description: "Squad completo para planejamento, implementação e teste de features de software."
|
|
3
|
+
agents:
|
|
4
|
+
- dev
|
|
5
|
+
- qa
|
|
6
|
+
- architect
|
|
7
|
+
workflows:
|
|
8
|
+
- id: new-feature
|
|
9
|
+
file: workflows/new-feature.md
|
|
10
|
+
- id: code-review
|
|
11
|
+
file: workflows/code-review.md
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Workflow: Revisão de Código (Code Review)
|
|
2
|
+
|
|
3
|
+
**Objetivo:** Garantir a qualidade e consistência do código antes do merge.
|
|
4
|
+
|
|
5
|
+
## Etapas do Fluxo
|
|
6
|
+
|
|
7
|
+
### 1. Análise Estática
|
|
8
|
+
- **Agente:** @qa (em conjunto com CodeRabbit)
|
|
9
|
+
- **Ação:** Identificar bugs latentes, vulnerabilidades e dívida técnica.
|
|
10
|
+
|
|
11
|
+
### 2. Revisão de Padrões
|
|
12
|
+
- **Agente:** @architect
|
|
13
|
+
- **Ação:** Validar se o código segue os padrões arquiteturais do projeto.
|
|
14
|
+
|
|
15
|
+
### 3. Validação de Lógica
|
|
16
|
+
- **Agente:** @dev (Peer Review)
|
|
17
|
+
- **Ação:** Revisar a lógica de negócio implementada.
|
|
18
|
+
|
|
19
|
+
## Critérios de Aprovação
|
|
20
|
+
- Zero problemas críticos de segurança.
|
|
21
|
+
- Lint e testes passando 100%.
|
|
22
|
+
- Conformidade com ADRs existentes.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Workflow: Nova Funcionalidade (New Feature)
|
|
2
|
+
|
|
3
|
+
**Objetivo:** Levar uma ideia de funcionalidade até a produção através de um fluxo estruturado.
|
|
4
|
+
|
|
5
|
+
## Etapas do Fluxo
|
|
6
|
+
|
|
7
|
+
### 1. Planejamento Arquitetural
|
|
8
|
+
- **Agente:** @architect
|
|
9
|
+
- **Ação:** Criar ou atualizar o design do sistema para a nova feature.
|
|
10
|
+
- **Saída:** Documento de arquitetura técnica.
|
|
11
|
+
|
|
12
|
+
### 2. Implementação
|
|
13
|
+
- **Agente:** @dev
|
|
14
|
+
- **Ação:** Codificar a funcionalidade seguindo o design aprovado.
|
|
15
|
+
- **Saída:** Código-fonte implementado e commitado localmente.
|
|
16
|
+
|
|
17
|
+
### 3. Garantia de Qualidade (QA)
|
|
18
|
+
- **Agente:** @qa
|
|
19
|
+
- **Ação:** Validar a implementação contra os critérios de aceitação.
|
|
20
|
+
- **Saída:** Aprovação de QA e sugestões de melhoria.
|
|
21
|
+
|
|
22
|
+
## Gatilhos (Triggers)
|
|
23
|
+
- Solicitação de nova feature pelo @pm
|
|
24
|
+
- Backlog de sprints atualizado pelo @sm
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
name: "Planning & Strategy Squad"
|
|
2
|
+
description: "Squad focado em requisitos, design de sistema e experiência do usuário (UX)."
|
|
3
|
+
agents:
|
|
4
|
+
- analyst
|
|
5
|
+
- pm
|
|
6
|
+
- architect
|
|
7
|
+
- ux-design-expert
|
|
8
|
+
workflows:
|
|
9
|
+
- id: prd-to-stories
|
|
10
|
+
file: workflows/prd-to-stories.md
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Workflow: PRD para Histórias (PRD to Stories)
|
|
2
|
+
|
|
3
|
+
**Objetivo:** Fragmentar requisitos de alto nível em unidades de desenvolvimento acionáveis.
|
|
4
|
+
|
|
5
|
+
## Etapas do Fluxo
|
|
6
|
+
|
|
7
|
+
### 1. Refinamento de Requisitos
|
|
8
|
+
- **Agente:** @analyst + @pm
|
|
9
|
+
- **Ação:** Validar o briefing e transformar em um PRD completo.
|
|
10
|
+
|
|
11
|
+
### 2. Design Visual (UX)
|
|
12
|
+
- **Agente:** @ux-design-expert
|
|
13
|
+
- **Ação:** Criar fluxos de usuário e wireframes para os requisitos.
|
|
14
|
+
|
|
15
|
+
### 3. Fragmentação (Sharding)
|
|
16
|
+
- **Agente:** @sm
|
|
17
|
+
- **Ação:** Criar as histórias (stories) em `docs/stories/` com base no PRD.
|
|
18
|
+
|
|
19
|
+
## Saída Esperada
|
|
20
|
+
- Backlog de stories priorizado e pronto para implementação.
|