@aksp/opencrew 1.7.0 → 1.8.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 (29) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/README.md +52 -2
  3. package/package.json +1 -1
  4. package/templates/AGENTS.md +3 -0
  5. package/templates/_opencrew/.opencrew-version +1 -1
  6. package/templates/_opencrew/core/architect.agent.yaml +1 -1
  7. package/templates/_opencrew/core/prompts/discovery.prompt.md +1 -1
  8. package/templates/_opencrew/core/prompts/entrega.prompt.md +131 -0
  9. package/templates/_opencrew/core/runner.pipeline.md +91 -98
  10. package/templates/_opencrew/core/scripts/caminho/argumentos.mjs +49 -0
  11. package/templates/_opencrew/core/scripts/caminho/disco.mjs +36 -0
  12. package/templates/_opencrew/core/scripts/caminho/nucleo.mjs +61 -0
  13. package/templates/_opencrew/core/scripts/caminho.mjs +124 -0
  14. package/templates/_opencrew/core/scripts/entrega/argumentos.mjs +46 -0
  15. package/templates/_opencrew/core/scripts/entrega/canais.mjs +51 -0
  16. package/templates/_opencrew/core/scripts/entrega/fora.mjs +49 -0
  17. package/templates/_opencrew/core/scripts/entrega/gravar.mjs +83 -0
  18. package/templates/_opencrew/core/scripts/entrega/leiame.mjs +89 -0
  19. package/templates/_opencrew/core/scripts/entrega/leitor.mjs +120 -0
  20. package/templates/_opencrew/core/scripts/entrega/longas.mjs +109 -0
  21. package/templates/_opencrew/core/scripts/entrega/nomes.mjs +78 -0
  22. package/templates/_opencrew/core/scripts/entrega/passos.mjs +99 -0
  23. package/templates/_opencrew/core/scripts/entrega/pendencias.mjs +87 -0
  24. package/templates/_opencrew/core/scripts/entrega/separar.mjs +103 -0
  25. package/templates/_opencrew/core/scripts/entrega/texto.mjs +95 -0
  26. package/templates/_opencrew/core/scripts/entregar.mjs +141 -0
  27. package/templates/_opencrew/core/scripts/verificar/pecas.mjs +4 -4
  28. package/templates/_opencrew/core/scripts/verificar/secoes.mjs +22 -2
  29. package/templates/_opencrew/core/scripts/verificar.mjs +4 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,101 @@
3
3
  All notable changes to opencrew are documented here.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/).
5
5
 
6
+ ## [1.8.0] — 2026-10-07
7
+
8
+ Fase U3a, fatia 1 "Pasta de entrega" (`specs/fase-u3a1-pasta-de-entrega.md`). Chega a quem já usa
9
+ com um `npx @aksp/opencrew@latest update`, e funciona nas crews que já existem, sem mexer nelas.
10
+
11
+ Ainda não nesta versão: PDF e "posts formatados" não são gerados pela entrega (`artigo.md`,
12
+ `corpo.md` e os roteiros saem em markdown, e o LEIA-ME ensina a salvar como PDF pelo "Imprimir");
13
+ copiar a entrega para uma pasta do projeto, registrar "entregar assim mesmo" e marcar "já
14
+ publicado" ficam para a 1.9.0. O LEIA-ME e os nomes dos arquivos são só em português.
15
+
16
+ ### Added
17
+ - **Pasta `entrega/`: o que você usa, separado por canal.** Depois da aprovação final, a crew
18
+ monta `crews/<crew>/output/<execução>/entrega/` com uma pasta por canal (`instagram/`,
19
+ `linkedin/`, `blog/`, `email/`, `whatsapp/`, `twitter/`, `youtube/`; só os que a execução tem).
20
+ Antes, você recebia a pasta da execução com `v1`, `v2`, relatórios e textos cheios de `#`, `**`
21
+ e rótulos.
22
+ - **Texto pronto para colar.** `legenda.txt`, `post.txt` e `tweet.txt` saem sem `#`, `**`, rótulos
23
+ nem recados internos, com as hashtags no fim. O primeiro comentário do LinkedIn vem em arquivo
24
+ à parte; a thread, em `tweet-1.txt`, `tweet-2.txt`…; o blog, em `seo.txt` (título, meta
25
+ description, palavra-chave, slug) e `artigo.md`; o e-mail, em `assunto.txt`, `previa.txt` e
26
+ `corpo.md`; o WhatsApp, em `mensagem.txt`. As imagens vão para a pasta do canal com o nome
27
+ original, sem alteração; o HTML dos slides, para `editaveis/`.
28
+ - **`LEIA-ME.md` em cada entrega.** Diz o que fazer com cada arquivo, canal por canal, em passos
29
+ numerados; marca cada canal como "Pronto" ou "Não está pronto"; lista em "Antes de usar" o que
30
+ falta; e diz o que não foi conferido (links e fatos, texto dentro das imagens, aparência final
31
+ em cada rede).
32
+ - **O que não está pronto fica marcado.** Texto com `[PREENCHER]`, acima de um limite ou arquivo
33
+ que faltou: o canal aparece como "Não está pronto" e a crew pergunta se você quer corrigir agora
34
+ ou seguir assim. Se a legenda, o post ou o tweet passar do limite por causa das hashtags no fim,
35
+ o LEIA-ME traz um alerta.
36
+ - **Arquivo sem canal não se perde.** Proposta, minuta, relatório ou formato que não é de rede
37
+ nenhuma vai inteiro para `outros/`, com o nome original, e aparece no LEIA-ME.
38
+ - **Entrega de uma execução antiga.** Peça à IA para montar a entrega de uma execução já
39
+ encerrada: ela lista os arquivos, pede o seu "sim" e monta a pasta.
40
+ - Crew que publica sozinha (Instagram, por exemplo): a entrega é montada antes da publicação, e
41
+ o LEIA-ME avisa "Esta crew publica este canal sozinha. Antes de postar à mão, confira se já saiu."
42
+
43
+ ### Changed
44
+ - **O fim da execução aponta para `entrega/` e para o LEIA-ME**, não mais para a pasta da execução
45
+ e para um "arquivo final" que ninguém dizia qual era. A cópia do arquivo final na raiz da
46
+ execução deixa de ser feita.
47
+ - A pasta `entrega/` é refeita do zero a cada entrega e fica fora do git: o que você editar ali se
48
+ perde. Para guardar, copie a pasta para outro lugar do projeto (o LEIA-ME avisa).
49
+ - Se o script da entrega não rodar (sem Node, por exemplo), a execução não para: a crew avisa e
50
+ lista os arquivos aprovados.
51
+
52
+ ### Fixed
53
+ - **O título do arquivo era lido como legenda.** Num arquivo com `# Legenda — …` no topo e a
54
+ legenda de verdade mais abaixo, o verificador media duas legendas e podia dar alerta falso.
55
+ Agora o título do arquivo não conta como peça.
56
+
57
+ ### Internal
58
+ - `_opencrew/core/scripts/entregar.mjs` e os módulos de `scripts/entrega/` (sem dependência, até
59
+ 200 linhas cada); `_opencrew/core/prompts/entrega.prompt.md`; seção `### Entrega` no runner, que
60
+ perde "Save final output", "Run folder" e "Output saved to".
61
+ - Regra 15 do `AGENTS.md`: script do runtime só escreve onde foi combinado.
62
+ - Travas novas: `tests/entregar*.test.js`, `tests/runtime-contracts-u3a.test.js`,
63
+ `tests/upgrade-u3a.test.js` e o U3a-14c em `tests/package.test.js`.
64
+ - Roteiro renumerado: U3a fatia 2 = 1.9.0, U3b = 1.10.0, U4 = 1.11.0.
65
+
66
+ ## [1.7.1] — 2026-10-06
67
+
68
+ Fase R3 "Reparos do runner em uso real" (`specs/fase-r3-runner-em-uso-real.md`): dois defeitos
69
+ achados numa execução real de crew, seguindo o runner ao pé da letra. Chega a quem já usa com um
70
+ `npx @aksp/opencrew@latest update`. Execuções antigas continuam legíveis.
71
+
72
+ ### Fixed
73
+ - **A crew parava no segundo passo com "Input … not found".** O passo procurava o arquivo de
74
+ entrada num caminho em que o passo anterior não tinha gravado (a pesquisa estava em `v1/`, e a
75
+ entrada era procurada fora dela). Agora a entrada de um passo é sempre a saída mais nova daquele
76
+ arquivo, em qualquer pasta de versão.
77
+ - **No Windows, cada conferência dependia de a IA traduzir um comando de bash** (`test -s`,
78
+ `grep`, `ls | sort | tail`, `mkdir -p`). Um erro de tradução virava validação que falhava sem
79
+ motivo. Esses comandos saíram do runner.
80
+ - O Architect proibia criar pasta por comando e o runner mandava criar: os dois agora dizem a
81
+ mesma coisa (ninguém cria pasta por comando).
82
+
83
+ ### Changed
84
+ - **Quem calcula os caminhos da execução é um script, não a IA.** O runner roda um comando curto
85
+ (`_opencrew/core/scripts/caminho.mjs`), igual em qualquer sistema, para criar a pasta da
86
+ execução, saber onde cada passo grava, achar a entrada e conferir o arquivo gravado. Existência,
87
+ número de seções e TL;DR saem numa conferência só; antes eram até três.
88
+ - A pasta de versão continua subindo como antes (`v1`, `v2`, `v3`… a cada passo que grava), agora
89
+ em ordem numérica (`v10` vem depois de `v9`). O script só cria pastas, e só dentro de
90
+ `crews/<crew>/output/<execução>/`; nunca cria, altera nem apaga arquivo.
91
+ - Se o script não rodar (sem Node, por exemplo), a execução não para: o runner avisa uma vez,
92
+ segue pela regra escrita e lista esses arquivos como "não verificado" na aprovação final.
93
+ - Saber se a memória da crew está no formato novo e se o `runs.md` existe passa a ser feito lendo
94
+ o arquivo, sem comando de terminal. Na criação de crew, as crews existentes são listadas pela
95
+ ferramenta da IDE, não por `ls`.
96
+
97
+ ### Internal
98
+ - Travas novas: `tests/caminho.test.js`, `tests/caminho-casca.test.js`,
99
+ `tests/runtime-contracts-r3.test.js` e `tests/upgrade-r3.test.js`; os testes R2-04d que contavam
100
+ comandos de bash no runner passam a proteger as aspas nos comandos novos.
6
101
  ## [1.7.0] — 2026-10-06
7
102
 
8
103
  Fase E1 "Escritório ao vivo — a equipe trabalhando, em 8 bits"
package/README.md CHANGED
@@ -32,6 +32,9 @@ dentro da sua IDE.**
32
32
  mensal, lançamento de produto. Comece em 2 minutos.
33
33
  - 📤 **Exportação multi-formato** — PDF, CSV e posts formatados por plataforma,
34
34
  sem abrir editor nenhum.
35
+ - 📬 **Entrega por canal** — depois de aprovar, você encontra a pasta `entrega/`: uma pasta por
36
+ canal (Instagram, LinkedIn, blog, e-mail, WhatsApp, X/Twitter, YouTube), o texto pronto para
37
+ colar, as imagens e um `LEIA-ME.md` com o passo a passo. O que não está pronto fica marcado.
35
38
  - 🎛️ **Seleção inteligente de agentes** — o sistema analisa seu pedido e
36
39
  sugere quais agentes são necessários para aquela tarefa. Você confirma ou
37
40
  ajusta com um clique. Agentes pulados não gastam tokens naquele run.
@@ -178,9 +181,9 @@ meu-projeto/
178
181
  │ │ ├── skills.engine.md ← gerenciador de skills
179
182
  │ │ ├── architect.agent.yaml ← definição do Arquiteto
180
183
  │ │ ├── best-practices/ ← 22 guias de melhores práticas + _catalog.yaml
181
- │ │ ├── scripts/ ← verificador, conferência de fontes e os scripts do Escritório
184
+ │ │ ├── scripts/ ← verificador, conferência de fontes, caminhos, entrega e os scripts do Escritório
182
185
  │ │ ├── escritorio/ ← página do Escritório ao vivo (abre com /opencrew dashboard)
183
- │ │ └── prompts/ ← 13 prompts de fase (discovery, design, build, etc.)
186
+ │ │ └── prompts/ ← 14 prompts de fase (discovery, design, build, entrega, etc.)
184
187
  │ ├── agents/ ← 5 agentes base compartilhados
185
188
  │ │ ├── researcher.agent.md
186
189
  │ │ ├── copywriter.agent.md
@@ -194,6 +197,9 @@ meu-projeto/
194
197
  │
195
198
  ├── crews/ ← suas crews vivem aqui
196
199
  │ ├── blog-semanal/ ← template: blog semanal
200
+ │ │ └── output/<execução>/ ← criada a cada execução
201
+ │ │ ├── v1/ v2/ … ← o que cada passo gravou
202
+ │ │ └── entrega/ ← o que você usa: LEIA-ME.md + uma pasta por canal
197
203
  │ ├── instagram-carrossel/ ← template: Instagram carrossel
198
204
  │ ├── newsletter-mensal/ ← template: newsletter
199
205
  │ └── lancamento-produto/ ← template: lançamento
@@ -209,6 +215,50 @@ meu-projeto/
209
215
 
210
216
  ---
211
217
 
218
+ ## Entrega por canal
219
+
220
+ Depois da aprovação final, a crew monta a pasta `entrega/` dentro da pasta da execução
221
+ (`crews/<crew>/output/<execução>/entrega/`). É ali que está o que você vai usar:
222
+
223
+ ```
224
+ entrega/
225
+ ├── LEIA-ME.md ← comece por aqui: o que fazer com cada arquivo, canal por canal
226
+ ├── instagram/ ← legenda.txt (hashtags no fim) e as imagens, com o nome original
227
+ ├── linkedin/ ← post.txt e, se houver, post-comentario.txt (o primeiro comentário)
228
+ ├── blog/ ← seo.txt (título, meta description, palavra-chave, slug) e artigo.md
229
+ ├── email/ ← assunto.txt, previa.txt e corpo.md
230
+ ├── whatsapp/ ← mensagem.txt
231
+ ├── twitter/ ← tweet.txt (na thread: tweet-1.txt, tweet-2.txt…)
232
+ ├── youtube/ ← o roteiro
233
+ ├── outros/ ← arquivo sem canal (proposta, minuta, relatório), como está
234
+ └── editaveis/ ← o HTML dos slides, para quem quiser ajustar
235
+ ```
236
+
237
+ Só aparecem as pastas que a execução tem.
238
+
239
+ - **Texto pronto para colar.** Os `.txt` saem sem `#`, `**`, rótulos nem recados internos, com as
240
+ hashtags no fim. Com mais de uma peça do mesmo tipo, os arquivos são numerados (`post-1.txt`,
241
+ `post-2.txt`).
242
+ - **O `LEIA-ME.md` diz o que fazer.** Cada canal tem a situação ("Pronto" ou "Não está pronto"),
243
+ os arquivos, de onde cada um veio e os passos, numerados. "Antes de usar" junta o que falta;
244
+ "O que não foi conferido" lembra o que ninguém mediu (links e fatos, texto dentro das imagens,
245
+ aparência final em cada rede).
246
+ - **O que não está pronto fica marcado.** Sobrou um `[PREENCHER]` ou um texto acima do limite? O
247
+ canal aparece como "Não está pronto" e a crew pergunta se você quer corrigir agora ou seguir
248
+ assim.
249
+ - **Arquivo sem canal vai para `outros/`**, inteiro e com o nome original: nada some.
250
+ - **A pasta é refeita a cada entrega e fica fora do git.** O que você editar ali se perde; para
251
+ guardar, copie a pasta para outro lugar do projeto.
252
+ - **Execução antiga?** Peça à IA: "monte a entrega da execução X da crew Y". Ela lista os
253
+ arquivos, pede o seu "sim" e monta a pasta. Funciona em crews criadas antes da 1.8.0, depois
254
+ do `update`.
255
+
256
+ A entrega não gera PDF nem imagem: `artigo.md`, `corpo.md` e os roteiros saem em markdown, e o
257
+ LEIA-ME ensina a salvar como PDF pelo "Imprimir" do seu editor. O LEIA-ME e os nomes dos arquivos
258
+ são sempre em português.
259
+
260
+ ---
261
+
212
262
  ## Escritório ao vivo
213
263
 
214
264
  Quer ver a equipe trabalhando? O **Escritório** é uma página em pixel-art, aberta no navegador,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aksp/opencrew",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -61,6 +61,7 @@ Route input to the matching action:
61
61
  | `/opencrew dashboard` | Turn on and open the Escritório (live view) — see "Dashboard (Optional)" |
62
62
  | `/opencrew dashboard off` | Turn the Escritório off — see "Dashboard (Optional)" |
63
63
  | `/opencrew reset` | Confirm and reset all configuration |
64
+ | Request to deliver a run that already ended ("monte a entrega da execução …") | Load `_opencrew/core/prompts/entrega.prompt.md` → build the `entrega/` folder of that run |
64
65
  | Natural language about crews | Infer intent and route accordingly |
65
66
 
66
67
  ## Loading Agents
@@ -120,6 +121,8 @@ and touch nothing else: stop no process, delete no file.
120
121
  - Exception: crew memory scaffolding (`memories.md` headers, `runs.md` columns)
121
122
  keeps fixed PT-BR structural labels regardless of the user's language —
122
123
  see `_opencrew/core/runner.pipeline.md`
124
+ - Exception: the delivery folder (`entrega/`) — its folder names, file names and the `LEIA-ME.md`
125
+ are written by a script in fixed PT-BR, whatever the user's language
123
126
 
124
127
  ## Critical Rules
125
128
 
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.8.0
@@ -32,7 +32,7 @@ agent:
32
32
  - Each agent must have exactly one clear responsibility
33
33
  - Pipelines must have checkpoints at every user decision point
34
34
  - Default to the simplest pipeline that achieves the goal
35
- - "Path safety: Never use Bash mkdir to create directories. Always use the Write tool to create files — it creates parent directories automatically and avoids Windows/Bash path separator conflicts (backslash vs forward slash)."
35
+ - "Path safety: Never create directories by command (no Bash mkdir, on any system). Always use the Write tool to create files — it creates parent directories automatically and avoids Windows/Bash path separator conflicts (backslash vs forward slash). At run time, the folders of a run are created by the runner (`_opencrew/core/scripts/caminho.mjs`), never by a command of yours."
36
36
 
37
37
  discussion: true
38
38
 
@@ -305,7 +305,7 @@ target_formats: # content crews only; empty list for others
305
305
 
306
306
  The `crew_code` must be a short, URL-safe slug derived from the crew's purpose (e.g., `content-calendar`, `competitor-tracker`, `lead-notify`).
307
307
 
308
- **CRITICAL — Name uniqueness:** The `crew_code` MUST NEVER match any existing folder name in `crews/`. Before finalizing, run `ls crews/ 2>/dev/null` (Bash) to list existing crew directories. If the slug you derive matches an existing folder, append a numeric suffix (`-2`, `-3`, etc.) until it is unique. Never reuse an existing crew folder name — doing so would overwrite another crew's files.
308
+ **CRITICAL — Name uniqueness:** The `crew_code` MUST NEVER match any existing folder name in `crews/`. Before finalizing, list the existing folders of `crews/` with the IDE's folder-listing tool (no shell command); if `crews/` does not exist yet, there are none. If the slug you derive matches an existing folder, append a numeric suffix (`-2`, `-3`, etc.) until it is unique. Never reuse an existing crew folder name — doing so would overwrite another crew's files.
309
309
 
310
310
  ---
311
311
 
@@ -0,0 +1,131 @@
1
+ # Entrega — The Delivery Folder of a Run
2
+
3
+ One script turns the approved files of a run into `crews/{name}/output/{run_id}/entrega/`: one
4
+ folder per channel, text ready to paste and a `LEIA-ME.md` that tells the user what to do with each
5
+ file. Your part is to build the list of files, run the script and act on its last line.
6
+
7
+ You do NOT copy, split, rename or rewrite a file yourself, and you never write inside `entrega/`:
8
+ the script rebuilds that folder from scratch on every call. **When** the delivery runs is in the
9
+ section "Entrega" of `_opencrew/core/runner.pipeline.md`; a request to deliver a run that is
10
+ already over starts at "A run that already ended", below.
11
+
12
+ ## Step 1: Build the list
13
+
14
+ `{lista}` is one item per file, separated by commas, each written `{caminho}={formato}`.
15
+
16
+ - **What goes in:** for each **creation or rendering step** of the approved run, every path the
17
+ `saida` action of `caminho.mjs` returned the **last time** the step ran (a step sent back by the
18
+ reviewer ran more than once: only its last version counts) — all the output files of the step,
19
+ images and HTML included. Use the paths you stored during the run. Never look for a `vN` folder
20
+ by yourself and never assume `v1`.
21
+ - **`{formato}`** is the `format:` of the step that wrote the file. A rendering step with no
22
+ `format:` uses the `format:` of the content step it renders (the slides of an `instagram-feed`
23
+ carousel go as `=instagram-feed`). With no format either way, with an export format (`pdf`,
24
+ `csv`, `formatted-post`) or with one outside `[a-z0-9-]+`, the item goes without `={formato}`:
25
+ the script puts that file in `outros/`.
26
+ This list is **not** the list of the checker (`verificar.mjs`), where a step with no `format:`
27
+ goes without one: here the rendering step (images, HTML) takes the format of the content step it
28
+ renders — the step that wrote its `inputFile`. Without it the images land in `outros/`.
29
+ - **Stay out:** research, briefing, the reviewer's verdict, checkpoint answers and every skipped
30
+ step (a deselected agent, or a step the user skipped).
31
+ - **Safe names** — the safe-name rule (nome seguro) of the runner applies. A file that rule left
32
+ out of commands stays out of the list too; tell the user:
33
+ `{arquivo} — ficou fora da entrega: nome com caractere que não vai em comando`.
34
+
35
+ ## Step 2: Channels the crew publishes by itself
36
+
37
+ Add `--vai-publicar {canal}` once for each channel of the list that has an irreversible step in the
38
+ pipeline (`side_effects: irreversible`, in the step or in the agent's skill), whether that step
39
+ already ran or not. The `LEIA-ME.md` then opens that channel with: "Esta crew publica este canal
40
+ sozinha. Antes de postar à mão, confira se já saiu."
41
+
42
+ - The channel of a step is the `platform:` of its `format:` — read it in
43
+ `_opencrew/best-practices.local/{format}.md` when that file declares `platform:`, otherwise in
44
+ `_opencrew/core/best-practices/{format}.md`. For a step with no `format:`, the one of the skill
45
+ (`instagram-publisher` → `instagram`). With neither, do not pass the option.
46
+ - `{canal}` is the folder name: `instagram`, `linkedin`, `blog`, `email`, `whatsapp`, `twitter` or
47
+ `youtube`. Only a channel that has an item in the list (an item whose format has that
48
+ `platform:`) — for any other the script stops with `Canal não encontrado nesta entrega: {canal}.`
49
+
50
+ ## Step 3: Run the script
51
+
52
+ From the project root, one line, everything between double quotes:
53
+
54
+ `node _opencrew/core/scripts/entregar.mjs --crew "crews/{name}" --run "{run_id}" --arquivo "{lista}"`
55
+
56
+ With channels from Step 2, the same command ends with one option per channel:
57
+
58
+ `node _opencrew/core/scripts/entregar.mjs --crew "crews/{name}" --run "{run_id}" --arquivo "{lista}" --vai-publicar {canal}`
59
+
60
+ ## Step 4: Show the result and read the last line
61
+
62
+ The output of the script is the final summary of the run (the folder, each channel as "Pronto" or
63
+ "Não está pronto", what is missing, the path of the `LEIA-ME.md`): show it to the user as it came,
64
+ without the `ENTREGA:` line. Do not rewrite it and do not add files it does not list. Besides the
65
+ `entrega/` folder, the script also writes `crews/{name}/output/{run_id}/verificacao-entrega.md`,
66
+ the report of the check made at delivery time (it is not part of the delivery).
67
+
68
+ - `ENTREGA:OK` → go on with the run.
69
+ - `ENTREGA:INCOMPLETA` → a channel is not ready, or a file could not be written. The files were
70
+ generated anyway and the `LEIA-ME.md` marks the channel. Show what is missing and ask:
71
+ ```
72
+ ⚠️ A entrega ficou incompleta: {o que falta}
73
+ 1. Corrigir agora (eu ajusto e monto a entrega de novo)
74
+ 2. Seguir assim (no LEIA-ME, o canal fica marcado como "Não está pronto")
75
+ ```
76
+ Wait for the answer.
77
+ - **1** — for each item that is missing, fix it in the source file the summary names: ask the
78
+ user for the real information of every `[PREENCHER: …]`, shorten what is over a limit, write
79
+ again a file that is not there (when the summary says a file could not be written, there is
80
+ nothing to fix in the text). Then run the delivery again, with the same list.
81
+ - **2** — go on, with the delivery as it is. Every irreversible step still asks for its own
82
+ confirmation, as it does today.
83
+
84
+ After "Edit this content" (the final menu of the runner) changes an approved file, or any step
85
+ runs again after the delivery, run the delivery again with the new paths: the folder is rebuilt
86
+ from scratch, so whatever was edited inside `entrega/` is lost — the `LEIA-ME.md` says so.
87
+
88
+ ## When the script does not run
89
+
90
+ The script did not run when there is no Node, an error, or no `ENTREGA:` line at the end (it prints
91
+ one line in PT-BR and stops, with nothing written). Then never build the folder by hand. If the line points to something in the
92
+ command you wrote (an option, a channel, the run), fix the command and run it once more. Otherwise
93
+ tell the user, list the approved files (the paths of your list) and go on with the run:
94
+
95
+ ```
96
+ ⚠️ A entrega automática não rodou: {motivo}
97
+ Os arquivos aprovados estão em:
98
+ - {caminho}
99
+ ```
100
+
101
+ `{motivo}` is the line the script printed, or what kept it from running. The completion summary
102
+ of the runner then shows this list in place of the `entrega/` folder.
103
+
104
+ ## A run that already ended
105
+
106
+ When the user asks to deliver a run that is over (it was run before this folder existed, or the
107
+ delivery did not run):
108
+
109
+ 1. Find the crew and the run. If the user did not say which, list the folders of
110
+ `crews/{name}/output/` with the IDE's folder-listing tool (no shell command) and ask.
111
+ 2. Read the steps of `crews/{name}/pipeline/`. For the `outputFile` of each creation or rendering
112
+ step (same rules of Step 1 for what stays out and for `{formato}`), run:
113
+ `node _opencrew/core/scripts/caminho.mjs "{name}" entrada --run "{run_id}" --arquivo "{outputFile}"`
114
+ `CAMINHO:OK {path}` → that path is the item. `CAMINHO:FALTA` → the file is not in that run:
115
+ leave it out.
116
+ 3. Nobody recorded what was approved in that run, so show the list and wait for the "sim":
117
+ ```
118
+ Entrega da execução {run_id} da crew {name}. Arquivos:
119
+ - {caminho} ({formato})
120
+ Posso montar a entrega com esta lista? (sim / não)
121
+ ```
122
+ 4. On "sim", follow Steps 2 to 4. No step of the pipeline runs again, and nothing is published.
123
+
124
+ ## Rules
125
+
126
+ - **DO** show the output of the script as it came; the folder and file names and the `LEIA-ME.md`
127
+ are fixed PT-BR, whatever the user's language.
128
+ - **DO** run the delivery again whenever an approved file changes.
129
+ - **DO NOT** create, edit or delete anything inside `entrega/` yourself.
130
+ - **DO NOT** put in the list a file the user did not approve, nor a path you guessed.
131
+ - **DO NOT** treat `ENTREGA:INCOMPLETA` as an error of the script: it is its answer.