oxe-cc 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.cursor/commands/oxe-ask.md +4 -2
  2. package/.cursor/commands/oxe-capabilities.md +4 -2
  3. package/.cursor/commands/oxe-checkpoint.md +4 -2
  4. package/.cursor/commands/oxe-compact.md +4 -2
  5. package/.cursor/commands/oxe-dashboard.md +4 -2
  6. package/.cursor/commands/oxe-debug.md +4 -2
  7. package/.cursor/commands/oxe-discuss.md +4 -2
  8. package/.cursor/commands/oxe-execute.md +5 -3
  9. package/.cursor/commands/oxe-forensics.md +4 -2
  10. package/.cursor/commands/oxe-help.md +4 -2
  11. package/.cursor/commands/oxe-loop.md +4 -2
  12. package/.cursor/commands/oxe-milestone.md +4 -2
  13. package/.cursor/commands/oxe-next.md +4 -2
  14. package/.cursor/commands/oxe-obs.md +4 -2
  15. package/.cursor/commands/oxe-plan-agent.md +4 -2
  16. package/.cursor/commands/oxe-plan.md +4 -2
  17. package/.cursor/commands/oxe-project.md +4 -2
  18. package/.cursor/commands/oxe-quick.md +4 -2
  19. package/.cursor/commands/oxe-research.md +4 -2
  20. package/.cursor/commands/oxe-retro.md +4 -2
  21. package/.cursor/commands/oxe-review-pr.md +4 -2
  22. package/.cursor/commands/oxe-route.md +4 -2
  23. package/.cursor/commands/oxe-scan.md +4 -2
  24. package/.cursor/commands/oxe-security.md +4 -2
  25. package/.cursor/commands/oxe-session.md +5 -3
  26. package/.cursor/commands/oxe-ship.md +4 -2
  27. package/.cursor/commands/oxe-skill.md +4 -2
  28. package/.cursor/commands/oxe-spec.md +4 -2
  29. package/.cursor/commands/oxe-ui-review.md +4 -2
  30. package/.cursor/commands/oxe-ui-spec.md +4 -2
  31. package/.cursor/commands/oxe-update.md +4 -2
  32. package/.cursor/commands/oxe-validate-gaps.md +4 -2
  33. package/.cursor/commands/oxe-verify-audit.md +46 -0
  34. package/.cursor/commands/oxe-verify.md +4 -2
  35. package/.cursor/commands/oxe-workflow-authoring.md +47 -0
  36. package/.cursor/commands/oxe-workstream.md +4 -2
  37. package/.cursor/commands/oxe.md +6 -2
  38. package/.github/prompts/oxe-ask.prompt.md +4 -2
  39. package/.github/prompts/oxe-capabilities.prompt.md +4 -2
  40. package/.github/prompts/oxe-checkpoint.prompt.md +4 -2
  41. package/.github/prompts/oxe-compact.prompt.md +5 -3
  42. package/.github/prompts/oxe-dashboard.prompt.md +4 -2
  43. package/.github/prompts/oxe-debug.prompt.md +4 -2
  44. package/.github/prompts/oxe-discuss.prompt.md +6 -2
  45. package/.github/prompts/oxe-execute.prompt.md +5 -3
  46. package/.github/prompts/oxe-forensics.prompt.md +4 -2
  47. package/.github/prompts/oxe-help.prompt.md +6 -2
  48. package/.github/prompts/oxe-loop.prompt.md +4 -2
  49. package/.github/prompts/oxe-milestone.prompt.md +4 -2
  50. package/.github/prompts/oxe-next.prompt.md +6 -2
  51. package/.github/prompts/oxe-obs.prompt.md +4 -2
  52. package/.github/prompts/oxe-plan-agent.prompt.md +5 -2
  53. package/.github/prompts/oxe-plan.prompt.md +4 -2
  54. package/.github/prompts/oxe-project.prompt.md +4 -2
  55. package/.github/prompts/oxe-quick.prompt.md +4 -2
  56. package/.github/prompts/oxe-research.prompt.md +4 -2
  57. package/.github/prompts/oxe-retro.prompt.md +4 -2
  58. package/.github/prompts/oxe-review-pr.prompt.md +4 -2
  59. package/.github/prompts/oxe-route.prompt.md +4 -2
  60. package/.github/prompts/oxe-scan.prompt.md +4 -2
  61. package/.github/prompts/oxe-security.prompt.md +4 -2
  62. package/.github/prompts/oxe-session.prompt.md +5 -3
  63. package/.github/prompts/oxe-ship.prompt.md +4 -2
  64. package/.github/prompts/oxe-skill.prompt.md +4 -2
  65. package/.github/prompts/oxe-spec.prompt.md +4 -2
  66. package/.github/prompts/oxe-ui-review.prompt.md +4 -2
  67. package/.github/prompts/oxe-ui-spec.prompt.md +4 -2
  68. package/.github/prompts/oxe-update.prompt.md +4 -2
  69. package/.github/prompts/oxe-validate-gaps.prompt.md +4 -2
  70. package/.github/prompts/oxe-verify-audit.prompt.md +46 -0
  71. package/.github/prompts/oxe-verify.prompt.md +4 -2
  72. package/.github/prompts/oxe-workflow-authoring.prompt.md +47 -0
  73. package/.github/prompts/oxe-workstream.prompt.md +4 -2
  74. package/.github/prompts/oxe.prompt.md +6 -2
  75. package/.github/workflows/ci.yml +57 -20
  76. package/.github/workflows/release.yml +94 -0
  77. package/AGENTS.md +3 -1
  78. package/CHANGELOG.md +383 -342
  79. package/QUICKSTART.md +99 -0
  80. package/README.md +89 -65
  81. package/bin/lib/oxe-agent-install.cjs +127 -107
  82. package/bin/lib/oxe-install-resolve.cjs +10 -0
  83. package/bin/lib/oxe-operational.cjs +34 -28
  84. package/bin/lib/oxe-project-health.cjs +38 -6
  85. package/bin/lib/oxe-release.cjs +423 -0
  86. package/bin/lib/oxe-runtime-semantics.cjs +68 -24
  87. package/bin/oxe-cc.js +388 -55
  88. package/commands/oxe/ask.md +7 -3
  89. package/commands/oxe/capabilities.md +6 -2
  90. package/commands/oxe/checkpoint.md +5 -1
  91. package/commands/oxe/compact.md +6 -2
  92. package/commands/oxe/dashboard.md +6 -2
  93. package/commands/oxe/debug.md +6 -2
  94. package/commands/oxe/discuss.md +6 -2
  95. package/commands/oxe/execute.md +6 -2
  96. package/commands/oxe/forensics.md +6 -2
  97. package/commands/oxe/help.md +6 -2
  98. package/commands/oxe/loop.md +6 -2
  99. package/commands/oxe/milestone.md +6 -2
  100. package/commands/oxe/next.md +6 -2
  101. package/commands/oxe/obs.md +6 -2
  102. package/commands/oxe/oxe.md +6 -2
  103. package/commands/oxe/plan-agent.md +6 -2
  104. package/commands/oxe/plan.md +6 -2
  105. package/commands/oxe/project.md +6 -2
  106. package/commands/oxe/quick.md +6 -2
  107. package/commands/oxe/research.md +6 -2
  108. package/commands/oxe/retro.md +6 -2
  109. package/commands/oxe/review-pr.md +6 -2
  110. package/commands/oxe/route.md +6 -2
  111. package/commands/oxe/scan.md +6 -2
  112. package/commands/oxe/security.md +6 -2
  113. package/commands/oxe/session.md +6 -2
  114. package/commands/oxe/ship.md +6 -2
  115. package/commands/oxe/skill.md +6 -2
  116. package/commands/oxe/spec.md +6 -2
  117. package/commands/oxe/ui-review.md +6 -2
  118. package/commands/oxe/ui-spec.md +6 -2
  119. package/commands/oxe/update.md +6 -2
  120. package/commands/oxe/validate-gaps.md +6 -2
  121. package/commands/oxe/verify-audit.md +50 -0
  122. package/commands/oxe/verify.md +6 -2
  123. package/commands/oxe/workflow-authoring.md +50 -0
  124. package/commands/oxe/workstream.md +6 -2
  125. package/docs/INCIDENT-PLAYBOOK.md +181 -0
  126. package/docs/RELEASE-READINESS.md +46 -0
  127. package/docs/ROLES.md +129 -0
  128. package/docs/RUNTIME-SMOKE-MATRIX.md +128 -0
  129. package/docs/TEAM-ADOPTION.md +153 -0
  130. package/docs/WALKTHROUGH.md +241 -0
  131. package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +28 -0
  132. package/lib/runtime/scheduler/multi-agent-coordinator.js +152 -26
  133. package/lib/sdk/README.md +2 -0
  134. package/lib/sdk/index.cjs +22 -8
  135. package/lib/sdk/index.d.ts +60 -16
  136. package/oxe/templates/config.template.json +1 -0
  137. package/package.json +30 -22
  138. package/packages/runtime/package.json +1 -1
  139. package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +357 -193
  140. package/vscode-extension/oxe-agents-1.4.0.vsix +0 -0
  141. package/vscode-extension/oxe-agents-1.5.0.vsix +0 -0
  142. package/vscode-extension/package.json +1 -1
package/QUICKSTART.md ADDED
@@ -0,0 +1,99 @@
1
+ # OXE — Primeiros 15 Minutos
2
+
3
+ > Leitura: ~5 min. Você sai daqui com o projeto configurado e o primeiro ciclo rodando.
4
+
5
+ ---
6
+
7
+ ## 1. Instalar
8
+
9
+ ```bash
10
+ npx oxe-cc@latest
11
+ ```
12
+
13
+ Responda as perguntas do wizard (IDE, perfil, workstream). O OXE cria `.oxe/` no projeto com STATE.md, config.json e os workflows.
14
+
15
+ Verifique:
16
+
17
+ ```bash
18
+ npx oxe-cc doctor
19
+ ```
20
+
21
+ Deve mostrar `✓ Pronto` para Node, workflows e estrutura base. Se aparecer algum `⚠`, siga o conselho na linha.
22
+
23
+ ---
24
+
25
+ ## 2. Primeiro ciclo (modo padrão)
26
+
27
+ Execute na sua IDE (Cursor, Copilot, Claude Code, etc.):
28
+
29
+ ```
30
+ /oxe
31
+ ```
32
+
33
+ O router lê STATE.md e sugere exatamente um próximo passo. Siga a recomendação.
34
+
35
+ **Sequência mínima completa:**
36
+
37
+ ```
38
+ /oxe → descobre onde você está
39
+ /oxe-scan → mapeia o codebase em .oxe/codebase/
40
+ /oxe-spec → gera SPEC.md com critérios de aceite
41
+ /oxe-plan → gera PLAN.md com ondas e tarefas
42
+ /oxe-execute → implementa a onda atual
43
+ /oxe-verify → valida os critérios do SPEC
44
+ ```
45
+
46
+ Para uma tarefa pequena (S/M), use o modo rápido:
47
+
48
+ ```
49
+ /oxe-quick → spec + plan + execute + verify em uma sessão
50
+ ```
51
+
52
+ ---
53
+
54
+ ## 3. Quando usar runtime-first
55
+
56
+ Se o projeto tem o runtime compilado (`lib/runtime/index.js`), os comandos enterprise ficam disponíveis:
57
+
58
+ ```bash
59
+ # Verificação formal com manifesto de evidências
60
+ npx oxe-cc runtime verify --dir .
61
+
62
+ # Listar gates pendentes
63
+ npx oxe-cc runtime gates list --dir .
64
+
65
+ # Promover run verificada para PR draft
66
+ npx oxe-cc runtime promote --dir . --target pr_draft
67
+
68
+ # Recuperar run pausada ou interrompida
69
+ npx oxe-cc runtime recover --dir . --run-id <id>
70
+ ```
71
+
72
+ Se o runtime não estiver compilado, os comandos OXE continuam funcionando no modo legado — sem perda de UX.
73
+
74
+ ---
75
+
76
+ ## 4. Validação dos 5 minutos
77
+
78
+ Após o primeiro ciclo completo, estas 5 coisas devem estar verdes:
79
+
80
+ | # | O que checar | Como |
81
+ |---|-------------|------|
82
+ | 1 | STATE.md mostra `verify_complete` ou `plan_complete` | `cat .oxe/STATE.md` |
83
+ | 2 | Nenhum `ERROR` em `oxe-cc doctor` | `npx oxe-cc doctor` |
84
+ | 3 | `oxe-cc status` retorna próximo passo claro | `npx oxe-cc status` |
85
+ | 4 | SPEC.md tem critérios de aceite preenchidos | `cat .oxe/SPEC.md` |
86
+ | 5 | VERIFY.md existe (se ciclo completo) | `cat .oxe/VERIFY.md` |
87
+
88
+ Se algum falhar, rode `/oxe` — o router vai diagnosticar e sugerir a ação correta.
89
+
90
+ ---
91
+
92
+ ## 5. Próximos passos
93
+
94
+ - **Para times** → [`docs/TEAM-ADOPTION.md`](docs/TEAM-ADOPTION.md)
95
+ - **Por papel (executor/reviewer/operador)** → [`docs/ROLES.md`](docs/ROLES.md)
96
+ - **Exemplo completo reproduzível** → [`docs/WALKTHROUGH.md`](docs/WALKTHROUGH.md)
97
+ - **Incidentes e gates** → [`docs/INCIDENT-PLAYBOOK.md`](docs/INCIDENT-PLAYBOOK.md)
98
+ - **Suporte por runtime** → [`docs/RUNTIME-SMOKE-MATRIX.md`](docs/RUNTIME-SMOKE-MATRIX.md)
99
+ - **Referência completa** → [`README.md`](README.md)
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![npm](https://img.shields.io/npm/v/oxe-cc.svg?style=flat-square)](https://www.npmjs.com/package/oxe-cc)
8
8
  [![license](https://img.shields.io/npm/l/oxe-cc.svg?style=flat-square)](LICENSE)
9
9
 
10
- **Versão:** `1.4.0` · [package.json](package.json)
10
+ **Versão:** `1.5.0` · [package.json](package.json)
11
11
 
12
12
  **Framework OXE — Orchestrated eXperience Engineering**
13
13
 
@@ -25,10 +25,10 @@ npx oxe-cc@latest
25
25
 
26
26
  OXE é o **Framework OXE — Orchestrated eXperience Engineering**: um framework de desenvolvimento assistido por IA orientado por artefatos, contexto em disco e execução verificável. Funciona identicamente em Cursor, GitHub Copilot, Claude Code, Gemini CLI, Windsurf e qualquer outro agente — o estado fica em `.oxe/` no seu projeto, não preso a nenhuma IDE.
27
27
 
28
- No momento atual, o OXE opera em duas camadas complementares já prontas para publicação:
28
+ No momento atual, o OXE opera em duas camadas complementares já prontas para publicação:
29
29
 
30
30
  - **framework de método** — `spec -> plan -> execute -> verify`, sessões, workstreams, lessons loop e contratos de raciocínio multi-runtime
31
- - **runtime enterprise** — `ExecutionGraph`, `canonical_state`, context packs, evidence store, verification manifest, gates, policy, promotion, recovery e auditoria operacional
31
+ - **runtime enterprise** — `ExecutionGraph`, `canonical_state`, context packs, evidence store, verification manifest, gates, policy, promotion, recovery e auditoria operacional
32
32
 
33
33
  Ele se apoia em três princípios:
34
34
 
@@ -58,7 +58,7 @@ Essas regras vivem no núcleo canónico em `oxe/workflows/references/reasoning-*
58
58
 
59
59
  ## Momento atual do produto
60
60
 
61
- O OXE já não é só um conjunto de prompts e markdowns. Hoje ele combina:
61
+ O OXE já não é só um conjunto de prompts e markdowns. Hoje ele combina:
62
62
 
63
63
  - **artefatos canónicos em `.oxe/`** para continuidade entre sessões, IDEs e agentes
64
64
  - **Context Engine V2** para seleção e compressão determinística de contexto
@@ -72,16 +72,32 @@ Em termos práticos, o estado operacional real agora passa por:
72
72
  - `.oxe/runs/<run_id>.json`
73
73
  - `.oxe/runs/<run_id>/verification-manifest.json`
74
74
  - `.oxe/runs/<run_id>/residual-risk-ledger.json`
75
- - `.oxe/runs/<run_id>/evidence-coverage.json`
76
- - `.oxe/execution/GATES.json`
77
- - `OXE-EVENTS.ndjson`
78
-
79
- Contrato estável desta release:
80
-
81
- - `execute` e `verify` são `runtime-first` quando `oxe-cc runtime` está disponível
82
- - `status`, `doctor`, dashboard e CLI de runtime leem o mesmo estado canónico
83
- - `multi-agent` é GA apenas com isolamento real (`git_worktree`); `inplace` não é backend válido para coordenação paralela
84
- - `pr_draft` é o alvo remoto estável de promotion nesta publicação
75
+ - `.oxe/runs/<run_id>/evidence-coverage.json`
76
+ - `.oxe/execution/GATES.json`
77
+ - `OXE-EVENTS.ndjson`
78
+
79
+ Contrato estável desta release:
80
+
81
+ - `execute` e `verify` são `runtime-first` quando `oxe-cc runtime` está disponível
82
+ - `status`, `doctor`, dashboard e CLI de runtime leem o mesmo estado canónico
83
+ - `multi-agent` é GA apenas com isolamento real (`git_worktree`); `inplace` não é backend válido para coordenação paralela
84
+ - `pr_draft` é o alvo remoto estável de promotion nesta publicação
85
+
86
+ → [Guia por papel](docs/ROLES.md) — executor, reviewer, operador de gate, mantenedor do pacote
87
+
88
+ ---
89
+
90
+ ## Para times
91
+
92
+ | Recurso | Link |
93
+ |---------|------|
94
+ | Primeiros 15 minutos | [QUICKSTART.md](QUICKSTART.md) |
95
+ | Guia por papel (executor / reviewer / operador) | [docs/ROLES.md](docs/ROLES.md) |
96
+ | Fluxo recomendado para times | [docs/TEAM-ADOPTION.md](docs/TEAM-ADOPTION.md) |
97
+ | Exemplo completo reproduzível | [docs/WALKTHROUGH.md](docs/WALKTHROUGH.md) |
98
+ | Incidentes e gates | [docs/INCIDENT-PLAYBOOK.md](docs/INCIDENT-PLAYBOOK.md) |
99
+ | Suporte por runtime (Cursor, Copilot, Claude Code…) | [docs/RUNTIME-SMOKE-MATRIX.md](docs/RUNTIME-SMOKE-MATRIX.md) |
100
+ | Release readiness e publicação | [docs/RELEASE-READINESS.md](docs/RELEASE-READINESS.md) |
85
101
 
86
102
  ---
87
103
 
@@ -387,25 +403,25 @@ Implementar: o mínimo para passar o Verificar
387
403
  Complexidade: S | M | L | XL
388
404
  ```
389
405
 
390
- Tarefas `XL` bloqueiam o gate sem sub-tarefas ou justificativa. `/oxe-obs` propaga automaticamente constraints para os R-IDs e Tns afetados.
391
-
392
- #### Iteração correta do plano
393
-
394
- Se o usuário quiser chamar `/oxe-plan` várias vezes até ficar satisfeito, o fluxo esperado é este:
395
-
396
- - **Mesmo escopo e mesma `SPEC.md`, mas quer refinar tarefas, ondas, dependências, riscos ou validação**: usar `/oxe-plan --replan`
397
- - **Mudou a estratégia técnica**: voltar para `/oxe-discuss` e depois `/oxe-plan --replan`
398
- - **Mudou requisitos, critérios, prioridades ou aceite**: voltar para `/oxe-spec` e depois `/oxe-plan`
399
-
400
- Regra prática:
401
-
402
- - `spec` muda o **que** será entregue
403
- - `discuss` muda o **como** ou o **porquê** da estratégia
404
- - `plan --replan` muda **como quebrar e executar** a mesma entrega
405
-
406
- Se já existir `PLAN.md` no escopo atual e o usuário chamar `/oxe-plan` de novo sem alterar a spec, o OXE deve tratar isso como **replan implícito**, preservando a seção **Replanejamento** e o histórico útil do plano anterior.
407
-
408
- ### Runtime operacional e checkpoints
406
+ Tarefas `XL` bloqueiam o gate sem sub-tarefas ou justificativa. `/oxe-obs` propaga automaticamente constraints para os R-IDs e Tns afetados.
407
+
408
+ #### Iteração correta do plano
409
+
410
+ Se o usuário quiser chamar `/oxe-plan` várias vezes até ficar satisfeito, o fluxo esperado é este:
411
+
412
+ - **Mesmo escopo e mesma `SPEC.md`, mas quer refinar tarefas, ondas, dependências, riscos ou validação**: usar `/oxe-plan --replan`
413
+ - **Mudou a estratégia técnica**: voltar para `/oxe-discuss` e depois `/oxe-plan --replan`
414
+ - **Mudou requisitos, critérios, prioridades ou aceite**: voltar para `/oxe-spec` e depois `/oxe-plan`
415
+
416
+ Regra prática:
417
+
418
+ - `spec` muda o **que** será entregue
419
+ - `discuss` muda o **como** ou o **porquê** da estratégia
420
+ - `plan --replan` muda **como quebrar e executar** a mesma entrega
421
+
422
+ Se já existir `PLAN.md` no escopo atual e o usuário chamar `/oxe-plan` de novo sem alterar a spec, o OXE deve tratar isso como **replan implícito**, preservando a seção **Replanejamento** e o histórico útil do plano anterior.
423
+
424
+ ### Runtime operacional e checkpoints
409
425
 
410
426
  - `PLAN.md` continua estratégico.
411
427
  - `EXECUTION-RUNTIME.md` continua como superfície humana de operação, mas o estado canónico vive no runtime.
@@ -420,36 +436,43 @@ Se já existir `PLAN.md` no escopo atual e o usuário chamar `/oxe-plan` de novo
420
436
 
421
437
  O caminho padrão de inspeção é CLI-first:
422
438
 
423
- ```bash
424
- oxe-cc status --full # health + coverage matrix + readiness gate no terminal
425
- oxe-cc runtime status # run ativo, cursor, onda atual
426
- oxe-cc runtime verify # verify enterprise: suite + evidence + manifest + risk ledger
427
- oxe-cc runtime gates list
428
- oxe-cc runtime agents --json
429
- oxe-cc runtime promote --target pr_draft
430
- ```
431
-
432
- O `status --full` mostra em ANSI: readiness do ciclo, autoavaliação do plano, health lógico, contexto, gates pendentes, verify enterprise, quotas, audit trail, recovery state, multi-agent e promotion state.
439
+ ```bash
440
+ oxe-cc status --full # health + coverage matrix + readiness gate no terminal
441
+ oxe-cc runtime status # run ativo, cursor, onda atual
442
+ oxe-cc runtime verify # verify enterprise: suite + evidence + manifest + risk ledger
443
+ oxe-cc runtime gates list
444
+ oxe-cc runtime agents --json
445
+ oxe-cc runtime promote --target pr_draft
446
+ ```
447
+
448
+ O `status --full` mostra em ANSI: readiness do ciclo, autoavaliação do plano, health lógico, contexto, gates pendentes, verify enterprise, quotas, audit trail, recovery state, multi-agent e promotion state.
433
449
 
434
450
  ### Dashboard web — opt-in para revisões de equipe
435
451
 
436
- - `oxe-cc dashboard` sobe uma interface web local em `localhost` para revisar o plano antes da execução — indicado para apresentações, operação de gates e revisões em equipe, não para substituir o terminal no dia a dia.
437
- - A UI lê os artefatos OXE reais; ela não substitui `PLAN.md`, `STATE.md` ou `VERIFY.md`.
438
- - A visão inclui ciclo principal, mapa de artefatos, active run, trace log, trilha de ondas, handoffs, checkpoints, agentes, evidências, gates, quotas, audit summary, recovery state e promotion state sem criar uma segunda fonte de verdade.
439
- - `oxe-cc runtime <start|pause|resume|replay|status|compile|verify|project|ci|promote|recover|gates|agents>` controla explicitamente `ACTIVE-RUN.json`, `runs/`, `GATES.json`, manifests de verify, artefatos de recovery, `multi-agent-state.json` e `OXE-EVENTS.ndjson` no mesmo contrato consumido pelo dashboard.
440
- - A aprovação visual persiste em `plan_review_status` no `STATE.md`, em `PLAN-REVIEW.md` e em `plan-review-comments.json`.
441
-
442
- ### Critérios de publicação desta release
443
-
444
- O pacote está pronto para uma publicação robusta quando estes sinais estiverem verdes no repositório da release:
445
-
452
+ - `oxe-cc dashboard` sobe uma interface web local em `localhost` para revisar o plano antes da execução — indicado para apresentações, operação de gates e revisões em equipe, não para substituir o terminal no dia a dia.
453
+ - A UI lê os artefatos OXE reais; ela não substitui `PLAN.md`, `STATE.md` ou `VERIFY.md`.
454
+ - A visão inclui ciclo principal, mapa de artefatos, active run, trace log, trilha de ondas, handoffs, checkpoints, agentes, evidências, gates, quotas, audit summary, recovery state e promotion state sem criar uma segunda fonte de verdade.
455
+ - `oxe-cc runtime <start|pause|resume|replay|status|compile|verify|project|ci|promote|recover|gates|agents>` controla explicitamente `ACTIVE-RUN.json`, `runs/`, `GATES.json`, manifests de verify, artefatos de recovery, `multi-agent-state.json` e `OXE-EVENTS.ndjson` no mesmo contrato consumido pelo dashboard.
456
+ - A aprovação visual persiste em `plan_review_status` no `STATE.md`, em `PLAN-REVIEW.md` e em `plan-review-comments.json`.
457
+
458
+ ### Critérios de publicação desta release
459
+
460
+ O pacote está pronto para uma publicação robusta quando estes sinais estiverem verdes no repositório da release:
461
+
446
462
  - `npm test`
447
463
  - `npm run scan:assets`
448
464
  - `npm run build:vscode-ext`
449
- - `node bin/oxe-cc.js doctor`
465
+ - `node bin/oxe-cc.js doctor --release --write-manifest`
450
466
  - `node bin/oxe-cc.js status --full`
451
467
 
452
- Não outro bloqueador funcional do plano runtime core para esta publicação. O que sobra depois dela é evolução de ergonomia e expansão de targets, não correção estrutural do contrato atual.
468
+ Artefatos obrigatórios desta fase:
469
+
470
+ - `.oxe/release/release-manifest.json`
471
+ - `.oxe/release/runtime-smoke-report.json`
472
+ - `.oxe/release/recovery-fixture-report.json`
473
+ - `.oxe/release/multi-agent-soak-report.json`
474
+
475
+ Não há outro bloqueador funcional do plano runtime core para esta publicação. O que sobra depois dela é evolução de ergonomia e expansão de targets, não correção estrutural do contrato atual.
453
476
 
454
477
  ### `/oxe-retro` — loop de aprendizado
455
478
 
@@ -544,22 +567,23 @@ node bin/oxe-cc.js --help
544
567
  | Comando | O que faz |
545
568
  |---------|-----------|
546
569
  | `oxe-cc` / `oxe-cc install` | Instala workflows e integrações |
547
- | `oxe-cc doctor` | Diagnóstico completo: Node, workflows, config, bootstrap `.oxe/`, sessão ativa, autoavaliação do plano, saúde lógica (`healthy` \| `warning` \| `broken`), drift semântico multi-runtime e workflows sem contrato no registry |
570
+ | `oxe-cc doctor` | Diagnóstico completo: Node, workflows, config, bootstrap `.oxe/`, sessão ativa, autoavaliação do plano, saúde lógica (`healthy` \| `warning` \| `broken`), drift semântico multi-runtime e workflows sem contrato no registry |
571
+ | `oxe-cc doctor --release --write-manifest` | Gate de publicação: valida versões, topo do `CHANGELOG`, runtime compilado, wrapper sync e relatórios obrigatórios; persiste `release-manifest.json` |
548
572
  | `oxe-cc status` | Próximo passo sugerido + saúde lógica do fluxo |
549
573
  | `oxe-cc status --full` | Coverage matrix + readiness gate + active run no terminal (ANSI) |
550
- | `oxe-cc status --json` | Mesmo, em JSON (schema v5), com `healthStatus`, `activeSession`, `planSelfEvaluation`, `contextPacks`, `contextQuality`, `semanticsDrift`, `verificationSummary`, `residualRiskSummary`, `evidenceCoverage`, `pendingGates`, `policyDecisionSummary`, `quotaSummary`, `auditSummary`, `promotionSummary`, `runtimeMode`, `fallbackMode`, `gateQueue`, `policyCoverage`, `promotionReadiness`, `recoveryState`, `multiAgent` e `providerCatalog` |
574
+ | `oxe-cc status --json` | Mesmo, em JSON (schema v5), com `healthStatus`, `activeSession`, `planSelfEvaluation`, `contextPacks`, `contextQuality`, `semanticsDrift`, `verificationSummary`, `residualRiskSummary`, `evidenceCoverage`, `pendingGates`, `policyDecisionSummary`, `quotaSummary`, `auditSummary`, `promotionSummary`, `runtimeMode`, `fallbackMode`, `gateQueue`, `policyCoverage`, `promotionReadiness`, `recoveryState`, `multiAgent` e `providerCatalog` |
551
575
  | `oxe-cc context build [--workflow <slug>] [--tier <minimal\|standard\|full>]` | Gera context pack(s) em `.oxe/context/packs/` — seleção determinística de artefatos por contrato de workflow |
552
576
  | `oxe-cc context inspect [--workflow <slug>]` | Inspeciona um context pack existente ou resolve sob demanda (sem escrita); útil para diagnóstico antes de iniciar um passo |
553
577
  | `oxe-cc update` | Atualiza workflows para a versão mais recente |
554
578
  | `oxe-cc init-oxe` | Bootstrap do `.oxe/` (STATE, config, codebase/, context/, install/) |
555
579
  | `oxe-cc dashboard` | Interface web local para revisão, comentários e aprovação do plano (inclui aba Context com quality score e drift semântico) |
556
- | `oxe-cc runtime <status\|start\|pause\|resume\|replay\|compile\|verify\|project\|ci\|promote\|recover\|gates\|agents>` | Controla o runtime enterprise: run ativo, grafo compilado, verify executável, gates, promoção remota, recovery, multi-agent e tracing operacional |
557
- | `oxe-cc runtime replay [--run <id>] [--from <event-id>] [--wave <n>] [--write] [--json]` | Timeline operacional estruturada; `--write` gera `REPLAY-SESSION.md` com divergências e deltas |
558
- | `oxe-cc runtime verify` | Executa `compileVerification + executeSuite + EvidenceStore + manifest + residual risk + projections` para a run ativa |
559
- | `oxe-cc runtime gates <list\|show\|resolve>` | Lista, inspeciona e resolve gates operacionais persistidos; `list` aceita `--run`, `--status`, `--scope`, `--task` e `--json` |
560
- | `oxe-cc runtime agents status [--run <id>] [--json]` | Inspeciona ownership, handoffs, heartbeats, timeouts e failover multi-agent |
561
- | `oxe-cc runtime promote --target pr_draft` | Promoção remota explícita, separada de `ship`, governada por verify, gates, risk e coverage; `pr_draft` é o alvo estável desta release |
562
- | `oxe-cc runtime recover [--run <id>] [--json]` | Reidrata journal, gates, policy decisions, evidence refs, verification artifacts e estado canónico da run |
580
+ | `oxe-cc runtime <status\|start\|pause\|resume\|replay\|compile\|verify\|project\|ci\|promote\|recover\|gates\|agents>` | Controla o runtime enterprise: run ativo, grafo compilado, verify executável, gates, promoção remota, recovery, multi-agent e tracing operacional |
581
+ | `oxe-cc runtime replay [--run <id>] [--from <event-id>] [--wave <n>] [--write] [--json]` | Timeline operacional estruturada; `--write` gera `REPLAY-SESSION.md` com divergências e deltas |
582
+ | `oxe-cc runtime verify` | Executa `compileVerification + executeSuite + EvidenceStore + manifest + residual risk + projections` para a run ativa |
583
+ | `oxe-cc runtime gates <list\|show\|resolve>` | Lista, inspeciona e resolve gates operacionais persistidos; `list` aceita `--run`, `--status`, `--scope`, `--task` e `--json` |
584
+ | `oxe-cc runtime agents status [--run <id>] [--json]` | Inspeciona ownership, handoffs, heartbeats, timeouts e failover multi-agent |
585
+ | `oxe-cc runtime promote --target pr_draft` | Promoção remota explícita, separada de `ship`, governada por verify, gates, risk e coverage; `pr_draft` é o alvo estável desta release |
586
+ | `oxe-cc runtime recover [--run <id>] [--json]` | Reidrata journal, gates, policy decisions, evidence refs, verification artifacts e estado canónico da run |
563
587
  | `oxe-cc capabilities <list\|install\|remove\|update>` | Mantém o catálogo nativo de capabilities em `.oxe/` |
564
588
  | `oxe-cc plugins <list\|install\|remove>` | Gerencia plugins de lifecycle; `install npm:<pkg>` instala em `.oxe/plugins/_npm/` |
565
589
  | `oxe-cc uninstall` | Remove integrações OXE do HOME e do repo |
@@ -644,4 +668,4 @@ TypeScript: [`lib/sdk/index.d.ts`](lib/sdk/index.d.ts) · Docs: [`lib/sdk/README
644
668
 
645
669
  ## Licença
646
670
 
647
- [MIT](LICENSE)
671
+ [MIT](LICENSE)
@@ -13,8 +13,13 @@ const path = require('path');
13
13
  const os = require('os');
14
14
  const runtimeSemantics = require('./oxe-runtime-semantics.cjs');
15
15
 
16
- const OXE_MANAGED_HTML = '<!-- oxe-cc managed -->';
17
- const OXE_MANAGED_TOML = '# oxe-cc managed';
16
+ const OXE_MANAGED_HTML = '<!-- oxe-cc managed -->';
17
+ const OXE_MANAGED_TOML = '# oxe-cc managed';
18
+
19
+ /** @param {string} name */
20
+ function isOxeCommandMarkdownName(name) {
21
+ return (name === 'oxe.md' || name.startsWith('oxe-')) && name.endsWith('.md');
22
+ }
18
23
 
19
24
  function expandTilde(p) {
20
25
  if (typeof p !== 'string') return p;
@@ -223,13 +228,13 @@ function installSkillTreeFromCursorCommands(cCmdSrc, skillsRoot, opts, pathRewri
223
228
  * Copia .md dos comandos Cursor para pastas OpenCode (markdown nativo).
224
229
  * @param {AgentInstallPaths} paths
225
230
  */
226
- function installOpenCodeCommands(cCmdSrc, paths, opts, pathRewriteNested, logOmitido, logWrite) {
227
- if (!fs.existsSync(cCmdSrc)) return;
228
- for (const destDir of paths.opencodeCommandDirs) {
229
- for (const name of fs.readdirSync(cCmdSrc)) {
230
- if (!name.startsWith('oxe-') || !name.endsWith('.md')) continue;
231
- const src = path.join(cCmdSrc, name);
232
- const dest = path.join(destDir, name);
231
+ function installOpenCodeCommands(cCmdSrc, paths, opts, pathRewriteNested, logOmitido, logWrite) {
232
+ if (!fs.existsSync(cCmdSrc)) return;
233
+ for (const destDir of paths.opencodeCommandDirs) {
234
+ for (const name of fs.readdirSync(cCmdSrc)) {
235
+ if (!isOxeCommandMarkdownName(name)) continue;
236
+ const src = path.join(cCmdSrc, name);
237
+ const dest = path.join(destDir, name);
233
238
  if (opts.dryRun) {
234
239
  if (logWrite) logWrite(`opencode ${src} → ${dest}`);
235
240
  continue;
@@ -345,13 +350,13 @@ function installWindsurfGlobalWorkflows(cCmdSrc, paths, opts, pathRewriteNested,
345
350
  * Codex: prompts em ~/.codex/prompts ou ./.codex/prompts (local).
346
351
  * @param {AgentInstallPaths} paths
347
352
  */
348
- function installCodexPrompts(cCmdSrc, paths, opts, pathRewriteNested, logOmitido, logWrite) {
349
- if (!fs.existsSync(cCmdSrc)) return;
350
- const destDir = paths.codexPromptsDir;
351
- for (const name of fs.readdirSync(cCmdSrc)) {
352
- if (!name.startsWith('oxe-') || !name.endsWith('.md')) continue;
353
- const src = path.join(cCmdSrc, name);
354
- const dest = path.join(destDir, name);
353
+ function installCodexPrompts(cCmdSrc, paths, opts, pathRewriteNested, logOmitido, logWrite) {
354
+ if (!fs.existsSync(cCmdSrc)) return;
355
+ const destDir = paths.codexPromptsDir;
356
+ for (const name of fs.readdirSync(cCmdSrc)) {
357
+ if (!isOxeCommandMarkdownName(name)) continue;
358
+ const src = path.join(cCmdSrc, name);
359
+ const dest = path.join(destDir, name);
355
360
  if (opts.dryRun) {
356
361
  if (logWrite) logWrite(`codex prompts ${src} → ${dest}`);
357
362
  continue;
@@ -385,8 +390,10 @@ function installCodexPrompts(cCmdSrc, paths, opts, pathRewriteNested, logOmitido
385
390
  * @param {{ dryRun: boolean }} u
386
391
  * @param {AgentInstallPaths} [paths] omissão = instalação global (HOME)
387
392
  */
388
- function cleanupMarkedUnifiedArtifacts(u, paths) {
389
- const p = paths || buildAgentInstallPaths(true, process.cwd());
393
+ function cleanupMarkedUnifiedArtifacts(u, paths) {
394
+ const p = paths || buildAgentInstallPaths(true, process.cwd());
395
+ const targets = u && typeof u === 'object' && u.targets && typeof u.targets === 'object' ? u.targets : null;
396
+ const shouldClean = (name) => !targets || targets[name] !== false;
390
397
 
391
398
  const unlinkQuiet = (filePath) => {
392
399
  if (!fs.existsSync(filePath)) return;
@@ -416,92 +423,104 @@ function cleanupMarkedUnifiedArtifacts(u, paths) {
416
423
  }
417
424
  };
418
425
 
419
- for (const dir of p.opencodeCommandDirs) {
420
- if (!fs.existsSync(dir)) continue;
421
- for (const name of fs.readdirSync(dir)) {
422
- if (!name.startsWith('oxe-') || !name.endsWith('.md')) continue;
423
- const filePath = path.join(dir, name);
424
- let txt = '';
425
- try {
426
- txt = fs.readFileSync(filePath, 'utf8');
427
- } catch {
428
- continue;
429
- }
430
- if (txt.includes(OXE_MANAGED_HTML)) unlinkQuiet(filePath);
431
- }
432
- }
433
-
434
- const gBase = p.geminiCommandsBase;
435
- const oxeToml = path.join(gBase, 'oxe.toml');
436
- if (fs.existsSync(oxeToml)) {
437
- try {
438
- if (fs.readFileSync(oxeToml, 'utf8').includes(OXE_MANAGED_TOML)) unlinkQuiet(oxeToml);
439
- } catch {
440
- /* ignore */
441
- }
442
- }
443
- const oxeSub = path.join(gBase, 'oxe');
444
- if (fs.existsSync(oxeSub)) {
445
- for (const name of fs.readdirSync(oxeSub)) {
446
- if (!name.endsWith('.toml')) continue;
447
- const filePath = path.join(oxeSub, name);
448
- try {
449
- if (fs.readFileSync(filePath, 'utf8').includes(OXE_MANAGED_TOML)) unlinkQuiet(filePath);
450
- } catch {
451
- /* ignore */
452
- }
453
- }
454
- try {
455
- if (!u.dryRun && fs.existsSync(oxeSub) && fs.readdirSync(oxeSub).length === 0) fs.rmdirSync(oxeSub);
456
- } catch {
457
- /* ignore */
458
- }
459
- }
460
-
461
- const wfDir = p.windsurfWorkflowsDir;
462
- if (fs.existsSync(wfDir)) {
463
- for (const name of fs.readdirSync(wfDir)) {
464
- if (name !== 'oxe.md' && !(name.startsWith('oxe-') && name.endsWith('.md'))) continue;
465
- const filePath = path.join(wfDir, name);
466
- try {
467
- if (fs.readFileSync(filePath, 'utf8').includes(OXE_MANAGED_HTML)) unlinkQuiet(filePath);
468
- } catch {
469
- /* ignore */
470
- }
471
- }
472
- }
473
-
474
- const cpDir = p.codexPromptsDir;
475
- if (fs.existsSync(cpDir)) {
476
- for (const name of fs.readdirSync(cpDir)) {
477
- if (!name.startsWith('oxe-') || !name.endsWith('.md')) continue;
478
- const filePath = path.join(cpDir, name);
479
- try {
480
- if (fs.readFileSync(filePath, 'utf8').includes(OXE_MANAGED_HTML)) unlinkQuiet(filePath);
481
- } catch {
482
- /* ignore */
483
- }
484
- }
485
- }
486
-
487
- const agRoot = p.antigravitySkillsRoot;
488
- if (fs.existsSync(agRoot)) {
489
- for (const name of fs.readdirSync(agRoot, { withFileTypes: true })) {
490
- if (!name.isDirectory()) continue;
491
- if (!/^oxe($|-)/.test(name.name)) continue;
492
- rmDirIfOxeSkill(path.join(agRoot, name.name));
493
- }
494
- }
495
-
496
- const cxRoot = p.codexAgentsSkillsRoot;
497
- if (fs.existsSync(cxRoot)) {
498
- for (const name of fs.readdirSync(cxRoot, { withFileTypes: true })) {
499
- if (!name.isDirectory()) continue;
500
- if (!/^oxe($|-)/.test(name.name)) continue;
501
- rmDirIfOxeSkill(path.join(cxRoot, name.name));
502
- }
503
- }
504
- }
426
+ if (shouldClean('opencode')) {
427
+ for (const dir of p.opencodeCommandDirs) {
428
+ if (!fs.existsSync(dir)) continue;
429
+ for (const name of fs.readdirSync(dir)) {
430
+ if (!isOxeCommandMarkdownName(name)) continue;
431
+ const filePath = path.join(dir, name);
432
+ let txt = '';
433
+ try {
434
+ txt = fs.readFileSync(filePath, 'utf8');
435
+ } catch {
436
+ continue;
437
+ }
438
+ if (txt.includes(OXE_MANAGED_HTML)) unlinkQuiet(filePath);
439
+ }
440
+ }
441
+ }
442
+
443
+ if (shouldClean('gemini')) {
444
+ const gBase = p.geminiCommandsBase;
445
+ const oxeToml = path.join(gBase, 'oxe.toml');
446
+ if (fs.existsSync(oxeToml)) {
447
+ try {
448
+ if (fs.readFileSync(oxeToml, 'utf8').includes(OXE_MANAGED_TOML)) unlinkQuiet(oxeToml);
449
+ } catch {
450
+ /* ignore */
451
+ }
452
+ }
453
+ const oxeSub = path.join(gBase, 'oxe');
454
+ if (fs.existsSync(oxeSub)) {
455
+ for (const name of fs.readdirSync(oxeSub)) {
456
+ if (!name.endsWith('.toml')) continue;
457
+ const filePath = path.join(oxeSub, name);
458
+ try {
459
+ if (fs.readFileSync(filePath, 'utf8').includes(OXE_MANAGED_TOML)) unlinkQuiet(filePath);
460
+ } catch {
461
+ /* ignore */
462
+ }
463
+ }
464
+ try {
465
+ if (!u.dryRun && fs.existsSync(oxeSub) && fs.readdirSync(oxeSub).length === 0) fs.rmdirSync(oxeSub);
466
+ } catch {
467
+ /* ignore */
468
+ }
469
+ }
470
+ }
471
+
472
+ if (shouldClean('windsurf')) {
473
+ const wfDir = p.windsurfWorkflowsDir;
474
+ if (fs.existsSync(wfDir)) {
475
+ for (const name of fs.readdirSync(wfDir)) {
476
+ if (!isOxeCommandMarkdownName(name)) continue;
477
+ const filePath = path.join(wfDir, name);
478
+ try {
479
+ if (fs.readFileSync(filePath, 'utf8').includes(OXE_MANAGED_HTML)) unlinkQuiet(filePath);
480
+ } catch {
481
+ /* ignore */
482
+ }
483
+ }
484
+ }
485
+ }
486
+
487
+ if (shouldClean('codex')) {
488
+ const cpDir = p.codexPromptsDir;
489
+ if (fs.existsSync(cpDir)) {
490
+ for (const name of fs.readdirSync(cpDir)) {
491
+ if (!isOxeCommandMarkdownName(name)) continue;
492
+ const filePath = path.join(cpDir, name);
493
+ try {
494
+ if (fs.readFileSync(filePath, 'utf8').includes(OXE_MANAGED_HTML)) unlinkQuiet(filePath);
495
+ } catch {
496
+ /* ignore */
497
+ }
498
+ }
499
+ }
500
+ }
501
+
502
+ if (shouldClean('antigravity')) {
503
+ const agRoot = p.antigravitySkillsRoot;
504
+ if (fs.existsSync(agRoot)) {
505
+ for (const name of fs.readdirSync(agRoot, { withFileTypes: true })) {
506
+ if (!name.isDirectory()) continue;
507
+ if (!/^oxe($|-)/.test(name.name)) continue;
508
+ rmDirIfOxeSkill(path.join(agRoot, name.name));
509
+ }
510
+ }
511
+ }
512
+
513
+ if (shouldClean('codex')) {
514
+ const cxRoot = p.codexAgentsSkillsRoot;
515
+ if (fs.existsSync(cxRoot)) {
516
+ for (const name of fs.readdirSync(cxRoot, { withFileTypes: true })) {
517
+ if (!name.isDirectory()) continue;
518
+ if (!/^oxe($|-)/.test(name.name)) continue;
519
+ rmDirIfOxeSkill(path.join(cxRoot, name.name));
520
+ }
521
+ }
522
+ }
523
+ }
505
524
 
506
525
  module.exports = {
507
526
  OXE_MANAGED_HTML,
@@ -520,6 +539,7 @@ module.exports = {
520
539
  geminiUserDir,
521
540
  codexAgentsSkillsRoot,
522
541
  codexPromptsDir,
523
- antigravitySkillsRoot,
524
- cleanupMarkedUnifiedArtifacts,
525
- };
542
+ antigravitySkillsRoot,
543
+ isOxeCommandMarkdownName,
544
+ cleanupMarkedUnifiedArtifacts,
545
+ };
@@ -36,6 +36,16 @@ function resolveInstallOptionsFromConfig(projectRoot, optsIn) {
36
36
  opts.explicitScope = true;
37
37
  }
38
38
 
39
+ if (!opts.explicitIdeScope && !opts.oxeOnly && typeof inst.ide_scope === 'string') {
40
+ if (inst.ide_scope === 'local') {
41
+ opts.ideLocal = true;
42
+ opts.explicitIdeScope = true;
43
+ } else if (inst.ide_scope === 'global') {
44
+ opts.ideLocal = false;
45
+ opts.explicitIdeScope = true;
46
+ }
47
+ }
48
+
39
49
  if (!opts.oxeOnly && inst.vscode === true) {
40
50
  opts.vscode = true;
41
51
  }