primocode 9.8.0-beta.2 → 9.8.0-beta.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/README.md +33 -6
- package/app/ansi.js +55 -0
- package/app/app.css +482 -281
- package/app/app.js +888 -315
- package/app/index.html +176 -101
- package/app/primo-marca.js +58 -1
- package/bin/primocode.js +697 -118
- package/comandos/explicar.md +14 -0
- package/comandos/publicar.md +10 -0
- package/comandos/revisar.md +13 -0
- package/lib/act.js +130 -26
- package/lib/api.js +8 -1
- package/lib/app.js +317 -74
- package/lib/browser.js +79 -3
- package/lib/catalogo.js +11 -3
- package/lib/checkpoint-git.js +218 -0
- package/lib/checkpoint.js +249 -0
- package/lib/claude-engine.js +25 -3
- package/lib/comandos-extra.js +481 -0
- package/lib/comandos.js +104 -0
- package/lib/config.js +21 -4
- package/lib/estudio/acervo-site.js +157 -0
- package/lib/estudio/assets.js +77 -3
- package/lib/estudio/cinema.js +354 -0
- package/lib/estudio/composicao.js +470 -0
- package/lib/estudio/edicao.js +450 -0
- package/lib/estudio/impacto.js +263 -0
- package/lib/estudio/index.js +769 -5
- package/lib/estudio/plano.js +5 -2
- package/lib/estudio/remotion.js +228 -23
- package/lib/estudio/slides.js +34 -30
- package/lib/fala.js +95 -1
- package/lib/local/cerebro.json +361 -180
- package/lib/local/entrada.js +18 -8
- package/lib/local/motor-cli.js +1 -1
- package/lib/mencoes.js +98 -0
- package/lib/offline.js +168 -0
- package/lib/painel.js +291 -0
- package/lib/perigo.js +256 -0
- package/lib/pre-leitura.js +118 -0
- package/lib/repeticao.js +4 -2
- package/lib/skills.js +6 -1
- package/lib/tempos.js +62 -0
- package/lib/ui.js +171 -17
- package/package.json +3 -2
- package/skills/apresentacao-pptx/SKILL.md +52 -0
- package/skills/cartaz-de-arte/LICENSE.txt +202 -0
- package/skills/cartaz-de-arte/SKILL.md +47 -0
- package/skills/criar-skill/LICENSE.txt +202 -0
- package/skills/criar-skill/SKILL.md +49 -0
- package/skills/depurar-de-verdade/LICENSE.txt +21 -0
- package/skills/depurar-de-verdade/SKILL.md +14 -5
- package/skills/design-de-verdade/LICENSE.txt +177 -0
- package/skills/design-de-verdade/SKILL.md +42 -0
- package/skills/documento-word/SKILL.md +57 -0
- package/skills/interface-revisada/SKILL.md +47 -0
- package/skills/me-ensina/LICENSE.txt +21 -0
- package/skills/me-ensina/SKILL.md +27 -0
- package/skills/me-entrevista/LICENSE.txt +21 -0
- package/skills/me-entrevista/SKILL.md +27 -0
- package/skills/motion-de-primeira/SKILL.md +1 -1
- package/skills/pdf-bonito/SKILL.md +48 -0
- package/skills/planilha-excel/SKILL.md +47 -0
- package/skills/react-sem-dor/SKILL.md +48 -0
- package/skills/revisao-antes-de-entregar/LICENSE.txt +21 -0
- package/skills/revisao-antes-de-entregar/SKILL.md +6 -1
- package/skills/site-com-motion/SKILL.md +39 -0
- package/skills/temas-prontos/LICENSE.txt +202 -0
- package/skills/temas-prontos/SKILL.md +50 -0
- package/skills/testar-o-site/LICENSE.txt +202 -0
- package/skills/testar-o-site/SKILL.md +46 -0
- package/skills/video-no-remotion/SKILL.md +48 -0
- package/studio/narrar.py +111 -10
- package/studio/rostos.py +52 -0
package/lib/ui.js
CHANGED
|
@@ -60,9 +60,19 @@ const c = {
|
|
|
60
60
|
// Só glifos de bloco (U+2580–U+259F): largura 1 garantida em qualquer terminal
|
|
61
61
|
// monospace, sem emoji e sem depender de fonte instalada.
|
|
62
62
|
//
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
//
|
|
63
|
+
// Primo, raposa e gato compartilham corpo e pés — são o mesmo bicho de
|
|
64
|
+
// orelhas diferentes. Os que chegaram depois ("mais mascotes", pedido do
|
|
65
|
+
// dono) têm silhueta própria: um robô de corpo de gato não seria um robô.
|
|
66
|
+
//
|
|
67
|
+
// As cores saem SÓ do PALETTE. `full` pinta o bloco cheio, `edge` o contorno;
|
|
68
|
+
// a `mascara` (opcional, uma letra por coluna) marca o que foge da regra —
|
|
69
|
+
// olho (`o`), acento (`a`), corpo (`c`), borda (`b`). É por ela que o olho do
|
|
70
|
+
// robô acende na primária e a barriga do pinguim fica clara, sem inventar cor.
|
|
71
|
+
//
|
|
72
|
+
// Cada um tem nome, bordão (aparece na saudação) e um rostinho por humor, que
|
|
73
|
+
// sai numa linha discreta depois da resposta do agente (/mascot reacoes off
|
|
74
|
+
// desliga). Rosto em ASCII/Unicode de largura 1 — emoji ocupa duas colunas e
|
|
75
|
+
// muda de desenho de um terminal para outro.
|
|
66
76
|
|
|
67
77
|
const ART_W = 9; // colunas de cada linha do desenho
|
|
68
78
|
const ART_H = 3; // linhas — igual ao número de linhas de identidade
|
|
@@ -72,28 +82,168 @@ const PES = ' ▘▘ ▝▝ ';
|
|
|
72
82
|
|
|
73
83
|
const MASCOTS = {
|
|
74
84
|
// Padrão: o Primo — cabeça cheia, ombros marcados, dois pezinhos.
|
|
75
|
-
primo: {
|
|
85
|
+
primo: {
|
|
86
|
+
nome: 'Primo', frase: 'Bora construir junto?',
|
|
87
|
+
linhas: [' ▐▛███▜▌ ', CORPO, PES], full: 'brand', edge: 'brandDim',
|
|
88
|
+
rosto: { feliz: '(^‿^)', preocupado: '(°_°)', parado: '(-_-)' },
|
|
89
|
+
},
|
|
76
90
|
// Raposa — orelhas largas, abertas para fora. Na secundária do sistema.
|
|
77
|
-
fox:
|
|
91
|
+
fox: {
|
|
92
|
+
nome: 'Raposa', frase: 'Esperta e rápida no código.',
|
|
93
|
+
linhas: [' ▛▀ ▀▜ ', CORPO, PES], full: 'warn', edge: 'dim',
|
|
94
|
+
rosto: { feliz: '(^ᴥ^)', preocupado: '(•ᴥ•;)', parado: '(-ᴥ-)' },
|
|
95
|
+
},
|
|
78
96
|
// Gato — orelhas curtas e juntas. Primária recuada, para não repetir o Primo.
|
|
79
|
-
cat:
|
|
97
|
+
cat: {
|
|
98
|
+
nome: 'Gato', frase: 'Curioso até achar o bug.',
|
|
99
|
+
linhas: [' ▛▘ ▝▜ ', CORPO, PES], full: 'brandDim', edge: 'dim',
|
|
100
|
+
rosto: { feliz: '(=^.^=)', preocupado: '(=°.°=)', parado: '(=-.-=)' },
|
|
101
|
+
},
|
|
102
|
+
// Robô — antena, cabeça quadrada e os dois olhos acesos na primária.
|
|
103
|
+
// Corpo em slate: é metal, e metal é neutro.
|
|
104
|
+
robo: {
|
|
105
|
+
nome: 'Bip', frase: 'Bip-bop: pedido entendido.',
|
|
106
|
+
linhas: [' ▗▄▄█▄▄▖ ', ' ▐█████▌ ', ' █▀▀▀█ '],
|
|
107
|
+
mascara: [' ccccc ', ' o o ', ' '],
|
|
108
|
+
full: 'muted', edge: 'dim', olho: 'brand',
|
|
109
|
+
rosto: { feliz: '[^_^]', preocupado: '[o_O]', parado: '[-_-]' },
|
|
110
|
+
},
|
|
111
|
+
// Coruja — os tufos em cima e dois olhões claros. Na secundária: é a
|
|
112
|
+
// cor do "aviso que não é falha", e a coruja é a que pensa antes.
|
|
113
|
+
coruja: {
|
|
114
|
+
nome: 'Sábia', frase: 'Pensa antes, erra menos.',
|
|
115
|
+
linhas: [' █▄▄▄▄▄█ ', ' ███▄███ ', ' ▝█▀▀▀█▘ '],
|
|
116
|
+
mascara: [' ccccccc ', ' oo oo ', ' '],
|
|
117
|
+
full: 'warn', edge: 'dim', olho: 'white',
|
|
118
|
+
rosto: { feliz: '(O,O)', preocupado: '(o,O)', parado: '(-,-)' },
|
|
119
|
+
},
|
|
120
|
+
// Dragão — chifres para fora, asinhas nos lados e o rabo à direita.
|
|
121
|
+
// Chifres na secundária, corpo na primária.
|
|
122
|
+
dragao: {
|
|
123
|
+
nome: 'Faísca', frase: 'Bota fogo no projeto!',
|
|
124
|
+
linhas: ['▝▙▗▄▄▄▖▟▘', '▗▟█████▙▖', ' ▝█▀▀▀█▙▖'],
|
|
125
|
+
mascara: ['aa aa', 'a o o a', ' '],
|
|
126
|
+
full: 'brand', edge: 'brandDim', olho: 'white', acento: 'warn',
|
|
127
|
+
rosto: { feliz: '<^w^>', preocupado: '<°w°;>', parado: '<-w->' },
|
|
128
|
+
},
|
|
129
|
+
// Fantasma — cúpula, dois olhos vazados e a barra ondulada embaixo.
|
|
130
|
+
fantasma: {
|
|
131
|
+
nome: 'Boo', frase: 'Some com os bugs sem fazer barulho.',
|
|
132
|
+
linhas: [' ▗▟███▙▖ ', ' ██▄█▄██ ', ' ▛▚▟▀▙▞▜ '],
|
|
133
|
+
mascara: [' ', ' c c ', ' '],
|
|
134
|
+
full: 'white', edge: 'muted',
|
|
135
|
+
rosto: { feliz: '(^o^)~', preocupado: '(°o°)~', parado: '(-o-)~' },
|
|
136
|
+
},
|
|
137
|
+
// Capivara — de perfil: orelhinha, focinho reto, corpo comprido e as
|
|
138
|
+
// perninhas curtas. A brasileira da turma, na secundária (o mais perto do
|
|
139
|
+
// marrom que a paleta tem).
|
|
140
|
+
capivara: {
|
|
141
|
+
nome: 'Capi', frase: 'Na calma, tudo sai.',
|
|
142
|
+
linhas: [' ▗▖ ', '▗█▀█▄▄▄▄▖', '▝▀█▀▀▀█▀ '],
|
|
143
|
+
mascara: [' bb ', ' o cccc', ' '],
|
|
144
|
+
full: 'warn', edge: 'dim', olho: 'dim',
|
|
145
|
+
rosto: { feliz: '(•ᴗ•)', preocupado: '(•_•;)', parado: '(-ᴗ-)' },
|
|
146
|
+
},
|
|
147
|
+
// Polvo — cabeça redonda, olhos vazados e os braços abertos embaixo.
|
|
148
|
+
polvo: {
|
|
149
|
+
nome: 'Polvinho', frase: 'Oito braços, várias tarefas.',
|
|
150
|
+
linhas: [' ▟███▙ ', ' ▐█▄█▄█▌ ', '▗▛▐▘█▝▌▜▖'],
|
|
151
|
+
full: 'brandDim', edge: 'brandDim',
|
|
152
|
+
rosto: { feliz: '~(^u^)~', preocupado: '~(°u°)~', parado: '~(-u-)~' },
|
|
153
|
+
},
|
|
154
|
+
// Pinguim — cabeça escura, bico na secundária, barriga clara e os pés.
|
|
155
|
+
pinguim: {
|
|
156
|
+
nome: 'Gelinho', frase: 'Cabeça fria, código limpo.',
|
|
157
|
+
linhas: [' ▟▀█▀▙ ', ' ▟█████▙ ', ' ▝▀▘ ▝▀▘ '],
|
|
158
|
+
mascara: [' a ', ' ooo ', ' aaa aaa '],
|
|
159
|
+
full: 'dim', edge: 'dim', olho: 'white', acento: 'warn',
|
|
160
|
+
rosto: { feliz: '<(^v^)>', preocupado: '<(°v°)>', parado: '<(-v-)>' },
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// A ordem da galeria e dos números do /mascot. Os três de sempre primeiro:
|
|
165
|
+
// quem escolheu o gato ontem acha ele no mesmo lugar hoje.
|
|
166
|
+
const MASCOTES = Object.keys(MASCOTS);
|
|
167
|
+
|
|
168
|
+
// Quem digita em português escreve "raposa", "robô", "dragão".
|
|
169
|
+
const APELIDOS_MASCOTE = {
|
|
170
|
+
raposa: 'fox', gato: 'cat', robô: 'robo', robot: 'robo', dragão: 'dragao', dragon: 'dragao',
|
|
171
|
+
owl: 'coruja', ghost: 'fantasma', capybara: 'capivara', capi: 'capivara', octopus: 'polvo',
|
|
172
|
+
penguin: 'pinguim', bip: 'robo', boo: 'fantasma', sabia: 'coruja', sábia: 'coruja',
|
|
173
|
+
faisca: 'dragao', faísca: 'dragao', polvinho: 'polvo', gelinho: 'pinguim',
|
|
80
174
|
};
|
|
81
175
|
|
|
176
|
+
/** Nome, apelido ou número (1-based) → id do mascote. null se não existe. */
|
|
177
|
+
function resolverMascote(pedido) {
|
|
178
|
+
const t = String(pedido == null ? '' : pedido).trim().toLowerCase();
|
|
179
|
+
if (!t) return null;
|
|
180
|
+
if (/^\d+$/.test(t)) return MASCOTES[Number(t) - 1] || null;
|
|
181
|
+
if (MASCOTS[t]) return t;
|
|
182
|
+
return APELIDOS_MASCOTE[t] || null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function mascoteInfo(style) {
|
|
186
|
+
const id = MASCOTS[style] ? style : 'primo';
|
|
187
|
+
const m = MASCOTS[id];
|
|
188
|
+
return { id, nome: m.nome, frase: m.frase, rosto: { ...m.rosto } };
|
|
189
|
+
}
|
|
190
|
+
|
|
82
191
|
// Bloco cheio na cor viva, contorno na apagada: dá volume ao desenho sem
|
|
83
|
-
// precisar de gradiente nem de cor de fundo.
|
|
84
|
-
|
|
192
|
+
// precisar de gradiente nem de cor de fundo. A máscara ganha da regra.
|
|
193
|
+
const PAPEL = { c: 'full', b: 'edge', o: 'olho', a: 'acento' };
|
|
194
|
+
function shade(line, m, mascara) {
|
|
85
195
|
let out = '';
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
196
|
+
const letras = [...(mascara || '')];
|
|
197
|
+
[...line].forEach((ch, i) => {
|
|
198
|
+
if (ch === ' ') { out += ch; return; }
|
|
199
|
+
const papel = PAPEL[letras[i]];
|
|
200
|
+
const cor = (papel && m[papel]) || ((ch === '█' || ch === '▀') ? m.full : m.edge);
|
|
201
|
+
out += c[cor](ch);
|
|
202
|
+
});
|
|
91
203
|
return out;
|
|
92
204
|
}
|
|
93
205
|
|
|
94
206
|
function mascot(style) {
|
|
95
207
|
const m = MASCOTS[style] || MASCOTS.primo;
|
|
96
|
-
return
|
|
208
|
+
return m.linhas.map((l, i) => shade(l, m, m.mascara && m.mascara[i]));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* A galeria do /mascot: todos lado a lado, com o número e o nome em cima.
|
|
213
|
+
* Célula de 13 colunas ("● 10 pinguim" + folga); quantas cabem por fileira
|
|
214
|
+
* sai da largura do terminal, então 80 colunas dá seis por fileira.
|
|
215
|
+
*/
|
|
216
|
+
function galeriaMascotes(atual, colunas) {
|
|
217
|
+
const CEL = 13;
|
|
218
|
+
const cols = Math.max(CEL + 2, Math.min(colunas || process.stdout.columns || 80, 120));
|
|
219
|
+
const porFileira = Math.max(1, Math.floor((cols - 2) / CEL));
|
|
220
|
+
const out = [];
|
|
221
|
+
for (let i = 0; i < MASCOTES.length; i += porFileira) {
|
|
222
|
+
const grupo = MASCOTES.slice(i, i + porFileira);
|
|
223
|
+
const rotulo = grupo.map((id, j) => {
|
|
224
|
+
const txt = `${i + j + 1} ${id}`;
|
|
225
|
+
return id === atual ? padRight(c.brand('● ' + txt), CEL) : padRight(c.muted(' ' + txt), CEL);
|
|
226
|
+
}).join('');
|
|
227
|
+
out.push(' ' + rotulo.replace(/\s+$/, ''));
|
|
228
|
+
for (let l = 0; l < ART_H; l++) {
|
|
229
|
+
out.push((' ' + grupo.map((id) => ' ' + mascot(id)[l] + ' ').join('')).replace(/\s+$/, ''));
|
|
230
|
+
}
|
|
231
|
+
out.push('');
|
|
232
|
+
}
|
|
233
|
+
return out.join('\n');
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* A reação depois da resposta do agente: o rostinho e uma palavra. Uma linha,
|
|
237
|
+
cor apagada — é tempero, não aviso. O humor sai do que aconteceu:
|
|
238
|
+
terminou (feliz), parou sem concluir (preocupado), a pessoa mandou parar
|
|
239
|
+
(parado). Cor segue função: primária para o que deu certo, secundária para
|
|
240
|
+
o que pede atenção. */
|
|
241
|
+
const DITO = { feliz: 'pronto!', preocupado: 'não terminei tudo, dá uma olhada', parado: 'parei aqui' };
|
|
242
|
+
function reacao(style, humor) {
|
|
243
|
+
const m = MASCOTS[style] || MASCOTS.primo;
|
|
244
|
+
const h = m.rosto[humor] ? humor : 'feliz';
|
|
245
|
+
const cor = h === 'feliz' ? 'brand' : h === 'preocupado' ? 'warn' : 'muted';
|
|
246
|
+
return ` ${c[cor](m.rosto[h])} ${c.dim(m.nome + ': ' + DITO[h])}`;
|
|
97
247
|
}
|
|
98
248
|
|
|
99
249
|
// ── Medição de largura ───────────────────────────────────────────────────
|
|
@@ -177,9 +327,13 @@ function welcomeBox(version, contexto, opts = {}) {
|
|
|
177
327
|
const art = mascot(style);
|
|
178
328
|
const cols = Math.max(32, Math.min(process.stdout.columns || 100, 120));
|
|
179
329
|
|
|
180
|
-
|
|
330
|
+
// O bordão do mascote vem na mesma linha da saudação: é ele quem cumprimenta.
|
|
331
|
+
// Em terminal estreito o truncate corta o bordão antes do nome.
|
|
332
|
+
const info = mascoteInfo(style);
|
|
333
|
+
const saudacao = (userName
|
|
181
334
|
? `${c.muted('Bem-vindo de volta, ')}${c.bold(c.white(userName))}`
|
|
182
|
-
: c.muted('Bem-vindo de volta')
|
|
335
|
+
: c.muted('Bem-vindo de volta'))
|
|
336
|
+
+ c.dim(` · ${info.nome}: "${info.frase}"`);
|
|
183
337
|
|
|
184
338
|
// As três linhas de identidade — uma por linha do mascote, na ordem em que
|
|
185
339
|
// se lê: quem é, quem chegou, onde estamos.
|
|
@@ -455,4 +609,4 @@ function friendlyError(raw) {
|
|
|
455
609
|
}
|
|
456
610
|
|
|
457
611
|
|
|
458
|
-
module.exports = { c, mascot, welcomeBox, Spinner, PENSANDO, actionHeader, friendlyError, visibleWidth, stripAnsi, truncate, padRight };
|
|
612
|
+
module.exports = { c, mascot, MASCOTES, resolverMascote, mascoteInfo, galeriaMascotes, reacao, welcomeBox, Spinner, PENSANDO, actionHeader, friendlyError, visibleWidth, stripAnsi, truncate, padRight };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primocode",
|
|
3
|
-
"version": "9.8.0-beta.
|
|
3
|
+
"version": "9.8.0-beta.21",
|
|
4
4
|
"description": "PrimoCode — agente de engenharia com IA e cursor próprio. Requer conta Conecta Primo AI (Premium ou Super). Cria arquivos, roda comandos, controla navegador e desktop: abre apps, clica em botões e ícones pelo nome, digita e usa atalhos.",
|
|
5
5
|
"main": "bin/primocode.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "node bin/primocode.js",
|
|
11
|
-
"test": "node test/tools.test.js && node test/ui.test.js && node test/entrada.test.js && node test/transparencia.test.js && node test/permissao.test.js && node test/compatibilidade.test.js && node test/skills.test.js && node test/estudio.test.js && node test/voz.test.js && node test/voz-conversa.test.js && node test/modo.test.js && node test/pasta.test.js && node test/projeto.test.js && node test/nome-projeto.test.js && node test/api-propria.test.js && node test/claude-engine.test.js && node test/codex.test.js && node test/conferir.test.js && node test/catalogo.test.js && node test/desktop.test.js && node test/seta.test.js && node test/effort.test.js && node test/regressao.test.js && node test/memoria-conversa.test.js && node test/repeticao.test.js && node test/autonomia.test.js && node test/referencia.test.js && node test/parar.test.js && node test/continuar.test.js && node test/pipeline.test.js && node test/app.test.js && node test/aplicativo.test.js && node test/conta.test.mjs && node test/nuvem.test.js && node test/prazo.test.js && node test/primeira-vez.test.js && node test/janela.test.js && node test/fala.test.js && node test/especialistas.test.js && node test/empurrao.test.js && node test/terminal-novo.test.js && node test/markdown.test.js && node test/coerencia.test.js"
|
|
11
|
+
"test": "node test/tools.test.js && node test/ui.test.js && node test/entrada.test.js && node test/transparencia.test.js && node test/permissao.test.js && node test/compatibilidade.test.js && node test/skills.test.js && node test/skills-de-fora.test.js && node test/skills-novas.test.js && node test/comandos.test.js && node test/estudio.test.js && node test/voz.test.js && node test/voz-conversa.test.js && node test/modo.test.js && node test/pasta.test.js && node test/projeto.test.js && node test/nome-projeto.test.js && node test/api-propria.test.js && node test/claude-engine.test.js && node test/codex.test.js && node test/conferir.test.js && node test/catalogo.test.js && node test/desktop.test.js && node test/seta.test.js && node test/effort.test.js && node test/regressao.test.js && node test/memoria-conversa.test.js && node test/repeticao.test.js && node test/autonomia.test.js && node test/desfazer.test.js && node test/desfazer-git.test.js && node test/referencia.test.js && node test/parar.test.js && node test/continuar.test.js && node test/pipeline.test.js && node test/app.test.js && node test/app-janela.test.js && node test/aplicativo.test.js && node test/conta.test.mjs && node test/nuvem.test.js && node test/prazo.test.js && node test/primeira-vez.test.js && node test/janela.test.js && node test/fala.test.js && node test/especialistas.test.js && node test/empurrao.test.js && node test/terminal-novo.test.js && node test/markdown.test.js && node test/coerencia.test.js && node test/contexto.test.js && node test/perigo.test.js && node test/rapidez.test.js && node test/mascotes.test.js && node test/comandos-extra.test.js && node test/offline.test.js && node test/edicao.test.js && node test/composicao.test.js && node test/acervo-site.test.js && node test/impacto.test.js && node test/cinema.test.js"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=18.17.0"
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"skills/",
|
|
33
33
|
"voz/",
|
|
34
34
|
"README.md",
|
|
35
|
+
"comandos/",
|
|
35
36
|
"!**/__pycache__",
|
|
36
37
|
"!**/*.pyc",
|
|
37
38
|
"!**/*.pyo",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
nome: Apresentação PowerPoint
|
|
3
|
+
descricao: gerar um .pptx editável (PowerPoint, Keynote, Google Slides) com python-pptx, e conferir slide por slide
|
|
4
|
+
quando: pptx, powerpoint, power point, keynote, google slides, apresentação editável, slides editáveis
|
|
5
|
+
autor: PrimoCode
|
|
6
|
+
---
|
|
7
|
+
Primeiro a pergunta certa: a pessoa precisa EDITAR depois, ou só apresentar?
|
|
8
|
+
Só apresentar → o Estúdio faz slides com mais liberdade visual e entrega em PDF
|
|
9
|
+
(`estudio_projeto` formato "slides"). Precisa abrir no PowerPoint, no Keynote ou
|
|
10
|
+
no Google Slides e mexer → .pptx, com `python-pptx`.
|
|
11
|
+
|
|
12
|
+
**1. Prepare.** `python3 -m venv .venv && .venv/bin/pip install python-pptx`, e um
|
|
13
|
+
script (`gerar_slides.py`) que dá para rodar de novo a cada ajuste.
|
|
14
|
+
|
|
15
|
+
**2. Tamanho 16:9 e layout em branco.** O padrão da biblioteca é 4:3.
|
|
16
|
+
```python
|
|
17
|
+
from pptx import Presentation
|
|
18
|
+
from pptx.util import Inches, Pt
|
|
19
|
+
from pptx.dml.color import RGBColor
|
|
20
|
+
prs = Presentation()
|
|
21
|
+
prs.slide_width, prs.slide_height = Inches(13.333), Inches(7.5)
|
|
22
|
+
s = prs.slides.add_slide(prs.slide_layouts[6]) # 6 = em branco
|
|
23
|
+
caixa = s.shapes.add_textbox(Inches(0.8), Inches(0.8), Inches(11.7), Inches(1.5))
|
|
24
|
+
p = caixa.text_frame.paragraphs[0]
|
|
25
|
+
p.text = 'O custo dobrou em seis meses'
|
|
26
|
+
p.font.size, p.font.bold = Pt(44), True
|
|
27
|
+
p.font.color.rgb = RGBColor(0x1A, 0x23, 0x32)
|
|
28
|
+
s.notes_slide.notes_text_frame.text = 'O que falar neste slide.'
|
|
29
|
+
prs.save('apresentacao.pptx')
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**3. Regras que evitam o slide quebrado**
|
|
33
|
+
- O `python-pptx` NÃO encolhe texto que não cabe: ele vaza da caixa. Escreva
|
|
34
|
+
curto, uma ideia por slide, e dê à caixa a altura do texto.
|
|
35
|
+
- Corpo com pelo menos 24pt; título entre 36 e 54pt.
|
|
36
|
+
- Fonte que a outra máquina tem (Arial, Calibri, Georgia, Helvetica). O .pptx
|
|
37
|
+
não leva a fonte junto: a que falta é trocada e o texto muda de tamanho.
|
|
38
|
+
- Margem de 0,6 polegada em volta, e a mesma posição de título em todo slide.
|
|
39
|
+
- Imagem com `s.shapes.add_picture('foto.jpg', x, y, width=...)`: dê só a
|
|
40
|
+
largura, para ela não esticar.
|
|
41
|
+
- O que a pessoa vai FALAR vai nas notas, não no slide.
|
|
42
|
+
|
|
43
|
+
O conteúdo segue as regras da skill de slides: título que afirma, uma ideia por
|
|
44
|
+
slide, dado com fonte.
|
|
45
|
+
|
|
46
|
+
**4. Confira antes de entregar.**
|
|
47
|
+
- Reabra com `Presentation('apresentacao.pptx')` e imprima o número de slides e
|
|
48
|
+
o título de cada um.
|
|
49
|
+
- Com LibreOffice: `soffice --headless --convert-to pdf apresentacao.pptx`,
|
|
50
|
+
abra o PDF e OLHE cada página. Texto vazando da caixa, imagem cortada e slide
|
|
51
|
+
vazio só aparecem assim.
|
|
52
|
+
- Diga à pessoa que o Google Slides abre o .pptx por Arquivo → Importar.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Anthropic, PBC.
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
nome: Cartaz de arte
|
|
3
|
+
descricao: pôster, capa ou peça de arte parada que parece feita à mão por um mestre, e não por modelo pronto
|
|
4
|
+
quando: cartaz, cartazes, pôster, arte abstrata, peça de arte, obra de arte, capa de álbum, capa de disco, capa de livro, arte para imprimir, arte pra imprimir, quadro para parede
|
|
5
|
+
autor: adaptado de "canvas-design" (Anthropic, anthropics/skills, Apache-2.0 — ver LICENSE.txt); resumido e traduzido pelo PrimoCode
|
|
6
|
+
---
|
|
7
|
+
Trabalhe em dois passos: primeiro uma FILOSOFIA visual, depois a peça que a
|
|
8
|
+
expressa. É isso que impede o resultado de parecer um modelo pronto.
|
|
9
|
+
|
|
10
|
+
**1. A filosofia** (escreva num `filosofia.md`, curto):
|
|
11
|
+
- um nome de movimento de 1 ou 2 palavras ("Silêncio geométrico", "Poesia de
|
|
12
|
+
concreto", "Meditação analógica");
|
|
13
|
+
- um parágrafo dizendo como ele aparece em espaço e forma, cor e material,
|
|
14
|
+
escala e ritmo, composição e hierarquia.
|
|
15
|
+
Ela fala de linguagem visual, não do assunto. E diz, com todas as letras, que a
|
|
16
|
+
peça tem de parecer resultado de horas de trabalho cuidadoso de alguém no topo do
|
|
17
|
+
ofício.
|
|
18
|
+
|
|
19
|
+
**2. A referência escondida.** Tire do pedido um fio do assunto e tece ele na
|
|
20
|
+
forma, na cor e no ritmo, sem anunciar. Quem conhece o assunto sente; quem não
|
|
21
|
+
conhece vê uma composição bonita. Como um músico citando outra música.
|
|
22
|
+
|
|
23
|
+
**3. A peça**
|
|
24
|
+
- 90% visual, 10% texto. Texto é gesto raro: uma palavra grande, rótulos
|
|
25
|
+
pequenos. Nunca parágrafo.
|
|
26
|
+
- Padrões que se repetem, formas perfeitas, paleta curta e intencional.
|
|
27
|
+
- NADA encosta na borda, nada se sobrepõe sem querer, tudo com margem. Isso não
|
|
28
|
+
se negocia.
|
|
29
|
+
- Fontes: 1 ou 2, escolhidas para esta peça (`estudio_midia acao:"fontes"`).
|
|
30
|
+
- Nada copiado de artista existente: inspiração em movimento, nunca em obra.
|
|
31
|
+
|
|
32
|
+
**Como fazer o arquivo**, no PrimoCode:
|
|
33
|
+
- pelo Estúdio: `estudio_projeto` com formato "arte" → `estudio_plano` com uma
|
|
34
|
+
cena parada → `estudio_render`, que entrega o PDF;
|
|
35
|
+
- ou um HTML/SVG do tamanho exato da peça, fotografado inteiro pelo Chrome:
|
|
36
|
+
`"<chrome>" --headless=new --hide-scrollbars --window-size=1123,1587
|
|
37
|
+
--screenshot="$PWD/arte.png" "file://$PWD/arte.html"` (A3 em 96dpi; o
|
|
38
|
+
`browser_screenshot` pega só o pedaço visível da janela).
|
|
39
|
+
|
|
40
|
+
**4. O segundo passe.** Olhe o resultado e refine TIRANDO, não acrescentando.
|
|
41
|
+
Vontade de pôr mais uma forma ou um filtro? Pare e pergunte: como deixar o que já
|
|
42
|
+
existe mais coeso? Alinhe, ajuste o respiro, reduza a paleta.
|
|
43
|
+
|
|
44
|
+
Mais de uma página: cada uma é uma variação da mesma filosofia, como páginas de
|
|
45
|
+
um livro de arte que contam uma história juntas.
|
|
46
|
+
|
|
47
|
+
Entregue a peça e o `filosofia.md`, e explique em duas linhas a ideia por trás.
|