@esquadrao/cli 0.0.0-stage → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +366 -2
  3. package/assets/fonts/Anton-Regular.ttf +0 -0
  4. package/assets/fonts/BebasNeue-Regular.ttf +0 -0
  5. package/assets/fonts/OFL.txt +93 -0
  6. package/assets/fonts/Poppins-Bold.ttf +0 -0
  7. package/assets/fonts/README.md +13 -0
  8. package/bin/cli.js +126 -0
  9. package/package.json +58 -4
  10. package/scripts/ast_slice.js +73 -0
  11. package/scripts/cutout.py +197 -0
  12. package/scripts/dag_validator.js +78 -0
  13. package/scripts/lint.js +43 -0
  14. package/scripts/merkle_verify.js +83 -0
  15. package/scripts/wcag_check.js +77 -0
  16. package/skill-audit/SKILL.md +42 -0
  17. package/skill-audit/references/merkle-ledger-spec.md +27 -0
  18. package/skill-audit/references/receipt-ed25519-verification.md +17 -0
  19. package/skill-audit/references/time-travel-replay.md +10 -0
  20. package/skill-code-reviewer/SKILL.md +40 -0
  21. package/skill-context/SKILL.md +44 -0
  22. package/skill-context/references/ast-virtualization.md +10 -0
  23. package/skill-context/references/openapi-contract-synthesis.md +10 -0
  24. package/skill-engineering-manager/SKILL.md +40 -0
  25. package/skill-media-producer/SKILL.md +328 -0
  26. package/skill-media-producer/references/caption-templates.md +194 -0
  27. package/skill-media-producer/references/composicoes-especiais.md +99 -0
  28. package/skill-media-producer/references/configuracao-inicial.md +239 -0
  29. package/skill-media-producer/references/corte-podcast-3-niveis.md +179 -0
  30. package/skill-media-producer/references/llm-agent-guide.md +231 -0
  31. package/skill-orchestrate/SKILL.md +49 -0
  32. package/skill-orchestrate/references/mission-lifecycle.md +36 -0
  33. package/skill-orchestrate/references/swarm-coordination.md +33 -0
  34. package/skill-pipeline/SKILL.md +42 -0
  35. package/skill-pipeline/references/auto-healing-patterns.md +17 -0
  36. package/skill-pipeline/references/dag-decomposition-rules.md +18 -0
  37. package/skill-pipeline/references/topological-waves.md +16 -0
  38. package/skill-product-manager/SKILL.md +40 -0
  39. package/skill-qa-engineer/SKILL.md +40 -0
  40. package/skill-review/SKILL.md +46 -0
  41. package/skill-review/references/anti-slop-patterns.md +17 -0
  42. package/skill-review/references/dual-blind-adjudication.md +15 -0
  43. package/skill-review/references/voice-calibration.md +10 -0
  44. package/skill-security-engineer/SKILL.md +40 -0
  45. package/skill-software-architect/SKILL.md +40 -0
  46. package/skill-software-engineer/SKILL.md +40 -0
  47. package/skill-sre-engineer/SKILL.md +40 -0
  48. package/skill-system-analyst/SKILL.md +40 -0
  49. package/skill-tech-lead/SKILL.md +40 -0
  50. package/skill-technical-writer/SKILL.md +40 -0
  51. package/skill-ui/SKILL.md +45 -0
  52. package/skill-ui/references/design-tokens-spec.md +19 -0
  53. package/skill-ui/references/visual-tdd-methodology.md +10 -0
  54. package/skill-ui/references/wcag-target-sizes.md +9 -0
  55. package/src/captionTemplates.js +285 -0
  56. package/src/commands/onboard.js +618 -0
  57. package/src/commands/role.js +119 -0
  58. package/src/commands/setup.js +174 -0
  59. package/src/commands/studio.js +1822 -0
  60. package/src/roles/authority.js +129 -0
  61. package/src/roles/codeReviewer.js +65 -0
  62. package/src/roles/engineeringManager.js +53 -0
  63. package/src/roles/index.js +80 -0
  64. package/src/roles/mediaProducer.js +223 -0
  65. package/src/roles/productManager.js +50 -0
  66. package/src/roles/qaEngineer.js +54 -0
  67. package/src/roles/securityEngineer.js +53 -0
  68. package/src/roles/softwareArchitect.js +58 -0
  69. package/src/roles/softwareEngineer.js +76 -0
  70. package/src/roles/sreEngineer.js +60 -0
  71. package/src/roles/systemAnalyst.js +45 -0
  72. package/src/roles/techLead.js +46 -0
  73. package/src/roles/technicalWriter.js +46 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LuizKarlos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,367 @@
1
- # Temporary Holding Version
1
+ # Esquadrão de Conteúdo CLI (`@esquadrao/cli`)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Framework autônomo local e CLI de orquestração de skills, execução de papéis técnicos e produção automatizada de vídeo vertical (9:16) e widescreen (16:9) via FFmpeg, com formato e estilo definidos pelo usuário.
4
+
5
+ ---
6
+
7
+ ## Documentação Canônica e Sincronia de Desenvolvimento
8
+
9
+ Este repositório (`LuizKarlos/esquadrao_skill`) adota engenharia rigorosa centrada no código e opera sincronizado com o funil de vendas e área de membros (`LuizKarlos/esquadrao_funil`):
10
+
11
+ - **[`SPEC.md`](./SPEC.md)**: Especificação técnica canônica contendo arquitetura sem dependências obrigatórias (motor local opcional), contratos dos comandos `onboard` e `studio`, soberania de escolha de formato pelo usuário e matriz de papéis.
12
+ - **[`GLOSSARY.md`](./GLOSSARY.md)**: Fonte canônica de terminologia, equivalências técnicas, códigos de saída e matriz anti-delírio.
13
+ - **[`ROADMAP.md`](./ROADMAP.md)**: Esteira viva de engenharia estruturada em 5 fases vinculadas às issues do repositório.
14
+ - **[`Guia Operacional para LLMs`](./skill-media-producer/references/llm-agent-guide.md)**: Playbook completo para agentes inteligentes (Claude, Cursor, Codex, Grok, Hermes) conduzirem onboarding sem alucinações.
15
+ - **[`Catálogo de Templates de Legenda`](./skill-media-producer/references/caption-templates.md)**: Nove presets visuais com fonte, cores, contorno, sombra e medidas, disponíveis via `--caption-template`.
16
+ - **[`Prova de Corte em 3 Níveis`](./skill-media-producer/references/corte-podcast-3-niveis.md)**: Procedimento validado para demonstrar corte de pausas longas e respiros curtos, com métricas e critérios de aceite.
17
+
18
+ ---
19
+
20
+ ## Overview
21
+
22
+ `@esquadrao/cli` provides a portable, zero-required-dependency bridge to run skills, roles, and tools across any AI coding agent and CLI (local transcription is an optional add-on):
23
+
24
+ - **Grok Build** (`.agents/skills/`)
25
+ - **Claude Code** (`.claude/skills/`)
26
+ - **Codex CLI** (`.codex/skills/`, `AGENTS.md`)
27
+ - **Cursor** (`.cursor/rules/*.mdc`)
28
+ - **Hermes / VS Code** (`~/.hermes/`, `.vscode/`)
29
+
30
+ ## Requisitos
31
+
32
+ - **Node.js** >= 18.0.0
33
+ - **FFmpeg & ffprobe** no PATH (obrigatório para renderização de vídeo e comandos de studio/onboard):
34
+ - **Windows**: `winget install Gyan.FFmpeg` ou `choco install ffmpeg`
35
+ - **macOS**: `brew install ffmpeg`
36
+ - **Linux (Debian/Ubuntu)**: `sudo apt update && sudo apt install -y ffmpeg`
37
+
38
+ ## Installation
39
+
40
+ ### Run directly via npx
41
+ ```bash
42
+ npx @esquadrao/cli setup
43
+ ```
44
+
45
+ ### Install globally via npm
46
+ ```bash
47
+ npm install -g @esquadrao/cli
48
+ esquadrao setup
49
+ ```
50
+
51
+ ## Commands
52
+
53
+ ```bash
54
+ # Comando principal canônico: esquadrao
55
+ esquadrao onboard [--mode <mode>] [--dest <path>] [--file <file>] [--captions <file.srt>] [--openai] [--local] [--no-captions] [--verbose] [--json]
56
+
57
+ # Auto-corte integrado: detecta silêncio, expurga pausas e renderiza com QA
58
+ # Legendas: use --captions <file.srt>, --openai (com OPENAI_API_KEY) ou --local (Whisper local opcional)
59
+ esquadrao studio auto-clip <video.mp4> [--captions <file.srt>] [--openai] [--local] [--broll <file>] [--music <file.mp3>] [--layout fullscreen|pip|split_bottom] [--overlay-duration inserts|full] [--silence-thresh -30dB] [--silence-duration 0.8] [--format 9:16] [--caption-style impact]
60
+
61
+ # Detector rápido de silêncio e pausas mortas
62
+ esquadrao studio detect-silence <video.mp4> [--json]
63
+
64
+ # Transcrição estruturada para análise de copy (exporta transcript.json e transcript.srt via --openai ou --local)
65
+ esquadrao studio transcribe <video.mp4> [--openai] [--local] [--json]
66
+
67
+ # Configurar skills nos harnesses locais do usuário (.agents, .claude, .codex, .cursor)
68
+ esquadrao setup [--dest <path>] [--json]
69
+
70
+ # Inspecionar e executar papéis canônicos
71
+ esquadrao role [list | info <id> | prompt <id> | matrix] [--json]
72
+
73
+ # Inicializar workspace e importar mídia
74
+ esquadrao studio init [--dest <path>]
75
+ esquadrao studio import <file>
76
+
77
+ # Renderizar plano manual ou executar QA
78
+ esquadrao studio render <editplan.json>
79
+ esquadrao studio qa <artifact.mp4> [--plan <editplan.json>]
80
+ esquadrao studio cutout <video.mp4> --background <pack.mp4> [--python <interpretador>] [--fps 15]
81
+ ```
82
+
83
+ ## Primeiro acesso
84
+
85
+ O comando `onboard` conduz o cliente do zero até o primeiro vídeo renderizado com validação automatizada de QA. No modo `podcast_clip`, ele executa o pipeline real de `studio auto-clip` (detecção de silêncio, cortes, legendas e QA) e aceita `--captions`, `--openai`, `--local` ou `--no-captions`. Sem qualquer fonte de legenda, aplica `--no-captions` automaticamente, gera o corte real sem legendas e avisa; já o `studio auto-clip` direto, sem `--no-captions`, falha com código `1`.
86
+
87
+ ```bash
88
+ # Fluxo guiado interativo:
89
+ esquadrao onboard
90
+
91
+ # Execução não interativa com flags:
92
+ esquadrao onboard --mode dark --dest ./workspace
93
+ esquadrao onboard --mode edit_only --file ./raw.mp4 --dest ./workspace
94
+ esquadrao onboard --mode podcast_clip --file ./podcast.mp4 --captions ./podcast.srt --dest ./workspace
95
+ ```
96
+
97
+ ### Flags do Onboard:
98
+ - `--mode <podcast_clip | edit_only | dark>`: Modo de vídeo (cortes com legendas, decupagem ou tipografia).
99
+ - `--format <9:16 | 16:9>`: Proporção de tela definida pelo usuário (Vertical 9:16 para mobile ou Widescreen 16:9 para desktop).
100
+ - `--dest <path>`: Diretório do workspace (persiste no perfil para reuso).
101
+ - `--file <path>`: Arquivo de vídeo fonte (pode ser repetido para múltiplos arquivos).
102
+ - `--captions <file.srt>`: Legenda SRT para o modo `podcast_clip`.
103
+ - `--openai`: Usa OpenAI Whisper (requer `OPENAI_API_KEY`).
104
+ - `--local`: Usa o motor local `@xenova/transformers` (opcional).
105
+ - `--no-captions`: Gera o corte sem legendas, de forma explícita.
106
+ - `--verbose`: Exibe logs detalhados do FFmpeg em caso de erro.
107
+ - `--json`: Retorna resultado estruturado em formato JSON.
108
+
109
+ > **Importante — Soberania do Usuário:** Nem fundo preto (`dark`) nem widescreen (`16:9`) são impostos como padrão. O usuário escolhe a proporção e o estilo de edição.
110
+
111
+ ### Configurar proporção, legendas e áudio
112
+
113
+ Siga o [guia completo de configuração inicial para Windows / PowerShell](skill-media-producer/references/configuracao-inicial.md): preparação do projeto, importação, plano de edição, formatos vertical/horizontal, legendas, áudio, renderização e QA. A referência acompanha a instalação da `skill-media-producer` e documenta as opções disponíveis e os limites atuais.
114
+
115
+ ### Templates de legenda
116
+ O catálogo canônico tem nove presets sem fundo sólido — MrBeast Yellow, TikTok White, Gold Stroke, Green Stroke, Neon Glitch, Minimal Lower Third, Red Stroke, Heavy White e Mono Clean. Fonte, cores, contorno, sombra e medidas estão em [`caption-templates.md`](skill-media-producer/references/caption-templates.md).
117
+
118
+ **Disponível no CLI 1.6.0:** use `--caption-template <id>` em `studio auto-clip`/`studio render` ou `captions[].template` no EditPlan. `--caption-style impact|word|full` continua como legado.
119
+
120
+ ## Estrutura do workspace
121
+
122
+ Ao inicializar o estúdio via `esquadrao studio init` (ou no primeiro uso via `onboard`), a seguinte árvore de diretórios é criada:
123
+
124
+ ```
125
+ workspace/
126
+ ├── assets/ # Mídias brutas e assets importados (vídeos, áudios, b-rolls)
127
+ ├── packages/ # Planos de corte e edição gerados (editplan.json)
128
+ ├── artifacts/ # Vídeos finais renderizados (.mp4); QA é emitido em JSON/stdout
129
+ └── studio.json # Manifesto do estúdio e inventário de assets registrados
130
+ ```
131
+
132
+ ## Exemplos de EditPlan por Modo
133
+
134
+ ### 1. Modo `dark` (zero footage, textos/overlays):
135
+ ```json
136
+ {
137
+ "schema_version": 1,
138
+ "mode": "dark",
139
+ "clips": [
140
+ {
141
+ "kind": "text",
142
+ "text": "Esquadrão Onboarding",
143
+ "duration_ms": 1000,
144
+ "timeline_start_ms": 0
145
+ }
146
+ ],
147
+ "output": {
148
+ "width": 1080,
149
+ "height": 1920,
150
+ "fps_num": 30,
151
+ "fps_den": 1,
152
+ "video_codec": "h264",
153
+ "audio_codec": "aac"
154
+ }
155
+ }
156
+ ```
157
+
158
+ ### 2. Modo `edit_only` (2 cortes contíguos de fontes de vídeo):
159
+ ```json
160
+ {
161
+ "schema_version": 1,
162
+ "mode": "edit_only",
163
+ "clips": [
164
+ {
165
+ "kind": "video",
166
+ "asset_id": "AST-12345678",
167
+ "clip_id": "c1",
168
+ "in_ms": 0,
169
+ "out_ms": 500,
170
+ "timeline_start_ms": 0,
171
+ "speed": 1
172
+ },
173
+ {
174
+ "kind": "video",
175
+ "asset_id": "AST-12345678",
176
+ "clip_id": "c2",
177
+ "in_ms": 500,
178
+ "out_ms": 1000,
179
+ "timeline_start_ms": 500,
180
+ "speed": 1
181
+ }
182
+ ],
183
+ "audio_tracks": [
184
+ { "kind": "source", "clip_id": "c1", "gain_db": 0 },
185
+ { "kind": "source", "clip_id": "c2", "gain_db": 0 }
186
+ ],
187
+ "output": {
188
+ "width": 1080,
189
+ "height": 1920,
190
+ "fps_num": 30,
191
+ "fps_den": 1,
192
+ "video_codec": "h264",
193
+ "audio_codec": "aac"
194
+ }
195
+ }
196
+ ```
197
+
198
+ ### 3. Modo `podcast_clip` (>= 1 corte com legendas visuais):
199
+ ```json
200
+ {
201
+ "schema_version": 1,
202
+ "mode": "podcast_clip",
203
+ "clips": [
204
+ {
205
+ "kind": "video",
206
+ "asset_id": "AST-12345678",
207
+ "clip_id": "c1",
208
+ "in_ms": 0,
209
+ "out_ms": 1000,
210
+ "timeline_start_ms": 0,
211
+ "speed": 1
212
+ }
213
+ ],
214
+ "audio_tracks": [
215
+ { "kind": "source", "clip_id": "c1", "gain_db": 0 }
216
+ ],
217
+ "captions": [
218
+ {
219
+ "text": "Esquadrão Podcast Clip",
220
+ "timeline_start_ms": 0,
221
+ "duration_ms": 1000
222
+ }
223
+ ],
224
+ "output": {
225
+ "width": 1080,
226
+ "height": 1920,
227
+ "fps_num": 30,
228
+ "fps_den": 1,
229
+ "video_codec": "h264",
230
+ "audio_codec": "aac"
231
+ }
232
+ }
233
+ ```
234
+
235
+ ### 4. Modo `podcast_clip` dinâmico (com B-Rolls, Trilha Sonora e Ducking):
236
+ ```json
237
+ {
238
+ "schema_version": 1,
239
+ "mode": "podcast_clip",
240
+ "clips": [
241
+ {
242
+ "kind": "video",
243
+ "clip_id": "orador-01",
244
+ "asset_id": "AST-PODCAST01",
245
+ "in_ms": 15000,
246
+ "out_ms": 45000,
247
+ "timeline_start_ms": 0,
248
+ "speed": 1
249
+ }
250
+ ],
251
+ "audio_tracks": [
252
+ { "kind": "source", "clip_id": "orador-01", "gain_db": 0 }
253
+ ],
254
+ "overlays": [
255
+ {
256
+ "asset_id": "AST-BROLL01",
257
+ "layout": "fullscreen",
258
+ "in_ms": 0,
259
+ "out_ms": 3000,
260
+ "timeline_start_ms": 5000,
261
+ "duration_ms": 3000
262
+ }
263
+ ],
264
+ "music_tracks": [
265
+ {
266
+ "asset_id": "AST-TRILHA01",
267
+ "gain_db": -22,
268
+ "ducking": true
269
+ }
270
+ ],
271
+ "captions": [
272
+ {
273
+ "text": "O MAIOR SEGREDO",
274
+ "timeline_start_ms": 0,
275
+ "duration_ms": 1500,
276
+ "style": "impact"
277
+ }
278
+ ],
279
+ "output": {
280
+ "width": 1080,
281
+ "height": 1920,
282
+ "fps_num": 30,
283
+ "fps_den": 1,
284
+ "video_codec": "h264",
285
+ "audio_codec": "aac"
286
+ }
287
+ }
288
+ ```
289
+
290
+ ## Industry Roles Matrix
291
+
292
+ All roles follow standardized industry nomenclature, structural authority boundaries, and zero-dependency contract validation:
293
+
294
+ | Role ID | Title | Access | Description |
295
+ | :--- | :--- | :--- | :--- |
296
+ | `product-manager` | Product Manager | Read/Write | Requirements contracts, bounded scope, acceptance criteria |
297
+ | `system-analyst` | Systems Analyst | Read-Only | Repository mapping, dependency graphs, architectural recon |
298
+ | `software-architect` | Principal Software Architect | Read/Write | System decomposition, interface invariants, rollback criteria |
299
+ | `tech-lead` | Technical Lead | Read/Write | Architectural adjudication, technical trade-offs, standard enforcement |
300
+ | `security-engineer` | Security Engineer | Read-Only | Adversarial threat modeling, vulnerability auditing, boundary checks |
301
+ | `software-engineer` | Senior Software Engineer | Read/Write | Production code implementation, unit tests, minimal working diffs |
302
+ | `code-reviewer` | Code Reviewer | Read-Only | Independent peer review, anti-slop linting, anti-self-review guard |
303
+ | `sre-engineer` | Site Reliability Engineer | Read/Write | Failure diagnosis, root cause analysis (RCA), fix contracts |
304
+ | `qa-engineer` | QA Engineer | Read-Only | Release verification, operational criteria check, terminal gates |
305
+ | `technical-writer` | Technical Writer | Read/Write | Developer guides, API documentation, changelogs, ADR records |
306
+ | `engineering-manager` | Engineering Manager | Read/Write | Milestone roadmaps, sprint backlogs, follow-up task generation |
307
+ | `media-producer` | Media Producer | Read/Write | Video edit plans, timeline cuts (>=100ms), NFC text, media QA |
308
+
309
+ ## Skills Matrix
310
+
311
+ | Skill | Description |
312
+ | :--- | :--- |
313
+ | `skill-orchestrate` | Autonomous missions, multi-agent swarms, atomic checkpoints, and rollbacks |
314
+ | `skill-pipeline` | DAG decomposition, topological wave calculation, and auto-healing |
315
+ | `skill-review` | Adversarial dual-blind code review, anti-slop pattern linting, and voice calibration |
316
+ | `skill-audit` | SHA-256 Merkle chain integrity, receipt verification, and time-travel replay |
317
+ | `skill-context` | AST outline slicing, OpenAPI 3.1 contract synthesis, and context packets <3k tokens |
318
+ | `skill-ui` | Headless WCAG 2.1 AA/AAA contrast check, 44x44px touch targets, and visual TDD |
319
+ | `skill-product-manager` | Requirements synthesis, scope boundaries, and acceptance criteria |
320
+ | `skill-system-analyst` | Read-only codebase reconnaissance, dependency mapping, and touchpoints |
321
+ | `skill-software-architect` | Architectural contracts, system invariants, and rollback conditions |
322
+ | `skill-tech-lead` | Proposal arbitration, technical debt evaluation, and engineering guidelines |
323
+ | `skill-security-engineer` | Threat modeling, injection and privilege audit, fail-closed enforcement |
324
+ | `skill-software-engineer` | Implementation of atomic patches and focused unit tests |
325
+ | `skill-code-reviewer` | Independent diff review, anti-slop inspection, and anti-self-review |
326
+ | `skill-sre-engineer` | Root-cause analysis (RCA) and deterministic fix contracts |
327
+ | `skill-qa-engineer` | Final operational release gates and acceptance certification |
328
+ | `skill-technical-writer` | Developer guides, ADR documentation, and changelog authoring |
329
+ | `skill-engineering-manager` | Milestone derivations, sprint task backlogs, and agile planning |
330
+ | `skill-media-producer` | Video timeline cuts, audio gain leveling, NFC text overlays, media QA |
331
+
332
+ ## Standalone Scripts
333
+
334
+ All scripts run directly with Node.js stdlib (zero dependencies):
335
+
336
+ - `node scripts/dag_validator.js tasks.json` - Validates DAG acyclicity and computes topological waves.
337
+ - `node scripts/merkle_verify.js ledger.json` - Verifies cryptographic continuity of Merkle blocks.
338
+ - `node scripts/ast_slice.js src/app.js` - Extracts structural AST signatures reducing tokens by >60%.
339
+ - `node scripts/wcag_check.js --fg="#000" --bg="#fff"` - Checks WCAG contrast ratios and target sizes.
340
+
341
+ ## Limitações atuais
342
+
343
+ - **Legendas automáticas:** a transcrição no `studio auto-clip` e `studio transcribe` depende de SRT (`--captions <file.srt>`), da API OpenAI (`--openai` com `OPENAI_API_KEY`) ou do motor local (`--local`, `@xenova/transformers` em `optionalDependencies`). Sem nenhum deles, o comando falha com código `1` e instrução acionável; use `--no-captions` para gerar o corte explicitamente sem legendas (CLI-02/CLI-03 resolvidos em 1.4.0).
344
+ - **Sem processamento em lote nativo:** não há comando `batch`; renderizações em lote devem ser orquestradas externamente via chamadas sucessivas de `esquadrao studio render`.
345
+ - **Ducking de áudio fixo:** a opção `ducking: true` em `music_tracks` aplica atenuação fixa de volume em `-22dB` via filtro `amix`; ducking dinâmico via sidechain está pendente de implementação (CLI-05).
346
+ - **Layout de overlay `split_top`:** embora aceito na validação do schema do EditPlan, o pipeline de renderização trata apenas `fullscreen`, `pip` e `split_bottom`; overlays com `split_top` são renderizados como tela cheia (`fullscreen`) (CLI-06).
347
+ - **Split permanente:** disponível em `auto-clip --broll <pack> --layout split_bottom --overlay-duration full`; o pack cobre toda a linha do tempo em loop e o áudio original é preservado (CLI-13). `split_top` continua pendente (CLI-06).
348
+ - **Recorte de pessoa com troca de fundo:** `studio cutout` é experimental e exige Python com `rembg`, `onnxruntime`, `opencv-python-headless` e `numpy`; sem isso, falha com instrução. Saída 9:16, 15 fps por padrão, ~18–20 min de CPU por 60 s. Sem cache de máscaras ou GPU nesta versão. Detalhes em [`skill-media-producer/references/composicoes-especiais.md`](./skill-media-producer/references/composicoes-especiais.md).
349
+ - **Alias legado no package.json:** o binário canônico oficial é `esquadrao`; o alias `esquadrao-skill` ainda consta no campo `bin` do `package.json` para compatibilidade retroativa e sua remoção está mapeada em backlog (CLI-09).
350
+
351
+ ## Testing
352
+
353
+ Run the native test suite:
354
+ ```bash
355
+ npm test
356
+ ```
357
+
358
+ ## License
359
+
360
+ MIT
361
+
362
+ ---
363
+
364
+ ## 🛡️ Auditoria Atlas MCP & Jev: Sanitização Concluída
365
+
366
+ > **AVISO DE CONFORMIDADE:** A etapa de produção de tutoriais está **CONFORME E LIBERADA**.
367
+ > Sanitização de nomes de pacotes (`@esquadrao/cli`), binários (`esquadrao`) e manifestos (`esquadrao-studio`) executada com sucesso. Erradicação de 100% dos termos legados.
Binary file
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The Anton Project Authors (https://github.com/googlefonts/AntonFont.git)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
@@ -0,0 +1,13 @@
1
+ # Fontes empacotadas
2
+
3
+ Estas fontes são distribuídas com o `@esquadrao/cli` para que os templates de legenda tenham o mesmo desenho em qualquer sistema.
4
+
5
+ | Arquivo | Família | Origem | Licença |
6
+ | :--- | :--- | :--- | :--- |
7
+ | `Anton-Regular.ttf` | Anton | [Google Fonts](https://fonts.google.com/specimen/Anton) | SIL Open Font License 1.1 |
8
+ | `BebasNeue-Regular.ttf` | Bebas Neue | [Google Fonts](https://fonts.google.com/specimen/Bebas+Neue) | SIL Open Font License 1.1 |
9
+ | `Poppins-Bold.ttf` | Poppins | [Google Fonts](https://fonts.google.com/specimen/Poppins) | SIL Open Font License 1.1 |
10
+
11
+ O texto integral da licença está em [`OFL.txt`](./OFL.txt).
12
+
13
+ Liberation Sans Bold e DejaVu Sans Mono Bold são resolvidas do sistema operacional; quando ausentes, o CLI usa `Poppins-Bold.ttf` como fallback.
package/bin/cli.js ADDED
@@ -0,0 +1,126 @@
1
+ #!/usr/bin/env node
2
+ import { parseArgs } from 'node:util';
3
+ import { existsSync, readFileSync } from 'node:fs';
4
+ import process from 'node:process';
5
+
6
+ if (typeof process.loadEnvFile === 'function' && existsSync('.env')) {
7
+ try { process.loadEnvFile(); } catch {}
8
+ }
9
+
10
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
11
+
12
+ const { values: flags, positionals } = parseArgs({
13
+ args: process.argv.slice(2),
14
+ options: {
15
+ json: { type: 'boolean' },
16
+ dest: { type: 'string' },
17
+ mode: { type: 'string' },
18
+ file: { type: 'string', multiple: true },
19
+ plan: { type: 'string' },
20
+ verbose: { type: 'boolean' },
21
+ help: { type: 'boolean', short: 'h' },
22
+ version: { type: 'boolean', short: 'v' },
23
+ format: { type: 'string' },
24
+ 'silence-thresh': { type: 'string' },
25
+ 'silence-duration': { type: 'string' },
26
+ 'caption-style': { type: 'string' },
27
+ openai: { type: 'boolean' },
28
+ local: { type: 'boolean' },
29
+ captions: { type: 'string' },
30
+ 'caption-template': { type: 'string' },
31
+ 'no-captions': { type: 'boolean' },
32
+ broll: { type: 'string', multiple: true },
33
+ music: { type: 'string' },
34
+ layout: { type: 'string' },
35
+ 'overlay-duration': { type: 'string' },
36
+ background: { type: 'string' },
37
+ engine: { type: 'string' },
38
+ fps: { type: 'string' },
39
+ python: { type: 'string' },
40
+ 'min-dur': { type: 'string' },
41
+ 'max-dur': { type: 'string' },
42
+ },
43
+ allowPositionals: true,
44
+ strict: false,
45
+ });
46
+
47
+ const command = positionals[0];
48
+
49
+ if (flags.version || command === 'version' || flags.v) {
50
+ console.log(pkg.version);
51
+ process.exit(0);
52
+ }
53
+
54
+ const SUBCOMMANDS = new Set(['setup', 'role', 'studio', 'onboard']);
55
+
56
+ if (!command || command === 'help' || (flags.help && !SUBCOMMANDS.has(command))) {
57
+ console.log(`Esquadrão CLI v${pkg.version}
58
+
59
+ Usage:
60
+ esquadrao <command> [options]
61
+
62
+ Commands:
63
+ setup Instala os skills nos ambientes de agentes (.agents, .claude, .codex, .cursor)
64
+ role Lista, inspeciona e executa papéis canônicos da esteira
65
+ studio Estúdio local de vídeo: init, import, render, qa, auto-clip, cutout, caption-templates
66
+ onboard Guia interativo: da mídia bruta ao primeiro corte renderizado
67
+ version Exibe a versão do CLI
68
+ help Exibe mensagens de ajuda
69
+
70
+ Options:
71
+ -h, --help Show help
72
+ -v, --version Show version
73
+ --json Output results in JSON format
74
+ --dest <path> Custom destination directory for skills or workspace
75
+ --mode <mode> Video mode for onboarding (edit_only, dark, podcast_clip)
76
+ --file <path> Source media file for onboarding (can be repeated)
77
+ --format <9:16|16:9> Aspect ratio (padrão: 9:16)
78
+ --silence-thresh <dB> Sensibilidade de silêncio (padrão: -30dB)
79
+ --silence-duration <sec> Pausa mínima para corte (padrão: 0.8s)
80
+ --caption-style <style> Estilo de legendas: impact (padrão), word, full
81
+ --openai Usar API OpenAI Whisper para transcrição
82
+ --local Usar Whisper local (offline)
83
+ --captions <file.srt> Arquivo de legendas externo
84
+ --caption-template <id> Template de legenda (ver studio caption-templates)
85
+ --no-captions Gerar corte sem legendas (pula transcrição)
86
+ --broll <file> Arquivo de B-roll/cena de apoio (pode ser repetido)
87
+ --music <file.mp3> Arquivo de música de fundo para ducking
88
+ --layout <layout> Layout do B-roll: fullscreen, pip ou split_bottom
89
+ --overlay-duration <mode> inserts (2-4s) ou full (todo o clipe)
90
+ --background <file> Pack de fundo para studio cutout
91
+ --engine <rembg> Motor de recorte de pessoa (padrão: rembg)
92
+ --fps <n> FPS do recorte (padrão: 15)
93
+ --python <path> Interpretador Python para o motor de recorte
94
+ --min-dur <sec> Duração mínima para detecção de gancho (padrão: 30)
95
+ --max-dur <sec> Duração máxima para detecção de gancho (padrão: 60)`);
96
+ process.exit(0);
97
+ }
98
+
99
+ if (!SUBCOMMANDS.has(command)) {
100
+ console.error(`Unknown command: '${command}'. Run 'esquadrao --help' for available commands.`);
101
+ process.exit(1);
102
+ }
103
+
104
+ // ponytail: direct file resolution for command modules; upgrade when complex routing needed.
105
+ const candidates = [
106
+ new URL(`../src/commands/${command}.js`, import.meta.url),
107
+ new URL(`../src/${command}.js`, import.meta.url),
108
+ ];
109
+ const target = candidates.find((url) => existsSync(url));
110
+
111
+ if (!target) {
112
+ console.error(`Command '${command}' is not yet implemented.`);
113
+ process.exit(1);
114
+ }
115
+
116
+ try {
117
+ const mod = await import(target.href);
118
+ const handler = mod.run || mod.default || mod[command];
119
+ if (typeof handler !== 'function') {
120
+ throw new Error(`Command module '${command}' does not export a runnable function.`);
121
+ }
122
+ await handler({ positionals: positionals.slice(1), flags });
123
+ } catch (err) {
124
+ console.error(`Error executing '${command}':`, err.message);
125
+ process.exit(1);
126
+ }