atlas-workflow 0.8.2
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/LICENSE +21 -0
- package/README.md +235 -0
- package/VERSION +1 -0
- package/build/cli/atlas-init.mjs +590 -0
- package/hosts/opencode/.opencode/agents/atlas-direct-execute.md +31 -0
- package/hosts/opencode/.opencode/agents/atlas-findings-repair.md +35 -0
- package/hosts/opencode/.opencode/agents/atlas-plan-execute.md +33 -0
- package/hosts/opencode/.opencode/agents/atlas-slice-review.md +27 -0
- package/hosts/opencode/.opencode/agents/atlas-task-validator.md +121 -0
- package/hosts/opencode/.opencode/atlas/VERSION +1 -0
- package/hosts/opencode/.opencode/atlas/orchestrator/README.md +261 -0
- package/hosts/opencode/.opencode/atlas/orchestrator/commands/workflow.md +37 -0
- package/hosts/opencode/.opencode/atlas/orchestrator/defaults/paths.md +21 -0
- package/hosts/opencode/.opencode/atlas/orchestrator/references/host-adapters.md +104 -0
- package/hosts/opencode/.opencode/atlas/orchestrator/references/qa_s13_matrix.md +141 -0
- package/hosts/opencode/.opencode/atlas/orchestrator/references/subagent_dispatch.md +42 -0
- package/hosts/opencode/.opencode/atlas/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +412 -0
- package/hosts/opencode/.opencode/atlas/packages/mcp-server/README.md +28 -0
- package/hosts/opencode/.opencode/atlas/packages/mcp-server/package.json +15 -0
- package/hosts/opencode/.opencode/atlas/packages/mcp-server/server.js +3076 -0
- package/hosts/opencode/.opencode/atlas/packages/templates/BACKLOG_MESTRE_TEMPLATE.md +844 -0
- package/hosts/opencode/.opencode/atlas/packages/templates/BOUNDARY_PRD_PLAN.md +93 -0
- package/hosts/opencode/.opencode/atlas/packages/templates/PERGUNTAS_EM_ABERTO_TEMPLATE.md +139 -0
- package/hosts/opencode/.opencode/atlas/packages/templates/PLAN_TEMPLATE.md +146 -0
- package/hosts/opencode/.opencode/atlas/packages/templates/PRD_TEMPLATE.md +149 -0
- package/hosts/opencode/.opencode/atlas/packages/templates/STATE_FILE_SCHEMA.md +32 -0
- package/hosts/opencode/.opencode/skills/atlas-backlog-generator/SKILL.md +88 -0
- package/hosts/opencode/.opencode/skills/atlas-backlog-generator/agents/openai.yaml +4 -0
- package/hosts/opencode/.opencode/skills/atlas-direct-execute/SKILL.md +186 -0
- package/hosts/opencode/.opencode/skills/atlas-direct-execute/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-findings-repair/SKILL.md +148 -0
- package/hosts/opencode/.opencode/skills/atlas-findings-repair/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-execute/SKILL.md +129 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-execute/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-execute/references/plan-contract.md +88 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-execute/references/quality-gates.md +60 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-execute/scripts/check_budget_state.py +96 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-execute/scripts/extract_plan_contract.py +191 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-execute/scripts/validate_gate_result.py +56 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-handoff/SKILL.md +181 -0
- package/hosts/opencode/.opencode/skills/atlas-plan-handoff/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-prd-interview/SKILL.md +77 -0
- package/hosts/opencode/.opencode/skills/atlas-prd-interview/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-slice-review/SKILL.md +121 -0
- package/hosts/opencode/.opencode/skills/atlas-slice-review/agents/openai.yaml +4 -0
- package/hosts/opencode/.opencode/skills/atlas-slice-review/references/review-contract.md +58 -0
- package/hosts/opencode/.opencode/skills/atlas-slice-review/references/scenario-lenses.md +49 -0
- package/hosts/opencode/.opencode/skills/atlas-slice-review/scripts/classify_findings.py +56 -0
- package/hosts/opencode/.opencode/skills/atlas-slice-review/scripts/extract_review_slice.py +158 -0
- package/hosts/opencode/.opencode/skills/atlas-sprint-prd-generator/SKILL.md +74 -0
- package/hosts/opencode/.opencode/skills/atlas-sprint-prd-generator/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-task-validator/SKILL.md +158 -0
- package/hosts/opencode/.opencode/skills/atlas-task-validator/agents/openai.yaml +7 -0
- package/hosts/opencode/.opencode/skills/atlas-workflow-orchestrator/SKILL.md +412 -0
- package/hosts/opencode/opencode.json +13 -0
- package/hosts/pi/.mcp.json +11 -0
- package/hosts/pi/.pi/agents/atlas-direct-execute.md +218 -0
- package/hosts/pi/.pi/agents/atlas-findings-repair.md +184 -0
- package/hosts/pi/.pi/agents/atlas-plan-execute.md +163 -0
- package/hosts/pi/.pi/agents/atlas-slice-review.md +149 -0
- package/hosts/pi/.pi/agents/atlas-task-validator.md +121 -0
- package/hosts/pi/atlas/VERSION +1 -0
- package/hosts/pi/atlas/orchestrator/README.md +261 -0
- package/hosts/pi/atlas/orchestrator/commands/workflow.md +37 -0
- package/hosts/pi/atlas/orchestrator/defaults/paths.md +21 -0
- package/hosts/pi/atlas/orchestrator/references/host-adapters.md +104 -0
- package/hosts/pi/atlas/orchestrator/references/qa_s13_matrix.md +141 -0
- package/hosts/pi/atlas/orchestrator/references/subagent_dispatch.md +42 -0
- package/hosts/pi/atlas/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +412 -0
- package/hosts/pi/atlas/packages/mcp-server/README.md +28 -0
- package/hosts/pi/atlas/packages/mcp-server/package.json +15 -0
- package/hosts/pi/atlas/packages/mcp-server/server.js +3076 -0
- package/hosts/pi/atlas/packages/templates/BACKLOG_MESTRE_TEMPLATE.md +844 -0
- package/hosts/pi/atlas/packages/templates/BOUNDARY_PRD_PLAN.md +93 -0
- package/hosts/pi/atlas/packages/templates/PERGUNTAS_EM_ABERTO_TEMPLATE.md +139 -0
- package/hosts/pi/atlas/packages/templates/PLAN_TEMPLATE.md +146 -0
- package/hosts/pi/atlas/packages/templates/PRD_TEMPLATE.md +149 -0
- package/hosts/pi/atlas/packages/templates/STATE_FILE_SCHEMA.md +32 -0
- package/hosts/pi/skills/atlas-backlog-generator/SKILL.md +88 -0
- package/hosts/pi/skills/atlas-backlog-generator/agents/openai.yaml +4 -0
- package/hosts/pi/skills/atlas-direct-execute/SKILL.md +186 -0
- package/hosts/pi/skills/atlas-direct-execute/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-findings-repair/SKILL.md +148 -0
- package/hosts/pi/skills/atlas-findings-repair/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-plan-execute/SKILL.md +129 -0
- package/hosts/pi/skills/atlas-plan-execute/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-plan-execute/references/plan-contract.md +88 -0
- package/hosts/pi/skills/atlas-plan-execute/references/quality-gates.md +60 -0
- package/hosts/pi/skills/atlas-plan-execute/scripts/check_budget_state.py +96 -0
- package/hosts/pi/skills/atlas-plan-execute/scripts/extract_plan_contract.py +191 -0
- package/hosts/pi/skills/atlas-plan-execute/scripts/validate_gate_result.py +56 -0
- package/hosts/pi/skills/atlas-plan-handoff/SKILL.md +181 -0
- package/hosts/pi/skills/atlas-plan-handoff/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-prd-interview/SKILL.md +77 -0
- package/hosts/pi/skills/atlas-prd-interview/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-slice-review/SKILL.md +121 -0
- package/hosts/pi/skills/atlas-slice-review/agents/openai.yaml +4 -0
- package/hosts/pi/skills/atlas-slice-review/references/review-contract.md +58 -0
- package/hosts/pi/skills/atlas-slice-review/references/scenario-lenses.md +49 -0
- package/hosts/pi/skills/atlas-slice-review/scripts/classify_findings.py +56 -0
- package/hosts/pi/skills/atlas-slice-review/scripts/extract_review_slice.py +158 -0
- package/hosts/pi/skills/atlas-sprint-prd-generator/SKILL.md +74 -0
- package/hosts/pi/skills/atlas-sprint-prd-generator/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-task-validator/SKILL.md +158 -0
- package/hosts/pi/skills/atlas-task-validator/agents/openai.yaml +7 -0
- package/hosts/pi/skills/atlas-workflow-orchestrator/SKILL.md +412 -0
- package/package.json +17 -0
- package/plugins/atlas-workflow-orchestrator/.codex/agents/atlas-direct-execute.toml +3 -0
- package/plugins/atlas-workflow-orchestrator/.codex/agents/atlas-findings-repair.toml +3 -0
- package/plugins/atlas-workflow-orchestrator/.codex/agents/atlas-plan-execute.toml +3 -0
- package/plugins/atlas-workflow-orchestrator/.codex/agents/atlas-slice-review.toml +3 -0
- package/plugins/atlas-workflow-orchestrator/.codex/agents/atlas-task-validator.toml +5 -0
- package/plugins/atlas-workflow-orchestrator/.codex-plugin/plugin.json +37 -0
- package/plugins/atlas-workflow-orchestrator/.mcp.json +12 -0
- package/plugins/atlas-workflow-orchestrator/VERSION +1 -0
- package/plugins/atlas-workflow-orchestrator/agents/atlas-direct-execute.md +31 -0
- package/plugins/atlas-workflow-orchestrator/agents/atlas-findings-repair.md +35 -0
- package/plugins/atlas-workflow-orchestrator/agents/atlas-plan-execute.md +33 -0
- package/plugins/atlas-workflow-orchestrator/agents/atlas-slice-review.md +27 -0
- package/plugins/atlas-workflow-orchestrator/agents/atlas-task-validator.md +123 -0
- package/plugins/atlas-workflow-orchestrator/orchestrator/README.md +261 -0
- package/plugins/atlas-workflow-orchestrator/orchestrator/commands/workflow.md +37 -0
- package/plugins/atlas-workflow-orchestrator/orchestrator/defaults/paths.md +21 -0
- package/plugins/atlas-workflow-orchestrator/orchestrator/references/host-adapters.md +104 -0
- package/plugins/atlas-workflow-orchestrator/orchestrator/references/qa_s13_matrix.md +141 -0
- package/plugins/atlas-workflow-orchestrator/orchestrator/references/subagent_dispatch.md +42 -0
- package/plugins/atlas-workflow-orchestrator/orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +412 -0
- package/plugins/atlas-workflow-orchestrator/packages/mcp-server/README.md +28 -0
- package/plugins/atlas-workflow-orchestrator/packages/mcp-server/package.json +15 -0
- package/plugins/atlas-workflow-orchestrator/packages/mcp-server/server.js +3076 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-backlog-generator/SKILL.md +88 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-backlog-generator/agents/openai.yaml +4 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-direct-execute/SKILL.md +186 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-direct-execute/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-findings-repair/SKILL.md +148 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-findings-repair/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-execute/SKILL.md +129 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-execute/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-execute/references/plan-contract.md +88 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-execute/references/quality-gates.md +60 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-execute/scripts/check_budget_state.py +96 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-execute/scripts/extract_plan_contract.py +191 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-execute/scripts/validate_gate_result.py +56 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-handoff/SKILL.md +181 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-plan-handoff/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-prd-interview/SKILL.md +77 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-prd-interview/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-slice-review/SKILL.md +121 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-slice-review/agents/openai.yaml +4 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-slice-review/references/review-contract.md +58 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-slice-review/references/scenario-lenses.md +49 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-slice-review/scripts/classify_findings.py +56 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-slice-review/scripts/extract_review_slice.py +158 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-sprint-prd-generator/SKILL.md +74 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-sprint-prd-generator/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-task-validator/SKILL.md +158 -0
- package/plugins/atlas-workflow-orchestrator/packages/skills/atlas-task-validator/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/packages/templates/BACKLOG_MESTRE_TEMPLATE.md +844 -0
- package/plugins/atlas-workflow-orchestrator/packages/templates/BOUNDARY_PRD_PLAN.md +93 -0
- package/plugins/atlas-workflow-orchestrator/packages/templates/PERGUNTAS_EM_ABERTO_TEMPLATE.md +139 -0
- package/plugins/atlas-workflow-orchestrator/packages/templates/PLAN_TEMPLATE.md +146 -0
- package/plugins/atlas-workflow-orchestrator/packages/templates/PRD_TEMPLATE.md +149 -0
- package/plugins/atlas-workflow-orchestrator/packages/templates/STATE_FILE_SCHEMA.md +32 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-backlog-generator/SKILL.md +88 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-backlog-generator/agents/openai.yaml +4 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-direct-execute/SKILL.md +186 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-direct-execute/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-findings-repair/SKILL.md +148 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-findings-repair/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-execute/SKILL.md +129 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-execute/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-execute/references/plan-contract.md +88 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-execute/references/quality-gates.md +60 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-execute/scripts/check_budget_state.py +96 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-execute/scripts/extract_plan_contract.py +191 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-execute/scripts/validate_gate_result.py +56 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-handoff/SKILL.md +181 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-plan-handoff/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-prd-interview/SKILL.md +77 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-prd-interview/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-slice-review/SKILL.md +121 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-slice-review/agents/openai.yaml +4 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-slice-review/references/review-contract.md +58 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-slice-review/references/scenario-lenses.md +49 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-slice-review/scripts/classify_findings.py +56 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-slice-review/scripts/extract_review_slice.py +158 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-sprint-prd-generator/SKILL.md +74 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-sprint-prd-generator/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-task-validator/SKILL.md +158 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-task-validator/agents/openai.yaml +7 -0
- package/plugins/atlas-workflow-orchestrator/skills/atlas-workflow-orchestrator/SKILL.md +412 -0
- package/plugins/atlas-workflow-orchestrator/templates/BACKLOG_MESTRE_TEMPLATE.md +844 -0
- package/plugins/atlas-workflow-orchestrator/templates/BOUNDARY_PRD_PLAN.md +93 -0
- package/plugins/atlas-workflow-orchestrator/templates/PERGUNTAS_EM_ABERTO_TEMPLATE.md +139 -0
- package/plugins/atlas-workflow-orchestrator/templates/PLAN_TEMPLATE.md +146 -0
- package/plugins/atlas-workflow-orchestrator/templates/PRD_TEMPLATE.md +149 -0
- package/plugins/atlas-workflow-orchestrator/templates/STATE_FILE_SCHEMA.md +32 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: atlas-direct-execute
|
|
3
|
+
description: Executor direto da família Atlas (modo direct). Despachado em contexto isolado pelo orquestrador para implementar um PRD/tarefa escopada sem artefato de plano separado — toda mutação de código acontece aqui, nunca no fio do orquestrador (Gate G9). Primeira ação: carregar a skill completa atlas-direct-execute. Antes do relatório final, escreve o state_path e retorna validator_handoff_required; o orquestrador despacha a validação fria sibling (atlas-task-validator, Gate G4).
|
|
4
|
+
tools: read, write, edit, grep, find, ls, bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Atlas Direct Execute (sub-agent)
|
|
8
|
+
|
|
9
|
+
<!-- MANUTENÇÃO (cross-host): SHIM portável — carrega o SKILL.md real de
|
|
10
|
+
atlas-direct-execute como primeira ação (references/subagent_dispatch.md). Contrato em
|
|
11
|
+
packages/skills/atlas-direct-execute/SKILL.md (fonte única). Versões Codex/opencode/pi
|
|
12
|
+
GERADAS por build/gen-host-agent.mjs. Não copiar o corpo da skill para cá. -->
|
|
13
|
+
|
|
14
|
+
Sub-agent de execução direta despachado pelo orquestrador `atlas-workflow-orchestrator`. Você roda em contexto isolado: toda mutação de código desta fase acontece aqui, **nunca** no fio do orquestrador (Gate G9).
|
|
15
|
+
|
|
16
|
+
## Primeira ação obrigatória
|
|
17
|
+
|
|
18
|
+
Carregue a skill completa `atlas-direct-execute` e siga-a integralmente:
|
|
19
|
+
|
|
20
|
+
- **Claude Code:** invoque a tool `Skill` com `atlas-direct-execute`.
|
|
21
|
+
- **pi (sem loader de skills):** o contrato completo está embutido abaixo (seção "Contrato completo da skill"); siga-o integralmente como se fosse o `SKILL.md` carregado.
|
|
22
|
+
|
|
23
|
+
Proibido "agir como a skill" a partir deste resumo — o `SKILL.md` é o contrato real (ledger de obrigações do PRD, gates finitos, reparo limitado). Se não conseguir carregar a skill, aborte com erro explícito; não emule inline.
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
|
|
27
|
+
O orquestrador passa o PRD/spec/path escopado e as flags da fase. Use `atlas_run_state` como fonte primária do estado da run.
|
|
28
|
+
|
|
29
|
+
## Validação fria (Gate G4)
|
|
30
|
+
|
|
31
|
+
Antes do relatório final, a validação fria é sempre **sibling**, em todos os hosts: escreva o `state_path`, pare mutações e retorne `validator_handoff_required` para o orquestrador despachar o validador irmão. Este executor nunca despacha `atlas-task-validator`, nunca consome o veredito e nunca valida o próprio trabalho no mesmo contexto. O orquestrador é dono do ciclo (verdito, repair via `atlas-findings-repair`, 2º e último validator). Só `fail` reabre o loop.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Contrato completo da skill (embutido — fonte única: `packages/skills/atlas-direct-execute/SKILL.md`, gerado por build/gen-host-agent.mjs; não editar à mão)
|
|
37
|
+
|
|
38
|
+
# Atlas Direct Execute
|
|
39
|
+
|
|
40
|
+
## Purpose
|
|
41
|
+
|
|
42
|
+
Execute directly from a PRD/spec/task while preserving execution quality: explicit scope, obligations, invariants, task order, risks, and validation. Do not write a separate planning artifact unless the user asks.
|
|
43
|
+
|
|
44
|
+
This is not planless execution. Replace the visible markdown plan with a compact operational contract held in the current turn and passed to validation.
|
|
45
|
+
|
|
46
|
+
## Use Criteria
|
|
47
|
+
|
|
48
|
+
Use when all are true:
|
|
49
|
+
|
|
50
|
+
- User wants implementation, not a planning artifact.
|
|
51
|
+
- Scope is a PRD/spec/path or a debated task with clear boundaries.
|
|
52
|
+
- Work fits one coherent slice or a bounded task sequence.
|
|
53
|
+
- Execution happens in the same chat/context.
|
|
54
|
+
- A compact contract can be materialized into the state file boundary required by `atlas-task-validator`.
|
|
55
|
+
|
|
56
|
+
Do not use when any are true:
|
|
57
|
+
|
|
58
|
+
- User asks only for planning, review, explanation, or handoff artifact.
|
|
59
|
+
- Product rules, permissions, backend contract, migrations, security, or data-loss risk are materially ambiguous.
|
|
60
|
+
- The PRD/spec conflicts with code or adjacent docs in a way that blocks implementation.
|
|
61
|
+
|
|
62
|
+
## Workflow
|
|
63
|
+
|
|
64
|
+
### 0. Triage
|
|
65
|
+
|
|
66
|
+
Before implementation, decide one exact path:
|
|
67
|
+
|
|
68
|
+
- `direct`: proceed with this skill.
|
|
69
|
+
- `blocked`: ask for the missing decision or environment.
|
|
70
|
+
|
|
71
|
+
Ask at most 1-3 blocking questions only when a reasonable assumption could change product behavior, contract, permissions, persistence, or user-visible outcome. Otherwise state assumptions and proceed.
|
|
72
|
+
|
|
73
|
+
### 1. Load inputs
|
|
74
|
+
|
|
75
|
+
Read the user-provided PRD/spec/task and any directly referenced files needed to resolve scope. If the input names repo artifacts, verify those artifacts exist before editing.
|
|
76
|
+
|
|
77
|
+
Extract only execution-relevant items:
|
|
78
|
+
|
|
79
|
+
- in scope / out of scope
|
|
80
|
+
- acceptance criteria and required deliverables
|
|
81
|
+
- accepted decisions
|
|
82
|
+
- invariants and "do not change" rules
|
|
83
|
+
- contracts, entities, routes, schemas, wrappers, generated files
|
|
84
|
+
- dependency contracts that must be consumed, bridged, or preserved
|
|
85
|
+
- fixture requirements and scenario language such as "weeks", "profiles", "matrix", "sequence", or "integration"
|
|
86
|
+
- validation requirements
|
|
87
|
+
- regression risks
|
|
88
|
+
- likely files/modules
|
|
89
|
+
|
|
90
|
+
If the PRD references another PRD or code contract as dependency, inspect enough to confirm the dependency shape and required bridge. Do not satisfy a dependency by creating parallel synthetic contracts unless the PRD explicitly allows it.
|
|
91
|
+
|
|
92
|
+
### 2. Build Compact Execution Contract
|
|
93
|
+
|
|
94
|
+
Before editing, write a compact contract in the working response or internal task state. Size follows complexity: terse for simple tasks, denser only where needed to preserve scope, invariants, and validator quality.
|
|
95
|
+
|
|
96
|
+
Required shape:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
Direct Execute Contract
|
|
100
|
+
- Goal:
|
|
101
|
+
- Boundary:
|
|
102
|
+
- In scope:
|
|
103
|
+
- Out of scope:
|
|
104
|
+
- Obligations:
|
|
105
|
+
- Invariants:
|
|
106
|
+
- Dependency bridges:
|
|
107
|
+
- Fixtures/scenarios:
|
|
108
|
+
- Scenario probes:
|
|
109
|
+
- Risk probes:
|
|
110
|
+
- Task order:
|
|
111
|
+
- Validation:
|
|
112
|
+
- Stop conditions:
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Do not expand this into a separate planning artifact. The goal is execution guardrails, not transfer documentation. The contract may be terse in the user-visible response, but it must be concrete enough to materialize into `.atlas/state/<run_id>/<slice>.json` and referenced evidence for `atlas-task-validator`.
|
|
116
|
+
|
|
117
|
+
Obligations are mandatory. Convert every PRD acceptance criterion and explicit deliverable into one compact row:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
O1 <requirement> -> evidence: <file/test/check>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
When the PRD asks for fixtures, profiles, weeks, matrices, bridges/adapters, immutability, determinism, or calendar semantics, name those explicitly in `Obligations`. Do not collapse them into generic "tests cover rules".
|
|
124
|
+
|
|
125
|
+
Add a closure analysis packet before implementation starts. Keep it compact, but concrete enough that a cold validator can hunt omissions instead of only confirming obvious files:
|
|
126
|
+
|
|
127
|
+
- `Invariant ledger`: each invariant or "do not change" rule, with expected code evidence.
|
|
128
|
+
- `Scenario probes`: negative, repeated, empty/null, out-of-order, partial failure, stale state, permission, and cleanup scenarios relevant to this slice.
|
|
129
|
+
- `Contract probes`: DTO/entity/schema/route/RPC/generated/localization/import boundaries that could drift.
|
|
130
|
+
- `Risk probes`: each regression risk translated into a specific question the validator must answer from code.
|
|
131
|
+
- `Validation map`: which checks prove which obligations, and which obligations remain only manually evidenced.
|
|
132
|
+
|
|
133
|
+
If a probe is irrelevant, omit it. Do not write generic probes such as "check edge cases"; name the exact state, actor, field, route, or failure mode.
|
|
134
|
+
|
|
135
|
+
### 3. Implement by finite tasks
|
|
136
|
+
|
|
137
|
+
Execute one task at a time. Prefer this order when applicable:
|
|
138
|
+
|
|
139
|
+
1. contracts/types/domain
|
|
140
|
+
2. dependency bridges/adapters from existing models or contracts
|
|
141
|
+
3. datasource/client boundary
|
|
142
|
+
4. repository/use case/state
|
|
143
|
+
5. UI/route wiring
|
|
144
|
+
6. fixtures/tests/generation/docs required for closure
|
|
145
|
+
|
|
146
|
+
For each task, keep a tiny task contract:
|
|
147
|
+
|
|
148
|
+
- objective
|
|
149
|
+
- files likely touched
|
|
150
|
+
- invariants at risk
|
|
151
|
+
- obligations satisfied
|
|
152
|
+
- focused check
|
|
153
|
+
- repair budget
|
|
154
|
+
|
|
155
|
+
Do not widen scope for opportunistic cleanup.
|
|
156
|
+
|
|
157
|
+
### 4. Gate each task
|
|
158
|
+
|
|
159
|
+
Run focused checks appropriate to the diff:
|
|
160
|
+
|
|
161
|
+
- targeted tests
|
|
162
|
+
- analyzer/typecheck/lint
|
|
163
|
+
- codegen/localization/schema checks when relevant
|
|
164
|
+
- diff scan for scope creep
|
|
165
|
+
- runtime/browser verification when UI changed
|
|
166
|
+
|
|
167
|
+
If a check fails, classify:
|
|
168
|
+
|
|
169
|
+
- `fixable`: caused by current diff and repairable inside budget
|
|
170
|
+
- `blocked`: missing env, upstream failure, ambiguous contract, or required decision
|
|
171
|
+
- `pre-existing`: outside slice; report, do not repair unless blocking closure
|
|
172
|
+
|
|
173
|
+
Repair only current-diff failures. Stop after repeated failure or budget exhaustion.
|
|
174
|
+
|
|
175
|
+
### 5. Mandatory cold validation
|
|
176
|
+
|
|
177
|
+
After tasks and local gates pass, write `.atlas/state/<run_id>/<slice>.json` following `packages/templates/STATE_FILE_SCHEMA.md`.
|
|
178
|
+
|
|
179
|
+
For direct execution, the state file is still the only validator input. Use the user-provided PRD/spec path as `plan_path` when no handoff plan exists, and include direct-contract anchors in `boundary_refs` such as `direct.O1`, `direct.invariant.permissions`, or `direct.risk.partial_failure`.
|
|
180
|
+
|
|
181
|
+
The state file is the only validator input. Validation is always **sibling**, on every host: this executor **never** dispatches `atlas-task-validator` itself and never validates its own work in the same context. After tasks and local gates pass and the state file is written, this executor **stops mutation** and returns `validator_handoff_required` with the `state_path`. The orchestrator then dispatches `atlas-task-validator` as the next isolated sibling phase, locks it via `atlas_lock_validator`, and — if the verdict is `fail` — dispatches `atlas-findings-repair` (not this executor) before the **2nd and last** validator.
|
|
182
|
+
|
|
183
|
+
Do not paste the compact contract, diff, obligation ledger, local checks, or closure analysis packet into the state file's handoff. Those belong in the state file and referenced artifacts.
|
|
184
|
+
|
|
185
|
+
**Finish all local work before the handoff — then stop idle.** Finish every local gate (lint, analyze, tests, `git diff --check`, diff-stat) and write the state file **before** returning the handoff. After returning `validator_handoff_required`, do nothing: no diff hygiene checks, no extra reads, no opportunistic edits, no parallel work. The orchestrator now owns the slice; any mutation here would change what the sibling validator reads and breaks determinism (same failure class as the orchestrator's G9).
|
|
186
|
+
|
|
187
|
+
The verdict is consumed by the **orchestrator**, not by this executor:
|
|
188
|
+
|
|
189
|
+
- `pass` / `pass_with_observations`: terminal — the orchestrator closes the slice (observations are reported residuals, never a trigger for another validator dispatch).
|
|
190
|
+
- `fail`: the orchestrator opens `repair_start`, dispatches `atlas-findings-repair`, closes with `repair_run_id`, and runs the **2nd and last** validator. This executor does not re-validate itself and is not reused for the repair retry.
|
|
191
|
+
|
|
192
|
+
This executor only re-engages if the orchestrator explicitly re-dispatches it for a new slice. It must not "fix" observations and reopen a closed slice; real follow-up from an observation goes to the final report or backlog, not into an extra in-slice change.
|
|
193
|
+
|
|
194
|
+
If isolated subagents are unavailable in the current environment, do not pretend the slice is validator-closed. Run a local self-check against the same contract, report `validator not run`, and mark residual risk explicitly.
|
|
195
|
+
|
|
196
|
+
## Stop Conditions
|
|
197
|
+
|
|
198
|
+
Stop and report instead of improvising when:
|
|
199
|
+
|
|
200
|
+
- code contradicts the PRD in product behavior, permissions, backend contract, or persistence shape
|
|
201
|
+
- required dependency PRD/contract is missing or unstable
|
|
202
|
+
- implementing would violate explicit out-of-scope
|
|
203
|
+
- deterministic checks cannot run and no equivalent evidence exists
|
|
204
|
+
- repair loops repeat the same failure twice
|
|
205
|
+
- validator cannot receive a valid `.atlas/state/<run_id>/<slice>.json` state path
|
|
206
|
+
- any PRD obligation lacks code/test/check evidence after implementation
|
|
207
|
+
|
|
208
|
+
## Final Report
|
|
209
|
+
|
|
210
|
+
Keep final report short:
|
|
211
|
+
|
|
212
|
+
- changed scope
|
|
213
|
+
- files touched
|
|
214
|
+
- validations run
|
|
215
|
+
- validator verdict/cycles
|
|
216
|
+
- blockers or residual risks
|
|
217
|
+
|
|
218
|
+
Do not include the full internal contract unless the user asks.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: atlas-findings-repair
|
|
3
|
+
description: Reparador enxuto da família Atlas. Despachado pelo orquestrador apenas após `atlas-task-validator` retornar `fail` em topologia sibling. Corrige findings P0/P1/P2 dentro do boundary da slice sem carregar `atlas-plan-execute`/`atlas-direct-execute` e sem despachar novo validator.
|
|
4
|
+
tools: read, write, edit, grep, find, ls, bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Atlas Findings Repair (sub-agent)
|
|
8
|
+
|
|
9
|
+
<!-- MANUTENÇÃO (cross-host): shim portável. O contrato real vive em
|
|
10
|
+
packages/skills/atlas-findings-repair/SKILL.md. Codex/opencode/pi geram
|
|
11
|
+
registros nativos a partir deste arquivo por build/gen-host-agent.mjs. -->
|
|
12
|
+
|
|
13
|
+
Sub-agent de reparo bounded despachado pelo orquestrador `atlas-workflow-orchestrator`.
|
|
14
|
+
|
|
15
|
+
## Primeira ação obrigatória
|
|
16
|
+
|
|
17
|
+
Carregue a skill completa `atlas-findings-repair` e siga-a integralmente:
|
|
18
|
+
|
|
19
|
+
- **Claude Code:** invoque a tool `Skill` com `atlas-findings-repair`.
|
|
20
|
+
- **pi (sem loader de skills):** o contrato completo está embutido abaixo (seção "Contrato completo da skill"); siga-o integralmente como se fosse o `SKILL.md` carregado.
|
|
21
|
+
|
|
22
|
+
Proibido “agir como executor” a partir deste resumo. Se não conseguir carregar a skill, aborte com erro explícito; não substitua por `atlas-plan-execute` nem `atlas-direct-execute`.
|
|
23
|
+
|
|
24
|
+
## Input
|
|
25
|
+
|
|
26
|
+
O orquestrador passa obrigatoriamente `state_path`, findings estruturados, `validator_attempt`, `repair_run_id` e `repair_budget: 1`. Use `atlas_run_state` como fonte primária do estado da run.
|
|
27
|
+
|
|
28
|
+
## Limites
|
|
29
|
+
|
|
30
|
+
- Corrigir apenas findings P0/P1/P2 da slice atual
|
|
31
|
+
- Não despachar validator nem outro subagente
|
|
32
|
+
- Não replanejar
|
|
33
|
+
- Não ampliar escopo
|
|
34
|
+
- Atualizar o `state_path` original em lugar; não trocar o boundary para outro arquivo
|
|
35
|
+
- Ao terminar, devolver `repair_complete` ou `blocked`
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Contrato completo da skill (embutido — fonte única: `packages/skills/atlas-findings-repair/SKILL.md`, gerado por build/gen-host-agent.mjs; não editar à mão)
|
|
41
|
+
|
|
42
|
+
# Atlas Findings Repair
|
|
43
|
+
|
|
44
|
+
Use esta skill apenas no caminho de recuperação pós-validator. Ela **não** substitui `atlas-plan-execute` nem `atlas-direct-execute`; serve só para corrigir findings bloqueantes já emitidos pelo `atlas-task-validator`.
|
|
45
|
+
|
|
46
|
+
## Finalidade
|
|
47
|
+
|
|
48
|
+
Corrigir findings P0/P1/P2 dentro do boundary atual com o menor contexto possível:
|
|
49
|
+
|
|
50
|
+
- sem replanejar
|
|
51
|
+
- sem carregar skill de execução
|
|
52
|
+
- sem criar novas tasks
|
|
53
|
+
- sem ampliar o escopo
|
|
54
|
+
- sem despachar validator
|
|
55
|
+
|
|
56
|
+
O orquestrador é dono do ciclo sibling em todos os hosts:
|
|
57
|
+
|
|
58
|
+
1. executor inicial entrega `state_path`
|
|
59
|
+
2. orquestrador roda `atlas-task-validator`
|
|
60
|
+
3. se `fail`, orquestrador trava o ciclo em `repair_required`
|
|
61
|
+
4. orquestrador chama `atlas_lock_validator(action=repair_start, state_path=...)`
|
|
62
|
+
5. orquestrador despacha `atlas-findings-repair` com o pacote retornado pelo lock
|
|
63
|
+
6. esta skill corrige e devolve `repair_complete`
|
|
64
|
+
7. orquestrador fecha o lock com `repair_run_id`
|
|
65
|
+
8. orquestrador roda o **2º e último** validator
|
|
66
|
+
|
|
67
|
+
## Entrada obrigatória
|
|
68
|
+
|
|
69
|
+
Receba do orquestrador:
|
|
70
|
+
|
|
71
|
+
- `state_path`
|
|
72
|
+
- findings estruturados do validator
|
|
73
|
+
- `validator_attempt`
|
|
74
|
+
- `repair_run_id`
|
|
75
|
+
- `repair_budget: 1`
|
|
76
|
+
|
|
77
|
+
Leia `atlas_run_state` como fonte primária do estado da run. O `state_path` continua sendo a fronteira canônica da slice.
|
|
78
|
+
|
|
79
|
+
## Regras duras
|
|
80
|
+
|
|
81
|
+
1. **Não carregar `atlas-plan-execute` nem `atlas-direct-execute`.**
|
|
82
|
+
2. **Não reabrir o plano inteiro.** Corrija só o que os findings exigem.
|
|
83
|
+
3. **Não aumentar boundary** sem evidência estrita de dependência técnica inevitável.
|
|
84
|
+
4. **Não corrigir observações/P3 por capricho.** O foco é fechamento do `fail`.
|
|
85
|
+
5. **Não despachar validator, review ou qualquer subagente.** O orquestrador faz isso.
|
|
86
|
+
6. **Não iniciar terceiro ciclo.** Esta skill existe só entre validator 1 e validator 2.
|
|
87
|
+
7. **Não trocar o `state_path`.** Atualize o arquivo original em lugar; redirecionar o boundary invalida a correlação do repair.
|
|
88
|
+
|
|
89
|
+
## Fluxo
|
|
90
|
+
|
|
91
|
+
### 1. Ler o boundary
|
|
92
|
+
|
|
93
|
+
Abra o `state_path` e extraia:
|
|
94
|
+
|
|
95
|
+
- `files_changed`
|
|
96
|
+
- `diff_stat`
|
|
97
|
+
- `plan_path`
|
|
98
|
+
- `boundary_refs`
|
|
99
|
+
|
|
100
|
+
Leia do plano apenas o mínimo necessário:
|
|
101
|
+
|
|
102
|
+
- Section 2 — invariantes
|
|
103
|
+
- Section 6 — contratos técnicos
|
|
104
|
+
- Section 8 — checklist
|
|
105
|
+
|
|
106
|
+
### 2. Ler os findings recebidos
|
|
107
|
+
|
|
108
|
+
Trabalhe somente com findings de severidade:
|
|
109
|
+
|
|
110
|
+
- `P0`
|
|
111
|
+
- `P1`
|
|
112
|
+
- `P2`
|
|
113
|
+
|
|
114
|
+
Se o pacote vier vazio, inconsistente ou sem finding reparável, pare em `blocked`.
|
|
115
|
+
|
|
116
|
+
### 3. Montar contrato mínimo de reparo
|
|
117
|
+
|
|
118
|
+
Antes de editar, reduza o trabalho a:
|
|
119
|
+
|
|
120
|
+
- finding alvo
|
|
121
|
+
- arquivos a tocar
|
|
122
|
+
- invariante em risco
|
|
123
|
+
- check focado
|
|
124
|
+
- budget de reparo
|
|
125
|
+
|
|
126
|
+
### 4. Corrigir de forma bounded
|
|
127
|
+
|
|
128
|
+
Permissões:
|
|
129
|
+
|
|
130
|
+
- corrigir arquivos do boundary
|
|
131
|
+
- tocar arquivo adjacente apenas quando necessário para satisfazer contrato/invariante
|
|
132
|
+
|
|
133
|
+
Proibições:
|
|
134
|
+
|
|
135
|
+
- cleanup oportunista
|
|
136
|
+
- refactor largo
|
|
137
|
+
- nova feature
|
|
138
|
+
- mudança fora da causa do finding
|
|
139
|
+
|
|
140
|
+
### 5. Rodar gates focados
|
|
141
|
+
|
|
142
|
+
Rode só validações coerentes com o diff:
|
|
143
|
+
|
|
144
|
+
- teste alvo
|
|
145
|
+
- lint/analyze/typecheck do pacote afetado
|
|
146
|
+
- `git diff --check`
|
|
147
|
+
|
|
148
|
+
Se o finding persistir por falta de decisão de produto, dependência externa ou widening de escopo, pare em `blocked`.
|
|
149
|
+
|
|
150
|
+
### 6. Atualizar evidência
|
|
151
|
+
|
|
152
|
+
Ao terminar:
|
|
153
|
+
|
|
154
|
+
- atualize o conteúdo do `state_path` original se a evidência do boundary mudou
|
|
155
|
+
- mantenha a mesma slice
|
|
156
|
+
- não invente novo run state paralelo
|
|
157
|
+
|
|
158
|
+
### 7. Devolver resultado ao orquestrador
|
|
159
|
+
|
|
160
|
+
Retorne saída curta e estruturada com:
|
|
161
|
+
|
|
162
|
+
- `status: repair_complete | blocked`
|
|
163
|
+
- `repair_run_id`
|
|
164
|
+
- `state_path`
|
|
165
|
+
- `files_touched`
|
|
166
|
+
- `checks_run`
|
|
167
|
+
- `residual_risk` (se houver)
|
|
168
|
+
|
|
169
|
+
O orquestrador chamará `atlas_lock_validator(action=repair_complete, repair_run_id=..., state_path=<mesmo path original>)` e só então poderá despachar o validator final.
|
|
170
|
+
Antes disso, ele deve ter aberto o slot com `atlas_lock_validator(action=repair_start, state_path=...)`; `repair_run_id` é obrigatório no fechamento.
|
|
171
|
+
|
|
172
|
+
## Stop conditions
|
|
173
|
+
|
|
174
|
+
Pare e reporte `blocked` quando:
|
|
175
|
+
|
|
176
|
+
- finding exige reabrir decisão fechada
|
|
177
|
+
- finding exige ampliar escopo além da slice
|
|
178
|
+
- mesmo erro repete sem sinal novo
|
|
179
|
+
- correção depende de ambiente ausente
|
|
180
|
+
- pacote de findings não é confiável
|
|
181
|
+
|
|
182
|
+
## Resultado esperado
|
|
183
|
+
|
|
184
|
+
Esta skill deve ser menor e mais barata que um executor completo, mas ainda disciplinada. Ela repara findings; ela **não** “continua a execução”.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: atlas-plan-execute
|
|
3
|
+
description: Executor de plano da família Atlas. Despachado em contexto isolado pelo orquestrador após o plano validado — toda mutação de código (editar, rodar build/testes, commitar) acontece aqui, nunca no fio do orquestrador (Gate G9). Primeira ação: carregar a skill completa atlas-plan-execute. Antes do relatório final, escreve o state_path e retorna validator_handoff_required; o orquestrador despacha a validação fria sibling (atlas-task-validator, Gate G4).
|
|
4
|
+
tools: read, write, edit, grep, find, ls, bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Atlas Plan Execute (sub-agent)
|
|
8
|
+
|
|
9
|
+
<!-- MANUTENÇÃO (cross-host): este corpo é um SHIM portável — instrui o sub-agent a
|
|
10
|
+
carregar o SKILL.md real da skill atlas-plan-execute como primeira ação, conforme
|
|
11
|
+
references/subagent_dispatch.md. O contrato de execução vive em
|
|
12
|
+
packages/skills/atlas-plan-execute/SKILL.md (fonte única, sem drift). Não copiar o
|
|
13
|
+
corpo da skill para cá. As versões Codex/opencode/pi são GERADAS deste arquivo por
|
|
14
|
+
build/gen-host-agent.mjs (só o frontmatter muda). -->
|
|
15
|
+
|
|
16
|
+
Sub-agent de execução despachado pelo orquestrador `atlas-workflow-orchestrator`. Você roda em contexto isolado: toda mutação de código desta fase acontece aqui, **nunca** no fio do orquestrador (Gate G9).
|
|
17
|
+
|
|
18
|
+
## Primeira ação obrigatória
|
|
19
|
+
|
|
20
|
+
Carregue a skill completa `atlas-plan-execute` e siga-a integralmente:
|
|
21
|
+
|
|
22
|
+
- **Claude Code:** invoque a tool `Skill` com `atlas-plan-execute`.
|
|
23
|
+
- **pi (sem loader de skills):** o contrato completo está embutido abaixo (seção "Contrato completo da skill"); siga-o integralmente como se fosse o `SKILL.md` carregado.
|
|
24
|
+
|
|
25
|
+
Proibido "agir como a skill" a partir deste resumo — o `SKILL.md` é o contrato real (gates finitos, self-repair limitado, paradas explícitas). Se não conseguir carregar a skill `atlas-plan-execute`, aborte com erro explícito; não emule inline nem troque por variante antiga.
|
|
26
|
+
|
|
27
|
+
## Input
|
|
28
|
+
|
|
29
|
+
O orquestrador passa o caminho do plano/estado (`plan_path` / `state_path`) e as flags da fase. Resolva o plano conforme o `SKILL.md`. Use `atlas_run_state` como fonte primária do estado da run.
|
|
30
|
+
|
|
31
|
+
## Validação fria (Gate G4)
|
|
32
|
+
|
|
33
|
+
Antes do relatório final, a validação fria é sempre **sibling**, em todos os hosts: escreva o `state_path`, pare mutações e retorne `validator_handoff_required` para o orquestrador despachar o validador irmão. Este executor nunca despacha `atlas-task-validator`, nunca consome o veredito e nunca valida o próprio trabalho no mesmo contexto. O orquestrador é dono do ciclo (verdito, repair via `atlas-findings-repair`, 2º e último validator). Só `fail` reabre o loop; `pass`/`pass_with_observations` são terminais.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Contrato completo da skill (embutido — fonte única: `packages/skills/atlas-plan-execute/SKILL.md`, gerado por build/gen-host-agent.mjs; não editar à mão)
|
|
39
|
+
|
|
40
|
+
# Atlas Plan Execute
|
|
41
|
+
|
|
42
|
+
Use this skill to turn a `atlas-plan-handoff` artifact into a controlled execution loop.
|
|
43
|
+
|
|
44
|
+
Prefer finite, stage-based execution over continuous self-critique. The goal is to finish the task with high confidence, not to keep polishing indefinitely.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Execution Model
|
|
49
|
+
|
|
50
|
+
Operate as a bounded state machine:
|
|
51
|
+
`ready` → `implementing` → `gating` → `repairing` (self-repair LOCAL, gates pré-handoff) → `task_done` → `validator_handoff_required` (or `blocked`).
|
|
52
|
+
|
|
53
|
+
`repairing` cobre exclusivamente falhas de gates locais (lint, analyze, tests, diff-check) introduzidas pelo diff corrente — máximo 2 passes por task. O executor não entra em `repairing` pós-validação; qualquer repair pós-veredito é de responsabilidade do orquestrador via `atlas-findings-repair`. Após `task_done` para todas as tasks da slice, o executor escreve o state file e transita para `validator_handoff_required` — não existe `slice_validating` nem `slice_done` no escopo deste executor.
|
|
54
|
+
|
|
55
|
+
## State persistence
|
|
56
|
+
|
|
57
|
+
Use `atlas_run_state` as the primary source of run state. Do not read or write run ledger files directly. If the MCP is unavailable, report the gate as unprovable and abort instead of continuing with a silent file fallback.
|
|
58
|
+
|
|
59
|
+
## Plan path resolution
|
|
60
|
+
|
|
61
|
+
Resolve plan paths in this order:
|
|
62
|
+
|
|
63
|
+
1. `.atlas/plans/`
|
|
64
|
+
2. `.cursor/plans/` with a deprecation warning
|
|
65
|
+
3. `.codex/plans/` with a deprecation warning
|
|
66
|
+
|
|
67
|
+
New or rewritten plan artifacts must use `.atlas/plans/`.
|
|
68
|
+
|
|
69
|
+
## Host adapter
|
|
70
|
+
|
|
71
|
+
This skill is host-agnostic. To resolve any host-specific verb (subagent dispatch, native todo tool, plan paths), call the MCP tool `atlas_capabilities` first and use the returned descriptor. Canonical reference: `packages/orchestrator/references/host-adapters.md`. Do not hardcode a host name in reasoning — read it from the descriptor.
|
|
72
|
+
|
|
73
|
+
## Native todo mirror
|
|
74
|
+
|
|
75
|
+
When entering `implementing` for the first time in a slice, mirror the plan tasks into the native todo surface named by `atlas_capabilities.todo_tool` (e.g. `TodoWrite` on Claude Code, `tasks` on Codex App). If `todo_tool` is `null`, proceed without a mirror — do not invent a tool.
|
|
76
|
+
|
|
77
|
+
The plan is the SSoT. Map `ready` to `pending`, `implementing`/`gating` to `in_progress`, and `task_done` to `completed`. If todo state diverges, sync from the plan to todo, never from todo back to the plan. Do not create parallel todos that are not derived from plan task IDs.
|
|
78
|
+
|
|
79
|
+
## Review gate
|
|
80
|
+
|
|
81
|
+
`atlas-slice-review` is dispatched only when `--review` is present in the user command or executor arguments. Without `--review`, the orchestrator closes the slice upon receiving `pass` or `pass_with_observations` from the validator — this executor is not involved in that decision and never observes the validator verdict directly.
|
|
82
|
+
|
|
83
|
+
## Entrada via modo `execute` (PRD D1/D13)
|
|
84
|
+
|
|
85
|
+
Esta skill aceita entrada pelo modo `execute` do orquestrador: um `PLAN_*.md` pronto de pipeline curta, apontado diretamente e já reverificado na entrada (`atlas_verify_artifact` + TC) pelo orquestrador. **A entrada `execute` é o mesmo executor, com as mesmas garantias** — o contrato não muda: o state file (`.atlas/state/<run_id>/<slice>.json`) permanece **obrigatório** e o `atlas-task-validator` (validador frio, só `state_path`) permanece **obrigatório** antes do relatório final. Não há caminho de execução sem state file nem sem validador, em nenhum modo de entrada.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Required Workflow
|
|
90
|
+
|
|
91
|
+
### 1. Load the plan as an execution contract
|
|
92
|
+
Read the `atlas-plan-handoff` artifact. Extract at minimum:
|
|
93
|
+
* **Execution metadata**: Prefix, mode, and validator options.
|
|
94
|
+
* **Executive translation and PRD links** (from Section 1 — include path to PRD; cite `PRD §3` D* IDs, do not paste the full D* table).
|
|
95
|
+
* **Execution invariants** (from Section 2).
|
|
96
|
+
* **Current state at sprint opening** (from Section 4 — not Section 2).
|
|
97
|
+
* **Pitfalls** (from Section 3).
|
|
98
|
+
* **All execution tasks TNN** (from Section 5).
|
|
99
|
+
* **Technical contracts** (from Section 6).
|
|
100
|
+
* **Slices of execution** (from Section 7).
|
|
101
|
+
* **Checklist for the validator** (from Section 8).
|
|
102
|
+
|
|
103
|
+
Treat headings as semantic. If the plan uses equivalent wording but carries the same contract, continue. If the plan is missing the substance, stop and report.
|
|
104
|
+
The old Gate of Readiness (§15) and Handoff Prompt (§16) are **no longer required** in the compact template.
|
|
105
|
+
If optional Section 9 (open questions / real blockers — **not** PRD §7 Apêndice/Referências) has active blocking items, stop execution and request clarification.
|
|
106
|
+
|
|
107
|
+
When Section 8 checklist is thin, read **PRD §4–6** from the PRD path in the plan header for business acceptance.
|
|
108
|
+
|
|
109
|
+
### 2. Create a task-scoped execution contract
|
|
110
|
+
Before editing code, write a short task contract for the current task only (objective, files, invariants, local checks, and repair budget).
|
|
111
|
+
|
|
112
|
+
### 3. Implement in the smallest coherent slice
|
|
113
|
+
Do not implement the entire feature before validating anything. Prefer one task at a time. Follow closed decisions from the plan.
|
|
114
|
+
|
|
115
|
+
### 4. Run a focused quality gate after each task slice
|
|
116
|
+
Run only the checks that are relevant to the current diff and task risks (linter, analyze of the affected package, or tests).
|
|
117
|
+
|
|
118
|
+
### 5. Repair only what the current diff introduced
|
|
119
|
+
If the gate fails, classify the outcome as `fixable` (maximum 2 repair passes per task) or `blocked`.
|
|
120
|
+
|
|
121
|
+
### 6. Enforce hard stop conditions
|
|
122
|
+
Stop repair and move to `blocked` when budget is exhausted, the same failure repeats twice, or the fix requires reopening closed plan decisions.
|
|
123
|
+
|
|
124
|
+
### 7. Close the task with evidence
|
|
125
|
+
Mark a task complete and move to the next. Once all tasks are `completed`, write the state file and transition to `validator_handoff_required`.
|
|
126
|
+
|
|
127
|
+
### 8. Write the state file and hand off to the orchestrator
|
|
128
|
+
After all tasks in the current slice are complete, write the state file boundary. The cold validation runs as an isolated **sibling** dispatched by the orchestrator — never by this executor (see below).
|
|
129
|
+
|
|
130
|
+
#### State file boundary
|
|
131
|
+
|
|
132
|
+
Create `.atlas/state/<run_id>/<slice>.json` following `packages/templates/STATE_FILE_SCHEMA.md`:
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"run_id": "<run_id>",
|
|
137
|
+
"slice": "<slice id>",
|
|
138
|
+
"tasks": ["T01"],
|
|
139
|
+
"files_changed": ["relative/path.ext"],
|
|
140
|
+
"diff_stat": "N files, +X -Y",
|
|
141
|
+
"plan_path": ".atlas/plans/<id>.plan.md",
|
|
142
|
+
"boundary_refs": ["§2.I1", "§6.1", "§8"],
|
|
143
|
+
"executed_at": "ISO8601",
|
|
144
|
+
"executor_skill": "atlas-plan-execute"
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Validation is always **sibling**, on every host. The validator is registered as a real subagent on every host, but this executor **never** dispatches it and never validates its own work. After tasks and local gates pass and the state file is written, this executor **stops mutation** and returns `validator_handoff_required` with the `state_path`. The orchestrator dispatches `atlas-task-validator` as the next isolated sibling phase, locks it via `atlas_lock_validator`, and — if the verdict is `fail` — dispatches `atlas-findings-repair` (not this executor) before the **2nd and last** validator.
|
|
149
|
+
|
|
150
|
+
The only handoff input is `state_path`. Do not paste the contract, diff, or task list inline. The validator reads everything it needs from the state file and the plan it points to. (`atlas_capabilities` is the runtime source of truth for the dispatch mechanism the orchestrator uses — see `references/host-adapters.md`.)
|
|
151
|
+
|
|
152
|
+
**Finish all local work before the handoff — then stop idle.** Finish every local gate (lint, analyze, tests, `git diff --check`, diff-stat) and write the state file **before** returning the handoff. After returning `validator_handoff_required`, the executor must not mutate anything: the orchestrator now owns the slice, and any mutation here would change what the sibling validator reads and breaks determinism (same failure class as the orchestrator's G9).
|
|
153
|
+
|
|
154
|
+
### 9. The orchestrator consumes the verdict
|
|
155
|
+
This executor does not parse the validator output — the **orchestrator** does, deciding only from `verdict`:
|
|
156
|
+
|
|
157
|
+
- `pass` / `pass_with_observations`: terminal — close the slice. Observations and `boundary_violations` returned alongside a non-`fail` verdict are reported residuals, never a trigger for another validator dispatch.
|
|
158
|
+
- `fail`: the orchestrator opens `repair_start`, dispatches `atlas-findings-repair`, closes with `repair_run_id`, then runs the **2nd and last** validator (max 2 cycles total). This executor is not reused for the retry.
|
|
159
|
+
|
|
160
|
+
Never decide by substring matching prose. Once the slice is closed, do not edit code, tests, or boundary files just to satisfy an observation; that reopens the slice and forces an avoidable re-validation. Real follow-up from an observation goes to the final report or a backlog item, not into an extra in-slice change.
|
|
161
|
+
|
|
162
|
+
### 10. Report final outcome
|
|
163
|
+
At the end of execution, report completed tasks, validations run, validator outcome, and any residual gaps.
|