@aksp/opencrew 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,60 @@
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.11.0] — 2026-10-07
7
+
8
+ Fase U4, fatia 1: "Conserto de crews e caminho de criação" (`specs/fase-u4a-conserto-de-crews.md`).
9
+ Chega a quem já usa com um `npx @aksp/opencrew@latest update`; as suas crews só mudam quando você
10
+ pede o conserto e diz sim a cada ponto.
11
+
12
+ Ainda não nesta versão: histórico confiável e pedido avulso à crew (`/opencrew pedir`), que vêm
13
+ na 1.12.0; retomar uma execução interrompida, na 1.13.0. O conserto não reordena passos: crew
14
+ sem revisão, sem aprovação final ou que publica antes da revisão é apontada e resolvida com
15
+ `/opencrew edit`.
16
+
17
+ ### Added
18
+ - **`/opencrew repair <crew>` conserta crews antigas.** Ele lê a crew e mostra, em português, o
19
+ que falta para as melhorias das versões seguintes valerem nela: passo sem o formato do texto
20
+ (o verificador media como post de blog), crew sem os arquivos do projeto que deve ler,
21
+ proibição sem trecho entre aspas (que o verificador não consegue barrar), nomes dos agentes,
22
+ passo que publica sem a marca. Conserta um ponto por vez, com o seu sim; cada arquivo alterado
23
+ ganha uma cópia `.bak`. Quem grava é um script (`_opencrew/core/scripts/conserto.mjs`), não a
24
+ IA; sem `--aplicar` ele só lê.
25
+ - **Proibição que é regra de conteúdo** ("nunca prever votação por aclamação") pode ser marcada
26
+ como `(revisão humana)`: fica para o revisor e deixa de aparecer como pendência do verificador.
27
+ - **Crew de documento na criação.** Pedir uma crew de ata, ofício, contrato ou proposta leva a
28
+ perguntas próprias (quais documentos, quem assina e quem recebe, papel timbrado, quais arquivos
29
+ mandam no texto), sem a oferta de investigar perfis de referência, e os passos já saem com o
30
+ formato `documento-oficial`.
31
+ - **Formato da crew escrito num lugar só** (`_opencrew/core/formato-da-crew.md`): `crew.yaml`,
32
+ `pipeline.yaml`, os campos de cada passo e o `id` do agente, com um exemplo completo. A criação,
33
+ o runner e o conserto seguem esse arquivo; as formas que versões antigas gravaram continuam
34
+ sendo lidas.
35
+ - Depois do `update`, quando o projeto tem ao menos uma crew, o resumo lembra do
36
+ `/opencrew repair`.
37
+
38
+ ### Changed
39
+ - **`max_review_cycles` no `crew.yaml` passa a valer.** O runner só lia o limite de ciclos de
40
+ revisão no passo de revisão; crews que o declaravam no `crew.yaml` recebiam sempre 3.
41
+ - **Tier Express tem passo de revisão**, feito pelo próprio redator: o verificador automático roda
42
+ também nele. Antes o texto dizia "o redator se revisa" e, em outro ponto, "toda crew precisa de
43
+ revisor".
44
+ - **Checkpoint que guarda a resposta em arquivo** deixa de usar sempre o formato de "foco de
45
+ pesquisa": fora do checkpoint do pesquisador, grava o título, a sua resposta e a data.
46
+ - O Architect lista os prompts de cada fase da criação, e o ponto de entrada diz onde ele está;
47
+ antes um apontava para o outro.
48
+ - Pasta de `crews/` sem `crew.yaml` (os modelos instalados) não aparece mais como crew nas
49
+ listas.
50
+
51
+ ### Fixed
52
+ - `init --ide=<lista> --yes` (e `--all`) instalava as pontes das 9 IDEs; agora a lista vence.
53
+ `--yes` sem `--ide` continua instalando todas.
54
+ - Uma frase cortada no meio nas instruções instaladas (`_opencrew/core/system.md`, desde a
55
+ 1.10.0): a rota do documento Word e o pedido de entrega de uma execução encerrada não exigem o
56
+ onboarding.
57
+ - O Build exigia um checkpoint imediatamente antes de cada passo que publica, o que era
58
+ impossível com dois passos de publicação seguidos.
59
+
6
60
  ## [1.10.0] — 2026-10-07
7
61
 
8
62
  Fase U3b "Documento Word, com perfil de documento oficial" (`specs/fase-u3b-documento-word.md`).
package/README.md CHANGED
@@ -184,8 +184,9 @@ meu-projeto/
184
184
  │ │ ├── runner.pipeline.md ← executor de pipeline
185
185
  │ │ ├── skills.engine.md ← gerenciador de skills
186
186
  │ │ ├── architect.agent.yaml ← definição do Arquiteto
187
+ │ │ ├── formato-da-crew.md ← o formato dos arquivos de uma crew (crew.yaml, pipeline.yaml, passos)
187
188
  │ │ ├── best-practices/ ← 23 guias de melhores práticas + _catalog.yaml
188
- │ │ ├── scripts/ ← verificador, conferência de fontes, caminhos, entrega, documento Word e os scripts do Escritório
189
+ │ │ ├── scripts/ ← verificador, conferência de fontes, caminhos, entrega, documento Word, conserto de crews e os scripts do Escritório
189
190
  │ │ ├── modelos/ ← modelo do perfil de documento oficial (papel timbrado)
190
191
  │ │ ├── escritorio/ ← página do Escritório ao vivo (abre com /opencrew dashboard)
191
192
  │ │ └── prompts/ ← 15 prompts de fase (discovery, design, build, entrega, documento, etc.)
@@ -437,6 +438,13 @@ o que você fez:
437
438
  `# opencrew:end`)? Nenhuma linha sua é apagada: o `update` guarda o arquivo como estava e põe
438
439
  um bloco completo no fim. O bloco começa por um comentário que diz que ele é do OpenCrew: as
439
440
  suas linhas ficam fora dele.
441
+ - **E as crews que você já tinha?** O `update` não mexe nelas. Para levar a elas o que veio
442
+ depois — o formato de cada texto (sem ele o verificador mede tudo como post de blog), os
443
+ arquivos do projeto que a crew deve ler, as proibições que o verificador consegue barrar —,
444
+ peça na sua IDE `/opencrew repair <nome>`. Ele mostra o que falta, pergunta antes de cada
445
+ mudança e deixa uma cópia `.bak` do arquivo que alterou. O que não dá para consertar assim
446
+ (crew sem passo de revisão, publicação antes da revisão) ele aponta e manda para
447
+ `/opencrew edit`.
440
448
  - **A instalação anterior parou no meio?** O `update` não altera nada e pede para você rodar
441
449
  `npx @aksp/opencrew init`, que conclui a instalação sem apagar o que já existe.
442
450
  - **Apagou um modelo de crew ou um skill do catálogo?** Ele volta no `update`, e a saída diz o
@@ -489,7 +497,7 @@ npx @aksp/opencrew update --check
489
497
  | `/opencrew run <nome>` | Executa o pipeline de uma crew |
490
498
  | `/opencrew list` | Lista todas as suas crews |
491
499
  | `/opencrew edit <nome>` | Modifica uma crew existente |
492
- | `/opencrew repair <nome>` | Conserta o manifesto de uma crew com nomes quebrados |
500
+ | `/opencrew repair <nome>` | Mostra o que falta numa crew que você já tem (formato de cada texto, arquivos do projeto que ela deve ler, proibições que o verificador consegue barrar, nomes dos agentes) e conserta um ponto por vez, com o seu sim e uma cópia `.bak` |
493
501
  | `/opencrew delete <nome>` | Remove uma crew |
494
502
  | `/opencrew skills` | Navega, instala ou remove skills |
495
503
  | `/opencrew install <skill>` | Instala uma skill do catálogo |
@@ -509,7 +517,7 @@ npx @aksp/opencrew update --check
509
517
  | `npx @aksp/opencrew@latest update` | Atualiza o framework |
510
518
  | `npx @aksp/opencrew update --check` (ou `--dry-run`) | Verifica se há update disponível, sem alterar nada |
511
519
  | `npx @aksp/opencrew upgrade` | Atalho para `update` |
512
- | `npx @aksp/opencrew init --ide=claude-code,cursor` | Instala só as pontes das IDEs indicadas |
520
+ | `npx @aksp/opencrew init --ide=claude-code,cursor` | Instala só as pontes das IDEs indicadas (também com `--yes`) |
513
521
  | `npx @aksp/opencrew init --all` (ou `-y`) | Instala as pontes de todas as IDEs |
514
522
  | `npx @aksp/opencrew@latest init --repair-bridges` | Regrava as pontes das IDEs já instaladas num workspace existente (`--ide=a,b`: só as indicadas; `--all`: as 9) |
515
523
  | `npx @aksp/opencrew version` | Mostra a versão instalada |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aksp/opencrew",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -148,14 +148,13 @@ async function workspaceState(target) {
148
148
  }
149
149
 
150
150
  /**
151
- * Decide which IDEs to configure. --all / --yes → every IDE; --ide → validated list;
152
- * nothing → `fallback()` (the interactive prompt; in repair mode, the detection). Throws
153
- * UsageError if --ide names no valid IDE.
151
+ * Decide which IDEs to configure. --ide → validated list, whatever comes with it; without it,
152
+ * --all / --yes → every IDE; nothing → `fallback()` (the interactive prompt; in repair mode, the
153
+ * detection). Throws UsageError if --ide names no valid IDE.
154
154
  */
155
155
  async function resolveIdes(opts, fallback) {
156
- if (opts.all || opts.yes) return allIdeIds();
157
156
  const ids = normalizeIdes(opts.ide);
158
- if (!ids) return fallback();
157
+ if (!ids) return opts.all || opts.yes ? allIdeIds() : fallback();
159
158
  const invalid = ids.filter((id) => !ideById(id));
160
159
  const valid = ids.filter((id) => ideById(id));
161
160
  if (!valid.length) {
@@ -88,6 +88,7 @@ async function apply(target, version) {
88
88
  const done = { unreadable, ...(await refreshBridges(ctx)) };
89
89
  done.mcp = await updateMcp(ctx, await readFile(tpl('.mcp.json')));
90
90
  done.leftovers = await findLeftovers(target);
91
+ done.hasCrew = await hasCrew(target);
91
92
  say(updateSummary(ctx, done));
92
93
 
93
94
  await writeManifest(target, version, ctx.files);
@@ -97,6 +98,13 @@ async function apply(target, version) {
97
98
  log(c.dim(`${UNTOUCHED}\n`));
98
99
  }
99
100
 
101
+ /** Is there a crew of the user's? A folder of `crews/` with `crew.yaml` (the templates have none). Only looks. */
102
+ async function hasCrew(target) {
103
+ const dirs = await fs.readdir(path.join(target, 'crews'), { withFileTypes: true }).catch(() => []);
104
+ const found = await Promise.all(dirs.filter((d) => d.isDirectory()).map((d) => exists(path.join(target, 'crews', d.name, 'crew.yaml'))));
105
+ return found.includes(true);
106
+ }
107
+
100
108
  /** @returns what `deliverTree` did to each crew template (only the missing ones are written). */
101
109
  async function refreshFramework(ctx) {
102
110
  const dest = (...p) => path.join(ctx.target, ...p);
package/src/lib/resumo.js CHANGED
@@ -18,6 +18,9 @@ export const ALREADY_INSTALLED = 'Para atualizar, rode `npx @aksp/opencrew@lates
18
18
  /** `update` over `_opencrew/core` with no version stamp (spec U3a-2, rule 31). */
19
19
  export const INTERRUPTED = 'A instalação anterior não terminou. Rode `npx @aksp/opencrew init` para concluir.';
20
20
 
21
+ /** After an `update`, when the project has at least one crew (spec U4-1, decision 7). */
22
+ export const REPAIR_HINT = 'Para levar as melhorias novas às crews que você já tem, peça na sua IDE: /opencrew repair';
23
+
21
24
  const NO_BRIDGES = 'Nenhuma ponte de IDE encontrada: nada a atualizar. Para criar a ponte de uma IDE: `npx @aksp/opencrew@latest init --repair-bridges --ide=<id>`.';
22
25
  const LEAK_REMOVED = 'CLAUDE.md: removi a seção de STATUS.md que as versões 1.4.0 e 1.4.1 gravaram por engano.';
23
26
  const FIRST_PROTECTED = 'Primeira atualização com proteção: sem registro anterior, guardamos tudo o que diferia. Daqui em diante, só o que você editar.';
@@ -112,7 +115,7 @@ function copyLines(ctx, unreadable) {
112
115
  * @param {object} done what each step returned: `agents` and `gitignore` (deliverBlock; `agents`
113
116
  * is null when a pre-1.3 AGENTS.md was migrated), `ides` (detected), `bridges` (deliverBridges),
114
117
  * `leak` (the STATUS.md section left CLAUDE.md's block), `mcp` (updateMcp), `leftovers`
115
- * (findLeftovers) and `unreadable` (manifest)
118
+ * (findLeftovers), `unreadable` (manifest) and `hasCrew` (a folder of `crews/` with `crew.yaml`)
116
119
  * @returns {Array<[Function, string]>} lines for `say`
117
120
  */
118
121
  export function updateSummary(ctx, done) {
@@ -124,5 +127,6 @@ export function updateSummary(ctx, done) {
124
127
  ...mcpLines(ctx, done.mcp),
125
128
  ...leftoverLines(done.leftovers, done.mcp),
126
129
  ...copyLines(ctx, done.unreadable),
130
+ ...(done.hasCrew ? [[info, REPAIR_HINT]] : []),
127
131
  ];
128
132
  }
@@ -10,7 +10,8 @@ On activation, perform these steps IN ORDER:
10
10
  1. Read the company context file: `{project-root}/_opencrew/_memory/company.md`
11
11
  2. Read the preferences file: `{project-root}/_opencrew/_memory/preferences.md`
12
12
  3. Check if company.md is empty or contains only the template — if so, trigger ONBOARDING
13
- (except for `/opencrew documento` and the `
13
+ (except for `/opencrew documento` and the request to deliver a run that already ended: neither
14
+ uses the company context)
14
15
  4. Otherwise, display the MAIN MENU
15
16
 
16
17
  ## Onboarding Flow (first time only)
@@ -50,11 +51,11 @@ Route input to the matching action:
50
51
  |---------------|--------|
51
52
  | `/opencrew` or `/opencrew menu` | Show main menu |
52
53
  | `/opencrew help` | Show help text |
53
- | `/opencrew create <description>` | Load Architect → Create Crew flow |
54
- | `/opencrew list` | List all crews in `crews/` |
54
+ | `/opencrew create <description>` | Load the Architect (`_opencrew/core/architect.agent.yaml`) → Create Crew flow: one prompt per phase, listed there |
55
+ | `/opencrew list` | List all crews in `crews/` (a folder without `crew.yaml` is not a crew) |
55
56
  | `/opencrew run <name>` | Load Pipeline Runner → Execute crew |
56
- | `/opencrew edit <name> <changes>` | Load Architect → Edit Crew flow |
57
- | `/opencrew repair <name>` | Load `_opencrew/core/prompts/repair.prompt.md` → fix agent names / rebuild crew-party.csv |
57
+ | `/opencrew edit <name> <changes>` | Load the Architect → Edit Crew flow |
58
+ | `/opencrew repair <name>` | Load `_opencrew/core/prompts/repair.prompt.md` → show what an existing crew is missing and fix one point at a time, each with a `.bak` copy |
58
59
  | `/opencrew skills` | Load Skills Engine → Show skills menu |
59
60
  | `/opencrew install <name>` | Install a skill from the catalog |
60
61
  | `/opencrew uninstall <name>` | Remove an installed skill |
@@ -74,7 +75,8 @@ Route input to the matching action:
74
75
 
75
76
  When a specific agent needs to be activated:
76
77
 
77
- 1. Read the agent's `.agent.md` file completely
78
+ 1. Read the agent's `.agent.md` file completely (the Architect is the exception: it lives in
79
+ `_opencrew/core/architect.agent.yaml`)
78
80
  2. Adopt the agent's persona (role, identity, communication_style, principles)
79
81
  3. Follow the agent's menu/workflow instructions
80
82
  4. When the agent's task is complete, return to the opencrew main context
@@ -1 +1 @@
1
- 1.10.0
1
+ 1.11.0
@@ -57,24 +57,30 @@ agent:
57
57
  create-crew: |
58
58
  ## Create Crew
59
59
 
60
- The create flow is now handled by the phased orchestration system.
61
- See the SKILL.md entry point for the full phased flow:
62
- Discovery → Investigation → Design → Template Selection (optional) → Build
63
-
64
- Each phase is a separate prompt in `_opencrew/core/prompts/`:
65
- - `discovery.prompt.md` — Phase 1: Intelligent wizard
66
- - `sherlock-*.md` — Phase 2: Investigation (optional)
67
- - `design.prompt.md` — Phase 3: Crew architecture (includes optional Phase H.5: Template Selection)
68
- - `build.prompt.md` — Phase 4: File generation + validation
69
-
70
- The SKILL.md orchestrator dispatches each phase as a subagent.
60
+ Creating a crew takes four phases, in this order. Each phase is one prompt: read it
61
+ completely when its turn comes, follow it to the end, and only then load the next one.
62
+
63
+ 1. `_opencrew/core/prompts/discovery.prompt.md` — Discovery: the questions; ends by
64
+ writing `crews/{code}/_build/discovery.yaml`
65
+ 2. `_opencrew/core/prompts/sherlock-shared.md` — Investigation: ONLY when the discovery
66
+ ended with the investigation enabled; it names the platform prompt to load with it
67
+ 3. `_opencrew/core/prompts/design.prompt.md` — Design: agents and pipeline (includes the
68
+ optional template selection); ends by writing `crews/{code}/_build/design.yaml`
69
+ 4. `_opencrew/core/prompts/build.prompt.md` — Build: writes the crew files, in the format
70
+ of `_opencrew/core/formato-da-crew.md`, and validates them
71
+
72
+ If your IDE can run a phase as a subagent, you may; otherwise run the phases one after
73
+ the other in this conversation. Never skip a phase and never write crew files before
74
+ the Build.
71
75
 
72
76
  edit-crew: |
73
77
  ## Edit Crew Workflow
74
78
 
75
- 1. Ask which crew to edit (list available crews if not specified).
79
+ 1. Ask which crew to edit (list available crews if not specified; a folder without
80
+ crew.yaml is not a crew).
76
81
  If only 1 crew exists, add "Cancel" as a second option. If 0 crews, inform user directly.
77
- 2. Read the crew's crew.yaml to understand current structure
82
+ 2. Read the crew's crew.yaml to understand current structure (the format of the crew
83
+ files is in `_opencrew/core/formato-da-crew.md`)
78
84
  3. Ask what changes the user wants
79
85
  4. **If the user asks to edit/define/change the visual template or identity of a design agent:**
80
86
  - Read and follow `skills/template-designer/SKILL.md`
@@ -86,8 +92,10 @@ agent:
86
92
  list-crews: |
87
93
  ## List Crews Workflow
88
94
 
89
- 1. Read all directories in crews/
90
- 2. For each, read crew.yaml to get name, description, icon, agent count
95
+ 1. Read all directories in crews/. A folder without crew.yaml is not a crew (the
96
+ template folders installed with the product): leave it out
97
+ 2. For each crew, read crew.yaml to get name, description and icon (inside `crew:` or,
98
+ in older crews, loose at the top level) and count the agents in crew-party.csv
91
99
  3. Present as a formatted list:
92
100
  ```
93
101
  Your Crews:
@@ -102,7 +110,8 @@ agent:
102
110
  delete-crew: |
103
111
  ## Delete Crew Workflow
104
112
 
105
- 1. Ask which crew to delete (list available if not specified).
113
+ 1. Ask which crew to delete (list available if not specified; a folder without
114
+ crew.yaml is not a crew).
106
115
  If only 1 crew exists, add "Cancel" as a second option. If 0 crews, inform user directly.
107
116
  2. Show crew details (name, agents, output count)
108
117
  3. Confirm deletion with explicit "Are you sure?" presented as a numbered list (1. Yes, delete / 2. No, cancel)
@@ -0,0 +1,162 @@
1
+ # Crew file format (formato da crew)
2
+
3
+ The single definition of the files that make a crew. The Build phase writes them, the Pipeline
4
+ Runner and the scripts read them, `/opencrew repair` checks them. When another prompt and this
5
+ file disagree, this file wins.
6
+
7
+ ```
8
+ crews/{code}/
9
+ ├── crew.yaml the crew: identity, sources, limits
10
+ ├── crew-party.csv one row per agent (the names shown to the user)
11
+ ├── agents/{agent-id}.agent.md
12
+ ├── pipeline/
13
+ │ ├── pipeline.yaml the order of the steps
14
+ │ ├── steps/step-NN-{name}.md
15
+ │ └── data/ reference material (never an output)
16
+ ├── _memory/ memories.md, runs.md
17
+ └── output/{run_id}/ what each run produces
18
+ ```
19
+
20
+ A folder under `crews/` without a `crew.yaml` is not a crew (the template folders installed with
21
+ the product only carry `discovery.template.yaml`).
22
+
23
+ ## crew.yaml
24
+
25
+ ```yaml
26
+ crew:
27
+ code: "atas-do-conselho" # the folder name
28
+ name: "Atas do Conselho" # shown in lists
29
+ description: "Da pauta à ata pronta para assinar"
30
+ icon: "📄"
31
+ tier: "standard" # express | standard | full
32
+
33
+ pipeline:
34
+ entry: "pipeline/pipeline.yaml"
35
+ steps_dir: "pipeline/steps"
36
+
37
+ skills: # every skill the agents use
38
+ - web_search
39
+ - web_fetch
40
+
41
+ data: # reference material the steps load
42
+ - pipeline/data/domain-framework.md
43
+ - pipeline/data/quality-criteria.md
44
+
45
+ fontes: # files of the user's project the crew must read
46
+ - caminho: Regras/estatuto.md # relative to the project root, never absolute
47
+ para_que: regras que mandam no texto
48
+
49
+ agent_dependencies: # only when an agent can be left out (see below)
50
+ rita-redacao: []
51
+ vito-veredito: [rita-redacao]
52
+
53
+ max_review_cycles: 2 # express 1 · standard 2 · full 3
54
+ ```
55
+
56
+ | Field | Written by | Read by |
57
+ |---|---|---|
58
+ | `crew.code`, `name`, `description`, `icon` | Build, from `design.yaml` | crew lists (Architect) |
59
+ | `crew.tier` | Build, from `design.yaml → crew.tier` | Runner (run header) |
60
+ | `pipeline.entry`, `steps_dir` | Build, always these two values | a reference for people; the Runner reads these two paths directly |
61
+ | `skills` | Build | Runner, Skills Engine |
62
+ | `data` | Build; the template designer appends | Runner |
63
+ | `fontes` (`caminho`, `para_que`) | Build, from `discovery.yaml → project_sources`; `/opencrew repair` | Runner (reads the sources at the start of the run), `conferir-fontes.mjs` |
64
+ | `agent_dependencies` | Build | Runner (Pre-Execution Agent Selection) |
65
+ | `max_review_cycles` | Build | Runner (Review Loops) |
66
+ | `entrega.destino` | `entregar.mjs --lembrar-destino` only | `entregar.mjs` |
67
+
68
+ - **`fontes`** is omitted only when the discovery found no project source.
69
+ - **`agent_dependencies`** is written when at least one agent can be left out of a run without
70
+ breaking another (for example, one writer per channel). Each key is an agent `id`; its value
71
+ lists the agents whose output it reads. When every agent is needed in every run, omit the
72
+ field: the Runner then runs all agents and shows no selection step.
73
+ - **`max_review_cycles`** — the Runner uses the value of the review step when the step declares
74
+ one, then this one, then 3.
75
+ - Old crews carry `name`, `code`, `description` and `tier` loose at the top level, without the
76
+ `crew:` block. Readers accept both; new crews use the block.
77
+
78
+ ## pipeline.yaml
79
+
80
+ ```yaml
81
+ steps:
82
+ - step: 1
83
+ file: "step-01-checkpoint-pauta.md" # relative to pipeline/steps
84
+ - step: 2
85
+ file: "step-02-redigir-ata.md"
86
+ - step: 3
87
+ file: "step-03-revisar.md"
88
+ - step: 4
89
+ file: "step-04-checkpoint-final.md"
90
+ ```
91
+
92
+ The steps run in the order of the list. `step` is the number other steps refer to (`on_reject`);
93
+ without it, the number is the position in the list. Old crews write `file: steps/step-…md`;
94
+ readers accept both. Nothing else is read from this file.
95
+
96
+ ## Step files
97
+
98
+ The frontmatter of `pipeline/steps/step-NN-{name}.md` says how the Runner executes the step.
99
+
100
+ **Creation step**
101
+ ```yaml
102
+ ---
103
+ execution: inline # inline | subagent
104
+ agent: rita-redacao # the agent id (see "Agent id")
105
+ format: documento-oficial # the kind of text this step produces (a best-practices id)
106
+ inputFile: crews/atas-do-conselho/output/pauta.md
107
+ outputFile: crews/atas-do-conselho/output/ata.md
108
+ ---
109
+ ```
110
+
111
+ **Review step** — the one with `on_reject`
112
+ ```yaml
113
+ ---
114
+ execution: inline
115
+ agent: vito-veredito
116
+ inputFile: crews/atas-do-conselho/output/ata.md
117
+ outputFile: crews/atas-do-conselho/output/revisao.md
118
+ on_reject: 2 # the number of the step the pipeline goes back to on a rejection
119
+ ---
120
+ ```
121
+
122
+ **Checkpoint**
123
+ ```yaml
124
+ ---
125
+ type: checkpoint
126
+ agent: rita-redacao # optional: skipped together with that agent
127
+ outputFile: crews/atas-do-conselho/output/pauta.md # optional: the user's answer is saved here
128
+ ---
129
+ ```
130
+
131
+ | Field | Rule |
132
+ |---|---|
133
+ | `execution` | `subagent` runs in the background; `inline` runs in the conversation. A step that publishes or sends is always `inline` |
134
+ | `agent` | the agent id |
135
+ | `format` | every step whose text is checked before the review (from the `on_reject` step up to the review) declares one; without it the checker measures the text as a blog post. A text to print, sign or file is `documento-oficial`. Omit only for research, analysis and the review itself |
136
+ | `inputFile`, `outputFile` | always under `crews/{code}/output/`; never `pipeline/data/` |
137
+ | `model_tier` | `fast` or `powerful`, only on `subagent` steps. Express: `fast`. Standard: `fast` for research and data gathering, `powerful` for the rest. Full: `powerful`. Inline steps do not carry it |
138
+ | `side_effects: irreversible` | every step that publishes, posts or sends outside the project; such steps come after the review and the final approval |
139
+ | `on_reject` | marks the review step; its value is a step number |
140
+ | `max_review_cycles` | optional on the review step, when it must differ from the crew's |
141
+ | `skills_needed` | optional list of skills whose full instructions the step needs from the start |
142
+ | `type: checkpoint` | a pause for the user; no `execution` |
143
+
144
+ Every crew has a review step, followed by a final approval checkpoint. In the Express tier the
145
+ review step is done by the writer agent itself; Standard and Full have a dedicated reviewer agent.
146
+
147
+ ## Agent id
148
+
149
+ One definition: the agent `id` is the file name without `.agent.md`
150
+ (`agents/rita-redacao.agent.md` → `rita-redacao`). The same text goes in the `id` column of
151
+ `crew-party.csv`, in `agent:` of the steps and in `agent_dependencies`. Old agent files carry
152
+ `id: "crews/{code}/agents/{id}"` in the frontmatter; readers use the last segment.
153
+
154
+ ## crew-party.csv
155
+
156
+ ```
157
+ id,displayName,title,icon,path,execution
158
+ rita-redacao,"Rita Redação","Redatora de Atas",📝,./agents/rita-redacao.agent.md,inline
159
+ ```
160
+
161
+ `displayName` is the agent's `name:` (the two-word persona name), never the role. Quote any field
162
+ with a space or a comma.
@@ -70,52 +70,24 @@ Generate these files. Use the Write tool for all file creation — never use Bas
70
70
 
71
71
  ### Files to generate:
72
72
 
73
- 1. **`crews/{code}/crew.yaml`** — Crew definition with pipeline
74
- - Include a `skills:` section listing all skills:
75
- ```yaml
76
- skills:
77
- - web_search
78
- - web_fetch
79
- # Add any skills from design.yaml:
80
- # - apify
81
- # - canva
82
- ```
83
- - Include a `data:` section listing all reference materials:
84
- ```yaml
85
- data:
86
- - pipeline/data/research-brief.md
87
- - pipeline/data/domain-framework.md
88
- - pipeline/data/quality-criteria.md
89
- - pipeline/data/output-examples.md
90
- - pipeline/data/anti-patterns.md
91
- - pipeline/data/tone-of-voice.md # for content crews
92
- ```
93
- - Include a `fontes:` section with the project sources from `discovery.yaml →
94
- project_sources` (omit it only if that list is empty). The Pipeline Runner reads them at the
95
- start of every run and checks they still exist:
96
- ```yaml
97
- fontes:
98
- - caminho: Memoria/01_Decisoes.md # relative to the project root
99
- para_que: decisões de público e posicionamento
100
- ```
73
+ **Read `_opencrew/core/formato-da-crew.md` before writing any file.** It is the single definition
74
+ of `crew.yaml`, `pipeline.yaml`, the step frontmatter and the agent id, with a complete example of
75
+ each. Write every file in that format; what follows here only adds what is specific to the Build.
76
+
77
+ 1. **`crews/{code}/crew.yaml`** — the crew: the `crew:` block (`code`, `name`, `description`,
78
+ `icon` and `tier`, all from `design.yaml`), `pipeline:`, `skills:`, `data:`, `fontes:`,
79
+ `agent_dependencies:` (only when the format file says so) and `max_review_cycles:`.
80
+ - `skills:` lists every skill from `design.yaml`; `data:` lists every reference material you
81
+ wrote in `pipeline/data/`.
82
+ - `fontes:` carries the project sources from `discovery.yaml → project_sources` (`path` →
83
+ `caminho`, `purpose` → `para_que`); omit it only if that list is empty. The Pipeline Runner
84
+ reads them at the start of every run and checks they still exist.
101
85
  - **Paths to the user's project files** — in `crew.yaml`, step files and tasks — are always
102
- written as a caminho relativo à raiz do projeto (relative to the project root), between
103
- backticks, e.g. `` `Ativos/Identidade Visual/logo.png` ``. NEVER write absolute paths
86
+ written as a caminho relativo à raiz do projeto (relative to the project root); in the
87
+ prose of step files and tasks, between backticks, e.g. `` `Ativos/Identidade Visual/logo.png` ``. NEVER write absolute paths
104
88
  (`C:/…`, `J:/…`, `/Users/…`): they break as soon as the user moves or syncs the folder.
105
- - Include an `agent_dependencies:` section (OPTIONAL — enables runtime
106
- Pre-Execution Agent Selection):
107
- ```yaml
108
- agent_dependencies: # OPTIONAL — enables Pre-Execution Agent Selection at runtime
109
- copywriter: [researcher] # copywriter consumes researcher's output
110
- designer: [copywriter] # designer consumes copywriter's output
111
- reviewer: [copywriter] # reviewer consumes copywriter's output
112
- ```
113
- - `agent_dependencies` is OPTIONAL. ALWAYS emit it for crews that should show the
114
- runtime agent-selection step — even as an empty map `agent_dependencies: {}` (the
115
- selection step triggers on field presence, so an empty map enables selection with
116
- no dependency warnings). Derive entries from the pipeline step order: for each
117
- agent step, list the agent(s) whose output it reads via `inputFile`. Omit the field
118
- entirely to keep the legacy behavior (run all agents, no selection step).
89
+ - `agent_dependencies:` — derive the entries from the step order: for each agent step, list
90
+ the agent(s) whose output it reads via `inputFile`.
119
91
 
120
92
  2. **`crews/{code}/crew-party.csv`** — Agent manifest
121
93
  - The header row MUST be EXACTLY these columns, in this order:
@@ -134,7 +106,7 @@ Generate these files. Use the Write tool for all file creation — never use Bas
134
106
  render the agent's name in "🤖 {name} is working…" announcements, and the Escritório
135
107
  (the optional live view) shows the same column. If `displayName` is missing, empty, or set
136
108
  to the role/title instead of the persona name, the crew renders with functions but no names.
137
- - `id` = the `path` basename with `./agents/` and `.agent.md` stripped
109
+ - `id` = the agent id: the agent file name without `.agent.md`
138
110
  (e.g. `./agents/researcher.agent.md` → `researcher`).
139
111
  - `title` = the agent's `title:` frontmatter (the role/function label). This is a
140
112
  SEPARATE column from `displayName` — never merge or swap them.
@@ -145,7 +117,8 @@ Generate these files. Use the Write tool for all file creation — never use Bas
145
117
  - For ALL agents that include `tasks:` in their frontmatter, ALSO generate the task files:
146
118
  `crews/{code}/agents/{agent-id}/tasks/{task}.md` — one per entry in the `tasks:` list
147
119
 
148
- 4. **`crews/{code}/pipeline/pipeline.yaml`** — Pipeline entry point
120
+ 4. **`crews/{code}/pipeline/pipeline.yaml`** — the order of the steps: one `step` + `file` entry
121
+ per step file, as in the format file
149
122
 
150
123
  5. **Step files** — `crews/{code}/pipeline/steps/step-NN-{name}.md` — one per pipeline step
151
124
 
@@ -185,7 +158,7 @@ Every agent file MUST contain ALL of the following sections. Target 120-200 line
185
158
 
186
159
  ```markdown
187
160
  ---
188
- id: "crews/{code}/agents/{agent}"
161
+ id: "{agent-id}" # the file name without `.agent.md`
189
162
  name: "{Agent Name}"
190
163
  title: "{Agent Title}"
191
164
  icon: "{emoji}"
@@ -392,10 +365,10 @@ Every step file begins with YAML frontmatter followed by the markdown body. The
392
365
  ```yaml
393
366
  ---
394
367
  execution: subagent # subagent = runs in background via Task tool; inline = runs in the main conversation
395
- agent: {agent-id} # the agent's id (matches the id field in their .agent.md frontmatter)
396
- format: {format-id} # OPTIONAL — e.g., "instagram-feed". Pipeline Runner auto-injects from _opencrew/core/best-practices/
397
- # Use for content creation steps where platform-specific rules should guide the agent
398
- # Omit for non-content steps (research, analysis, review without platform context)
368
+ agent: {agent-id} # the agent id: the agent file name without `.agent.md`
369
+ format: {format-id} # e.g., "instagram-feed". Pipeline Runner auto-injects from _opencrew/core/best-practices/
370
+ # REQUIRED on every step whose text the checker measures (from the `on_reject` step up to the review)
371
+ # Omit for non-content steps (research, analysis, the review itself)
399
372
  inputFile: crews/{code}/output/{filename}.{ext} # path to input file from previous step — MUST use output/ prefix
400
373
  outputFile: crews/{code}/output/{filename}.{ext} # path where this step saves its output — MUST use output/ prefix
401
374
  # NEVER use pipeline/data/ for outputFile — that folder is for static
@@ -410,8 +383,9 @@ side_effects: irreversible # REQUIRED for any step that publishes, posts, sends
410
383
  # distributes outside the project (it cannot be undone). The Pipeline
411
384
  # Runner never retries these automatically, and Gate 2c places them last.
412
385
  # Omit for every other step.
413
- max_review_cycles: {N} # ONLY for the review step: write it next to its `on_reject`.
414
- # By crew tier (`crew.tier` in design.yaml): Express 1, Standard 2, Full 3.
386
+ on_reject: {N} # ONLY for the review step: the number of the step the pipeline goes back to
387
+ # (the first writing step). `max_review_cycles` goes in `crew.yaml`, by crew
388
+ # tier (`crew.tier` in design.yaml): Express 1, Standard 2, Full 3.
415
389
  ---
416
390
  ```
417
391
 
@@ -428,7 +402,8 @@ agent: {agent-id} # OPTIONAL — ties this checkpoint to an agent; if that age
428
402
  ---
429
403
  ```
430
404
 
431
- For **research focus checkpoints** (where the user's response is saved to a file), use extended frontmatter with `outputFile`:
405
+ For a **checkpoint whose answer the next step needs** (the research focus, the chosen angle, the
406
+ request to be worked on), use extended frontmatter with `outputFile`:
432
407
  ```yaml
433
408
  ---
434
409
  type: checkpoint
@@ -437,7 +412,7 @@ agent: {agent-id} # OPTIONAL — same semantics as above
437
412
  ---
438
413
  ```
439
414
  The Pipeline Runner writes the user's response to this file before proceeding.
440
- The next step (researcher) reads it as `inputFile: crews/{code}/output/research-focus.md`.
415
+ The next step reads it as `inputFile: crews/{code}/output/research-focus.md`.
441
416
  Using `output/` ensures the path transformation applies and the file lands in the run_id folder.
442
417
 
443
418
  Every pipeline step file MUST contain ALL of the following sections. Target 60-120 lines per step.
@@ -593,7 +568,7 @@ For EACH agent step in the pipeline that produces visuals, renders images, or pu
593
568
  If ANY check fails:
594
569
  1. Insert a new `type: checkpoint` step immediately before the offending agent step
595
570
  2. Renumber all subsequent steps (e.g. step-05 becomes step-06, etc.)
596
- 3. Add the new step to the `checkpoints:` list in pipeline.yaml
571
+ 3. Add the new step to `pipeline.yaml`
597
572
  4. Generate a step file for the new checkpoint that asks the user to review and approve the preceding agent's output before the visual/publish step runs
598
573
  5. Re-validate Gate 2b. Max 2 fix attempts — after that, present to user for manual decision.
599
574
 
@@ -602,7 +577,8 @@ If ANY check fails:
602
577
  For EACH step that publishes, posts, sends email or distributes outside the project:
603
578
  - [ ] Its frontmatter declares `side_effects: irreversible` and `execution: inline`
604
579
  - [ ] It comes AFTER the Review step (the reviewer has already approved the final content)
605
- - [ ] The IMMEDIATELY preceding step is a `type: checkpoint` (Final Approval) that itself comes after the Review
580
+ - [ ] The IMMEDIATELY preceding step is a `type: checkpoint` (Final Approval) that itself comes
581
+ after the Review, or another irreversible step (two in a row share the same Final Approval)
606
582
  - [ ] Only other irreversible steps follow it (nothing is created, rendered or reviewed after publishing)
607
583
 
608
584
  If ANY check fails: