vireum-spec-cli 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +259 -0
- package/dist/commands/brief.js +0 -4
- package/dist/commands/distill.js +64 -301
- package/dist/commands/enrich.js +50 -55
- package/dist/commands/health.js +0 -4
- package/dist/commands/init/ai.js +186 -0
- package/dist/commands/init/api.js +195 -0
- package/dist/commands/init/automation.js +166 -0
- package/dist/commands/init/mobile.js +155 -0
- package/dist/commands/init/system.js +307 -0
- package/dist/commands/init/web.js +165 -0
- package/dist/commands/init.js +21 -253
- package/dist/commands/prioritize.js +82 -34
- package/dist/commands/retrofit.js +14 -400
- package/dist/commands/setup.js +56 -488
- package/dist/commands/skills.js +0 -6
- package/dist/commands/verify-mcps.js +0 -4
- package/dist/index.js +39 -2
- package/dist/lib/analyzer.js +194 -0
- package/dist/lib/generators-retrofit.js +259 -0
- package/dist/lib/generators-retrofit.test.js +112 -0
- package/dist/lib/generators-setup.js +764 -0
- package/dist/lib/generators-setup.test.js +118 -0
- package/dist/lib/generators.js +593 -0
- package/dist/lib/parsers/ai.js +54 -0
- package/dist/lib/parsers/api.js +63 -0
- package/dist/lib/parsers/automation.js +52 -0
- package/dist/lib/parsers/mobile.js +60 -0
- package/dist/lib/parsers/system.js +66 -0
- package/dist/lib/parsers/web.js +70 -0
- package/dist/lib/types.js +2 -0
- package/docs/COMO_USAR.md +322 -0
- package/docs/DOCUMENTACAO_FRAMEWORK.md +568 -0
- package/package.json +9 -3
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseBriefingApi = parseBriefingApi;
|
|
4
|
+
function parseBriefingApi(briefing) {
|
|
5
|
+
const endpoints = extrairListaSimples(briefing, 'Principais recursos');
|
|
6
|
+
return {
|
|
7
|
+
tipo: 'api',
|
|
8
|
+
projeto: extrairCampo(briefing, 'Projeto'),
|
|
9
|
+
cliente: extrairCampo(briefing, 'Cliente'),
|
|
10
|
+
responsavel: extrairCampo(briefing, 'Responsável'),
|
|
11
|
+
data: extrairCampo(briefing, 'Data da reunião') || new Date().toLocaleDateString('pt-BR'),
|
|
12
|
+
objetivo: extrairCampo(briefing, 'Propósito'),
|
|
13
|
+
problema: '',
|
|
14
|
+
prioridade: '',
|
|
15
|
+
features: endpoints,
|
|
16
|
+
featuresDesejaveis: [],
|
|
17
|
+
regras: '',
|
|
18
|
+
riscos: { tecnico: '', juridico: '', operacional: '' },
|
|
19
|
+
extra: {
|
|
20
|
+
consumidores: extrairCampo(briefing, 'Consumidores'),
|
|
21
|
+
endpoints: endpoints.join(', '),
|
|
22
|
+
auth: extrairCampo(briefing, 'Autenticação'),
|
|
23
|
+
rate_limiting: briefing.includes('Rate limiting: Sim'),
|
|
24
|
+
cors: briefing.includes('CORS configurado: Sim'),
|
|
25
|
+
dados_sensiveis: briefing.includes('Dados sensíveis: Sim'),
|
|
26
|
+
lgpd: briefing.includes('LGPD: Sim'),
|
|
27
|
+
banco: extrairCampo(briefing, 'Banco'),
|
|
28
|
+
orm: extrairCampo(briefing, 'ORM'),
|
|
29
|
+
cache: briefing.includes('Cache (Redis): Sim'),
|
|
30
|
+
swagger: briefing.includes('Swagger / OpenAPI: Sim'),
|
|
31
|
+
versioning: briefing.includes('Versionamento de API: Sim'),
|
|
32
|
+
sdk: briefing.includes('SDK para consumidores: Sim'),
|
|
33
|
+
deploy_plataforma: extrairCampo(briefing, 'Plataforma'),
|
|
34
|
+
staging: briefing.includes('Staging: Sim'),
|
|
35
|
+
cicd: briefing.includes('CI/CD: Sim'),
|
|
36
|
+
monitoramento: briefing.includes('Monitoramento / alertas: Sim'),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function extrairCampo(briefing, campo) {
|
|
41
|
+
const r1 = new RegExp(`\\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
42
|
+
const m1 = briefing.match(r1);
|
|
43
|
+
if (m1)
|
|
44
|
+
return m1[1].trim();
|
|
45
|
+
const r2 = new RegExp(`- \\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
46
|
+
const m2 = briefing.match(r2);
|
|
47
|
+
if (m2)
|
|
48
|
+
return m2[1].trim();
|
|
49
|
+
const r3 = new RegExp(`- ${campo}:\\s*(.+)`, 'i');
|
|
50
|
+
const m3 = briefing.match(r3);
|
|
51
|
+
return m3 ? m3[1].trim() : '';
|
|
52
|
+
}
|
|
53
|
+
function extrairListaSimples(briefing, tituloSubsecao) {
|
|
54
|
+
const regex = new RegExp(`### ${tituloSubsecao}[^\\n]*\\n([\\s\\S]*?)(?=###|##|$)`, 'i');
|
|
55
|
+
const match = briefing.match(regex);
|
|
56
|
+
if (!match)
|
|
57
|
+
return [];
|
|
58
|
+
return match[1]
|
|
59
|
+
.split('\n')
|
|
60
|
+
.filter(l => l.trim().startsWith('- '))
|
|
61
|
+
.map(l => l.replace(/^-\s*/, '').trim())
|
|
62
|
+
.filter(Boolean);
|
|
63
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseBriefingAutomation = parseBriefingAutomation;
|
|
4
|
+
function parseBriefingAutomation(briefing) {
|
|
5
|
+
const objetivo = extrairCampo(briefing, 'O que faz');
|
|
6
|
+
const problema = extrairCampo(briefing, 'Processo atual');
|
|
7
|
+
return {
|
|
8
|
+
tipo: 'automation',
|
|
9
|
+
projeto: extrairCampo(briefing, 'Projeto'),
|
|
10
|
+
cliente: extrairCampo(briefing, 'Cliente'),
|
|
11
|
+
responsavel: extrairCampo(briefing, 'Responsável'),
|
|
12
|
+
data: extrairCampo(briefing, 'Data da reunião') || new Date().toLocaleDateString('pt-BR'),
|
|
13
|
+
objetivo,
|
|
14
|
+
problema,
|
|
15
|
+
prioridade: '',
|
|
16
|
+
features: objetivo ? [objetivo] : [],
|
|
17
|
+
featuresDesejaveis: [],
|
|
18
|
+
regras: '',
|
|
19
|
+
riscos: { tecnico: '', juridico: '', operacional: '' },
|
|
20
|
+
extra: {
|
|
21
|
+
trigger: extrairCampo(briefing, 'Trigger'),
|
|
22
|
+
frequencia: extrairCampo(briefing, 'Frequência'),
|
|
23
|
+
volume: extrairCampo(briefing, 'Volume por execução'),
|
|
24
|
+
fonte: extrairCampo(briefing, 'Fonte de dados'),
|
|
25
|
+
fonte_detalhe: extrairCampo(briefing, 'Detalhe da fonte'),
|
|
26
|
+
transformacao: extrairCampo(briefing, 'Transformação'),
|
|
27
|
+
destino: extrairCampo(briefing, 'Destino'),
|
|
28
|
+
destino_detalhe: extrairCampo(briefing, 'Detalhe do destino'),
|
|
29
|
+
retry: briefing.includes('Retry em caso de falha: Sim'),
|
|
30
|
+
alerta: briefing.includes('Alerta de falha: Sim'),
|
|
31
|
+
alerta_canal: extrairCampo(briefing, 'Canal de alerta'),
|
|
32
|
+
idempotente: briefing.includes('Idempotente: Sim'),
|
|
33
|
+
logs: briefing.includes('Logs de execução: Sim'),
|
|
34
|
+
dashboard_mon: briefing.includes('Dashboard de monitoramento: Sim'),
|
|
35
|
+
linguagem: extrairCampo(briefing, 'Linguagem'),
|
|
36
|
+
deploy_auto: extrairCampo(briefing, 'Deploy'),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function extrairCampo(briefing, campo) {
|
|
41
|
+
const r1 = new RegExp(`\\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
42
|
+
const m1 = briefing.match(r1);
|
|
43
|
+
if (m1)
|
|
44
|
+
return m1[1].trim();
|
|
45
|
+
const r2 = new RegExp(`- \\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
46
|
+
const m2 = briefing.match(r2);
|
|
47
|
+
if (m2)
|
|
48
|
+
return m2[1].trim();
|
|
49
|
+
const r3 = new RegExp(`- ${campo}:\\s*(.+)`, 'i');
|
|
50
|
+
const m3 = briefing.match(r3);
|
|
51
|
+
return m3 ? m3[1].trim() : '';
|
|
52
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseBriefingMobile = parseBriefingMobile;
|
|
4
|
+
function parseBriefingMobile(briefing) {
|
|
5
|
+
const features = extrairCheckboxes(briefing, 'Funcionalidades obrigatórias');
|
|
6
|
+
return {
|
|
7
|
+
tipo: 'mobile',
|
|
8
|
+
projeto: extrairCampo(briefing, 'Projeto'),
|
|
9
|
+
cliente: extrairCampo(briefing, 'Cliente'),
|
|
10
|
+
responsavel: extrairCampo(briefing, 'Responsável'),
|
|
11
|
+
data: extrairCampo(briefing, 'Data da reunião') || new Date().toLocaleDateString('pt-BR'),
|
|
12
|
+
objetivo: extrairCampo(briefing, 'Propósito'),
|
|
13
|
+
problema: extrairCampo(briefing, 'Problema resolvido'),
|
|
14
|
+
prioridade: '',
|
|
15
|
+
features,
|
|
16
|
+
featuresDesejaveis: [],
|
|
17
|
+
regras: '',
|
|
18
|
+
riscos: { tecnico: '', juridico: '', operacional: '' },
|
|
19
|
+
extra: {
|
|
20
|
+
plataformas: extrairCampo(briefing, 'Plataformas'),
|
|
21
|
+
framework: extrairCampo(briefing, 'Framework'),
|
|
22
|
+
offline: briefing.includes('Funcionamento offline: Sim'),
|
|
23
|
+
push: briefing.includes('Notificações push: Sim'),
|
|
24
|
+
camera: briefing.includes('Câmera / Galeria'),
|
|
25
|
+
localizacao: briefing.includes('Localização / GPS'),
|
|
26
|
+
biometria: briefing.includes('Biometria'),
|
|
27
|
+
tem_api: briefing.includes('Conecta a API: Sim'),
|
|
28
|
+
api_propria: briefing.includes('API própria (Vireum): Sim'),
|
|
29
|
+
auth_mobile: extrairCampo(briefing, 'Autenticação'),
|
|
30
|
+
publicar: briefing.includes('Publicar nas lojas: Sim'),
|
|
31
|
+
conta_existente: briefing.includes('Contas de desenvolvedor existentes: Sim'),
|
|
32
|
+
deep_linking: briefing.includes('Deep linking: Sim'),
|
|
33
|
+
updates_ota: briefing.includes('Atualizações OTA: Sim'),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function extrairCampo(briefing, campo) {
|
|
38
|
+
const r1 = new RegExp(`\\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
39
|
+
const m1 = briefing.match(r1);
|
|
40
|
+
if (m1)
|
|
41
|
+
return m1[1].trim();
|
|
42
|
+
const r2 = new RegExp(`- \\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
43
|
+
const m2 = briefing.match(r2);
|
|
44
|
+
if (m2)
|
|
45
|
+
return m2[1].trim();
|
|
46
|
+
const r3 = new RegExp(`- ${campo}:\\s*(.+)`, 'i');
|
|
47
|
+
const m3 = briefing.match(r3);
|
|
48
|
+
return m3 ? m3[1].trim() : '';
|
|
49
|
+
}
|
|
50
|
+
function extrairCheckboxes(briefing, tituloSubsecao) {
|
|
51
|
+
const regex = new RegExp(`### ${tituloSubsecao}[^\\n]*\\n([\\s\\S]*?)(?=###|##|$)`, 'i');
|
|
52
|
+
const match = briefing.match(regex);
|
|
53
|
+
if (!match)
|
|
54
|
+
return [];
|
|
55
|
+
return match[1]
|
|
56
|
+
.split('\n')
|
|
57
|
+
.filter(l => l.includes('- [ ]'))
|
|
58
|
+
.map(l => l.replace('- [ ]', '').trim())
|
|
59
|
+
.filter(Boolean);
|
|
60
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseBriefingSystem = parseBriefingSystem;
|
|
4
|
+
function parseBriefingSystem(briefing) {
|
|
5
|
+
return {
|
|
6
|
+
tipo: 'system',
|
|
7
|
+
projeto: extrairCampo(briefing, 'Projeto'),
|
|
8
|
+
cliente: extrairCampo(briefing, 'Cliente'),
|
|
9
|
+
responsavel: extrairCampo(briefing, 'Responsável'),
|
|
10
|
+
data: extrairCampo(briefing, 'Data da reunião') || new Date().toLocaleDateString('pt-BR'),
|
|
11
|
+
objetivo: extrairCampo(briefing, 'Objetivo principal'),
|
|
12
|
+
problema: extrairCampo(briefing, 'Problema que o sistema resolve'),
|
|
13
|
+
prioridade: extrairCampo(briefing, 'Prioridade do cliente'),
|
|
14
|
+
// Fix: extrair de subseções separadas para não misturar obrigatórias com desejáveis
|
|
15
|
+
features: extrairSubsecaoCheckboxes(briefing, 'Funcionalidades Obrigatórias'),
|
|
16
|
+
featuresDesejaveis: extrairSubsecaoCheckboxes(briefing, 'Funcionalidades Desej'),
|
|
17
|
+
regras: extrairSecao(briefing, 'Regras de Negócio'),
|
|
18
|
+
riscos: {
|
|
19
|
+
tecnico: extrairCampo(briefing, 'Risco técnico'),
|
|
20
|
+
juridico: extrairCampo(briefing, 'Risco jurídico'),
|
|
21
|
+
operacional: extrairCampo(briefing, 'Risco operacional'),
|
|
22
|
+
},
|
|
23
|
+
extra: {
|
|
24
|
+
usuarios: extrairCampo(briefing, 'Quem usará'),
|
|
25
|
+
multiUsuario: briefing.includes('Diferentes tipos de usuários: Sim'),
|
|
26
|
+
niveisAcesso: briefing.includes('Níveis de acesso: Sim'),
|
|
27
|
+
integracoes: extrairCampo(briefing, 'Integrações Externas'),
|
|
28
|
+
plataforma: extrairCampo(briefing, 'Tipo'),
|
|
29
|
+
hospedagem: extrairCampo(briefing, 'Hospedagem'),
|
|
30
|
+
cicd: briefing.includes('CI/CD desde o início: Sim'),
|
|
31
|
+
staging: briefing.includes('Ambiente de staging: Sim'),
|
|
32
|
+
lgpd: briefing.includes('LGPD: Sim'),
|
|
33
|
+
dados_sensiveis: briefing.includes('Dados sensíveis: Sim'),
|
|
34
|
+
pagamento: briefing.includes('Integração com pagamento: Sim'),
|
|
35
|
+
cobranca: extrairCampo(briefing, 'Modelo de cobrança'),
|
|
36
|
+
dashboard: briefing.includes('Dashboard administrativo: Sim'),
|
|
37
|
+
kpis: extrairCampo(briefing, 'KPIs'),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function extrairCampo(briefing, campo) {
|
|
42
|
+
const r1 = new RegExp(`\\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
43
|
+
const m1 = briefing.match(r1);
|
|
44
|
+
if (m1)
|
|
45
|
+
return m1[1].trim();
|
|
46
|
+
const r2 = new RegExp(`- \\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
47
|
+
const m2 = briefing.match(r2);
|
|
48
|
+
return m2 ? m2[1].trim() : '';
|
|
49
|
+
}
|
|
50
|
+
function extrairSecao(briefing, titulo) {
|
|
51
|
+
const regex = new RegExp(`## [^#]*${titulo}[\\s\\S]*?(?=\n## |$)`, 'i');
|
|
52
|
+
const match = briefing.match(regex);
|
|
53
|
+
return match ? match[0].trim() : '';
|
|
54
|
+
}
|
|
55
|
+
// Extrai checkboxes de uma subseção específica (###), sem vazar para a próxima
|
|
56
|
+
function extrairSubsecaoCheckboxes(briefing, tituloSubsecao) {
|
|
57
|
+
const regex = new RegExp(`### ${tituloSubsecao}[^#\\n]*\\n([\\s\\S]*?)(?=###|##|$)`, 'i');
|
|
58
|
+
const match = briefing.match(regex);
|
|
59
|
+
if (!match)
|
|
60
|
+
return [];
|
|
61
|
+
return match[1]
|
|
62
|
+
.split('\n')
|
|
63
|
+
.filter(l => l.includes('- [ ]'))
|
|
64
|
+
.map(l => l.replace('- [ ]', '').trim())
|
|
65
|
+
.filter(Boolean);
|
|
66
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseBriefingWeb = parseBriefingWeb;
|
|
4
|
+
function parseBriefingWeb(briefing) {
|
|
5
|
+
const subtipoRaw = extrairCampo(briefing, 'Tipo de site');
|
|
6
|
+
const secoes = extrairListaSimples(briefing, 'Seções da página');
|
|
7
|
+
const subtipoLabel = {
|
|
8
|
+
landing: 'Landing page',
|
|
9
|
+
institucional: 'Institucional',
|
|
10
|
+
blog: 'Blog / Conteúdo',
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
13
|
+
tipo: 'web',
|
|
14
|
+
projeto: extrairCampo(briefing, 'Projeto'),
|
|
15
|
+
cliente: extrairCampo(briefing, 'Cliente'),
|
|
16
|
+
responsavel: extrairCampo(briefing, 'Responsável'),
|
|
17
|
+
data: extrairCampo(briefing, 'Data da reunião') || new Date().toLocaleDateString('pt-BR'),
|
|
18
|
+
objetivo: extrairCampo(briefing, 'Objetivo principal'),
|
|
19
|
+
problema: '',
|
|
20
|
+
prioridade: extrairCampo(briefing, 'CTA principal'),
|
|
21
|
+
features: secoes,
|
|
22
|
+
featuresDesejaveis: [],
|
|
23
|
+
regras: '',
|
|
24
|
+
riscos: { tecnico: '', juridico: '', operacional: '' },
|
|
25
|
+
extra: {
|
|
26
|
+
subtipo: subtipoRaw.toLowerCase(),
|
|
27
|
+
subtipo_label: subtipoLabel[subtipoRaw.toLowerCase()] || subtipoRaw,
|
|
28
|
+
cta_principal: extrairCampo(briefing, 'CTA principal'),
|
|
29
|
+
publico: extrairCampo(briefing, 'Público-alvo'),
|
|
30
|
+
secoes: secoes.join(', '),
|
|
31
|
+
formulario: briefing.includes('Formulário de contato/captura: Sim'),
|
|
32
|
+
campos_form: extrairCampo(briefing, 'Campos'),
|
|
33
|
+
blog_categorias: extrairCampo(briefing, 'Categorias do blog'),
|
|
34
|
+
analytics: briefing.includes('Analytics: Sim'),
|
|
35
|
+
chat: briefing.includes('Chat ao vivo: Sim'),
|
|
36
|
+
crm: extrairCampo(briefing, 'CRM / E-mail marketing'),
|
|
37
|
+
pixel: briefing.includes('Pixel de rastreamento: Sim'),
|
|
38
|
+
design_system: extrairCampo(briefing, 'Framework de UI'),
|
|
39
|
+
responsivo: briefing.includes('Responsivo: Sim'),
|
|
40
|
+
deploy_plataforma: extrairCampo(briefing, 'Plataforma de deploy'),
|
|
41
|
+
dominio: briefing.includes('Domínio configurado: Sim'),
|
|
42
|
+
seo: briefing.includes('SEO (meta tags, sitemap, OG): Sim'),
|
|
43
|
+
performance: briefing.includes('Performance / Core Web Vitals: Crítico'),
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function extrairCampo(briefing, campo) {
|
|
48
|
+
const r1 = new RegExp(`\\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
49
|
+
const m1 = briefing.match(r1);
|
|
50
|
+
if (m1)
|
|
51
|
+
return m1[1].trim();
|
|
52
|
+
const r2 = new RegExp(`- \\*\\*${campo}:\\*\\*\\s*(.+)`, 'i');
|
|
53
|
+
const m2 = briefing.match(r2);
|
|
54
|
+
if (m2)
|
|
55
|
+
return m2[1].trim();
|
|
56
|
+
const r3 = new RegExp(`- ${campo}:\\s*(.+)`, 'i');
|
|
57
|
+
const m3 = briefing.match(r3);
|
|
58
|
+
return m3 ? m3[1].trim() : '';
|
|
59
|
+
}
|
|
60
|
+
function extrairListaSimples(briefing, tituloSubsecao) {
|
|
61
|
+
const regex = new RegExp(`### ${tituloSubsecao}[^\\n]*\\n([\\s\\S]*?)(?=###|##|$)`, 'i');
|
|
62
|
+
const match = briefing.match(regex);
|
|
63
|
+
if (!match)
|
|
64
|
+
return [];
|
|
65
|
+
return match[1]
|
|
66
|
+
.split('\n')
|
|
67
|
+
.filter(l => l.trim().startsWith('- '))
|
|
68
|
+
.map(l => l.replace(/^-\s*/, '').trim())
|
|
69
|
+
.filter(Boolean);
|
|
70
|
+
}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# Vireum Spec Framework — Guia de Uso
|
|
2
|
+
|
|
3
|
+
> **Versão:** 0.7.0
|
|
4
|
+
> **Framework:** Spec Driven Development
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 📖 Índice
|
|
9
|
+
1. [Instalação](#instalação)
|
|
10
|
+
2. [Para Projetos Novos](#para-projetos-novos)
|
|
11
|
+
3. [Para Projetos Existentes (Retrofit)](#para-projetos-existentes-retrofit)
|
|
12
|
+
4. [Workflow Completo](#workflow-completo)
|
|
13
|
+
5. [Referência Rápida de Comandos](#referência-rápida-de-comandos)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Instalação
|
|
18
|
+
|
|
19
|
+
### Via NPM
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g vireum-spec-cli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Verificar Instalação
|
|
25
|
+
```bash
|
|
26
|
+
vireum-spec --version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Para Projetos Novos
|
|
32
|
+
|
|
33
|
+
### Passo 1: Inicializar o Projeto
|
|
34
|
+
Execute o comando de inicialização escolhendo o tipo de projeto:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
vireum-spec init --type <tipo>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Tipos disponíveis:**
|
|
41
|
+
- `system` — Sistema completo (padrão)
|
|
42
|
+
- `web` — Landing page, site, plataforma web
|
|
43
|
+
- `api` — API/Backend REST ou GraphQL
|
|
44
|
+
- `mobile` — App mobile (iOS/Android)
|
|
45
|
+
- `automation` — Automação de processos, workflows, RPA
|
|
46
|
+
- `ai` — Aplicação com IA (chatbot, agente, extração de dados)
|
|
47
|
+
|
|
48
|
+
**Exemplo:**
|
|
49
|
+
```bash
|
|
50
|
+
vireum-spec init --type ai
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Passo 2: Responder o Briefing Interativo
|
|
54
|
+
|
|
55
|
+
O framework fará perguntas estruturadas em 6 seções:
|
|
56
|
+
|
|
57
|
+
#### 📌 1. **Informações Gerais**
|
|
58
|
+
- Nome do projeto
|
|
59
|
+
- Nome do cliente
|
|
60
|
+
- Responsável pela implementação
|
|
61
|
+
- Data da reunião
|
|
62
|
+
|
|
63
|
+
#### 🎯 2. **Problema e Caso de Uso**
|
|
64
|
+
- Qual tarefa a IA/sistema vai resolver?
|
|
65
|
+
- Quem executa hoje?
|
|
66
|
+
- Quanto tempo leva?
|
|
67
|
+
- Caso de uso mais próximo
|
|
68
|
+
- Prazo esperado para MVP
|
|
69
|
+
|
|
70
|
+
#### 📚 3. **Fonte de Conhecimento e Dados** *(se aplicável)*
|
|
71
|
+
- Onde está o conhecimento? (docs, BD, web, API)
|
|
72
|
+
- Volume de dados
|
|
73
|
+
- Frequência de atualização
|
|
74
|
+
|
|
75
|
+
#### 💬 4. **Interface e Interação**
|
|
76
|
+
- Canal de comunicação (chat, WhatsApp, e-mail, API)
|
|
77
|
+
- Precisa de dashboard/painel?
|
|
78
|
+
- Quantos usuários?
|
|
79
|
+
- Nível de autonomia (responder, executar ações, agente completo)
|
|
80
|
+
|
|
81
|
+
#### 🤖 5. **Modelo e Infraestrutura**
|
|
82
|
+
- Provider de IA (OpenAI, Anthropic, Google, etc.)
|
|
83
|
+
- Restrições de custo
|
|
84
|
+
- Dados sensíveis?
|
|
85
|
+
- Restrição de enviar dados para API?
|
|
86
|
+
- Integrações com sistemas existentes
|
|
87
|
+
- Custo operacional estimado
|
|
88
|
+
|
|
89
|
+
#### ✅ 6. **Qualidade e Supervisão**
|
|
90
|
+
- Critério de sucesso
|
|
91
|
+
- Nível de supervisão humana
|
|
92
|
+
- Precisa de fallback para humano?
|
|
93
|
+
|
|
94
|
+
### Passo 3: Gerar o Specification
|
|
95
|
+
|
|
96
|
+
Após responder o briefing, execute:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
vireum-spec distill
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Isso irá gerar automaticamente no diretório `.spec/`:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
.spec/
|
|
106
|
+
├── briefing.md # Suas respostas originais
|
|
107
|
+
├── requirements.md # Funcionalidades e integrações
|
|
108
|
+
├── users.md # Personas e usuários
|
|
109
|
+
├── risks.md # Riscos técnicos, jurídicos, operacionais
|
|
110
|
+
├── architecture.md # Arquitetura da solução
|
|
111
|
+
├── rules.md # Regras de negócio
|
|
112
|
+
├── INDEX.md # Índice completo do spec
|
|
113
|
+
├── changelog.md # Histórico de mudanças
|
|
114
|
+
└── tasks/
|
|
115
|
+
├── active.md # Tasks em desenvolvimento
|
|
116
|
+
├── backlog.md # Tasks planejadas
|
|
117
|
+
└── done.md # Tasks concluídas
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Passo 4: Configurar Stack e Infraestrutura
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
vireum-spec setup
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Você será perguntado sobre:
|
|
127
|
+
- **Frontend:** Next.js, React, Vue, Nuxt, outro, ou nenhum
|
|
128
|
+
- **Backend:** Node.js + Express/Fastify, NestJS, Python + FastAPI, outro, ou nenhum
|
|
129
|
+
- **Banco de dados:** PostgreSQL, MySQL, SQLite, MongoDB, outro
|
|
130
|
+
- **ORM:** Prisma, TypeORM, Drizzle, Sequelize, nenhum, outro
|
|
131
|
+
- **Cache/Filas:** Redis + BullMQ, Redis simples, nenhum, outro
|
|
132
|
+
- **Autenticação:** JWT, NextAuth, Supabase Auth, Clerk, outro
|
|
133
|
+
- **Multi-tenant:** Sim/Não (e qual estratégia)
|
|
134
|
+
- **Protocolo de IA:** Sistema de prompts, guardrails, tools/functions
|
|
135
|
+
|
|
136
|
+
Gera automaticamente:
|
|
137
|
+
- `.vireum/stack.json` — Stack técnica
|
|
138
|
+
- `.vireum/protocol.md` — Protocolo de funcionamento da IA
|
|
139
|
+
- `.cursor/rules/` — Regras para Claude Code
|
|
140
|
+
|
|
141
|
+
### Passo 5: Priorizar Features (Opcional)
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
vireum-spec prioritize
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Classifica as features em:
|
|
148
|
+
- **MVP** — Mínimo viável
|
|
149
|
+
- **Fase 2** — Próxima iteração
|
|
150
|
+
- **Fora do escopo** — Talvez nunca
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Para Projetos Existentes (Retrofit)
|
|
155
|
+
|
|
156
|
+
Use quando o projeto já está em andamento ou em produção e você quer documentá-lo com o framework.
|
|
157
|
+
|
|
158
|
+
### Passo 1: Executar Retrofit
|
|
159
|
+
|
|
160
|
+
No diretório do projeto já existente:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
vireum-spec retrofit
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
O framework irá:
|
|
167
|
+
1. **Analisar automaticamente** a estrutura de arquivos
|
|
168
|
+
2. **Detectar** tecnologias usadas (frontend, backend, BD, ORM, auth)
|
|
169
|
+
3. **Encontrar** rotas/features implementadas
|
|
170
|
+
4. **Buscar** README existente
|
|
171
|
+
|
|
172
|
+
### Passo 2: Responder Complementos
|
|
173
|
+
|
|
174
|
+
Você responde perguntas sobre informações que **não puderam ser inferidas automaticamente**:
|
|
175
|
+
|
|
176
|
+
- Nome do projeto
|
|
177
|
+
- Cliente
|
|
178
|
+
- Objetivo principal
|
|
179
|
+
- Que problema resolve?
|
|
180
|
+
- O que já está funcionando / prioridade atual
|
|
181
|
+
- Quem usa?
|
|
182
|
+
- Principais regras de negócio
|
|
183
|
+
- Fase do projeto (MVP em dev, MVP concluído, Produção, Manutenção)
|
|
184
|
+
- Multi-tenant?
|
|
185
|
+
- Dados sensíveis?
|
|
186
|
+
- Principais riscos
|
|
187
|
+
|
|
188
|
+
### Passo 3: Revisar Briefing Gerado
|
|
189
|
+
|
|
190
|
+
O framework cria `.spec/briefing.md` com as informações coletadas e inferidas.
|
|
191
|
+
|
|
192
|
+
**⚠️ Importante:** Revise e corrija manualmente qualquer detalhe detectado incorretamente.
|
|
193
|
+
|
|
194
|
+
### Passo 4: Gerar Spec Completo
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
vireum-spec distill
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Mesmo processo do projeto novo — gera todos os arquivos em `.spec/`.
|
|
201
|
+
|
|
202
|
+
### Passo 5: (Opcional) Instalar Skills no Claude Code
|
|
203
|
+
|
|
204
|
+
Se você usa Claude Code:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
vireum-spec skills
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Instala automáticamente as skills do framework no seu cliente Claude Code para acelerar o desenvolvimento.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Workflow Completo
|
|
215
|
+
|
|
216
|
+
### Novo Projeto
|
|
217
|
+
```
|
|
218
|
+
vireum-spec init --type <tipo>
|
|
219
|
+
↓
|
|
220
|
+
vireum-spec distill
|
|
221
|
+
↓
|
|
222
|
+
vireum-spec setup
|
|
223
|
+
↓
|
|
224
|
+
vireum-spec prioritize (opcional)
|
|
225
|
+
↓
|
|
226
|
+
Iniciar desenvolvimento com spec documentado
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Projeto Existente
|
|
230
|
+
```
|
|
231
|
+
vireum-spec retrofit
|
|
232
|
+
↓
|
|
233
|
+
(Revisar e corrigir .spec/briefing.md)
|
|
234
|
+
↓
|
|
235
|
+
vireum-spec distill
|
|
236
|
+
↓
|
|
237
|
+
vireum-spec setup
|
|
238
|
+
↓
|
|
239
|
+
Continuar com spec documentado
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Referência Rápida de Comandos
|
|
245
|
+
|
|
246
|
+
| Comando | Descrição | Quando usar |
|
|
247
|
+
|---------|-----------|------------|
|
|
248
|
+
| `vireum-spec init --type <tipo>` | Inicia novo projeto com briefing interativo | Novo projeto |
|
|
249
|
+
| `vireum-spec distill` | Gera spec a partir do briefing | Após responder briefing |
|
|
250
|
+
| `vireum-spec setup` | Configura stack e protocolo da IA | Após distill |
|
|
251
|
+
| `vireum-spec prioritize` | Classifica features em MVP/Fase2 | Quando há muitas features |
|
|
252
|
+
| `vireum-spec retrofit` | Gera spec de projeto existente | Projeto em andamento |
|
|
253
|
+
| `vireum-spec health` | Verifica inconsistências no spec | Manutenção contínua |
|
|
254
|
+
| `vireum-spec brief` | Gera resumo do estado atual | Status check |
|
|
255
|
+
| `vireum-spec verify-mcps` | Verifica MCPs instalados | Diagnóstico |
|
|
256
|
+
| `vireum-spec skills` | Instala skills no Claude Code | Integração com IA |
|
|
257
|
+
| `vireum-spec enrich` | Gera prompt para identificar gaps | Qualidade do spec |
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Estrutura de Arquivos Criados
|
|
262
|
+
|
|
263
|
+
### Novo Projeto
|
|
264
|
+
```
|
|
265
|
+
projeto-novo/
|
|
266
|
+
├── .spec/
|
|
267
|
+
│ ├── briefing.md
|
|
268
|
+
│ ├── requirements.md
|
|
269
|
+
│ ├── users.md
|
|
270
|
+
│ ├── risks.md
|
|
271
|
+
│ ├── architecture.md
|
|
272
|
+
│ ├── rules.md
|
|
273
|
+
│ ├── INDEX.md
|
|
274
|
+
│ ├── changelog.md
|
|
275
|
+
│ └── tasks/
|
|
276
|
+
│ ├── active.md
|
|
277
|
+
│ ├── backlog.md
|
|
278
|
+
│ └── done.md
|
|
279
|
+
├── .vireum/
|
|
280
|
+
│ ├── stack.json
|
|
281
|
+
│ └── protocol.md
|
|
282
|
+
├── .cursor/
|
|
283
|
+
│ └── rules/
|
|
284
|
+
│ └── *.md
|
|
285
|
+
└── package.json
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Projeto Retrofit
|
|
289
|
+
Adiciona a mesma estrutura `.spec/` + `.vireum/` ao projeto existente.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Dicas Importantes
|
|
294
|
+
|
|
295
|
+
### ✅ Sempre faça:
|
|
296
|
+
- **Responda o briefing honestamente** — quanto mais detalhe, melhor o spec
|
|
297
|
+
- **Revise o spec gerado** — não é 100% automático, pode precisar de ajustes
|
|
298
|
+
- **Use o .spec/INDEX.md** — começa pelo índice para navegar tudo
|
|
299
|
+
- **Mantenha atualizado** — quando há mudanças significativas, rode `vireum-spec distill` novamente
|
|
300
|
+
|
|
301
|
+
### ❌ Evite:
|
|
302
|
+
- Deixar campos em branco quando souber a resposta
|
|
303
|
+
- Ignorar riscos e restrições — eles aparecem depois
|
|
304
|
+
- Não revisar o briefing gerado — pode ter interpretações erradas
|
|
305
|
+
- Esquecer de rodar `setup` — o protocolo de IA é crítico
|
|
306
|
+
|
|
307
|
+
### 💡 Pro Tips:
|
|
308
|
+
- Use `vireum-spec health` regularmente para manter spec consistente
|
|
309
|
+
- `vireum-spec brief` é perfeito para reportar status a stakeholders
|
|
310
|
+
- `vireum-spec enrich` ajuda a identificar gaps antes de começar a dev
|
|
311
|
+
- Skills do `vireum-spec skills` fazem a IA entender melhor seu projeto
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Próximos Passos
|
|
316
|
+
|
|
317
|
+
Após setup, você está pronto para:
|
|
318
|
+
|
|
319
|
+
1. **Começar a implementação** — Use o spec como guia
|
|
320
|
+
2. **Integrar com Claude Code** — Skills instaladas facilitam muito
|
|
321
|
+
3. **Manter o spec atualizado** — Conforme aprende, atualiza
|
|
322
|
+
4. **Usar como documentação** — Compartilhe `.spec/INDEX.md` com o time
|