@aksp/opencrew 1.1.0 → 1.2.1

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,40 @@
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.2.1] — 2026-08-02
7
+
8
+ ### Changed
9
+ - **Menu discovery for repair**: the "My crews" menu entry now mentions `repair`, so the
10
+ command introduced in 1.2.0 is discoverable from the menu and not only from the command
11
+ routing table.
12
+ - **README**: standardized the project name as "OpenCrew" in prose (commands and the npm
13
+ package name stay lowercase).
14
+
15
+ ## [1.2.0] — 2026-08-02
16
+
17
+ ### Fixed
18
+ - **Crews created without agent names**: some crews rendered their agents' functions
19
+ (e.g. "Pesquisador") but not their persona names (e.g. "Pedro Pesquisa"). Root cause:
20
+ `build.prompt.md` never specified the `crew-party.csv` schema, so the manifest could be
21
+ generated without a `displayName` column — the exact column the Pipeline Runner reads to
22
+ render agent names — even though the correct two-word names were present in each
23
+ `.agent.md`. Build now documents the full CSV schema (header + example) and enforces it
24
+ with a new blocking **Gate 0b: Crew-Party Manifest** that checks `displayName` exists and
25
+ matches each agent's `.agent.md` `name:`.
26
+
27
+ ### Added
28
+ - **`/opencrew repair <crew>`**: repairs an already-created crew whose manifest is missing
29
+ agent names. It rebuilds `crew-party.csv` from the persona names already stored in each
30
+ `.agent.md` (no re-generation of agents, research, or pipeline). New prompt at
31
+ `_opencrew/core/prompts/repair.prompt.md`, routed via `AGENTS.md`.
32
+
33
+ ### Migration
34
+ - To fix an existing crew that shows functions but no names:
35
+ 1. `npx @aksp/opencrew update` — refreshes the framework and installs the repair command.
36
+ 2. `/opencrew repair <crew>` — rewrites the crew's manifest with the correct names.
37
+ `update` intentionally never touches `crews/`, so the repair step is required in addition
38
+ to updating.
39
+
6
40
  ## [1.1.0] — 2026-08-01
7
41
 
8
42
  ### Fixed
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # opencrew
1
+ # OpenCrew
2
2
 
3
3
  [![CI](https://github.com/alberthpalhares/opencrew/actions/workflows/ci.yml/badge.svg)](https://github.com/alberthpalhares/opencrew/actions/workflows/ci.yml)
4
4
  [![npm](https://img.shields.io/npm/v/%40aksp%2Fopencrew)](https://www.npmjs.com/package/@aksp/opencrew)
@@ -10,7 +10,7 @@
10
10
  > you don't read Portuguese, use your browser's translator (e.g. Google Translate) or ask
11
11
  > an AI assistant to translate this page.
12
12
 
13
- opencrew é um framework de orquestração multi-agente. Descreva o que você precisa em
13
+ OpenCrew é um framework de orquestração multi-agente. Descreva o que você precisa em
14
14
  linguagem natural e ele monta um time de agentes especializados que rodam como um pipeline
15
15
  automatizado, com pontos de aprovação humana. Funciona no Claude Code, Cursor, Codex,
16
16
  Gemini CLI, OpenCode, Antigravity e mais.
@@ -19,7 +19,7 @@ Gemini CLI, OpenCode, Antigravity e mais.
19
19
  > O [OpenSquad](https://github.com/renatoasse/opensquad) foi criado por
20
20
  > [Renato Asse](https://github.com/renatoasse) ([Comunidade Sem Codar](https://semcodar.com.br)).
21
21
  > Eu ([aksp](https://www.npmjs.com/~aksp)) uso o OpenSquad no dia a dia e quis melhorar
22
- > algumas coisas para o meu próprio fluxo de trabalho — o `opencrew` é essa versão
22
+ > algumas coisas para o meu próprio fluxo de trabalho — o `OpenCrew` é essa versão
23
23
  > reformulada, compartilhada caso ajude outras pessoas também. Todo o crédito pela ideia e
24
24
  > pelo framework original é do Renato Asse. Veja [Origem e créditos](#origem-e-créditos)
25
25
  > abaixo. Licenciado sob MIT, assim como o original.
@@ -45,7 +45,7 @@ extra ou chave de API é necessária para começar.
45
45
 
46
46
  Algumas **skills opcionais** dependem de serviços externos — por exemplo, publicar no
47
47
  Instagram, gerar imagens com IA, fazer web scraping (Apify) ou enviar e-mails (Resend). Você
48
- não precisa se preocupar com isso antes de começar: se, ao montar uma crew, o opencrew
48
+ não precisa se preocupar com isso antes de começar: se, ao montar uma crew, o OpenCrew
49
49
  identificar que ela precisa de uma dessas skills, ele pede a chave direto na conversa
50
50
  (explicando o que é e onde consegui-la) e salva tudo por conta própria. Não é preciso abrir
51
51
  nem editar nenhum arquivo manualmente.
@@ -94,7 +94,7 @@ Cada integração é só um ponteiro enxuto para a fonte única de verdade, o **
94
94
 
95
95
  ## Dashboard (opcional)
96
96
 
97
- O opencrew inclui um dashboard visual auto-contido — `dashboard/index.html`, um arquivo
97
+ O OpenCrew inclui um dashboard visual auto-contido — `dashboard/index.html`, um arquivo
98
98
  HTML único sem dependências que mostra a execução de uma crew como um escritório virtual
99
99
  animado (com agentes trabalhando em suas mesas, handoffs entre etapas, e indicador de
100
100
  progresso).
@@ -122,7 +122,7 @@ vivem as instruções do sistema; os arquivos por IDE são gerados a partir de `
122
122
 
123
123
  ## Origem e créditos
124
124
 
125
- `opencrew` é uma **distribuição reformulada do [OpenSquad](https://github.com/renatoasse/opensquad)**,
125
+ `OpenCrew` é uma **distribuição reformulada do [OpenSquad](https://github.com/renatoasse/opensquad)**,
126
126
  o framework de orquestração multi-agente criado e mantido por
127
127
  **[Renato Asse](https://github.com/renatoasse)**, fundador da
128
128
  [Comunidade Sem Codar](https://semcodar.com.br). O projeto original, seu conceito, o modelo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aksp/opencrew",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "start": "node bin/opencrew.js",
22
22
  "test": "node --test tests/cli.test.js tests/docs.test.js tests/fsx.test.js tests/ides.test.js tests/init.test.js tests/update.test.js",
23
- "version": "node -e \"require('fs').writeFileSync('templates/_opencrew/.opencrew-version', require('./package.json').version + '\\n')\""
23
+ "version": "node -e \"require('fs').writeFileSync('templates/_opencrew/.opencrew-version', require('./package.json').version + '\\n')\" && git add templates/_opencrew/.opencrew-version"
24
24
  },
25
25
  "keywords": [
26
26
  "ai-agents",
@@ -36,7 +36,7 @@ When the user types `/opencrew` or asks for the menu, present an interactive sel
36
36
  **Primary menu (first question):**
37
37
  - **Create a new crew** — Describe what you need and I'll build a crew for you
38
38
  - **Run an existing crew** — Execute a crew's pipeline
39
- - **My crews** — View, edit, or delete your crews
39
+ - **My crews** — View, edit, repair, or delete your crews
40
40
  - **More options** — Skills, company profile, settings, and help
41
41
 
42
42
  If the user selects "More options", present a second selector the same way:
@@ -56,6 +56,7 @@ Parse user input and route to the appropriate action:
56
56
  | `/opencrew list` | List all crews in `crews/` directory |
57
57
  | `/opencrew run <name>` | Load Pipeline Runner → Execute crew |
58
58
  | `/opencrew edit <name> <changes>` | Load Architect → Edit Crew flow |
59
+ | `/opencrew repair <name>` | Load `_opencrew/core/prompts/repair.prompt.md` → fix agent names / rebuild crew-party.csv manifest |
59
60
  | `/opencrew skills` | Load Skills Engine → Show skills menu |
60
61
  | `/opencrew install <name>` | Install a skill from the catalog |
61
62
  | `/opencrew uninstall <name>` | Remove an installed skill |
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.2.1
@@ -92,7 +92,28 @@ Generate these files. Use the Write tool for all file creation — never use Bas
92
92
  ```
93
93
 
94
94
  2. **`crews/{code}/crew-party.csv`** — Agent manifest
95
- - Path column uses `.agent.md` extension (e.g., `./agents/researcher.agent.md`)
95
+ - The header row MUST be EXACTLY these columns, in this order:
96
+ ```
97
+ id,displayName,title,icon,path,execution
98
+ ```
99
+ - One row per agent. Example:
100
+ ```
101
+ id,displayName,title,icon,path,execution
102
+ researcher,"Pedro Pesquisa","Pesquisador de Tendências",🔎,./agents/researcher.agent.md,subagent
103
+ copywriter,"Guilherme Gancho","Redator Copywriter",✍️,./agents/copywriter.agent.md,inline
104
+ ```
105
+ - **`displayName` is REQUIRED and MUST be byte-for-byte identical to the agent's
106
+ `name:` frontmatter field in its `.agent.md`** (the mandatory two-word "FirstName
107
+ LastName" persona name). The Pipeline Runner reads `displayName` — NOT `title` — to
108
+ render the agent's name in `state.json`, in "🤖 {name} is working…" announcements, and
109
+ in the dashboard. If `displayName` is missing, empty, or set to the role/title instead
110
+ of the persona name, the crew renders with functions but no names.
111
+ - `id` = the `path` basename with `./agents/` and `.agent.md` stripped
112
+ (e.g. `./agents/researcher.agent.md` → `researcher`).
113
+ - `title` = the agent's `title:` frontmatter (the role/function label). This is a
114
+ SEPARATE column from `displayName` — never merge or swap them.
115
+ - `path` column uses `.agent.md` extension (e.g., `./agents/researcher.agent.md`).
116
+ - Quote any field containing a space or comma with double quotes (as shown above).
96
117
 
97
118
  3. **Agent files** — one per agent: `crews/{code}/agents/{agent-id}.agent.md`
98
119
  - For ALL agents that include `tasks:` in their frontmatter, ALSO generate the task files:
@@ -426,6 +447,23 @@ For EACH agent in `design.yaml`, verify:
426
447
 
427
448
  If ANY agent has a single-word name (missing last name), this is a critical bug. Fix it by generating an alliterative last name that references the agent's role, then update the name in `design.yaml` and all generated files.
428
449
 
450
+ ### Gate 0b: Crew-Party Manifest (BLOCKING)
451
+
452
+ Read `crews/{code}/crew-party.csv` and verify:
453
+ - [ ] The header row contains a `displayName` column (not just `title`/`role`/`name`)
454
+ - [ ] For EACH agent row: `displayName` is non-empty and has EXACTLY two words
455
+ - [ ] For EACH agent row: `displayName` matches, byte-for-byte, the `name:` frontmatter
456
+ of the `.agent.md` file referenced by that row's `path` column
457
+
458
+ This gate exists because the Pipeline Runner renders agent identity from the CSV's
459
+ `displayName` column. An agent can have a correct two-word `name:` in its `.agent.md`
460
+ (passing Gate 0) yet still render as "function without a name" if the CSV omits
461
+ `displayName` or fills it with the role/title. That is the exact failure this gate catches.
462
+
463
+ If ANY check fails: rewrite `crew-party.csv` using the canonical header
464
+ (`id,displayName,title,icon,path,execution`), pulling `displayName` from each agent's
465
+ `.agent.md` `name:` field and `title` from its `title:` field. Re-validate. Max 2 fix attempts.
466
+
429
467
  ### Gate 1: Agent Completeness (BLOCKING)
430
468
 
431
469
  For EACH `.agent.md` file, verify:
@@ -504,6 +542,7 @@ If any check fails: warn in the summary but don't block.
504
542
  Additional programmatic checks — read the filesystem to verify:
505
543
  - [ ] `crew.yaml` exists and is valid YAML
506
544
  - [ ] All `.agent.md` files listed in `crew-party.csv` exist
545
+ - [ ] `crew-party.csv` has a `displayName` column, populated for every row and matching each agent's `.agent.md` `name:` field
507
546
  - [ ] All task files referenced in agent frontmatter exist
508
547
  - [ ] All step files referenced in `pipeline.yaml` exist
509
548
  - [ ] Skills listed in `crew.yaml` are installed in `skills/`
@@ -0,0 +1,119 @@
1
+ # Repair — Fix Crew Agent Names / Manifest
2
+
3
+ You are the opencrew Repair agent. Your job is to fix an **already-created** crew whose
4
+ agents show their function/role but not their persona names (e.g. the dashboard and the
5
+ Pipeline Runner announce "Pesquisador" instead of "Pedro Pesquisa").
6
+
7
+ This is a known defect in crews built by older versions: the `crew-party.csv` manifest was
8
+ generated without a `displayName` column (or with the role/title in it instead of the
9
+ persona name), while the correct two-word names already live in each agent's `.agent.md`
10
+ `name:` frontmatter. This repair is **deterministic** — you pull names from the `.agent.md`
11
+ files and rewrite the manifest. You do NOT re-generate agent personas, re-run research, or
12
+ re-run the Build phase.
13
+
14
+ ## Scope
15
+
16
+ You may ONLY touch files under `crews/{code}/`:
17
+ - `crews/{code}/crew-party.csv`
18
+ - `crews/{code}/agents/*.agent.md` (only in the fallback case — see Step 4)
19
+ - `crews/{code}/state.json` (only if it exists)
20
+
21
+ Never modify `_opencrew/`, `templates/`, or any other crew. Use the Write tool for all file
22
+ writes (never Bash `mkdir`).
23
+
24
+ ---
25
+
26
+ ## Step 1: Identify the crew
27
+
28
+ - If the user passed a crew code (`/opencrew repair <name>`), use it.
29
+ - Otherwise, list the directories under `crews/` and ask which crew to repair.
30
+ - If exactly 1 crew exists, offer it plus a "Cancel" option.
31
+ - If 0 crews exist, tell the user there is nothing to repair and stop.
32
+
33
+ Verify `crews/{code}/crew.yaml` and `crews/{code}/agents/` exist. If not, report and stop.
34
+
35
+ ## Step 2: Read the source of truth (the agent files)
36
+
37
+ For EACH `crews/{code}/agents/*.agent.md`, read the YAML frontmatter and extract:
38
+ - `id` (or derive it from the filename: `researcher.agent.md` → `researcher`)
39
+ - `name` — the persona name (expected: two words, "FirstName LastName")
40
+ - `title` — the role/function label
41
+ - `icon` — the emoji
42
+ - `execution` — `inline` or `subagent`
43
+
44
+ Also read the current `crews/{code}/crew-party.csv` (if present) to preserve any
45
+ `execution`/`title` values that are correct there but missing from a `.agent.md`.
46
+
47
+ ## Step 3: Rebuild `crew-party.csv`
48
+
49
+ Write `crews/{code}/crew-party.csv` with the canonical header and one row per agent:
50
+
51
+ ```
52
+ id,displayName,title,icon,path,execution
53
+ ```
54
+
55
+ - `displayName` = the agent's `name:` from its `.agent.md` (the two-word persona name).
56
+ - `title` = the agent's `title:`.
57
+ - `icon` = the agent's `icon:`.
58
+ - `path` = `./agents/{id}.agent.md`.
59
+ - `execution` = the agent's `execution:` (default `inline` if absent).
60
+ - Quote any field containing a space or comma with double quotes.
61
+ - Preserve the original agent order (match the previous CSV order if it existed).
62
+
63
+ ## Step 4: Fallback — agent whose `.agent.md` name is itself broken
64
+
65
+ If an agent's `.agent.md` `name:` is empty or has only ONE word, the persona name never
66
+ existed and must be generated now, following the **Agent Naming Convention** from
67
+ `_opencrew/core/prompts/design.prompt.md`:
68
+
69
+ 1. Read the user's Output Language from `_opencrew/_memory/preferences.md`.
70
+ 2. Generate a two-word name: "FirstName LastName" — both words start with the SAME letter
71
+ (alliteration); the first name is common in the user's language; the last name is a
72
+ playful reference to the agent's function (from its `title:`). Each agent in the crew
73
+ must use a DIFFERENT initial letter.
74
+ 3. Update BOTH the `.agent.md` `name:` frontmatter AND the `# {Name}` heading in that file.
75
+ 4. Use the new name as the `displayName` in the rebuilt CSV.
76
+
77
+ Only do this for agents that are actually broken. Agents that already have a valid two-word
78
+ `name:` are left untouched (only the CSV is rewritten to carry it).
79
+
80
+ ## Step 5: Refresh `state.json` (only if it exists)
81
+
82
+ If `crews/{code}/state.json` exists, update each agent entry's `name` field to the repaired
83
+ `displayName`. Do not change any other field. If the file does not exist, skip — the
84
+ Pipeline Runner recreates it from the CSV on the next run.
85
+
86
+ ## Step 6: Report
87
+
88
+ Present a summary table of what changed:
89
+
90
+ ```
91
+ Crew "{name}" repaired.
92
+
93
+ | Agent id | Before | After | Source |
94
+ |-------------|---------------|------------------|---------------|
95
+ | researcher | (role only) | 🔎 Pedro Pesquisa | .agent.md |
96
+ | copywriter | Guilherme | ✍️ Guilherme Gancho | generated |
97
+
98
+ crew-party.csv: rewritten with displayName column
99
+ state.json: {updated | not present}
100
+
101
+ Run it: /opencrew run {code}
102
+ ```
103
+
104
+ If nothing was broken (CSV already had a valid `displayName` for every agent), say so
105
+ plainly instead of inventing changes: "This crew's manifest is already correct — no repair
106
+ needed."
107
+
108
+ ---
109
+
110
+ ## Rules
111
+
112
+ - **DO** pull names from `.agent.md` `name:` — that is the source of truth.
113
+ - **DO** rewrite the whole `crew-party.csv` with the canonical header.
114
+ - **DO** limit persona generation to agents whose own `.agent.md` name is missing/one-word.
115
+ - **DO NOT** re-run Discovery, Design, Build, research, or investigations.
116
+ - **DO NOT** modify agent personas, principles, or any section other than the `name:` line
117
+ and `# {Name}` heading (and only in the fallback case).
118
+ - **DO NOT** touch any file outside `crews/{code}/`.
119
+ - **DO NOT** fabricate a summary — report only what you actually changed.