atlas-workflow 0.9.2 → 0.9.4

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 (113) hide show
  1. package/README.md +18 -9
  2. package/VERSION +1 -1
  3. package/build/bump-version.mjs +6 -21
  4. package/build/cli/atlas-init.mjs +92 -5
  5. package/build/tests/etapa3.test.mjs +36 -6
  6. package/hosts/opencode/.opencode/atlas/VERSION +1 -1
  7. package/hosts/opencode/.opencode/atlas/orchestrator/README.md +15 -2
  8. package/hosts/opencode/.opencode/atlas/orchestrator/commands/workflow.md +7 -5
  9. package/hosts/opencode/.opencode/atlas/orchestrator/references/host-adapters.md +13 -12
  10. package/hosts/opencode/.opencode/atlas/orchestrator/references/subagent_dispatch.md +11 -1
  11. package/hosts/opencode/.opencode/atlas/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +32 -10
  12. package/hosts/opencode/.opencode/atlas/packages/mcp-server/README.md +2 -2
  13. package/hosts/opencode/.opencode/atlas/packages/mcp-server/package.json +1 -1
  14. package/hosts/opencode/.opencode/atlas/packages/mcp-server/server.js +149 -21
  15. package/hosts/opencode/.opencode/skills/_shared/references/stack-profiles.md +36 -0
  16. package/hosts/opencode/.opencode/skills/_shared/scripts/document_quality.mjs +37 -1
  17. package/hosts/opencode/.opencode/skills/atlas-audit/SKILL.md +201 -0
  18. package/hosts/opencode/.opencode/skills/atlas-audit/agents/openai.yaml +7 -0
  19. package/hosts/opencode/.opencode/skills/atlas-task-validator/SKILL.md +6 -0
  20. package/hosts/opencode/.opencode/skills/atlas-workflow-orchestrator/SKILL.md +32 -10
  21. package/hosts/pi/atlas/VERSION +1 -1
  22. package/hosts/pi/atlas/orchestrator/README.md +15 -2
  23. package/hosts/pi/atlas/orchestrator/commands/workflow.md +7 -5
  24. package/hosts/pi/atlas/orchestrator/references/host-adapters.md +13 -12
  25. package/hosts/pi/atlas/orchestrator/references/subagent_dispatch.md +11 -1
  26. package/hosts/pi/atlas/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +32 -10
  27. package/hosts/pi/atlas/packages/mcp-server/README.md +2 -2
  28. package/hosts/pi/atlas/packages/mcp-server/package.json +1 -1
  29. package/hosts/pi/atlas/packages/mcp-server/server.js +149 -21
  30. package/hosts/pi/skills/_shared/references/stack-profiles.md +36 -0
  31. package/hosts/pi/skills/_shared/scripts/document_quality.mjs +37 -1
  32. package/hosts/pi/skills/atlas-audit/SKILL.md +201 -0
  33. package/hosts/pi/skills/atlas-audit/agents/openai.yaml +7 -0
  34. package/hosts/pi/skills/atlas-task-validator/SKILL.md +6 -0
  35. package/hosts/pi/skills/atlas-workflow-orchestrator/SKILL.md +32 -10
  36. package/hosts/zcode/.zcode-plugin/plugin.json +27 -0
  37. package/hosts/zcode/agents/atlas-direct-execute.md +31 -0
  38. package/hosts/zcode/agents/atlas-findings-repair.md +39 -0
  39. package/hosts/zcode/agents/atlas-plan-execute.md +33 -0
  40. package/hosts/zcode/agents/atlas-slice-review.md +27 -0
  41. package/hosts/zcode/agents/atlas-task-validator.md +138 -0
  42. package/hosts/zcode/packages/mcp-server/README.md +29 -0
  43. package/hosts/zcode/packages/mcp-server/VERSION +1 -0
  44. package/hosts/zcode/packages/mcp-server/package.json +15 -0
  45. package/hosts/zcode/packages/mcp-server/server.js +3963 -0
  46. package/hosts/zcode/packages/orchestrator/README.md +283 -0
  47. package/hosts/zcode/packages/orchestrator/commands/workflow.md +39 -0
  48. package/hosts/zcode/packages/orchestrator/defaults/paths.md +21 -0
  49. package/hosts/zcode/packages/orchestrator/references/host-adapters.md +106 -0
  50. package/hosts/zcode/packages/orchestrator/references/qa_s13_matrix.md +141 -0
  51. package/hosts/zcode/packages/orchestrator/references/subagent_dispatch.md +52 -0
  52. package/hosts/zcode/packages/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +411 -0
  53. package/hosts/zcode/packages/templates/BACKLOG_MESTRE_TEMPLATE.md +855 -0
  54. package/hosts/zcode/packages/templates/BOUNDARY_PRD_PLAN.md +93 -0
  55. package/hosts/zcode/packages/templates/PERGUNTAS_EM_ABERTO_TEMPLATE.md +139 -0
  56. package/hosts/zcode/packages/templates/PLAN_TEMPLATE.md +146 -0
  57. package/hosts/zcode/packages/templates/PRD_TEMPLATE.md +150 -0
  58. package/hosts/zcode/packages/templates/STATE_FILE_SCHEMA.md +56 -0
  59. package/hosts/zcode/skills/_shared/references/stack-profiles.md +72 -0
  60. package/hosts/zcode/skills/_shared/scripts/document_quality.mjs +288 -0
  61. package/hosts/zcode/skills/atlas-audit/SKILL.md +201 -0
  62. package/hosts/zcode/skills/atlas-audit/agents/openai.yaml +7 -0
  63. package/hosts/zcode/skills/atlas-backlog-generator/SKILL.md +93 -0
  64. package/hosts/zcode/skills/atlas-backlog-generator/agents/openai.yaml +4 -0
  65. package/hosts/zcode/skills/atlas-direct-execute/SKILL.md +221 -0
  66. package/hosts/zcode/skills/atlas-direct-execute/agents/openai.yaml +7 -0
  67. package/hosts/zcode/skills/atlas-findings-repair/SKILL.md +158 -0
  68. package/hosts/zcode/skills/atlas-findings-repair/agents/openai.yaml +7 -0
  69. package/hosts/zcode/skills/atlas-plan-execute/SKILL.md +175 -0
  70. package/hosts/zcode/skills/atlas-plan-execute/agents/openai.yaml +7 -0
  71. package/hosts/zcode/skills/atlas-plan-execute/references/plan-contract.md +88 -0
  72. package/hosts/zcode/skills/atlas-plan-execute/references/quality-gates.md +60 -0
  73. package/hosts/zcode/skills/atlas-plan-execute/scripts/check_budget_state.py +96 -0
  74. package/hosts/zcode/skills/atlas-plan-execute/scripts/extract_plan_contract.py +191 -0
  75. package/hosts/zcode/skills/atlas-plan-execute/scripts/validate_gate_result.py +56 -0
  76. package/hosts/zcode/skills/atlas-plan-handoff/SKILL.md +183 -0
  77. package/hosts/zcode/skills/atlas-plan-handoff/agents/openai.yaml +7 -0
  78. package/hosts/zcode/skills/atlas-prd-interview/SKILL.md +82 -0
  79. package/hosts/zcode/skills/atlas-prd-interview/agents/openai.yaml +7 -0
  80. package/hosts/zcode/skills/atlas-slice-review/SKILL.md +156 -0
  81. package/hosts/zcode/skills/atlas-slice-review/agents/openai.yaml +4 -0
  82. package/hosts/zcode/skills/atlas-slice-review/references/review-contract.md +58 -0
  83. package/hosts/zcode/skills/atlas-slice-review/references/scenario-lenses.md +57 -0
  84. package/hosts/zcode/skills/atlas-slice-review/scripts/classify_findings.mjs +60 -0
  85. package/hosts/zcode/skills/atlas-slice-review/scripts/classify_findings.py +24 -0
  86. package/hosts/zcode/skills/atlas-slice-review/scripts/extract_review_slice.py +158 -0
  87. package/hosts/zcode/skills/atlas-sprint-prd-generator/SKILL.md +77 -0
  88. package/hosts/zcode/skills/atlas-sprint-prd-generator/agents/openai.yaml +7 -0
  89. package/hosts/zcode/skills/atlas-task-validator/SKILL.md +179 -0
  90. package/hosts/zcode/skills/atlas-task-validator/agents/openai.yaml +7 -0
  91. package/hosts/zcode/skills/atlas-workflow-orchestrator/SKILL.md +411 -0
  92. package/package.json +1 -1
  93. package/plugins/atlas-workflow-orchestrator/.codex-plugin/plugin.json +5 -4
  94. package/plugins/atlas-workflow-orchestrator/VERSION +1 -1
  95. package/plugins/atlas-workflow-orchestrator/orchestrator/README.md +15 -2
  96. package/plugins/atlas-workflow-orchestrator/orchestrator/commands/workflow.md +7 -5
  97. package/plugins/atlas-workflow-orchestrator/orchestrator/references/host-adapters.md +13 -12
  98. package/plugins/atlas-workflow-orchestrator/orchestrator/references/subagent_dispatch.md +11 -1
  99. package/plugins/atlas-workflow-orchestrator/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +32 -10
  100. package/plugins/atlas-workflow-orchestrator/packages/mcp-server/README.md +2 -2
  101. package/plugins/atlas-workflow-orchestrator/packages/mcp-server/package.json +1 -1
  102. package/plugins/atlas-workflow-orchestrator/packages/mcp-server/server.js +149 -21
  103. package/plugins/atlas-workflow-orchestrator/packages/skills/_shared/references/stack-profiles.md +36 -0
  104. package/plugins/atlas-workflow-orchestrator/packages/skills/_shared/scripts/document_quality.mjs +37 -1
  105. package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-audit/SKILL.md +201 -0
  106. package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-audit/agents/openai.yaml +7 -0
  107. package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-task-validator/SKILL.md +6 -0
  108. package/plugins/atlas-workflow-orchestrator/skills/_shared/references/stack-profiles.md +36 -0
  109. package/plugins/atlas-workflow-orchestrator/skills/_shared/scripts/document_quality.mjs +37 -1
  110. package/plugins/atlas-workflow-orchestrator/skills/atlas-audit/SKILL.md +201 -0
  111. package/plugins/atlas-workflow-orchestrator/skills/atlas-audit/agents/openai.yaml +7 -0
  112. package/plugins/atlas-workflow-orchestrator/skills/atlas-task-validator/SKILL.md +6 -0
  113. package/plugins/atlas-workflow-orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +32 -10
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Atlas Workflow
2
2
 
3
- Plugin **Atlas Workflow Orchestrator** v0.9.1 — pipeline determinístico (PRD → plano → execução → validação) com skills `atlas-*`, templates e MCP. Um pacote, seis hosts: **Claude Code**, **Cursor**, **Codex App**, **Antigravity (Gemini)**, **OpenCode** e **Pi CLI**.
3
+ Plugin **Atlas Workflow Orchestrator** v0.9.4 — pipeline determinístico (PRD → plano → execução → validação) com skills `atlas-*`, templates e MCP. Um pacote, sete hosts: **Claude Code**, **Cursor**, **Codex App**, **Antigravity (Gemini)**, **ZCode**, **OpenCode** e **Pi CLI**.
4
4
 
5
- **Versão:** [`VERSION`](VERSION) (`0.9.1`) · **Repo:** https://github.com/pauloborini/atlas-workflow
5
+ **Versão:** [`VERSION`](VERSION) (`0.9.4`) · **Repo:** https://github.com/pauloborini/atlas-workflow
6
6
 
7
7
  ## Hosts
8
8
 
@@ -12,6 +12,7 @@ Plugin **Atlas Workflow Orchestrator** v0.9.1 — pipeline determinístico (PRD
12
12
  | Cursor | **Igual ao Claude Code** (ver nota abaixo) | `atlas-workflow-claude.plugin` | — |
13
13
  | Codex App | Marketplace GitHub | `atlas-workflow-codex.plugin` | — |
14
14
  | Antigravity (Gemini) | Instalador from-source (`init antigravity`) → `~/.gemini/config/` | — (cópia direta, sem artefato `.plugin`) | — |
15
+ | ZCode | Instalador cache-based (`init zcode`) → `~/.zcode/cli/plugins/cache/` | `atlas-workflow-zcode.plugin` | — |
15
16
  | Opencode | Catálogo from-source `hosts/opencode/` | `atlas-workflow-opencode.plugin` | — |
16
17
  | Pi CLI | Catálogo from-source `hosts/pi/` | `atlas-workflow-pi.plugin` | **`pi-mcp-adapter` + `pi-subagents`** |
17
18
 
@@ -31,6 +32,7 @@ Um instalador único cobre os hosts de forma **global** (recomendado para valer
31
32
  npx github:pauloborini/atlas-workflow init claudecode # ou: cursor
32
33
  npx github:pauloborini/atlas-workflow init codex
33
34
  npx github:pauloborini/atlas-workflow init antigravity
35
+ npx github:pauloborini/atlas-workflow init zcode
34
36
  npx github:pauloborini/atlas-workflow init opencode --global
35
37
  npx github:pauloborini/atlas-workflow init pi --global --yes # --yes auto-instala as 2 deps
36
38
  ```
@@ -38,6 +40,7 @@ npx github:pauloborini/atlas-workflow init pi --global --yes # --yes auto-insta
38
40
  - **claudecode/cursor**: o instalador roda o `marketplace add` + `install` nativos da CLI por você. Já são globais por natureza.
39
41
  - **codex**: o instalador roda `marketplace add` + `plugin add` e também copia os custom agents Atlas para `CODEX_HOME/agents` (`~/.codex/agents` se `CODEX_HOME` não estiver definido). Este é o caminho garantido para `spawn_agent(agent_type: "atlas-*")`.
40
42
  - **antigravity**: o instalador registra o Atlas como um plugin em `~/.gemini/config/plugins/` e adiciona o MCP correspondente em `mcp_config.json`.
43
+ - **zcode**: o instalador copia o catálogo from-source `hosts/zcode/` para `~/.zcode/cli/plugins/cache/zcode-plugins-official/atlas-workflow-orchestrator/<version>/` e atualiza o `marketplace.json` cache. Ative no host via `/plugins enable atlas-workflow-orchestrator`. ZCode é Claude Agent SDK (clone estrutural do Claude Code): `Agent(subagent_type)` + `TodoWrite` + MCP stdio nativos — perfil `self_evident`, sem dependências externas.
41
44
  - **opencode**: com `--global`, instala globalmente em `~/.config/opencode/` (o MCP é registrado com caminho absoluto, funcionando em todos os projetos).
42
45
  - **pi**: com `--global`, instala globalmente em `~/.pi/agent/` (honra `PI_CODING_AGENT_DIR`), registra o MCP em `mcp.json` global e checa/instala as deps `pi-mcp-adapter` + `pi-subagents`.
43
46
 
@@ -86,6 +89,7 @@ Se a instalação foi **global** (padrão recomendado):
86
89
  ```bash
87
90
  npx github:pauloborini/atlas-workflow uninstall claudecode # ou: cursor
88
91
  npx github:pauloborini/atlas-workflow uninstall codex
92
+ npx github:pauloborini/atlas-workflow uninstall zcode
89
93
  npx github:pauloborini/atlas-workflow uninstall opencode --global
90
94
  npx github:pauloborini/atlas-workflow uninstall pi --global
91
95
  ```
@@ -100,15 +104,15 @@ npx github:pauloborini/atlas-workflow uninstall pi
100
104
 
101
105
  ## Artefato `.plugin` (opcional)
102
106
 
103
- Alternativa à instalação via GitHub: baixar o `.plugin` do host (`claude`, `codex`, `opencode` ou `pi`) na [release](https://github.com/pauloborini/atlas-workflow/releases) (tags `v*`), validar com `shasum -a 256 -c SHA256SUMS` e instalar pelo fluxo do host. Cursor usa o artefato Claude.
107
+ Alternativa à instalação via GitHub: baixar o `.plugin` do host (`claude`, `codex`, `opencode`, `pi` ou `zcode`) na [release](https://github.com/pauloborini/atlas-workflow/releases) (tags `v*`), validar com `shasum -a 256 -c SHA256SUMS` e instalar pelo fluxo do host. Cursor usa o artefato Claude.
104
108
 
105
109
  ## Como usar
106
110
 
107
111
  Comando (Claude Code / Cursor): `/workflow <mode> <input-type> [input] [flags]`
108
112
 
109
- No Codex, opencode e pi, invoque a skill do orquestrador com o mesmo padrão de argumentos (ex.: `workflow full backlog-item S05`). O verbo de dispatch do subagente é resolvido por `atlas_capabilities` (host-agnóstico).
113
+ No Codex, opencode, pi e zcode, invoque a skill do orquestrador com o mesmo padrão de argumentos (ex.: `workflow full backlog-item S05`). O verbo de dispatch do subagente é resolvido por `atlas_capabilities` (host-agnóstico).
110
114
 
111
- Se você quiser começar fora do fluxo principal, as skills listadas abaixo são os atalhos explícitos para backlog, PRD, plano, execução e revisão.
115
+ Se você quiser começar fora do fluxo principal, as skills listadas abaixo são os atalhos explícitos para backlog, PRD, auditoria, plano, execução e revisão.
112
116
 
113
117
  ### Modos
114
118
 
@@ -118,8 +122,9 @@ Se você quiser começar fora do fluxo principal, as skills listadas abaixo são
118
122
  | **`direct`** | PRD já existe e está maduro | Valida PRD → entrevista só se houver gap → **executa direto** (sem fase de plan handoff) → review opcional |
119
123
  | **`execute`** | Já tenho um `PLAN_*.md` pronto | Reverifica o plano (artefato + conformidade) → **executa o plano existente** → review opcional. **Não regera plano.** |
120
124
  | `interview-only` | Só fechar decisões / brainstorm | Entrevista; não implementa |
125
+ | **`audit`** | Quero diagnóstico sem patch | Audita target/boundary contra regras locais + stack detectada + Ponytail pass; `--handoff` grava `.atlas/plans/PLAN_AUDIT_*.md` sem executar |
121
126
 
122
- **Dica:** `full` = “quero PRD + plano + código”. `direct` = “já tenho PRD aprovado, implementa”. `execute` = “já tenho o plano, só executa”.
127
+ **Dica:** `full` = “quero PRD + plano + código”. `direct` = “já tenho PRD aprovado, implementa”. `execute` = “já tenho o plano, só executa”. `audit` = “diagnostica, não corrige”.
123
128
 
124
129
  > **Roteamento por tipo de input (v0.4.1+):** o tipo do arquivo que você passa **prevalece** sobre o modo digitado. Apontar um `PLAN_*.md` em `direct`/`full` (mesmo renomeado) auto-roteia para `execute` com um aviso de uma linha — nunca gera “plano de plano”. Pedir `execute` sobre um backlog/PRD roteia de volta para `full`/`direct`.
125
130
 
@@ -129,6 +134,7 @@ Se você quiser começar fora do fluxo principal, as skills listadas abaixo são
129
134
  - `idea` — indicação curta em texto
130
135
  - `prd` — caminho para `PRD_*.md` existente (principal em **`direct`**)
131
136
  - `plan` — caminho para `PLAN_*.md` existente (principal em **`execute`**)
137
+ - `target` — arquivo/diretório/feature/módulo auditável (só em **`audit`**)
132
138
  - `brainstorm` — texto livre (só com `interview-only`)
133
139
 
134
140
  ### Flags
@@ -185,7 +191,9 @@ Só alinhar decisões antes de planejar:
185
191
 
186
192
  ### Skills da cadeia
187
193
 
188
- Cadeia automática: `atlas-sprint-prd-generator` → `atlas-prd-interview` → `atlas-plan-handoff` → `atlas-plan-execute` (full) ou `atlas-direct-execute` (direct) → `atlas-task-validator` → `atlas-findings-repair` (só após `fail`, em qualquer host) → `atlas-slice-review` (opcional)
194
+ Cadeia automática de execução: `atlas-sprint-prd-generator` → `atlas-prd-interview` → `atlas-plan-handoff` → `atlas-plan-execute` (full) ou `atlas-direct-execute` (direct) → `atlas-task-validator` → `atlas-findings-repair` (só após `fail`, em qualquer host) → `atlas-slice-review` (opcional)
195
+
196
+ Modo sem execução: `atlas-audit` roda no fio principal, não altera código, não chama executor e pode gravar handoff Atlas-style em `.atlas/plans/` com `--handoff`.
189
197
 
190
198
  No modo `full`, as etapas documentais (`PRD`, entrevista, `PLAN_*.md`) ficam no agente principal/orquestrador. O primeiro sub-agent obrigatório nasce só na fase de execução (`atlas-plan-execute`).
191
199
 
@@ -196,6 +204,7 @@ Além da cadeia automática, estas skills também podem ser chamadas diretamente
196
204
  - `atlas-backlog-generator` — cria `BACKLOG_MESTRE_*.md` a partir de uma conversa, briefing, roadmap ou lista solta de requisitos. Use quando o objetivo for organizar demanda antes de virar PRD.
197
205
  - `atlas-sprint-prd-generator` — transforma um sprint ID como `S01`/`S02` em PRD de sprint. Use quando o escopo já está amarrado ao roadmap e você quer o PRD da rodada.
198
206
  - `atlas-prd-interview` — valida e amadurece um PRD antes de planejar. Use quando você quer fechar ambiguidades, dependências ou decisões de produto.
207
+ - `atlas-audit` — audita um target sem corrigir código. Use quando você quer achados com evidência `arquivo:linha` e, opcionalmente, handoff para correção posterior.
199
208
  - `atlas-plan-handoff` — converte um PRD validado em plano executável. Use quando a intenção é preparar a execução, não ainda codar.
200
209
  - `atlas-direct-execute` — executa diretamente quando o PRD já está maduro. Use quando você quer pular a fase de plan handoff.
201
210
  - `atlas-task-validator` — faz a validação fria da slice executada. Use como veredito final de conformidade, nunca como ação manual de rotina.
@@ -224,8 +233,8 @@ O validador frio (`atlas-task-validator`) **sempre** roda isolado e **sempre** c
224
233
  | [`packages/`](packages/) | Skills, templates, MCP |
225
234
  | [`agents/`](agents/) | Subagentes despachados (Claude): `atlas-task-validator`, `atlas-plan-execute`, `atlas-direct-execute`, `atlas-slice-review` |
226
235
  | [`plugins/atlas-workflow-orchestrator/`](plugins/atlas-workflow-orchestrator/) | Catálogo Codex from-source (marketplace) |
227
- | [`hosts/opencode/`](hosts/opencode/) · [`hosts/pi/`](hosts/pi/) | Catálogos from-source opencode/pi |
228
- | [`plugin-manifests/`](plugin-manifests/) | Manifests/configs por host (claude, codex, opencode, pi) |
236
+ | [`hosts/opencode/`](hosts/opencode/) · [`hosts/pi/`](hosts/pi/) · [`hosts/zcode/`](hosts/zcode/) | Catálogos from-source opencode/pi/zcode |
237
+ | [`plugin-manifests/`](plugin-manifests/) | Manifests/configs por host (claude, codex, opencode, pi, zcode) |
229
238
  | [`build/`](build/) | Gera `.plugin` em `dist/`, sincroniza catálogos, testes/smoke/conformance |
230
239
  | [`CHANGELOG.md`](CHANGELOG.md) · [`PATCH_PROCEDURE.md`](PATCH_PROCEDURE.md) | Release e manutenção |
231
240
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.9.4
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- // Bump determinístico de versão. Sincroniza os arquivos com versão concreta,
3
- // regenera bundles/catálogos e roda check-consistency. NÃO cria tag nem commita
4
- // — quem publica é o workflow Release ao detectar VERSION novo na main.
2
+ // Bump deterministico de versao. Sincroniza os arquivos com versao concreta,
3
+ // regenera bundles/catalogos e roda check-consistency. NAO cria tag nem commita
4
+ // — quem publica e cria a tag é o workflow Release ao detectar VERSION novo na main.
5
5
  //
6
6
  // Uso: node build/bump-version.mjs <nova-versao> (ex.: 0.8.3)
7
7
  //
@@ -88,26 +88,11 @@ execFileSync('bash', [path.join(ROOT, 'build', 'build-plugins.sh')], { cwd: ROOT
88
88
  console.log(`Rodando check-consistency…`);
89
89
  execFileSync('node', [path.join(ROOT, 'build', 'check-consistency.mjs')], { cwd: ROOT, stdio: 'inherit' });
90
90
 
91
- // Criar tag git local (marketplace resolve por tag, não por HEAD).
92
- // Tag só é criada — push fica pro passo manual junto com o commit.
93
- // CI Release é idempotente: se tag já existe, pula criação.
94
- const tag = `v${next}`;
95
- try {
96
- execFileSync('git', ['tag', tag], { cwd: ROOT, stdio: 'pipe' });
97
- console.log(`\n tag ${tag} (local — push com: git push origin ${tag})`);
98
- } catch (e) {
99
- if (e.stderr?.toString().includes('already exists')) {
100
- console.log(`\n tag ${tag} já existe (ok)`);
101
- } else {
102
- throw e;
103
- }
104
- }
105
-
106
91
  console.log(`\nbump-version: ${current} -> ${next} OK.
107
92
 
108
93
  Passos narrativos manuais (não automatizáveis):
109
94
  1. CHANGELOG.md — adicionar entrada "## ${next} - YYYY-MM-DD".
110
95
  2. packages/orchestrator/README.md — adicionar seção "### Novidades v${next}" e "Last updated".
111
- 3. Revisar 'git status', commitar e dar push na main (incluir tag):
112
- git push origin main v${next}
113
- => CI Release detecta tag existente e publica sem re-criar.`);
96
+ 3. Revisar 'git status', commitar e dar push na main:
97
+ git push origin main
98
+ => CI Release publica e cria a tag v${next}.`);
@@ -31,6 +31,7 @@ const HOST_ALIASES = {
31
31
  codex: 'codex',
32
32
  opencode: 'opencode',
33
33
  pi: 'pi',
34
+ zcode: 'zcode', zai: 'zcode',
34
35
  antigravity: 'antigravity', gemini: 'antigravity', antigravitycode: 'antigravity',
35
36
  };
36
37
 
@@ -571,6 +572,91 @@ function uninstallAntigravity(opts) {
571
572
  log('ok — artefatos globais do Atlas para Antigravity removidos.');
572
573
  }
573
574
 
575
+ // --- ZCode (cache-based install) ----------------------------------------------
576
+ // ZCode só descobre plugins no escopo `zcode-plugins-official` (verificado
577
+ // empiricamente no bundle zcode.cjs: `G2="zcode-plugins-official"` é hardcoded e o
578
+ // scan de cache é restrito a `cache/zcode-plugins-official/<plugin>/<version>/`).
579
+ // Por isso o installer copia para esse path — não para um marketplace custom.
580
+ // O ZCode também regenera `marketplaces/zcode-plugins-official/marketplace.json` no
581
+ // boot a partir do scan; mantemos essa entry sincronizada para visualização imediata.
582
+
583
+ const ZCODE_MARKETPLACE = 'zcode-plugins-official';
584
+ const ZCODE_PLUGIN_NAME = 'atlas-workflow-orchestrator';
585
+
586
+ function zcodeCacheDir() {
587
+ return path.join(homedir(), '.zcode', 'cli', 'plugins', 'cache', ZCODE_MARKETPLACE, ZCODE_PLUGIN_NAME, VERSION);
588
+ }
589
+
590
+ function zcodeMarketplaceCacheFile() {
591
+ return path.join(homedir(), '.zcode', 'cli', 'plugins', 'marketplaces', ZCODE_MARKETPLACE, 'marketplace.json');
592
+ }
593
+
594
+ function updateZcodeMarketplaceCacheEntry(cacheDir) {
595
+ const file = zcodeMarketplaceCacheFile();
596
+ let cfg = { name: ZCODE_MARKETPLACE, plugins: [], version: 1 };
597
+ if (fs.existsSync(file)) {
598
+ try { cfg = JSON.parse(fs.readFileSync(file, 'utf8')); }
599
+ catch { log(` aviso: ${path.basename(file)} é JSON inválido — reescrevendo do zero`); }
600
+ }
601
+ cfg.name = ZCODE_MARKETPLACE;
602
+ cfg.plugins = (cfg.plugins ?? []).filter((p) => p.name !== ZCODE_PLUGIN_NAME);
603
+ cfg.plugins.push({ cachePath: cacheDir, name: ZCODE_PLUGIN_NAME, source: 'filesystem', version: VERSION });
604
+ cfg.version = 1;
605
+ fs.mkdirSync(path.dirname(file), { recursive: true });
606
+ fs.writeFileSync(file, JSON.stringify(cfg, null, 2) + '\n');
607
+ }
608
+
609
+ function removeZcodeMarketplaceCacheEntry() {
610
+ const file = zcodeMarketplaceCacheFile();
611
+ if (!fs.existsSync(file)) return;
612
+ try {
613
+ const cfg = JSON.parse(fs.readFileSync(file, 'utf8'));
614
+ cfg.plugins = (cfg.plugins ?? []).filter((p) => p.name !== ZCODE_PLUGIN_NAME);
615
+ fs.writeFileSync(file, JSON.stringify(cfg, null, 2) + '\n');
616
+ } catch { log(` aviso: ${path.basename(file)} é JSON inválido — não mexi`); }
617
+ }
618
+
619
+ function installZcode(opts) {
620
+ const cacheDir = zcodeCacheDir();
621
+ const catalogSrc = path.join(ROOT, 'hosts/zcode');
622
+ log(`instalando Atlas (zcode v${VERSION}) GLOBAL em ${cacheDir}`);
623
+ if (!fs.existsSync(catalogSrc)) fail(`catálogo zcode ausente: hosts/zcode/ (rode build/build-plugins.sh)`);
624
+ if (opts.dryRun) {
625
+ log(` [dry-run] copiaria hosts/zcode/ → ${cacheDir}`);
626
+ log(` [dry-run] atualizaria ${zcodeMarketplaceCacheFile()}`);
627
+ return;
628
+ }
629
+ // Limpa instalação anterior (pode haver versão stale)
630
+ const parentDir = path.dirname(cacheDir);
631
+ if (fs.existsSync(parentDir)) fs.rmSync(parentDir, { recursive: true, force: true });
632
+ fs.mkdirSync(cacheDir, { recursive: true });
633
+ fs.cpSync(catalogSrc, cacheDir, { recursive: true });
634
+ // Gera o seed file no formato que o ZCode espera
635
+ const seed = {
636
+ hash: '',
637
+ marketplace: ZCODE_MARKETPLACE,
638
+ plugin: ZCODE_PLUGIN_NAME,
639
+ pluginVersion: VERSION,
640
+ source: 'filesystem',
641
+ version: 1,
642
+ };
643
+ fs.writeFileSync(path.join(cacheDir, '.zcode-plugin-seed.json'), JSON.stringify(seed, null, 2) + '\n');
644
+ // Sincroniza a entry do marketplace cache (o ZCode regenera no boot, mas
645
+ // mantemos sincronizado para visualização imediata no `/plugins`).
646
+ updateZcodeMarketplaceCacheEntry(cacheDir);
647
+ log('ok — ZCode instalado no cache oficial.');
648
+ log('próximo: abra o ZCode e ative via /plugins enable atlas-workflow-orchestrator');
649
+ log(' confirme com a tool MCP atlas_ping (host=zcode, status=alive).');
650
+ }
651
+
652
+ function uninstallZcode(opts) {
653
+ const cacheParent = path.join(homedir(), '.zcode', 'cli', 'plugins', 'cache', ZCODE_MARKETPLACE, ZCODE_PLUGIN_NAME);
654
+ log(`removendo Atlas (zcode) GLOBAL de ${cacheParent}`);
655
+ rmIfExists(cacheParent, opts);
656
+ removeZcodeMarketplaceCacheEntry();
657
+ log('ok — ZCode: cache e registry removidos.');
658
+ }
659
+
574
660
  function usage() {
575
661
  log(`atlas-workflow v${VERSION} — instalador multi-host
576
662
 
@@ -582,6 +668,7 @@ hosts:
582
668
  claudecode | cursor via \`claude plugin\` (marketplace from-source; já global)
583
669
  codex via \`codex plugin\` + custom agents em CODEX_HOME/agents
584
670
  antigravity via plugin nativo em ~/.gemini/config/ (já global)
671
+ zcode via cache ~/.zcode/cli/plugins/cache/ (já global; /plugins enable)
585
672
  opencode por-projeto: .opencode/ + opencode.json no [dir]
586
673
  --global: ~/.config/opencode/ (vale em todos os projetos)
587
674
  pi por-projeto: .mcp.json + .pi/agents/ no [dir] + deps
@@ -636,23 +723,23 @@ function main() {
636
723
  fail(`comando desconhecido: ${cmd} (use \`init <host>\` ou \`uninstall <host>\`)`, 2);
637
724
  }
638
725
 
639
- if (!rawHost) fail('informe o host: claudecode | cursor | codex | antigravity | opencode | pi', 2);
726
+ if (!rawHost) fail('informe o host: claudecode | cursor | codex | antigravity | zcode | opencode | pi', 2);
640
727
  if (extra.length) fail(`argumentos extras não suportados: ${extra.join(' ')}`, 2);
641
728
  const host = HOST_ALIASES[rawHost.toLowerCase()];
642
- if (!host) fail(`host inválido: ${rawHost} (use claudecode|cursor|codex|antigravity|opencode|pi)`, 2);
729
+ if (!host) fail(`host inválido: ${rawHost} (use claudecode|cursor|codex|antigravity|zcode|opencode|pi)`, 2);
643
730
 
644
731
  const opts = parsed.opts;
645
732
  const targetDir = path.resolve(opts.dir || rawDir || process.cwd());
646
733
  const actions = {
647
- init: { claude: installClaude, codex: installCodex, antigravity: installAntigravity, opencode: installOpencode, pi: installPi },
648
- uninstall: { claude: uninstallClaude, codex: uninstallCodex, antigravity: uninstallAntigravity, opencode: uninstallOpencode, pi: uninstallPi },
734
+ init: { claude: installClaude, codex: installCodex, antigravity: installAntigravity, zcode: installZcode, opencode: installOpencode, pi: installPi },
735
+ uninstall: { claude: uninstallClaude, codex: uninstallCodex, antigravity: uninstallAntigravity, zcode: uninstallZcode, opencode: uninstallOpencode, pi: uninstallPi },
649
736
  };
650
737
  const globalActions = {
651
738
  init: { opencode: installOpencodeGlobal, pi: installPiGlobal },
652
739
  uninstall: { opencode: uninstallOpencodeGlobal, pi: uninstallPiGlobal },
653
740
  };
654
741
 
655
- if (host === 'claude' || host === 'codex' || host === 'antigravity') {
742
+ if (host === 'claude' || host === 'codex' || host === 'antigravity' || host === 'zcode') {
656
743
  if (opts.global && (host === 'claude' || host === 'codex')) log('nota: claude/codex já são globais por natureza (registro da CLI) — --global ignorado.');
657
744
  actions[cmd][host](opts);
658
745
  } else if (opts.global) {
@@ -38,18 +38,48 @@ test('perfis: Flutter, Node e Python ativam só regras aplicáveis', () => {
38
38
  for (const [file, content] of Object.entries(files)) fs.writeFileSync(path.join(dir, file), content);
39
39
  return detectStackProfiles(dir, commands);
40
40
  };
41
- assert.deepEqual(fixture('node', { 'package.json': '{"scripts":{"test":"node --test"}}' }).boundaries[0], {
42
- boundary: '.', universal: true, flutter_dart: false, node_typescript: true, python: false, getx: false,
41
+ assert.deepEqual(pickProfile(fixture('node', { 'package.json': '{"scripts":{"test":"node --test"}}' }).boundaries[0]), {
42
+ boundary: '.', flutter_dart: false, node_typescript: true, python: false, go: false, rust: false, java_kotlin: false,
43
+ firebase: false, supabase: false, rest_openapi: false, getx: false,
43
44
  });
44
- assert.deepEqual(fixture('flutter', { 'pubspec.yaml': 'name: fixture\ndependencies:\n flutter:\n sdk: flutter\n' }).boundaries[0], {
45
- boundary: '.', universal: true, flutter_dart: true, node_typescript: false, python: false, getx: false,
45
+ assert.deepEqual(pickProfile(fixture('flutter', { 'pubspec.yaml': 'name: fixture\ndependencies:\n flutter:\n sdk: flutter\n' }).boundaries[0]), {
46
+ boundary: '.', flutter_dart: true, node_typescript: false, python: false, go: false, rust: false, java_kotlin: false,
47
+ firebase: false, supabase: false, rest_openapi: false, getx: false,
46
48
  });
47
- assert.deepEqual(fixture('python', { 'pyproject.toml': '[project]\nname="fixture"\n' }).boundaries[0], {
48
- boundary: '.', universal: true, flutter_dart: false, node_typescript: false, python: true, getx: false,
49
+ assert.deepEqual(pickProfile(fixture('python', { 'pyproject.toml': '[project]\nname="fixture"\n' }).boundaries[0]), {
50
+ boundary: '.', flutter_dart: false, node_typescript: false, python: true, go: false, rust: false, java_kotlin: false,
51
+ firebase: false, supabase: false, rest_openapi: false, getx: false,
49
52
  });
50
53
  fs.rmSync(root, { recursive: true, force: true });
51
54
  });
52
55
 
56
+ function pickProfile(profile) {
57
+ const {
58
+ boundary, flutter_dart, node_typescript, python, go, rust, java_kotlin,
59
+ firebase, supabase, rest_openapi, getx,
60
+ } = profile;
61
+ return {
62
+ boundary, flutter_dart, node_typescript, python, go, rust, java_kotlin,
63
+ firebase, supabase, rest_openapi, getx,
64
+ };
65
+ }
66
+
67
+ test('perfis: Go, Rust, Java/Kotlin, Firebase, Supabase e REST/OpenAPI são detectáveis', () => {
68
+ const root = fs.mkdtempSync(path.join(os.tmpdir(), 'atlas-stack-extra-'));
69
+ const fixture = (name, files) => {
70
+ const dir = path.join(root, name); fs.mkdirSync(dir);
71
+ for (const [file, content] of Object.entries(files)) fs.writeFileSync(path.join(dir, file), content);
72
+ return detectStackProfiles(dir).boundaries[0];
73
+ };
74
+ assert.equal(fixture('go', { 'go.mod': 'module example.com/app\n' }).go, true);
75
+ assert.equal(fixture('rust', { 'Cargo.toml': '[package]\nname="app"\n' }).rust, true);
76
+ assert.equal(fixture('java', { 'pom.xml': '<project><dependencies></dependencies></project>\n' }).java_kotlin, true);
77
+ assert.equal(fixture('firebase', { 'firebase.json': '{"firestore":{}}\n' }).firebase, true);
78
+ assert.equal(fixture('supabase', { 'package.json': '{"dependencies":{"@supabase/supabase-js":"latest"}}\n' }).supabase, true);
79
+ assert.equal(fixture('openapi', { 'openapi.yaml': 'openapi: 3.0.0\ninfo:\n title: API\n version: 1\n' }).rest_openapi, true);
80
+ fs.rmSync(root, { recursive: true, force: true });
81
+ });
82
+
53
83
  test('perfis: monorepo restringe stack por boundary e GetX exige evidência', () => {
54
84
  const root = fs.mkdtempSync(path.join(os.tmpdir(), 'atlas-monorepo-'));
55
85
  fs.mkdirSync(path.join(root, 'packages/node'), { recursive: true });
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.9.4
@@ -222,9 +222,15 @@ Veja este README, `packages/mcp-server/README.md` e os SKILL.md `atlas-*` para o
222
222
 
223
223
  ---
224
224
 
225
- **Plugin version:** 0.9.1
225
+ **Plugin version:** 0.9.4
226
226
  **Author:** Paulo Borini
227
- **Last updated:** 2026-06-16
227
+ **Last updated:** 2026-06-27
228
+
229
+ ### Novidades v0.9.4 — audit handoff TC-conforme + perfis de stack
230
+
231
+ - `/workflow audit --handoff` passa a escrever `.atlas/plans/PLAN_AUDIT_<slug>.md` **conforme ao `PLAN_TEMPLATE.md`** (cabeçalho com `| **PRD** | N/A — origem auditoria |`, ref a `BOUNDARY_PRD_PLAN.md`, §1–§6/§8, tasks `#### T01.`): passa no gate TC e é de fato consumível por `/workflow execute plan`. Fecha a promessa quebrada da estrutura ad-hoc anterior, que falharia o gate.
232
+ - Perfis de stack ganham 6 linhas detectáveis — `go`, `rust`, `java_kotlin`, `firebase`, `supabase`, `rest_openapi` — no baseline universal e no validador frio, ativadas só por manifests/deps/comandos reais no boundary.
233
+ - `audit`/`interview-only` não declaram `guarantee_level` (não há execução a garantir); descrição do `atlas_preflight` endurecida para refletir a impl.
228
234
 
229
235
  ### Novidades v0.8.4 — liveness do executor (Gate G12)
230
236
 
@@ -268,3 +274,10 @@ Veja este README, `packages/mcp-server/README.md` e os SKILL.md `atlas-*` para o
268
274
  - Os únicos sub-agents do pipeline são `atlas-plan-execute`/`atlas-direct-execute`, `atlas-task-validator`, `atlas-findings-repair` e `atlas-slice-review`.
269
275
  - A topologia é **sibling** em todos os hosts: o orquestrador coordena o validator irmão a partir do `state_path` retornado pelo executor e só reabre execução em `fail`. Host sem join síncrono é rejeitado no preflight (gate JOIN).
270
276
  - `atlas_preflight`/dispatchability distinguem skills documentais de skills executoras, evitando exigir sub-agent para entrevista/plano.
277
+
278
+ ### Novidades v0.9.3 — ZCode como novo host (tier-1)
279
+
280
+ - **Novo host: ZCode** (Claude Agent SDK compat). Entrada `zcode` em `HOST_ADAPTERS` (`packages/mcp-server/server.js`) com perfil `self_evident` — `Agent(subagent_type)` + `TodoWrite` + MCP stdio + skills nativas, clone estrutural do Claude Code. Detector `ZCODE_PLUGIN_ROOT` em `HOST_DETECTORS`. `validator_dispatch.join.sync: 'self_evident'`, `confidence: 'presumed'`.
281
+ - ZCode reusa o agente canônico `agents/<name>.md` no plugin root (mesmo formato Claude); sem gerador próprio, sem custo de manutenção a cada nova skill/agent.
282
+ - Installer `init zcode` (cache-based, análogo ao `init antigravity`): copia catálogo `hosts/zcode/` para `~/.zcode/cli/plugins/cache/zcode-plugins-official/atlas-workflow-orchestrator/<version>/` e atualiza o `marketplace.json` cache. Ativação no app via `/plugins enable atlas-workflow-orchestrator`. **Sem dependências externas** (não exige `pi-mcp-adapter`/etc. — passa no preflight direto).
283
+ - Sete hosts suportados: `claude`, `codex`, `opencode`, `pi`, `antigravity`, `zcode`, `generic`. `CAPABILITIES_SCHEMA_VERSION` segue **v5** (adição aditiva, sem breaking). Smoke real no host ZCode confirma `host=zcode sv=5 join.sync=self_evident ping=alive version=0.9.3`.
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Orquestra pipeline de desenvolvimento de feature no Atlas (PRD → validação → entrevista → plano → execução → review)
3
- argument-hint: <mode> <input-type> [input] [--interview] [--review] [--help]
2
+ description: Orquestra pipeline de desenvolvimento de feature no Atlas (PRD → validação → entrevista → plano → execução → review) e auditoria universal sem correção
3
+ argument-hint: <mode> <input-type|target> [input] [--interview] [--review] [--handoff] [--scope] [--help]
4
4
  ---
5
5
 
6
6
  Você está executando o comando `/workflow` do plugin **atlas-workflow-orchestrator**.
@@ -16,12 +16,12 @@ Argumentos recebidos: `$ARGUMENTS`
16
16
  ## Referência rápida de sintaxe
17
17
 
18
18
  ```
19
- /workflow <mode> <input-type> [input] [flags]
19
+ /workflow <mode> <input-type|target> [input] [flags]
20
20
  ```
21
21
 
22
- - **mode**: `full` · `direct` · `execute` · `interview-only`
22
+ - **mode**: `full` · `direct` · `execute` · `interview-only` · `audit`
23
23
  - **input-type**: `backlog-item` · `idea` · `prd` · `plan` · `brainstorm`
24
- - **flags**: `--interview` · `--review` · `--help`
24
+ - **flags**: `--interview` · `--review` · `--handoff` · `--scope <descrição>` · `--help`
25
25
 
26
26
  Exemplos:
27
27
 
@@ -30,6 +30,8 @@ Exemplos:
30
30
  /workflow direct prd "/path/PRD_S05.md" --review
31
31
  /workflow execute plan "/path/PLAN_S05.md"
32
32
  /workflow interview-only brainstorm "que tal dark mode?"
33
+ /workflow audit apps/mobile/lib/features/auth --handoff
34
+ → Gera relatório e `.atlas/plans/PLAN_AUDIT_*.md`; não executa correções
33
35
  ```
34
36
 
35
37
  Não improvise comportamento fora do `SKILL.md`. **Pipeline é fire-and-continue**: uma vez iniciado, avança fase a fase sem pedir permissão entre gates; só para em gate duro `blocked` ou blockage de ambiente real (ver "Princípio de continuação automática"). Nunca invente "Modo Discussão" ou peça "quer que eu gere/continue?". Decisão em aberto não para — dispara entrevista, propaga e segue. Em caso de erro real, siga "Error handling".
@@ -11,7 +11,7 @@ Tools nativas do cliente (`Agent()`, `TodoWrite`, `tasks`, `$skill`) vivem no ho
11
11
  1. **Runtime:** `atlas_capabilities` (MCP) — detecta host por env e retorna o descritor. Preferir sempre.
12
12
  2. **Estático:** esta tabela — fallback de leitura/documentação quando o MCP não está disponível.
13
13
 
14
- Os dois devem permanecer consistentes. O descritor em código vive em `packages/mcp-server/server.js` (`HOST_ADAPTERS`).
14
+ Os dois devem permanecer consistentes. O descritor em código vive em `packages/mcp-server/server.js` (`HOST_ADAPTERS`). ZCode usa o mesmo formato de agentes que Claude (`.md` com frontmatter) por ser Claude Agent SDK compat.
15
15
 
16
16
  ## Detecção de host
17
17
 
@@ -21,6 +21,7 @@ Os dois devem permanecer consistentes. O descritor em código vive em `packages/
21
21
  | env `ATLAS_HOST` | o valor da env |
22
22
  | env `CLAUDE_PLUGIN_ROOT` presente | `claude` |
23
23
  | env `CODEX_HOME` / `CODEX_PLUGIN_ROOT` | `codex` |
24
+ | env `ZCODE_PLUGIN_ROOT` (injetado pelo `.zcode-plugin` do host) | `zcode` |
24
25
  | env `ATLAS_HOST=opencode` (injetado por `opencode.json`) | `opencode` |
25
26
  | env `ATLAS_HOST=pi` (injetado pela config do `pi-mcp-adapter`) | `pi` |
26
27
  | env `ATLAS_HOST=antigravity` (injetado por `mcp_config.json`) | `antigravity` |
@@ -28,15 +29,15 @@ Os dois devem permanecer consistentes. O descritor em código vive em `packages/
28
29
 
29
30
  ## Matriz de adapters
30
31
 
31
- | Concern | `claude` (Claude Code) | `codex` (Codex App) | `opencode` | `pi` (pi cli) | `antigravity` (Gemini) | `generic` |
32
- |---------|------------------------|---------------------|------------|---------------|------------------------|-----------|
33
- | Disparo de subagente | `Agent(subagent_type: "<name>", prompt: "<state_path>")` | `spawn_agent(agent_type: "<name>", items: [{ type: "text", text: "<state_path>" }])` | `@<name>` (ou auto) com `<state_path>` | tool `subagent({ agent: "<name>", task: "<state_path>", context: "fresh" })` (pi-subagents) | `define_subagent` + `invoke_subagent` com `<state_path>` | subagente nativo do host, passando só `<state_path>` |
34
- | Registro do subagente | `agents/<name>.md` na raiz do plugin | `CODEX_HOME/agents/<name>.toml` via `init codex` (`.codex/agents/` no bundle é fonte gerada; custom agent nativo; `developer_instructions` carrega o `SKILL.md`; `atlas-task-validator` pinado em `model="gpt-5.4"` + `model_reasoning_effort="high"`) | `.opencode/agents/<name>.md` (`mode: subagent`) | `.pi/agents/<name>.md` (pi-subagents; frontmatter `name`+`description`+`tools`; **`SKILL.md` canônico embutido no corpo** porque o pi não tem skill loader no sub-agente — fonte única segue `packages/skills/<name>/SKILL.md`, agente é cópia gerada por `build/gen-host-agent.mjs`) | dinâmico via `define_subagent` da skill do orquestrador | mecanismo nativo equivalente |
35
- | Topologia do validador frio (G4) | **`sibling`** | **`sibling`** | **`sibling`** | **`sibling`** | **`sibling`** | **`sibling`** |
36
- | Join síncrono (gate JOIN) | `self_evident` (`Agent()` bloqueante) | `self_evident` (confirmado em produção) | `self_evident` (`@<name>` bloqueante) | `must_report` (depende de `pi-subagents`; hard-fail sem report) | `self_evident` (`invoke_subagent` bloqueante) | `must_report` (indeterminado; hard-fail sem report) |
37
- | Todo nativo | `TodoWrite` | `tasks` | `todowrite` | nenhum (segue sem mirror) | nenhum (segue sem mirror) | nenhum (segue sem mirror) |
38
- | Config MCP | `plugin.json` `mcpServers` | `.mcp.json` | `opencode.json` `mcp.<name>` (`type:"local"`, `environment.ATLAS_HOST=opencode`) | `.mcp.json` no root (`pi-mcp-adapter`; `env.ATLAS_HOST=pi`); tools chegam proxiadas/prefixadas `atlas_workflow_<tool>` | `mcp_config.json` (`env.ATLAS_HOST=antigravity`) | host MCP-capaz |
39
- | Deps externas obrigatórias | — | — | — | **`pi-mcp-adapter` + `pi-subagents`** (DEC-005) | — | — |
32
+ | Concern | `claude` (Claude Code) | `codex` (Codex App) | `opencode` | `pi` (pi cli) | `antigravity` (Gemini) | `zcode` (ZCode) | `generic` |
33
+ |---------|------------------------|---------------------|------------|---------------|------------------------|-----------|-----------|
34
+ | Disparo de subagente | `Agent(subagent_type: "<name>", prompt: "<state_path>")` | `spawn_agent(agent_type: "<name>", items: [{ type: "text", text: "<state_path>" }])` | `@<name>` (ou auto) com `<state_path>` | tool `subagent({ agent: "<name>", task: "<state_path>", context: "fresh" })` (pi-subagents) | `define_subagent` + `invoke_subagent` com `<state_path>` | `Agent(subagent_type: "<name>", prompt: "<state_path>")` | subagente nativo do host, passando só `<state_path>` |
35
+ | Registro do subagente | `agents/<name>.md` na raiz do plugin | `CODEX_HOME/agents/<name>.toml` via `init codex` (`.codex/agents/` no bundle é fonte gerada; custom agent nativo; `developer_instructions` carrega o `SKILL.md`; `atlas-task-validator` pinado em `model="gpt-5.4"` + `model_reasoning_effort="high"`) | `.opencode/agents/<name>.md` (`mode: subagent`) | `.pi/agents/<name>.md` (pi-subagents; frontmatter `name`+`description`+`tools`; **`SKILL.md` canônico embutido no corpo** porque o pi não tem skill loader no sub-agente — fonte única segue `packages/skills/<name>/SKILL.md`, agente é cópia gerada por `build/gen-host-agent.mjs`) | dinâmico via `define_subagent` da skill do orquestrador | `agents/<name>.md` na raiz do plugin (.zcode-plugin) — mesmo formato claude (Claude Agent SDK) | mecanismo nativo equivalente |
36
+ | Topologia do validador frio (G4) | **`sibling`** | **`sibling`** | **`sibling`** | **`sibling`** | **`sibling`** | **`sibling`** | **`sibling`** |
37
+ | Join síncrono (gate JOIN) | `self_evident` (`Agent()` bloqueante) | `self_evident` (confirmado em produção) | `self_evident` (`@<name>` bloqueante) | `must_report` (depende de `pi-subagents`; hard-fail sem report) | `self_evident` (`invoke_subagent` bloqueante) | `self_evident` (`Agent()` bloqueante; Claude Agent SDK) | `must_report` (indeterminado; hard-fail sem report) |
38
+ | Todo nativo | `TodoWrite` | `tasks` | `todowrite` | nenhum (segue sem mirror) | nenhum (segue sem mirror) | `TodoWrite` | nenhum (segue sem mirror) |
39
+ | Config MCP | `plugin.json` `mcpServers` | `.mcp.json` | `opencode.json` `mcp.<name>` (`type:"local"`, `environment.ATLAS_HOST=opencode`) | `.mcp.json` no root (`pi-mcp-adapter`; `env.ATLAS_HOST=pi`; tools chegam proxiadas/prefixadas `atlas_workflow_<tool>`) | `mcp_config.json` (`env.ATLAS_HOST=antigravity`) | `.zcode-plugin/plugin.json` `mcpServers` (stdio; `ZCODE_PLUGIN_ROOT` injetado pelo host) | host MCP-capaz |
40
+ | Deps externas obrigatórias | — | — | — | **`pi-mcp-adapter` + `pi-subagents`** (DEC-005) | — | — | — |
40
41
  | Estado de run | `atlas_run_state` (MCP) | `atlas_run_state` (MCP) | `atlas_run_state` (MCP) | `atlas_run_state` (MCP) | `atlas_run_state` (MCP) | `atlas_run_state` (MCP) |
41
42
  | Escrita de plano | `.atlas/plans/` | `.atlas/plans/` | `.atlas/plans/` | `.atlas/plans/` | `.atlas/plans/` | `.atlas/plans/` |
42
43
  | Leitura de plano (ordem) | `.atlas/plans/` → `.cursor/plans/` → `.codex/plans/` | idem | idem | idem | idem | idem |
@@ -92,7 +93,7 @@ Campos retornados (DEC-007):
92
93
  1. Adicionar entrada em `HOST_ADAPTERS` (`packages/mcp-server/server.js`).
93
94
  2. Adicionar regra de detecção em `detectHost` se houver env próprio.
94
95
  3. Adicionar linha na matriz de adapters.
95
- 4. Registrar o subagente no formato nativo do host (ex.: `agents/<name>.md` ou equivalente).
96
+ 4. Registrar o subagente no formato nativo do host (ex.: `agents/<name>.md` ou equivalente). ZCode reusa o formato Claude (`agents/<name>.md`) — mesmo formato, sem geração extra.
96
97
 
97
98
  Sem tocar nas skills — elas já consomem o descritor.
98
99
 
@@ -102,4 +103,4 @@ Sem tocar nas skills — elas já consomem o descritor.
102
103
 
103
104
  ## Status multi-host
104
105
 
105
- Todos os hosts-alvo do survey S01 estão implementados na matriz acima: `claude`, `codex`, `cursor` (carona no manifest claude), `opencode` (S06), `pi` (S07) e `generic`. Nenhum exige HTTP/SSE → stdio único (DEC-006/S05). Survey completo + fontes: `PRD_S01_host_survey.md`.
106
+ Todos os hosts-alvo do survey S01 estão implementados na matriz acima: `claude`, `codex`, `cursor` (carona no manifest claude), `opencode` (S06), `pi` (S07), `zcode` (Claude Agent SDK compat) e `generic`. Nenhum exige HTTP/SSE → stdio único (DEC-006/S05). Survey completo + fontes: `PRD_S01_host_survey.md`.
@@ -1,6 +1,6 @@
1
1
  # Despacho de sub-agent
2
2
 
3
- Contrato host-agnóstico para Cursor, Codex e Claude Code.
3
+ Contrato host-agnóstico para Claude Code, Cursor, Codex App, Antigravity, ZCode, OpenCode e Pi CLI.
4
4
 
5
5
  ## Regra central
6
6
 
@@ -26,6 +26,16 @@ spawn_agent(agent_type: "atlas-task-validator", items: [{ type: "text", text: "<
26
26
 
27
27
  O registro ativo desse agent vive em `CODEX_HOME/agents/atlas-task-validator.toml` após `npx github:pauloborini/atlas-workflow init codex`; o bundle mantém `.codex/agents/` como fonte gerada. O arquivo é gerado por `build/gen-host-agent.mjs` com `model = "gpt-5.4"` e `model_reasoning_effort = "high"`. Se o host responder `unknown agent_type`, a fase bloqueia (`blocked`/fail-closed). Proibido fallback para `default`, `$atlas-task-validator`, execução inline ou validação no fio do orquestrador.
28
28
 
29
+ ## ZCode
30
+
31
+ ZCode é Claude Agent SDK compat (clone estrutural do Claude Code). O mecanismo de sub-agent é o **mesmo** do Claude:
32
+
33
+ ```text
34
+ Agent(subagent_type: "atlas-task-validator", prompt: "<state_path>")
35
+ ```
36
+
37
+ O registro ativo do agent vive em `agents/<name>.md` na raiz do plugin (mesmo formato Claude, sem geração extra), descoberto pelo host via `.zcode-plugin/plugin.json` (skills + agents do plugin). O ZCode injeta `ZCODE_PLUGIN_ROOT` no env do subprocesso MCP (verificado no bundle `zcode.cjs`). Após `npx github:pauloborini/atlas-workflow init zcode`, o catálogo `hosts/zcode/` é copiado para `~/.zcode/cli/plugins/cache/zcode-plugins-official/atlas-workflow-orchestrator/<version>/` e ativado no app via `/plugins enable atlas-workflow-orchestrator`. ZCode é `self_evident` (passa PREREQ/JOIN sem report), sem dependências externas.
38
+
29
39
  ## Payload mínimo
30
40
 
31
41
  - `skill_id`