atlas-workflow 0.9.3 → 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.
- package/README.md +16 -10
- package/VERSION +1 -1
- package/build/tests/etapa3.test.mjs +36 -6
- package/hosts/opencode/.opencode/atlas/VERSION +1 -1
- package/hosts/opencode/.opencode/atlas/orchestrator/README.md +15 -2
- package/hosts/opencode/.opencode/atlas/orchestrator/commands/workflow.md +7 -5
- package/hosts/opencode/.opencode/atlas/orchestrator/references/subagent_dispatch.md +11 -1
- package/hosts/opencode/.opencode/atlas/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
- package/hosts/opencode/.opencode/atlas/packages/mcp-server/README.md +2 -2
- package/hosts/opencode/.opencode/atlas/packages/mcp-server/package.json +1 -1
- package/hosts/opencode/.opencode/atlas/packages/mcp-server/server.js +80 -14
- package/hosts/opencode/.opencode/skills/_shared/references/stack-profiles.md +36 -0
- package/hosts/opencode/.opencode/skills/_shared/scripts/document_quality.mjs +37 -1
- package/hosts/opencode/.opencode/skills/atlas-audit/SKILL.md +201 -0
- package/hosts/opencode/.opencode/skills/atlas-audit/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-task-validator/SKILL.md +6 -0
- package/hosts/opencode/.opencode/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
- package/hosts/pi/atlas/VERSION +1 -1
- package/hosts/pi/atlas/orchestrator/README.md +15 -2
- package/hosts/pi/atlas/orchestrator/commands/workflow.md +7 -5
- package/hosts/pi/atlas/orchestrator/references/subagent_dispatch.md +11 -1
- package/hosts/pi/atlas/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
- package/hosts/pi/atlas/packages/mcp-server/README.md +2 -2
- package/hosts/pi/atlas/packages/mcp-server/package.json +1 -1
- package/hosts/pi/atlas/packages/mcp-server/server.js +80 -14
- package/hosts/pi/skills/_shared/references/stack-profiles.md +36 -0
- package/hosts/pi/skills/_shared/scripts/document_quality.mjs +37 -1
- package/hosts/pi/skills/atlas-audit/SKILL.md +201 -0
- package/hosts/pi/skills/atlas-audit/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-task-validator/SKILL.md +6 -0
- package/hosts/pi/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
- package/hosts/zcode/.zcode-plugin/plugin.json +2 -2
- package/hosts/zcode/packages/mcp-server/README.md +2 -2
- package/hosts/zcode/packages/mcp-server/VERSION +1 -1
- package/hosts/zcode/packages/mcp-server/package.json +1 -1
- package/hosts/zcode/packages/mcp-server/server.js +80 -14
- package/hosts/zcode/packages/orchestrator/README.md +15 -2
- package/hosts/zcode/packages/orchestrator/commands/workflow.md +7 -5
- package/hosts/zcode/packages/orchestrator/references/subagent_dispatch.md +11 -1
- package/hosts/zcode/packages/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
- package/hosts/zcode/skills/_shared/references/stack-profiles.md +36 -0
- package/hosts/zcode/skills/_shared/scripts/document_quality.mjs +37 -1
- package/hosts/zcode/skills/atlas-audit/SKILL.md +201 -0
- package/hosts/zcode/skills/atlas-audit/agents/openai.yaml +7 -0
- package/hosts/zcode/skills/atlas-task-validator/SKILL.md +6 -0
- package/hosts/zcode/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
- package/package.json +1 -1
- package/plugins/atlas-workflow-orchestrator/.codex-plugin/plugin.json +5 -4
- package/plugins/atlas-workflow-orchestrator/VERSION +1 -1
- package/plugins/atlas-workflow-orchestrator/orchestrator/README.md +15 -2
- package/plugins/atlas-workflow-orchestrator/orchestrator/commands/workflow.md +7 -5
- package/plugins/atlas-workflow-orchestrator/orchestrator/references/subagent_dispatch.md +11 -1
- package/plugins/atlas-workflow-orchestrator/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
- package/plugins/atlas-workflow-orchestrator/packages/mcp-server/README.md +2 -2
- package/plugins/atlas-workflow-orchestrator/packages/mcp-server/package.json +1 -1
- package/plugins/atlas-workflow-orchestrator/packages/mcp-server/server.js +80 -14
- package/plugins/atlas-workflow-orchestrator/packages/skills/_shared/references/stack-profiles.md +36 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/_shared/scripts/document_quality.mjs +37 -1
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-audit/SKILL.md +201 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-audit/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-task-validator/SKILL.md +6 -0
- package/plugins/atlas-workflow-orchestrator/skills/_shared/references/stack-profiles.md +36 -0
- package/plugins/atlas-workflow-orchestrator/skills/_shared/scripts/document_quality.mjs +37 -1
- package/plugins/atlas-workflow-orchestrator/skills/atlas-audit/SKILL.md +201 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-audit/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-task-validator/SKILL.md +6 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +30 -10
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Atlas Workflow
|
|
2
2
|
|
|
3
|
-
Plugin **Atlas Workflow Orchestrator** v0.9.
|
|
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.
|
|
5
|
+
**Versão:** [`VERSION`](VERSION) (`0.9.4`) · **Repo:** https://github.com/pauloborini/atlas-workflow
|
|
6
6
|
|
|
7
7
|
## Hosts
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ npx github:pauloborini/atlas-workflow init pi --global --yes # --yes auto-insta
|
|
|
40
40
|
- **claudecode/cursor**: o instalador roda o `marketplace add` + `install` nativos da CLI por você. Já são globais por natureza.
|
|
41
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-*")`.
|
|
42
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/
|
|
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.
|
|
44
44
|
- **opencode**: com `--global`, instala globalmente em `~/.config/opencode/` (o MCP é registrado com caminho absoluto, funcionando em todos os projetos).
|
|
45
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`.
|
|
46
46
|
|
|
@@ -89,6 +89,7 @@ Se a instalação foi **global** (padrão recomendado):
|
|
|
89
89
|
```bash
|
|
90
90
|
npx github:pauloborini/atlas-workflow uninstall claudecode # ou: cursor
|
|
91
91
|
npx github:pauloborini/atlas-workflow uninstall codex
|
|
92
|
+
npx github:pauloborini/atlas-workflow uninstall zcode
|
|
92
93
|
npx github:pauloborini/atlas-workflow uninstall opencode --global
|
|
93
94
|
npx github:pauloborini/atlas-workflow uninstall pi --global
|
|
94
95
|
```
|
|
@@ -103,15 +104,15 @@ npx github:pauloborini/atlas-workflow uninstall pi
|
|
|
103
104
|
|
|
104
105
|
## Artefato `.plugin` (opcional)
|
|
105
106
|
|
|
106
|
-
Alternativa à instalação via GitHub: baixar o `.plugin` do host (`claude`, `codex`, `opencode` ou `
|
|
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.
|
|
107
108
|
|
|
108
109
|
## Como usar
|
|
109
110
|
|
|
110
111
|
Comando (Claude Code / Cursor): `/workflow <mode> <input-type> [input] [flags]`
|
|
111
112
|
|
|
112
|
-
No Codex, opencode e
|
|
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).
|
|
113
114
|
|
|
114
|
-
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.
|
|
115
116
|
|
|
116
117
|
### Modos
|
|
117
118
|
|
|
@@ -121,8 +122,9 @@ Se você quiser começar fora do fluxo principal, as skills listadas abaixo são
|
|
|
121
122
|
| **`direct`** | PRD já existe e está maduro | Valida PRD → entrevista só se houver gap → **executa direto** (sem fase de plan handoff) → review opcional |
|
|
122
123
|
| **`execute`** | Já tenho um `PLAN_*.md` pronto | Reverifica o plano (artefato + conformidade) → **executa o plano existente** → review opcional. **Não regera plano.** |
|
|
123
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 |
|
|
124
126
|
|
|
125
|
-
**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”.
|
|
126
128
|
|
|
127
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`.
|
|
128
130
|
|
|
@@ -132,6 +134,7 @@ Se você quiser começar fora do fluxo principal, as skills listadas abaixo são
|
|
|
132
134
|
- `idea` — indicação curta em texto
|
|
133
135
|
- `prd` — caminho para `PRD_*.md` existente (principal em **`direct`**)
|
|
134
136
|
- `plan` — caminho para `PLAN_*.md` existente (principal em **`execute`**)
|
|
137
|
+
- `target` — arquivo/diretório/feature/módulo auditável (só em **`audit`**)
|
|
135
138
|
- `brainstorm` — texto livre (só com `interview-only`)
|
|
136
139
|
|
|
137
140
|
### Flags
|
|
@@ -188,7 +191,9 @@ Só alinhar decisões antes de planejar:
|
|
|
188
191
|
|
|
189
192
|
### Skills da cadeia
|
|
190
193
|
|
|
191
|
-
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`.
|
|
192
197
|
|
|
193
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`).
|
|
194
199
|
|
|
@@ -199,6 +204,7 @@ Além da cadeia automática, estas skills também podem ser chamadas diretamente
|
|
|
199
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.
|
|
200
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.
|
|
201
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.
|
|
202
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.
|
|
203
209
|
- `atlas-direct-execute` — executa diretamente quando o PRD já está maduro. Use quando você quer pular a fase de plan handoff.
|
|
204
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.
|
|
@@ -227,8 +233,8 @@ O validador frio (`atlas-task-validator`) **sempre** roda isolado e **sempre** c
|
|
|
227
233
|
| [`packages/`](packages/) | Skills, templates, MCP |
|
|
228
234
|
| [`agents/`](agents/) | Subagentes despachados (Claude): `atlas-task-validator`, `atlas-plan-execute`, `atlas-direct-execute`, `atlas-slice-review` |
|
|
229
235
|
| [`plugins/atlas-workflow-orchestrator/`](plugins/atlas-workflow-orchestrator/) | Catálogo Codex from-source (marketplace) |
|
|
230
|
-
| [`hosts/opencode/`](hosts/opencode/) · [`hosts/pi/`](hosts/pi/) | Catálogos from-source opencode/pi |
|
|
231
|
-
| [`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) |
|
|
232
238
|
| [`build/`](build/) | Gera `.plugin` em `dist/`, sincroniza catálogos, testes/smoke/conformance |
|
|
233
239
|
| [`CHANGELOG.md`](CHANGELOG.md) · [`PATCH_PROCEDURE.md`](PATCH_PROCEDURE.md) | Release e manutenção |
|
|
234
240
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.4
|
|
@@ -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: '.',
|
|
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: '.',
|
|
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: '.',
|
|
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.
|
|
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.
|
|
225
|
+
**Plugin version:** 0.9.4
|
|
226
226
|
**Author:** Paulo Borini
|
|
227
|
-
**Last updated:** 2026-06-
|
|
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".
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Despacho de sub-agent
|
|
2
2
|
|
|
3
|
-
Contrato host-agnóstico para Cursor, Codex e
|
|
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`
|
package/hosts/opencode/.opencode/atlas/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: atlas-workflow-orchestrator
|
|
3
|
-
description: "Orquestra pipeline completo de desenvolvimento de features: /workflow <mode> <input-type> [flags]. Automatiza PRD generation → validação → entrevista (se necessário) → planejamento → execução → review (opcional). Pipeline orientado a artefato com gates duros: cada fase só conta se produzir arquivo verificável em disco."
|
|
3
|
+
description: "Orquestra pipeline completo de desenvolvimento de features: /workflow <mode> <input-type> [flags]. Automatiza PRD generation → validação → entrevista (se necessário) → planejamento → execução → review (opcional) e oferece audit universal sem correção. Pipeline orientado a artefato com gates duros: cada fase só conta se produzir arquivo verificável em disco."
|
|
4
4
|
category: Development Automation
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,17 +13,18 @@ Orquestra pipelines de desenvolvimento de features no projeto Atlas, automatizan
|
|
|
13
13
|
## Sintaxe
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
/workflow <mode> <input-type> [flags]
|
|
16
|
+
/workflow <mode> <input-type|target> [flags]
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
### Modos
|
|
20
20
|
|
|
21
|
-
Três modos **canônicos de execução** — `full`, `direct`, `execute` (PRD §5 D1) — mais
|
|
21
|
+
Três modos **canônicos de execução** — `full`, `direct`, `execute` (PRD §5 D1) — mais os modos sem execução `interview-only` e `audit`.
|
|
22
22
|
|
|
23
23
|
- **`full`** — pipeline completo: PRD → validação → entrevista (se necessário) → **plano (artefato obrigatório)** → executor → review (opcional)
|
|
24
24
|
- **`direct`** — pipeline enxuto: PRD → validação → entrevista (se necessário) → `atlas-direct-execute` → review (opcional). **Não produz plano de handoff** — a diferença real para `full` é exatamente essa.
|
|
25
25
|
- **`execute`** — recebe um **`PLAN_*.md` pronto** e o executa **sem gerar plano** (PRD D1). Entrada = caminho de plano; reverifica o artefato + conformidade de template e despacha `plan_execute` direto. Não regera nem replaneja: ajustes de plano pedem `full`. `atlas_assert_after_plan` (gate pós-plano do `full`) **não se aplica** em `execute` — o plano já é o input; o equivalente é a reverificação na entrada (PRD D13). **Não há alias `plan`**: usar `plan` como modo é ambíguo com planejamento documental e deve ser rejeitado como modo inválido.
|
|
26
26
|
- **`interview-only`** — entrevista direta (ex: brainstorm, resolução de decisões). Entrevista **sem execução**: não usa `guarantee_level` no fluxo (não há execução de código a garantir). Permanece modo separado (PRD D2).
|
|
27
|
+
- **`audit`** — auditoria universal sem correção de código: lê target/boundary, regras locais e stack detectada; gera relatório de achados e, com `--handoff`, plano Atlas-style para correção futura. **Não executa plano, não chama executor e não altera código.**
|
|
27
28
|
|
|
28
29
|
### Input Types
|
|
29
30
|
|
|
@@ -31,11 +32,14 @@ Três modos **canônicos de execução** — `full`, `direct`, `execute` (PRD §
|
|
|
31
32
|
- **`idea`** — Indicação/brainstorm curto
|
|
32
33
|
- **`prd`** — Path para PRD existente ou nome do arquivo
|
|
33
34
|
- **`brainstorm`** — Texto livre (só para `interview-only`)
|
|
35
|
+
- **`target`** — Path/feature/módulo auditável (só para `audit`)
|
|
34
36
|
|
|
35
37
|
### Flags
|
|
36
38
|
|
|
37
39
|
- `--interview` — força entrevista de PRD mesmo sem ambiguidades detectadas
|
|
38
40
|
- `--review` — executa slice-review ao final (senão é opcional)
|
|
41
|
+
- `--handoff` — em `audit`, escreve plano Atlas-style em `.atlas/plans/` derivado dos achados evidenciados; não executa
|
|
42
|
+
- `--scope <descrição>` — em `audit`, restringe o boundary lógico dentro do target
|
|
39
43
|
- `--help` — mostra sintaxe completa
|
|
40
44
|
|
|
41
45
|
## Exemplos
|
|
@@ -55,6 +59,9 @@ Três modos **canônicos de execução** — `full`, `direct`, `execute` (PRD §
|
|
|
55
59
|
|
|
56
60
|
/workflow execute plan "/path/to/PLAN_S05_login.md"
|
|
57
61
|
→ Reverifica o plano (artifact + TC), executa direto via plan_execute + validador frio. Não gera plano.
|
|
62
|
+
|
|
63
|
+
/workflow audit "apps/mobile/lib/features/auth" --handoff
|
|
64
|
+
→ Audita somente o target informado contra regras locais + stack detectada + Ponytail pass; gera relatório e `PLAN_AUDIT_*.md` sem execução.
|
|
58
65
|
```
|
|
59
66
|
|
|
60
67
|
---
|
|
@@ -63,7 +70,7 @@ Três modos **canônicos de execução** — `full`, `direct`, `execute` (PRD §
|
|
|
63
70
|
|
|
64
71
|
Executar **antes** de iniciar o pipeline. Se qualquer item falhar, **parar e reportar** — nunca emular.
|
|
65
72
|
|
|
66
|
-
1. **Parse** dos argumentos `<mode> <input-type> [input] [flags]`. Se inválido ou `--help` → mostrar sintaxe e parar.
|
|
73
|
+
1. **Parse** dos argumentos `<mode> <input-type|target> [input] [flags]`. Se inválido ou `--help` → mostrar sintaxe e parar. Em `audit`, o segundo argumento é `target`, não `input-type`.
|
|
67
74
|
2. **Chamar MCP `atlas_ping`.** Se não responder, versão vier vazia, `version_check.status` vier bloqueado ou capacidades não listarem os gates exigidos pelo modo → abortar com erro de MCP indisponível/drift. Não seguir por prosa.
|
|
68
75
|
2a. **Chamar MCP `atlas_capabilities`.** Ler `host`, `subagent_dispatch`, `validator_dispatch`, `capabilities_flags` e `required_deps`. Determinar a **disponibilidade real** dos pré-requisitos essenciais neste host: o subagente do plugin é despachável? o MCP está vivo (ping ok)? Em hosts com `required_deps` (ex.: pi: `pi-mcp-adapter` + `pi-subagents`), confirmar que cada dep está presente; se faltar, o pré-requisito correspondente é `false`.
|
|
69
76
|
2b. **Chamar MCP `atlas_classify_input`** no input informado (`input_path`), **antes de rotear** (PRD D3/D6). `classify_input` é para **artefato em arquivo** (path em disco). A tool devolve `artifact_type` ∈ {`backlog`, `prd`, `plan`, `idea`, `unknown`} (verdade forte = TC de plano passa) e um `banner` de roteamento já pronto. **O tipo de input é fato e prevalece sobre o modo pedido** (intenção). Aplicar o roteamento:
|
|
@@ -88,9 +95,9 @@ Executar **antes** de iniciar o pipeline. Se qualquer item falhar, **parar e rep
|
|
|
88
95
|
Motivo: dependência de backlog não está `done`
|
|
89
96
|
Ação: executar <dep> antes de <id>
|
|
90
97
|
```
|
|
91
|
-
4. **Usar a cadeia única `atlas-*`.** Cliente (Claude Code, Cursor, Codex App) é host de execução, não família de skills. Não existe roteamento por cliente.
|
|
98
|
+
4. **Usar a cadeia única `atlas-*`.** Cliente (Claude Code, Cursor, Codex App, Antigravity, ZCode, OpenCode, Pi CLI) é host de execução, não família de skills. Não existe roteamento por cliente.
|
|
92
99
|
5. **Carregar defaults do pacote do plugin** (`defaults/paths.md` e `references/subagent_dispatch.md`). Não exigir config na raiz do repositório usuário.
|
|
93
|
-
6. **Verificar disponibilidade dos ids `atlas-*`.** Para cada skill exigida pelo modo, confirmar que o id exato é **invocável** no host. Para as skills de **execução/validação/review** (`plan_execute`, `direct_execute`, `task_validator`, `findings_repair`, `slice_review`), confirmar também que são **despacháveis pelo verbo nativo do host** — leia `atlas_capabilities.subagent_dispatch.mechanism` (não assuma "Agent tool"; no Codex é `spawn_agent(agent_type)`, no opencode `@<name>`, no pi `subagent({...})`). No Codex, `$<skill>` é ativação in-context de skill e **não** conta como sub-agent isolado para execução. Para as skills **documentais** (`prd_generator`, `prd_interview`, `plan_handoff`), basta invocabilidade no fio principal; não exigir despachabilidade como sub-agent.
|
|
100
|
+
6. **Verificar disponibilidade dos ids `atlas-*`.** Para cada skill exigida pelo modo, confirmar que o id exato é **invocável** no host. Para as skills de **execução/validação/review** (`plan_execute`, `direct_execute`, `task_validator`, `findings_repair`, `slice_review`), confirmar também que são **despacháveis pelo verbo nativo do host** — leia `atlas_capabilities.subagent_dispatch.mechanism` (não assuma "Agent tool"; no Codex é `spawn_agent(agent_type)`, no opencode `@<name>`, no pi `subagent({...})`, no ZCode e Claude é `Agent(subagent_type)`). No Codex, `$<skill>` é ativação in-context de skill e **não** conta como sub-agent isolado para execução. Para as skills **documentais/de leitura** (`prd_generator`, `prd_interview`, `plan_handoff`, `audit`), basta invocabilidade no fio principal; não exigir despachabilidade como sub-agent.
|
|
94
101
|
- **Skill ausente é bloqueio** (Gate G10): não substitua por skill nativa, variante antiga ou prompt inline.
|
|
95
102
|
- **Conflito plugin × skill nativa:** use somente o id exato retornado pelo preflight. Se o host não permitir comprovar que a skill vem do plugin esperado, aborte e peça remoção/desativação manual da nativa; não resolva por tentativa silenciosa.
|
|
96
103
|
- **Nunca substituir por variante de executor** (Gate G10).
|
|
@@ -102,7 +109,7 @@ Executar **antes** de iniciar o pipeline. Se qualquer item falhar, **parar e rep
|
|
|
102
109
|
Ação: instalar/ativar o plugin ou corrigir o pacote atlas-* disponível no host
|
|
103
110
|
```
|
|
104
111
|
**PROIBIDO o fallback "implementação direta" / "contratos equivalentes inline".** Não existe caminho onde o orquestrador faz plano ou código no próprio fio. Emulação inline e fallback direto são a falha-raiz que esta skill proíbe — se não há sub-agent, **para**. (Gate G7.)
|
|
105
|
-
8. **Rejeitar conflito de modo:** se o pedido tiver `full`/`direct` junto com "sem patch", "sem editar código", "planejamento apenas", "handoff only" ou equivalente, **pare antes de gerar artefatos**. `full` executa `atlas-plan-execute`; `direct` executa `atlas-direct-execute`; não existe interpretação plan-only implícita.
|
|
112
|
+
8. **Rejeitar conflito de modo:** se o pedido tiver `full`/`direct` junto com "sem patch", "sem editar código", "planejamento apenas", "handoff only" ou equivalente, **pare antes de gerar artefatos**. `full` executa `atlas-plan-execute`; `direct` executa `atlas-direct-execute`; não existe interpretação plan-only implícita. Se o usuário quer diagnóstico sem patch, o modo correto é `audit`.
|
|
106
113
|
9. **Declarar o plano de execução** (1 bloco curto): `run_id`, modo, **ids exatos de cada sub-agent**, sequência de fases, artefatos esperados e tools MCP que sustentarão cada gate. Só então iniciar a Fase 1.
|
|
107
114
|
|
|
108
115
|
---
|
|
@@ -113,7 +120,7 @@ O pipeline é **fire-and-continue**: uma vez iniciado, o orquestrador avança fa
|
|
|
113
120
|
|
|
114
121
|
**Proibido (regressão, PRD §6):**
|
|
115
122
|
- Pedir confirmação para avançar: "Quer que eu gere o PRD?", "posso seguir?", "continuo?", "devo despachar o executor?". A resposta é sempre sim — **execute**. Se a próxima fase tem artefato a produzir, produza.
|
|
116
|
-
- Inventar modo fora do contrato. **Não existe "Modo Discussão", "modo análise", "dry-run"** ou similar. Os únicos modos são `full`/`direct`/`execute`/`interview-only`. Pedido em linguagem natural que nomeia um modo (ex.: "atlas full backlog s40") **executa esse modo** — não vira pergunta nem resumo passivo.
|
|
123
|
+
- Inventar modo fora do contrato. **Não existe "Modo Discussão", "modo análise", "dry-run"** ou similar. Os únicos modos são `full`/`direct`/`execute`/`interview-only`/`audit`. Pedido em linguagem natural que nomeia um modo (ex.: "atlas full backlog s40") **executa esse modo** — não vira pergunta nem resumo passivo.
|
|
117
124
|
- Parar por decisão em aberto. Decisão pendente de **qualquer fonte** (scan de PRD, entrevista, `PERGUNTAS_EM_ABERTO.md`, doc de discussão/decisões como `DISCUSSAO_*.md`, ou o próprio backlog) **não é blockage**: gera o PRD se ainda não existe, dispara `atlas-prd-interview` sobre ele, propaga e **continua**. Nunca oferecer "responda só: seguir com recomendação ou D=...". Ver "Decisão em aberto ≠ parada".
|
|
118
125
|
|
|
119
126
|
**PRD ausente em `full`/`direct`** = o passo "Generate PRD" **gera o PRD automaticamente** (invoca o id resolvido para `prd_generator` / autoria documental no fio principal). Nunca perguntar "quer que eu gere?".
|
|
@@ -138,8 +145,10 @@ O **mecanismo** varia por host — leia `subagent_dispatch.mechanism`, `.example
|
|
|
138
145
|
|
|
139
146
|
- **claude:** `Agent(subagent_type: "atlas-<exec>", prompt: ...)`
|
|
140
147
|
- **codex:** `spawn_agent(agent_type: "atlas-<exec>", items: [{ type: "text", text: "<state_path ou task>" }])` (custom agent nativo em `CODEX_HOME/agents/atlas-<exec>.toml`; `.codex/agents/` do bundle é gerado). `$atlas-*` sozinho **não** isola contexto — use `spawn_agent`.
|
|
148
|
+
- **zcode:** `Agent(subagent_type: "atlas-<exec>", prompt: "<state_path>")` (Claude Agent SDK — mesmo verbo de Claude, formato `agents/<name>.md` no plugin root; `ZCODE_PLUGIN_ROOT` injetado pelo host)
|
|
141
149
|
- **opencode:** `@atlas-<exec>` (ou auto por description)
|
|
142
150
|
- **pi:** `subagent({ agent: "atlas-<exec>", task, context: "fresh" })`
|
|
151
|
+
- **antigravity:** `define_subagent(name, system_prompt)` + `invoke_subagent(Subagents: [{TypeName, Role, Prompt, Workspace}])`
|
|
143
152
|
- **generic:** subagente nativo do host
|
|
144
153
|
|
|
145
154
|
> Ausência de "Agent tool" (host ≠ Claude) **não** é licença pra executar inline — é sinal pra usar o verbo daquele host (Gate G9, qualquer host). Host sem mecanismo de sub-agent já abortou em PREREQ; você nunca chega aqui sem isolamento.
|
|
@@ -184,7 +193,7 @@ Regras inegociáveis. Violação = parar, não contornar.
|
|
|
184
193
|
|
|
185
194
|
### [EXEC] — passo comum de execução + validação
|
|
186
195
|
|
|
187
|
-
`atlas_lock_dispatch(action=start, phase=plan_execute)` em todos os modos; despachar como sub-agent blocking o `routing.executor_skill` devolvido pelo preflight: `atlas-plan-execute` em `full`/`execute`, `atlas-direct-execute` em `direct`. O executor emite checkpoints G12; sem retorno/progresso, chamar `atlas_lock_dispatch(action=status, phase=plan_execute)` e tratar `executor_bootstrap_timeout`/`executor_progress_timeout` como `stalled`/retry — nunca como execução em andamento. O executor retorna `validator_handoff_required` com `state_path`; o MCP só abre o slot após o checkpoint `state_path_created` para esse mesmo `state_path`. Validação sempre **sibling**: `atlas_lock_validator(action=start)`, despachar **um** `task_validator`, exigir no output o `dispatch_token` do slot e fechar com `validator_run_id` + `dispatch_token`. Em `fail`: `repair_start`, despachar `atlas-findings-repair` com `{state_path, findings, validator_attempt, repair_run_id, repair_budget: 1}`, exigir atualização do mesmo `state_path`, fechar com `repair_run_id` e rodar o **2º e último** validator. `passed`/`passed_with_observations` são terminais aprovados; status diferente bloqueia review e output completed.
|
|
196
|
+
`atlas_lock_dispatch(action=start, phase=plan_execute)` em todos os modos; despachar como sub-agent blocking o `routing.executor_skill` devolvido pelo preflight: `atlas-plan-execute` em `full`/`execute`, `atlas-direct-execute` em `direct`. O executor emite checkpoints G12; sem retorno/progresso, chamar `atlas_lock_dispatch(action=status, phase=plan_execute)` e tratar `executor_bootstrap_timeout`/`executor_progress_timeout` como `stalled`/retry — nunca como execução em andamento. O executor retorna `validator_handoff_required` com `state_path`; o MCP só abre o slot após o checkpoint `state_path_created` para esse mesmo `state_path`. Validação sempre **sibling**: `atlas_lock_validator(action=start)`, despachar **um** `task_validator`, exigir no output o `dispatch_token` do slot e fechar com `validator_run_id` + `dispatch_token`. Se o output do validator for persistido em arquivo (`validator-output.json` ou equivalente), passar `validator_output_path` no `atlas_lock_validator(action=complete)` ou validar o arquivo com `atlas_verify_artifact(artifact_kind=json)` antes de declarar closure; JSON inválido bloqueia. Em `fail`: `repair_start`, despachar `atlas-findings-repair` com `{state_path, findings, validator_attempt, repair_run_id, repair_budget: 1}`, exigir atualização do mesmo `state_path`, fechar com `repair_run_id` e rodar o **2º e último** validator. `passed`/`passed_with_observations` são terminais aprovados; status diferente bloqueia review e output completed.
|
|
188
197
|
|
|
189
198
|
### Full mode
|
|
190
199
|
|
|
@@ -233,6 +242,16 @@ Entrada: um **`PLAN_*.md` pronto**. Artefatos esperados: (plano já existe) →
|
|
|
233
242
|
|
|
234
243
|
> `interview-only` é entrevista **sem execução**: não há fase `plan_execute` nem `guarantee_level` no fluxo (nada de código a garantir). A autoria do esboço é documental e livre.
|
|
235
244
|
|
|
245
|
+
### Audit mode
|
|
246
|
+
|
|
247
|
+
Entrada: um `target` auditável, com flags opcionais `--handoff` e `--scope <descrição>`. Artefatos esperados: relatório de auditoria em resposta; se `--handoff`, plano Atlas-style salvo em `.atlas/plans/PLAN_AUDIT_<slug>.md`. **Não há execução, `plan_execute`, validator, repair, review nem `guarantee_level`.**
|
|
248
|
+
|
|
249
|
+
1. **Parse / target** — resolver target real em disco. Se o target não for localizável, parar com pedido objetivo de path/boundary.
|
|
250
|
+
2. **Pré-flight leve** — `atlas_ping` → `atlas_capabilities` → `atlas_preflight(mode=audit)` para travar versão/família `atlas-*`. Não chamar `atlas_classify_input`: audit não roteia input para execução.
|
|
251
|
+
3. **Invocar `atlas-audit` no fio principal** — carregar o `SKILL.md` real, auditar só o boundary informado, ler regras locais, detectar stack por manifests/configs/comandos reais, aplicar checklist universal e Ponytail pass final.
|
|
252
|
+
4. **Output** — relatório com stack detectada, regras consultadas, boundary, achados P0/P1/P2/P3 com `arquivo:linha`, gaps por área e limitações.
|
|
253
|
+
5. **Handoff opcional** — se `--handoff`, escrever `PLAN_AUDIT_*.md` **conforme ao `PLAN_TEMPLATE.md`** (cabeçalho com linha `| **PRD** | N/A — origem auditoria |`, ref a `BOUNDARY_PRD_PLAN.md`, §1–§6/§8, tasks `#### T01.`), derivado somente dos achados evidenciados — passa no gate TC e é consumível por `/workflow execute plan`. Reportar o path e **parar aqui. Não chamar executor automaticamente.**
|
|
254
|
+
|
|
236
255
|
---
|
|
237
256
|
|
|
238
257
|
## Validação automática de PRD
|
|
@@ -330,7 +349,7 @@ Se `full` gerou `PLAN_*.md` mas não despachou `plan_execute`, o cabeçalho deve
|
|
|
330
349
|
|
|
331
350
|
## Skills envolvidas
|
|
332
351
|
|
|
333
|
-
`atlas-backlog-generator` aparece apenas para descoberta do catálogo: é **explicit-only** e nunca integra `full`/`direct`/`execute`/`interview-only`. A cadeia automática começa em PRD/input já fornecido.
|
|
352
|
+
`atlas-backlog-generator` aparece apenas para descoberta do catálogo: é **explicit-only** e nunca integra `full`/`direct`/`execute`/`interview-only`/`audit`. A cadeia automática começa em PRD/input já fornecido.
|
|
334
353
|
|
|
335
354
|
| Skill | Entrada | Saída (artefato) |
|
|
336
355
|
|-------|---------|------------------|
|
|
@@ -338,6 +357,7 @@ Se `full` gerou `PLAN_*.md` mas não despachou `plan_execute`, o cabeçalho deve
|
|
|
338
357
|
| `atlas-sprint-prd-generator` | sprint_id/indicação | `PRD_*.md`, decisions_found |
|
|
339
358
|
| `atlas-prd-interview` | prd_path, ambiguities | `PRD_*.md` atualizado, decisions |
|
|
340
359
|
| `atlas-plan-handoff` | prd_path | `PLAN_*.md` |
|
|
360
|
+
| `atlas-audit` | target, flags (`--handoff`, `--scope`) | relatório de auditoria; `.atlas/plans/PLAN_AUDIT_*.md` opcional sem execução |
|
|
341
361
|
| `atlas-plan-execute` | plan_path (`full` / `execute`) | diff de código, evidência, `state_path` |
|
|
342
362
|
| `atlas-direct-execute` | prd_path/spec/task (`direct`) | diff de código, evidência, `state_path` |
|
|
343
363
|
| `atlas-slice-review` | diff/output | review_feedback |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Atlas Workflow MCP Server
|
|
2
2
|
|
|
3
|
-
Servidor MCP do plugin Atlas Workflow v0.9.
|
|
3
|
+
Servidor MCP do plugin Atlas Workflow v0.9.4.
|
|
4
4
|
|
|
5
5
|
## Tools
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ Servidor MCP do plugin Atlas Workflow v0.9.3.
|
|
|
11
11
|
- `atlas_verify_artifact`: Gate G1; verifica se artefato obrigatório existe e é legível (`artifact_kind` opcional para banner correto).
|
|
12
12
|
- `atlas_verify_template_conformance`: Gate TC; PRD/PLAN só avançam com template conforme e `pending_count: 0`.
|
|
13
13
|
- `atlas_scan_prd`: Gate G5; escaneia PRD por padrões determinísticos de ambiguidade bloqueante.
|
|
14
|
-
- `atlas_preflight`: Gate G10; valida modo, versão, lock ativo e mapa oficial de skills atlas
|
|
14
|
+
- `atlas_preflight`: Gate G10; valida modo, versão, lock ativo e mapa oficial de skills atlas-*; `guarantee_level` só aparece em modos com execução.
|
|
15
15
|
- `atlas_lock_dispatch`: Gates G7/G8/G12; controla fase ativa, checkpoints de liveness do executor, ordem de dispatch e validator antes de review (`state_path_created` exige `state_path` legível).
|
|
16
16
|
- `atlas_lock_validator`: Gate G4 sibling; um validator por vez, `dispatch_token` obrigatório, máximo de 2 attempts, repair obrigatório entre fail e retry, proof-of-work (challenge sha256 do boundary recomputado no complete; re-dispatch bounded → `challenge_exhausted`).
|
|
17
17
|
- `atlas_assert_after_plan`: Gate G11; bloqueia encerramento prematuro do modo full após plano validado.
|
|
@@ -64,11 +64,12 @@ const WORKFLOW_CONFIG = {
|
|
|
64
64
|
plan_handoff: 'atlas-plan-handoff',
|
|
65
65
|
plan_execute: 'atlas-plan-execute',
|
|
66
66
|
direct_execute: 'atlas-direct-execute',
|
|
67
|
+
audit: 'atlas-audit',
|
|
67
68
|
findings_repair: 'atlas-findings-repair',
|
|
68
69
|
slice_review: 'atlas-slice-review',
|
|
69
70
|
task_validator: 'atlas-task-validator',
|
|
70
71
|
},
|
|
71
|
-
modes: ['full', 'direct', 'execute', 'interview-only', 'interview_only'],
|
|
72
|
+
modes: ['full', 'direct', 'execute', 'interview-only', 'interview_only', 'audit'],
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
const VALIDATOR_MAX_ATTEMPTS = 2;
|
|
@@ -104,7 +105,7 @@ function repairRunId(runId, attempt, timestamp) {
|
|
|
104
105
|
// pipelines completas (full/direct/execute) declaram full_pipeline; uso avulso
|
|
105
106
|
// documental/leitura declara reduced_standalone (fora do escopo desta camada).
|
|
106
107
|
// Data-driven: rota → nível, sem ramo solto. Modos sem execução de código
|
|
107
|
-
// (interview-only) NÃO declaram guarantee_level (não há execução a garantir):
|
|
108
|
+
// (interview-only/audit) NÃO declaram guarantee_level (não há execução a garantir):
|
|
108
109
|
// guaranteeLevelForMode devolve null e o campo é OMITIDO do output (PRD D2/D12).
|
|
109
110
|
const GUARANTEE_LEVELS = ['full_pipeline', 'reduced_standalone'];
|
|
110
111
|
const MODE_GUARANTEE_LEVEL = {
|
|
@@ -1160,6 +1161,16 @@ function runState(args = {}) {
|
|
|
1160
1161
|
throw rpcError(-32602, `Ação inválida para atlas_run_state: ${action}`);
|
|
1161
1162
|
}
|
|
1162
1163
|
|
|
1164
|
+
function validateJsonArtifactFile(absolutePath) {
|
|
1165
|
+
try {
|
|
1166
|
+
const content = fs.readFileSync(absolutePath, 'utf8');
|
|
1167
|
+
const parsed = JSON.parse(content);
|
|
1168
|
+
return { ok: true, parsed_type: Array.isArray(parsed) ? 'array' : typeof parsed };
|
|
1169
|
+
} catch (error) {
|
|
1170
|
+
return { ok: false, error: error.message };
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1163
1174
|
function verifyArtifact(args = {}) {
|
|
1164
1175
|
const runId = validateRunId(args.run_id);
|
|
1165
1176
|
const artifactPath = requiredString(args, 'artifact_path');
|
|
@@ -1172,7 +1183,9 @@ function verifyArtifact(args = {}) {
|
|
|
1172
1183
|
const artifactKind = optionalString(args, 'artifact_kind');
|
|
1173
1184
|
const okBanner = artifactKind === 'prd'
|
|
1174
1185
|
? renderBanner('prd_ok', {})
|
|
1175
|
-
:
|
|
1186
|
+
: artifactKind === 'json'
|
|
1187
|
+
? renderBanner('validacao', { status: 'json_ok' })
|
|
1188
|
+
: renderBanner('plano', {});
|
|
1176
1189
|
let result;
|
|
1177
1190
|
|
|
1178
1191
|
try {
|
|
@@ -1189,15 +1202,43 @@ function verifyArtifact(args = {}) {
|
|
|
1189
1202
|
};
|
|
1190
1203
|
} else {
|
|
1191
1204
|
fs.accessSync(absolutePath, fs.constants.R_OK);
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1205
|
+
if (artifactKind === 'json') {
|
|
1206
|
+
const jsonCheck = validateJsonArtifactFile(absolutePath);
|
|
1207
|
+
if (!jsonCheck.ok) {
|
|
1208
|
+
result = {
|
|
1209
|
+
gate: 'G1',
|
|
1210
|
+
status: 'blocked',
|
|
1211
|
+
artifact_path: artifactPath,
|
|
1212
|
+
bytes: stat.size,
|
|
1213
|
+
timestamp,
|
|
1214
|
+
banner: renderBanner('preflight_fail', { motivo: `json inválido: ${artifactPath}` }),
|
|
1215
|
+
error: `Artefato JSON inválido: ${artifactPath}`,
|
|
1216
|
+
cause: jsonCheck.error,
|
|
1217
|
+
next_action: 'corrigir_json_ou_regenerar_por_serializer',
|
|
1218
|
+
};
|
|
1219
|
+
} else {
|
|
1220
|
+
result = {
|
|
1221
|
+
gate: 'G1',
|
|
1222
|
+
status: 'passed',
|
|
1223
|
+
artifact_path: artifactPath,
|
|
1224
|
+
bytes: stat.size,
|
|
1225
|
+
parsed_type: jsonCheck.parsed_type,
|
|
1226
|
+
timestamp,
|
|
1227
|
+
banner: okBanner,
|
|
1228
|
+
next_action: 'avançar',
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
} else {
|
|
1232
|
+
result = {
|
|
1233
|
+
gate: 'G1',
|
|
1234
|
+
status: 'passed',
|
|
1235
|
+
artifact_path: artifactPath,
|
|
1236
|
+
bytes: stat.size,
|
|
1237
|
+
timestamp,
|
|
1238
|
+
banner: okBanner,
|
|
1239
|
+
next_action: 'avançar',
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1201
1242
|
}
|
|
1202
1243
|
} catch (error) {
|
|
1203
1244
|
result = {
|
|
@@ -1819,6 +1860,7 @@ function expectedNextPhase(routing, dispatch) {
|
|
|
1819
1860
|
if (routing.mode === 'full') return 'plan_handoff';
|
|
1820
1861
|
if (routing.mode === 'direct') return 'plan_execute';
|
|
1821
1862
|
if (routing.mode === 'execute') return 'plan_execute';
|
|
1863
|
+
if (routing.mode === 'audit') return 'audit_report';
|
|
1822
1864
|
return 'prd_interview';
|
|
1823
1865
|
}
|
|
1824
1866
|
|
|
@@ -2764,6 +2806,7 @@ function validatorComplete(args, context) {
|
|
|
2764
2806
|
// validator. Sem token não existe garantia anti-stale completa.
|
|
2765
2807
|
const dispatchToken = optionalInteger(args, 'dispatch_token');
|
|
2766
2808
|
const challengeResponse = optionalString(args, 'challenge_response');
|
|
2809
|
+
const validatorOutputPath = optionalString(args, 'validator_output_path');
|
|
2767
2810
|
|
|
2768
2811
|
if (!cycle.active) {
|
|
2769
2812
|
// S10: slot já fechado. Distinguir retorno duplicado já aplicado (idempotente
|
|
@@ -2934,6 +2977,28 @@ function validatorComplete(args, context) {
|
|
|
2934
2977
|
}
|
|
2935
2978
|
const challengeVerified = !cycle.active.challenge ? 'no_challenge' : 'verified';
|
|
2936
2979
|
|
|
2980
|
+
if (validatorOutputPath) {
|
|
2981
|
+
const outputPath = resolveConsumerPath(validatorOutputPath, args);
|
|
2982
|
+
const jsonCheck = validateJsonArtifactFile(outputPath);
|
|
2983
|
+
if (!jsonCheck.ok) {
|
|
2984
|
+
return {
|
|
2985
|
+
gate: 'G4',
|
|
2986
|
+
action: 'complete',
|
|
2987
|
+
status: 'blocked',
|
|
2988
|
+
timestamp,
|
|
2989
|
+
validator_attempt: cycle.active.attempt,
|
|
2990
|
+
validator_run_id: activeValidatorRunId,
|
|
2991
|
+
state_path: statePathValue,
|
|
2992
|
+
validator_output_path: validatorOutputPath,
|
|
2993
|
+
validator_status: 'invalid_validator_output_json',
|
|
2994
|
+
error: `Output JSON do validator inválido: ${validatorOutputPath}`,
|
|
2995
|
+
cause: jsonCheck.error,
|
|
2996
|
+
impact: 'relatorio_do_validador_nao_e_parseavel_como_json_confiavel',
|
|
2997
|
+
next_action: 'regenerar_validator_output_json_por_serializer_e_reenviar_complete',
|
|
2998
|
+
};
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
|
|
2937
3002
|
if (packetResult.violations.length > 0) {
|
|
2938
3003
|
return {
|
|
2939
3004
|
gate: 'G4', action: 'complete', status: 'blocked', timestamp,
|
|
@@ -3605,7 +3670,7 @@ function toolsList() {
|
|
|
3605
3670
|
run_id: { type: 'string', minLength: 1 },
|
|
3606
3671
|
project_root: { type: 'string', minLength: 1 },
|
|
3607
3672
|
artifact_path: { type: 'string', minLength: 1 },
|
|
3608
|
-
artifact_kind: { enum: ['prd', 'plan'] },
|
|
3673
|
+
artifact_kind: { enum: ['prd', 'plan', 'json'] },
|
|
3609
3674
|
},
|
|
3610
3675
|
},
|
|
3611
3676
|
},
|
|
@@ -3655,7 +3720,7 @@ function toolsList() {
|
|
|
3655
3720
|
},
|
|
3656
3721
|
{
|
|
3657
3722
|
name: 'atlas_preflight',
|
|
3658
|
-
description: 'Gate PREREQ+G10: hard-fail de pré-requisitos de determinismo (subagente/MCP do host, DEC-004), depois valida modo, versão e lock ativo, travando a rota da run. Output declara guarantee_level
|
|
3723
|
+
description: 'Gate PREREQ+G10: hard-fail de pré-requisitos de determinismo (subagente/MCP do host, DEC-004), depois valida modo, versão e lock ativo, travando a rota da run. Output declara guarantee_level só em modos com execução.',
|
|
3659
3724
|
inputSchema: {
|
|
3660
3725
|
type: 'object',
|
|
3661
3726
|
additionalProperties: false,
|
|
@@ -3724,6 +3789,7 @@ function toolsList() {
|
|
|
3724
3789
|
repair_run_id: { type: 'string' },
|
|
3725
3790
|
dispatch_token: { type: 'integer' },
|
|
3726
3791
|
challenge_response: { type: 'string' },
|
|
3792
|
+
validator_output_path: { type: 'string' },
|
|
3727
3793
|
verdict: { type: 'string', enum: ['pass', 'pass_with_observations', 'fail'] },
|
|
3728
3794
|
data: { type: 'object', additionalProperties: true },
|
|
3729
3795
|
host: { type: 'string', enum: HOST_NAMES },
|