oxe-cc 1.5.0 → 1.6.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 (50) hide show
  1. package/.cursor/commands/oxe-dashboard.md +2 -2
  2. package/.cursor/commands/oxe-execute.md +2 -2
  3. package/.cursor/commands/oxe-plan.md +2 -2
  4. package/.github/prompts/oxe-dashboard.prompt.md +2 -2
  5. package/.github/prompts/oxe-execute.prompt.md +2 -2
  6. package/.github/prompts/oxe-plan.prompt.md +2 -2
  7. package/AGENTS.md +1 -1
  8. package/CHANGELOG.md +52 -0
  9. package/README.md +17 -15
  10. package/bin/lib/oxe-context-engine.cjs +9 -4
  11. package/bin/lib/oxe-dashboard.cjs +140 -58
  12. package/bin/lib/oxe-project-health.cjs +486 -151
  13. package/bin/lib/oxe-rationality.cjs +385 -0
  14. package/bin/lib/oxe-release.cjs +76 -4
  15. package/bin/oxe-cc.js +113 -58
  16. package/commands/oxe/dashboard.md +2 -2
  17. package/commands/oxe/execute.md +2 -2
  18. package/commands/oxe/plan.md +2 -2
  19. package/docs/RELEASE-READINESS.md +8 -0
  20. package/docs/RUNTIME-SMOKE-MATRIX.md +9 -2
  21. package/lib/sdk/index.cjs +20 -11
  22. package/lib/sdk/index.d.ts +99 -34
  23. package/oxe/templates/CONFIG.md +3 -3
  24. package/oxe/templates/EXECUTION-RUNTIME.template.md +1 -1
  25. package/oxe/templates/FIXTURE-PACK.template.json +34 -0
  26. package/oxe/templates/FIXTURE-PACK.template.md +21 -0
  27. package/oxe/templates/IMPLEMENTATION-PACK.template.json +52 -0
  28. package/oxe/templates/IMPLEMENTATION-PACK.template.md +36 -0
  29. package/oxe/templates/INVESTIGATION.template.md +38 -38
  30. package/oxe/templates/PLAN.template.md +23 -14
  31. package/oxe/templates/REFERENCE-ANCHORS.template.md +24 -0
  32. package/oxe/templates/RESEARCH.template.md +11 -11
  33. package/oxe/templates/SPEC.template.md +6 -6
  34. package/oxe/templates/SUMMARY.template.md +20 -20
  35. package/oxe/templates/config.template.json +1 -1
  36. package/oxe/workflows/execute.md +18 -2
  37. package/oxe/workflows/milestone.md +12 -12
  38. package/oxe/workflows/next.md +1 -1
  39. package/oxe/workflows/plan.md +115 -57
  40. package/oxe/workflows/references/adaptive-discovery.md +27 -27
  41. package/oxe/workflows/references/flow-robustness-contract.md +80 -80
  42. package/oxe/workflows/references/session-path-resolution.md +71 -71
  43. package/oxe/workflows/references/workflow-runtime-contracts.json +36 -4
  44. package/oxe/workflows/verify.md +4 -4
  45. package/oxe/workflows/workstream.md +16 -16
  46. package/package.json +1 -1
  47. package/packages/runtime/package.json +1 -1
  48. package/vscode-extension/oxe-agents-1.5.1.vsix +0 -0
  49. package/vscode-extension/oxe-agents-1.6.0.vsix +0 -0
  50. package/vscode-extension/package.json +1 -1
package/bin/oxe-cc.js CHANGED
@@ -1527,15 +1527,20 @@ function printOxeHealthDiagnostics(target, c, diagOpts = {}) {
1527
1527
  if (r.eventsSummary) {
1528
1528
  console.log(` ${c ? dim : ''}Tracing:${c ? reset : ''} ${r.eventsSummary.total} evento(s)`);
1529
1529
  }
1530
- if (r.planSelfEvaluation && r.planSelfEvaluation.hasSection) {
1531
- const best = r.planSelfEvaluation.bestPlan || '—';
1532
- const conf =
1533
- typeof r.planSelfEvaluation.confidence === 'number' ? `${r.planSelfEvaluation.confidence}%` : '—';
1534
- console.log(` ${c ? dim : ''}Plano (autoavaliação):${c ? reset : ''} melhor=${best} | confiança=${conf}`);
1535
- }
1536
- if (r.contextQuality) {
1537
- console.log(
1538
- ` ${c ? dim : ''}Contexto:${c ? reset : ''} score=${r.contextQuality.primaryScore != null ? r.contextQuality.primaryScore : ''} | workflow=${r.contextQuality.primaryWorkflow || ''} | status=${r.contextQuality.primaryStatus || ''}`
1530
+ if (r.planSelfEvaluation && r.planSelfEvaluation.hasSection) {
1531
+ const best = r.planSelfEvaluation.bestPlan || '—';
1532
+ const conf =
1533
+ typeof r.planSelfEvaluation.confidence === 'number' ? `${r.planSelfEvaluation.confidence}%` : '—';
1534
+ console.log(` ${c ? dim : ''}Plano (autoavaliação):${c ? reset : ''} melhor=${best} | confiança=${conf}`);
1535
+ }
1536
+ if (typeof r.executionRationalityReady === 'boolean') {
1537
+ console.log(
1538
+ ` ${c ? dim : ''}Prontidão racional:${c ? reset : ''} implementation=${r.implementationPackReady ? 'ok' : 'pendente'} | anchors=${r.referenceAnchorsReady ? 'ok' : 'pendente'} | fixtures=${r.fixturePackReady ? 'ok' : 'pendente'}`
1539
+ );
1540
+ }
1541
+ if (r.contextQuality) {
1542
+ console.log(
1543
+ ` ${c ? dim : ''}Contexto:${c ? reset : ''} score=${r.contextQuality.primaryScore != null ? r.contextQuality.primaryScore : '—'} | workflow=${r.contextQuality.primaryWorkflow || '—'} | status=${r.contextQuality.primaryStatus || '—'}`
1539
1544
  );
1540
1545
  }
1541
1546
  if (r.semanticsDrift) {
@@ -1663,10 +1668,11 @@ function runStatusFull(target) {
1663
1668
  sp = oxeHealth.scopedOxePaths(target, activeSession);
1664
1669
  }
1665
1670
 
1666
- printSection('OXE ▸ status --full');
1667
- console.log(` ${c ? green : ''}Projeto:${c ? reset : ''} ${c ? cyan : ''}${target}${c ? reset : ''}`);
1668
- console.log(` ${c ? green : ''}Sessão:${c ? reset : ''} ${c ? cyan : ''}${activeSession || 'modo legado'}${c ? reset : ''}`);
1669
- console.log(` ${c ? green : ''}Fase:${c ? reset : ''} ${report.phase || ''}`);
1671
+ printSection('OXE ▸ status --full');
1672
+ console.log(` ${c ? green : ''}Projeto:${c ? reset : ''} ${c ? cyan : ''}${target}${c ? reset : ''}`);
1673
+ console.log(` ${c ? green : ''}Sessão:${c ? reset : ''} ${c ? cyan : ''}${activeSession || 'modo legado'}${c ? reset : ''}`);
1674
+ console.log(` ${c ? green : ''}Workspace mode:${c ? reset : ''} ${report.workspaceMode || 'oxe_project'}`);
1675
+ console.log(` ${c ? green : ''}Fase:${c ? reset : ''} ${report.phase || '—'}`);
1670
1676
 
1671
1677
  const healthColor = report.healthStatus === 'healthy' ? green : report.healthStatus === 'warning' ? yellow : red;
1672
1678
  console.log(` ${c ? green : ''}Saúde:${c ? reset : ''} ${c ? healthColor : ''}${report.healthStatus}${c ? reset : ''}`);
@@ -1696,17 +1702,41 @@ function runStatusFull(target) {
1696
1702
  console.log(` ${coverageCell(codebaseExists, 'codebase scan')} ${coverageCell(specExists, 'SPEC.md')} ${coverageCell(planExists, 'PLAN.md')} ${coverageCell(verifyExists, 'VERIFY.md')} ${coverageCell(lessonsExists, 'LESSONS.md')}`);
1697
1703
 
1698
1704
  // Readiness gate
1699
- const ready = specExists && planExists && !report.planWarn.length && !report.runtimeWarn.length;
1700
- const gateColor = ready ? green : yellow;
1701
- console.log(`\n ${c ? yellow : ''}Readiness gate${c ? reset : ''}`);
1702
- console.log(` ${c ? gateColor : ''}${ready ? '✓ Pronto para executar' : '✗ Não pronto para executar'}${c ? reset : ''}`);
1703
- if (!specExists) console.log(` ${c ? dim : ''} • SPEC.md ausente — rode /oxe-spec${c ? reset : ''}`);
1704
- if (!planExists) console.log(` ${c ? dim : ''} • PLAN.md ausente — rode /oxe-plan${c ? reset : ''}`);
1705
- if (report.planWarn.length) {
1706
- for (const w of report.planWarn) {
1707
- console.log(` ${c ? yellow : ''} • ${w}${c ? reset : ''}`);
1708
- }
1709
- }
1705
+ const packageMode = report.workspaceMode === 'product_package';
1706
+ const ready = packageMode
1707
+ ? Boolean(report.releaseReadiness && report.releaseReadiness.ok)
1708
+ : specExists
1709
+ && planExists
1710
+ && report.executionRationalityReady
1711
+ && !report.planWarn.length
1712
+ && !report.runtimeWarn.length;
1713
+ const gateColor = ready ? green : yellow;
1714
+ console.log(`\n ${c ? yellow : ''}Readiness gate${c ? reset : ''}`);
1715
+ console.log(` ${c ? gateColor : ''}${ready ? (packageMode ? '✓ Pronto para publicar' : '✓ Pronto para executar') : (packageMode ? '✗ Não pronto para publicar' : '✗ Não pronto para executar')}${c ? reset : ''}`);
1716
+ if (packageMode) {
1717
+ const releaseReadiness = report.releaseReadiness || { blockers: [], warnings: [] };
1718
+ if (Array.isArray(releaseReadiness.blockers) && releaseReadiness.blockers.length) {
1719
+ for (const blocker of releaseReadiness.blockers) {
1720
+ console.log(` ${c ? red : ''} • ${blocker}${c ? reset : ''}`);
1721
+ }
1722
+ }
1723
+ if (Array.isArray(releaseReadiness.warnings) && releaseReadiness.warnings.length) {
1724
+ for (const warning of releaseReadiness.warnings) {
1725
+ console.log(` ${c ? yellow : ''} • ${warning}${c ? reset : ''}`);
1726
+ }
1727
+ }
1728
+ } else {
1729
+ if (!specExists) console.log(` ${c ? dim : ''} • SPEC.md ausente — rode /oxe-spec${c ? reset : ''}`);
1730
+ if (!planExists) console.log(` ${c ? dim : ''} • PLAN.md ausente — rode /oxe-plan${c ? reset : ''}`);
1731
+ if (report.planWarn.length) {
1732
+ for (const w of report.planWarn) {
1733
+ console.log(` ${c ? yellow : ''} • ${w}${c ? reset : ''}`);
1734
+ }
1735
+ }
1736
+ if (planExists) {
1737
+ console.log(` ${c ? dim : ''} • Artefatos racionais:${c ? reset : ''} implementation=${report.implementationPackReady ? 'ok' : 'pendente'} · anchors=${report.referenceAnchorsReady ? 'ok' : 'pendente'} · fixtures=${report.fixturePackReady ? 'ok' : 'pendente'}`);
1738
+ }
1739
+ }
1710
1740
 
1711
1741
  // Active run summary
1712
1742
  if (report.activeRun) {
@@ -1792,18 +1822,24 @@ function runStatusFull(target) {
1792
1822
  }
1793
1823
 
1794
1824
  // Plan self-evaluation
1795
- if (report.planSelfEvaluation) {
1796
- const pse = report.planSelfEvaluation;
1797
- console.log(`\n ${c ? yellow : ''}Autoavaliação do plano${c ? reset : ''}`);
1798
- if (pse.best_plan_current != null) {
1799
- const bestColor = pse.best_plan_current ? green : red;
1800
- console.log(` ${c ? dim : ''}Melhor plano atual:${c ? reset : ''} ${c ? bestColor : ''}${pse.best_plan_current ? 'sim' : 'não'}${c ? reset : ''}`);
1801
- }
1802
- if (pse.confidence != null) {
1803
- const confColor = Number(pse.confidence) >= 70 ? green : Number(pse.confidence) >= 50 ? yellow : red;
1804
- console.log(` ${c ? dim : ''}Confiança:${c ? reset : ''} ${c ? confColor : ''}${pse.confidence}%${c ? reset : ''}`);
1805
- }
1806
- }
1825
+ if (!packageMode && report.planSelfEvaluation) {
1826
+ const pse = report.planSelfEvaluation;
1827
+ const threshold = report.planConfidenceThreshold || 90;
1828
+ console.log(`\n ${c ? yellow : ''}Autoavaliação do plano${c ? reset : ''}`);
1829
+ if (pse.best_plan_current != null) {
1830
+ const bestColor = pse.best_plan_current ? green : red;
1831
+ console.log(` ${c ? dim : ''}Melhor plano atual:${c ? reset : ''} ${c ? bestColor : ''}${pse.best_plan_current ? 'sim' : 'não'}${c ? reset : ''}`);
1832
+ }
1833
+ if (pse.confidence != null) {
1834
+ const confColor = report.planConfidenceExecutable
1835
+ ? green
1836
+ : Number(pse.confidence) >= Math.max(80, threshold - 10)
1837
+ ? yellow
1838
+ : red;
1839
+ console.log(` ${c ? dim : ''}Confiança:${c ? reset : ''} ${c ? confColor : ''}${pse.confidence}%${c ? reset : ''}`);
1840
+ console.log(` ${c ? dim : ''}Gate executável:${c ? reset : ''} > ${threshold}%${pse.executable ? ' (atingido)' : ' (ainda não atingido)'}`);
1841
+ }
1842
+ }
1807
1843
 
1808
1844
  console.log(`\n ${c ? dim : ''}Próximo passo:${c ? reset : ''} ${c ? cyan : ''}${report.next && report.next.cursorCmd ? report.next.cursorCmd : '—'}${c ? reset : ''}`);
1809
1845
  console.log(` ${c ? dim : ''}Motivo:${c ? reset : ''} ${report.next && report.next.reason ? report.next.reason : '—'}`);
@@ -1822,11 +1858,13 @@ function runStatus(target, opts = {}) {
1822
1858
  const next = report.next;
1823
1859
 
1824
1860
  if (opts.json) {
1825
- /** @type {Record<string, unknown>} */
1826
- const payload = {
1827
- oxeStatusSchema: 5,
1828
- projectRoot: path.resolve(target),
1829
- nextStep: report.next.step,
1861
+ /** @type {Record<string, unknown>} */
1862
+ const payload = {
1863
+ oxeStatusSchema: 5,
1864
+ projectRoot: path.resolve(target),
1865
+ workspaceMode: report.workspaceMode || 'oxe_project',
1866
+ releaseReadiness: report.releaseReadiness || null,
1867
+ nextStep: report.next.step,
1830
1868
  cursorCmd: report.next.cursorCmd,
1831
1869
  reason: report.next.reason,
1832
1870
  artifacts: report.next.artifacts,
@@ -1835,10 +1873,18 @@ function runStatus(target, opts = {}) {
1835
1873
  activeSession: report.activeSession,
1836
1874
  scanDate: report.scanDate,
1837
1875
  staleScan: report.stale,
1838
- compactDate: report.compactDate,
1839
- staleCompact: report.staleCompact,
1840
- planSelfEvaluation: report.planSelfEvaluation,
1841
- planReviewStatus: report.planReviewStatus,
1876
+ compactDate: report.compactDate,
1877
+ staleCompact: report.staleCompact,
1878
+ planSelfEvaluation: report.planSelfEvaluation,
1879
+ planConfidenceThreshold: report.planConfidenceThreshold,
1880
+ planConfidenceExecutable: report.planConfidenceExecutable,
1881
+ implementationPackReady: report.implementationPackReady,
1882
+ referenceAnchorsReady: report.referenceAnchorsReady,
1883
+ fixturePackReady: report.fixturePackReady,
1884
+ executionRationalityReady: report.executionRationalityReady,
1885
+ criticalExecutionGaps: report.criticalExecutionGaps,
1886
+ executionRationality: report.executionRationality,
1887
+ planReviewStatus: report.planReviewStatus,
1842
1888
  activeRun: report.activeRun,
1843
1889
  eventsSummary: report.eventsSummary,
1844
1890
  runtimeMode: report.runtimeMode,
@@ -1895,9 +1941,10 @@ function runStatus(target, opts = {}) {
1895
1941
  return;
1896
1942
  }
1897
1943
 
1898
- printSection('OXE ▸ status');
1899
- const c = useAnsiColors();
1900
- console.log(` ${c ? green : ''}Projeto:${c ? reset : ''} ${c ? cyan : ''}${target}${c ? reset : ''}`);
1944
+ printSection('OXE ▸ status');
1945
+ const c = useAnsiColors();
1946
+ console.log(` ${c ? green : ''}Projeto:${c ? reset : ''} ${c ? cyan : ''}${target}${c ? reset : ''}`);
1947
+ console.log(` ${c ? dim : ''}Workspace mode:${c ? reset : ''} ${report.workspaceMode || 'oxe_project'}`);
1901
1948
 
1902
1949
  const wfTgt = oxeWorkflows.resolveWorkflowsDir(target);
1903
1950
  if (!wfTgt) {
@@ -1928,16 +1975,24 @@ function runStatus(target, opts = {}) {
1928
1975
  }
1929
1976
 
1930
1977
  // Explicit blockage diagnosis
1931
- const specMissing = !fs.existsSync(path.join(target, '.oxe', 'SPEC.md'));
1932
- const planMissing = !fs.existsSync(path.join(target, '.oxe', 'PLAN.md'));
1933
- const verifyMissing = !fs.existsSync(path.join(target, '.oxe', 'VERIFY.md'));
1934
- if (specMissing) {
1935
- console.log(` ${c ? yellow : ''}⚠ Bloqueio:${c ? reset : ''} SPEC.md ausente — rode ${c ? cyan : ''}/oxe-spec${c ? reset : ''} antes de planejar`);
1936
- } else if (planMissing) {
1937
- console.log(` ${c ? yellow : ''}⚠ Bloqueio:${c ? reset : ''} PLAN.md ausente — rode ${c ? cyan : ''}/oxe-plan${c ? reset : ''}`);
1938
- } else if (verifyMissing && !planMissing) {
1939
- console.log(` ${c ? dim : ''}Obs.:${c ? reset : ''} VERIFY.md ainda não gerado — rode ${c ? cyan : ''}/oxe-verify${c ? reset : ''} após executar`);
1940
- }
1978
+ const packageMode = report.workspaceMode === 'product_package';
1979
+ const specMissing = !fs.existsSync(path.join(target, '.oxe', 'SPEC.md'));
1980
+ const planMissing = !fs.existsSync(path.join(target, '.oxe', 'PLAN.md'));
1981
+ const verifyMissing = !fs.existsSync(path.join(target, '.oxe', 'VERIFY.md'));
1982
+ if (packageMode) {
1983
+ const releaseReadiness = report.releaseReadiness || { ok: false, blockers: [], warnings: [] };
1984
+ if (!releaseReadiness.ok && Array.isArray(releaseReadiness.blockers) && releaseReadiness.blockers.length) {
1985
+ console.log(` ${c ? yellow : ''} Release blockers:${c ? reset : ''} ${releaseReadiness.blockers[0]}`);
1986
+ } else if (Array.isArray(releaseReadiness.warnings) && releaseReadiness.warnings.length) {
1987
+ console.log(` ${c ? dim : ''}Obs.:${c ? reset : ''} release warnings ativas — ${releaseReadiness.warnings[0]}`);
1988
+ }
1989
+ } else if (specMissing) {
1990
+ console.log(` ${c ? yellow : ''}⚠ Bloqueio:${c ? reset : ''} SPEC.md ausente — rode ${c ? cyan : ''}/oxe-spec${c ? reset : ''} antes de planejar`);
1991
+ } else if (planMissing) {
1992
+ console.log(` ${c ? yellow : ''}⚠ Bloqueio:${c ? reset : ''} PLAN.md ausente — rode ${c ? cyan : ''}/oxe-plan${c ? reset : ''}`);
1993
+ } else if (verifyMissing && !planMissing) {
1994
+ console.log(` ${c ? dim : ''}Obs.:${c ? reset : ''} VERIFY.md ainda não gerado — rode ${c ? cyan : ''}/oxe-verify${c ? reset : ''} após executar`);
1995
+ }
1941
1996
 
1942
1997
  if (opts.hints) {
1943
1998
  console.log(`\n ${c ? cyan : ''}Lembretes (rotina OXE)${reset}`);
@@ -15,7 +15,7 @@ oxe_tool_profile: read_heavy
15
15
  oxe_confidence_policy: explicit
16
16
  oxe_context_tier: standard
17
17
  oxe_contract_version: 2.0.0
18
- oxe_semantics_hash: 37f74d8be3442fe1
18
+ oxe_semantics_hash: ebb4473c14e5b080
19
19
  ---
20
20
 
21
21
  <!-- oxe-reasoning-contract:start -->
@@ -29,7 +29,7 @@ oxe_semantics_hash: 37f74d8be3442fe1
29
29
  - **Política de confiança:** explícita
30
30
  - **Tier de contexto padrão:** padrão
31
31
  - **Versão do contrato:** 2.0.0
32
- - **Checksum semântico:** `37f74d8be3442fe1`
32
+ - **Checksum semântico:** `ebb4473c14e5b080`
33
33
  - **Entrada de contexto prioritária:** `.oxe/context/packs/dashboard.md` e `.oxe/context/packs/dashboard.json`
34
34
  - **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
35
35
  - **Inspeção estruturada:** `oxe-cc context inspect --workflow dashboard --json`
@@ -17,7 +17,7 @@ oxe_tool_profile: write_bounded
17
17
  oxe_confidence_policy: explicit
18
18
  oxe_context_tier: standard
19
19
  oxe_contract_version: 2.0.0
20
- oxe_semantics_hash: 14ddb483209b28b3
20
+ oxe_semantics_hash: 7b3446b77aef9353
21
21
  ---
22
22
 
23
23
  <!-- oxe-reasoning-contract:start -->
@@ -31,7 +31,7 @@ oxe_semantics_hash: 14ddb483209b28b3
31
31
  - **Política de confiança:** explícita
32
32
  - **Tier de contexto padrão:** padrão
33
33
  - **Versão do contrato:** 2.0.0
34
- - **Checksum semântico:** `14ddb483209b28b3`
34
+ - **Checksum semântico:** `7b3446b77aef9353`
35
35
  - **Entrada de contexto prioritária:** `.oxe/context/packs/execute.md` e `.oxe/context/packs/execute.json`
36
36
  - **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
37
37
  - **Inspeção estruturada:** `oxe-cc context inspect --workflow execute --json`
@@ -16,7 +16,7 @@ oxe_tool_profile: mixed
16
16
  oxe_confidence_policy: rubric
17
17
  oxe_context_tier: standard
18
18
  oxe_contract_version: 2.0.0
19
- oxe_semantics_hash: 7809d830a5f5ff4a
19
+ oxe_semantics_hash: 5c589398cb807029
20
20
  ---
21
21
 
22
22
  <!-- oxe-reasoning-contract:start -->
@@ -30,7 +30,7 @@ oxe_semantics_hash: 7809d830a5f5ff4a
30
30
  - **Política de confiança:** rubrica
31
31
  - **Tier de contexto padrão:** padrão
32
32
  - **Versão do contrato:** 2.0.0
33
- - **Checksum semântico:** `7809d830a5f5ff4a`
33
+ - **Checksum semântico:** `5c589398cb807029`
34
34
  - **Entrada de contexto prioritária:** `.oxe/context/packs/plan.md` e `.oxe/context/packs/plan.json`
35
35
  - **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
36
36
  - **Inspeção estruturada:** `oxe-cc context inspect --workflow plan --json`
@@ -13,10 +13,13 @@ npx oxe-cc doctor --release --write-manifest
13
13
 
14
14
  O `doctor --release` deve bloquear a publicação quando encontrar:
15
15
 
16
+ - árvore canónica `oxe/workflows/`, `oxe/workflows/references/` ou `commands/oxe/` ausente
17
+ - `workflow-runtime-contracts.json` ausente ou inválido
16
18
  - drift de versão entre `package.json`, `packages/runtime/package.json`, `vscode-extension/package.json`, `README.md`, `CHANGELOG.md` e banner
17
19
  - topo do `CHANGELOG` ausente, sem data ou sem highlights
18
20
  - runtime não compilado em `lib/runtime/index.js`
19
21
  - wrappers dirty após `sync-runtime-metadata` e `sync:cursor`
22
+ - drift semântico entre workflows canónicos e superfícies geradas
20
23
  - ausência ou falha dos relatórios obrigatórios da release
21
24
 
22
25
  ## Relatórios obrigatórios
@@ -44,3 +47,8 @@ O pipeline de CI e o pipeline de release devem rodar o mesmo gate:
44
47
  3. `npm run release:doctor`
45
48
 
46
49
  Se qualquer etapa falhar, a release não está pronta.
50
+
51
+ ## Observações operacionais
52
+
53
+ - `status` e `status --full` distinguem agora `workspaceMode: product_package` de `workspaceMode: oxe_project`.
54
+ - No repositório do pacote, readiness passa a ser de publicação; o CLI deixa de bloquear por ausência de `PLAN.md` executável quando não há ciclo ativo declarado.
@@ -1,6 +1,6 @@
1
1
  # OXE — Runtime Smoke Matrix
2
2
 
3
- > Estado de suporte por runtime de IA. Atualizado em v1.5.0.
3
+ > Estado de suporte por runtime de IA. Atualizado em v1.6.0.
4
4
  >
5
5
  > `✓` = suportado e testado | `~` = suportado parcialmente | `✗` = não suportado | `?` = não testado
6
6
 
@@ -60,11 +60,18 @@ Este documento descreve a matrix estável da release. O artefato operacional con
60
60
 
61
61
  ### Codex CLI
62
62
 
63
- - Lê `.github/prompts/` via `--instructions` flag
63
+ - Lê `.codex/prompts/` como entrypoint e depende também de skills em `.agents/skills/oxe/`
64
+ - A smoke matrix desta release valida **prompts e skills**; falha se um dos dois lados estiver ausente ou sem a política de resolução de workflow
64
65
  - `verify` parcial: gera VERIFY.md mas evidências são menos detalhadas (sem análise de AST)
65
66
  - `runtime-first` não suportado: Codex CLI não tem acesso a subprocessos Node
66
67
  - **Limitação:** não suporta contexto multi-arquivo simultâneo em tasks longas
67
68
 
69
+ ### Escopo de instalação
70
+
71
+ - `--local` define o layout do repositório (`oxe/` + `.oxe/` vs só `.oxe/`)
72
+ - `--ide-local` define que a integração do runtime deve ser instalada no próprio projeto
73
+ - Para Codex, `install --codex --ide-local` é o fluxo correto quando a intenção é materializar `.codex/` e `.agents/` no repositório atual
74
+
68
75
  ### Gemini CLI
69
76
 
70
77
  - `plan` e `execute` parciais: segue o fluxo mas pode divergir dos critérios A* do SPEC
package/lib/sdk/index.cjs CHANGED
@@ -20,6 +20,7 @@ const azure = require('../../bin/lib/oxe-azure.cjs');
20
20
  const context = require('../../bin/lib/oxe-context-engine.cjs');
21
21
  const runtimeSemantics = require('../../bin/lib/oxe-runtime-semantics.cjs');
22
22
  const release = require('../../bin/lib/oxe-release.cjs');
23
+ const rationality = require('../../bin/lib/oxe-rationality.cjs');
23
24
 
24
25
  const PACKAGE_ROOT = path.join(__dirname, '..', '..');
25
26
 
@@ -541,20 +542,23 @@ module.exports = {
541
542
  /** Parsing de artefatos OXE (PLAN, SPEC, STATE, hypotheses, confidence, lessons). */
542
543
  parsePlan,
543
544
  parseSpec,
544
- parseHypotheses: context.parseHypotheses,
545
- parseConfidenceVector: context.parseConfidenceVector,
546
- parseState,
545
+ parseHypotheses: context.parseHypotheses,
546
+ parseConfidenceVector: context.parseConfidenceVector,
547
+ parseExecutionPlanTasks: rationality.parsePlanTasks,
548
+ parseState,
547
549
  validateDecisionFidelity,
548
550
  parseLessonsMetrics,
549
551
  updateLessonMetric,
550
552
  deprecateLowEffectiveness,
551
553
 
552
554
  /** Estado do projeto, SPEC/PLAN, fase, config. */
553
- health: {
554
- loadOxeConfigMerged: health.loadOxeConfigMerged,
555
- validateConfigShape: health.validateConfigShape,
556
- buildHealthReport: health.buildHealthReport,
557
- suggestNextStep: health.suggestNextStep,
555
+ health: {
556
+ loadOxeConfigMerged: health.loadOxeConfigMerged,
557
+ validateConfigShape: health.validateConfigShape,
558
+ buildHealthReport: health.buildHealthReport,
559
+ detectWorkspaceMode: health.detectWorkspaceMode,
560
+ shouldSuppressExecutionWorkspaceGates: health.shouldSuppressExecutionWorkspaceGates,
561
+ suggestNextStep: health.suggestNextStep,
558
562
  oxePaths: health.oxePaths,
559
563
  parseStatePhase: health.parseStatePhase,
560
564
  parseLastScanDate: health.parseLastScanDate,
@@ -568,9 +572,11 @@ module.exports = {
568
572
  planAgentsWarnings: health.planAgentsWarnings,
569
573
  phaseCoherenceWarnings: health.phaseCoherenceWarnings,
570
574
  specSectionWarnings: health.specSectionWarnings,
571
- planWaveWarningsFixed: health.planWaveWarningsFixed,
572
- planTaskAceiteWarnings: health.planTaskAceiteWarnings,
573
- verifyGapsWithoutSummaryWarning: health.verifyGapsWithoutSummaryWarning,
575
+ planWaveWarningsFixed: health.planWaveWarningsFixed,
576
+ planTaskAceiteWarnings: health.planTaskAceiteWarnings,
577
+ buildExecutionRationality: health.buildExecutionRationality,
578
+ executionRationalityWarningsFromSummary: health.executionRationalityWarningsFromSummary,
579
+ verifyGapsWithoutSummaryWarning: health.verifyGapsWithoutSummaryWarning,
574
580
  expandExecutionProfile: health.expandExecutionProfile,
575
581
  ALLOWED_CONFIG_KEYS: health.ALLOWED_CONFIG_KEYS,
576
582
  EXECUTION_PROFILES: health.EXECUTION_PROFILES,
@@ -654,6 +660,9 @@ module.exports = {
654
660
  loadRecoveryFixtureReport: release.loadRecoveryFixtureReport,
655
661
  loadMultiAgentSoakReport: release.loadMultiAgentSoakReport,
656
662
  buildReleaseManifest: release.buildReleaseManifest,
663
+ inspectCanonicalSource: release.inspectCanonicalSource,
664
+ evaluateReleaseManifest: release.evaluateReleaseManifest,
665
+ inspectReleaseReadiness: release.inspectReleaseReadiness,
657
666
  checkReleaseConsistency: release.checkReleaseConsistency,
658
667
  },
659
668
 
@@ -160,6 +160,8 @@ export interface MultiAgentStatusSummary {
160
160
  summary?: Record<string, unknown> | null;
161
161
  }
162
162
 
163
+ export type WorkspaceMode = 'product_package' | 'oxe_project';
164
+
163
165
  export interface ReleaseManifest {
164
166
  schema_version: number;
165
167
  generated_at: string;
@@ -168,6 +170,8 @@ export interface ReleaseManifest {
168
170
  release_contract: Record<string, unknown>;
169
171
  versions: Record<string, unknown>;
170
172
  runtime_compiled: { path: string; ok: boolean };
173
+ canonical_source?: Record<string, unknown>;
174
+ semantics?: Record<string, unknown>;
171
175
  wrappers: Record<string, unknown>;
172
176
  reports: Record<string, unknown>;
173
177
  }
@@ -225,21 +229,67 @@ export interface AuditSummary {
225
229
  actions: Record<string, number>;
226
230
  }
227
231
 
228
- export interface PromotionSummary {
229
- status: string | null;
230
- targetKind: string | null;
231
- remote: string | null;
232
- targetRef: string | null;
233
- prUrl: string | null;
234
- prNumber: number | null;
235
- coveragePercent: number | null;
236
- reasons: string[];
237
- path: string;
238
- }
232
+ export interface PromotionSummary {
233
+ status: string | null;
234
+ targetKind: string | null;
235
+ remote: string | null;
236
+ targetRef: string | null;
237
+ prUrl: string | null;
238
+ prNumber: number | null;
239
+ coveragePercent: number | null;
240
+ reasons: string[];
241
+ path: string;
242
+ }
243
+
244
+ export interface ExecutionImplementationPackSummary {
245
+ path: string | null;
246
+ exists: boolean;
247
+ parseError: string | null;
248
+ ready: boolean;
249
+ tasks: Array<Record<string, unknown>>;
250
+ taskCount: number;
251
+ mutatingTasks: number;
252
+ criticalGaps: string[];
253
+ }
254
+
255
+ export interface ExecutionReferenceAnchorsSummary {
256
+ path: string | null;
257
+ exists: boolean;
258
+ ready: boolean;
259
+ anchors: Array<Record<string, unknown>>;
260
+ missingCriticalCount: number;
261
+ staleCount: number;
262
+ criticalGaps: string[];
263
+ }
264
+
265
+ export interface ExecutionFixturePackSummary {
266
+ path: string | null;
267
+ exists: boolean;
268
+ parseError: string | null;
269
+ ready: boolean;
270
+ fixtures: Array<Record<string, unknown>>;
271
+ fixtureCount: number;
272
+ criticalGaps: string[];
273
+ }
274
+
275
+ export interface ExecutionRationalitySummary {
276
+ applicable: boolean;
277
+ planTaskCount: number;
278
+ externalReferenceCount: number;
279
+ implementationPackReady: boolean;
280
+ referenceAnchorsReady: boolean;
281
+ fixturePackReady: boolean;
282
+ executionRationalityReady: boolean;
283
+ criticalExecutionGaps: string[];
284
+ implementationPack: ExecutionImplementationPackSummary;
285
+ referenceAnchors: ExecutionReferenceAnchorsSummary;
286
+ fixturePack: ExecutionFixturePackSummary;
287
+ }
239
288
 
240
289
  /** Relatório retornado por `health.buildHealthReport` e incluído em `runDoctorChecks`.healthReport. */
241
- export interface OxeHealthReport {
242
- configPath: string | null;
290
+ export interface OxeHealthReport {
291
+ workspaceMode?: WorkspaceMode;
292
+ configPath: string | null;
243
293
  configParseError: string | null;
244
294
  unknownConfigKeys: string[];
245
295
  typeErrors: string[];
@@ -260,10 +310,16 @@ export interface OxeHealthReport {
260
310
  copilotWarn?: string[];
261
311
  copilot?: CopilotIntegrationReport | null;
262
312
  summaryGapWarn: string | null;
263
- specWarn: string[];
264
- planWarn: string[];
265
- planSelfEvaluation?: Record<string, unknown> | null;
266
- planReviewStatus?: string | null;
313
+ specWarn: string[];
314
+ planWarn: string[];
315
+ planSelfEvaluation?: Record<string, unknown> | null;
316
+ implementationPackReady?: boolean;
317
+ referenceAnchorsReady?: boolean;
318
+ fixturePackReady?: boolean;
319
+ executionRationalityReady?: boolean;
320
+ criticalExecutionGaps?: string[];
321
+ executionRationality?: ExecutionRationalitySummary | null;
322
+ planReviewStatus?: string | null;
267
323
  activeRun?: Record<string, unknown> | null;
268
324
  eventsSummary?: Record<string, unknown> | null;
269
325
  memoryLayers?: Record<string, unknown> | null;
@@ -283,9 +339,10 @@ export interface OxeHealthReport {
283
339
  contextWarn?: string[];
284
340
  semanticsWarn?: string[];
285
341
  contextPacks?: Record<string, ContextPackSummary>;
286
- contextQuality?: ContextQualitySummary;
287
- semanticsDrift?: SemanticsDriftSummary;
288
- packFreshness?: Record<string, PackFreshness>;
342
+ contextQuality?: ContextQualitySummary;
343
+ semanticsDrift?: SemanticsDriftSummary;
344
+ releaseReadiness?: ReleaseConsistencyResult | null;
345
+ packFreshness?: Record<string, PackFreshness>;
289
346
  activeSummaryRefs?: { project: string | null; session: string | null; phase: string | null };
290
347
  scanFocusGlobs?: unknown;
291
348
  scanIgnoreGlobs?: unknown;
@@ -616,11 +673,12 @@ export interface OxeSdk {
616
673
  readMinNode: (packageRoot: string) => number;
617
674
 
618
675
  /** Parsing de artefatos OXE. */
619
- parsePlan: (planMd: string) => ParsedPlan;
620
- parseHypotheses: (planText: string) => CriticalHypothesis[];
621
- parseConfidenceVector: (planText: string) => ConfidenceVector | null;
622
- parseSpec: (specMd: string) => ParsedSpec;
623
- parseState: (stateMd: string) => ParsedState;
676
+ parsePlan: (planMd: string) => ParsedPlan;
677
+ parseHypotheses: (planText: string) => CriticalHypothesis[];
678
+ parseConfidenceVector: (planText: string) => ConfidenceVector | null;
679
+ parseExecutionPlanTasks: (planPath: string | null) => Array<Record<string, unknown>>;
680
+ parseSpec: (specMd: string) => ParsedSpec;
681
+ parseState: (stateMd: string) => ParsedState;
624
682
  validateDecisionFidelity: (discussMd: string, planMd: string) => DecisionFidelityResult;
625
683
  parseLessonsMetrics: (metricsJson: string) => LessonMetric[];
626
684
  updateLessonMetric: (metrics: LessonMetric[], lessonId: string, outcome: LessonOutcome) => LessonMetric[];
@@ -637,11 +695,13 @@ export interface OxeSdk {
637
695
  timeoutMs?: number;
638
696
  }) => Promise<Record<string, unknown>>;
639
697
 
640
- health: {
641
- loadOxeConfigMerged: (targetProject: string) => { config: Record<string, unknown>; path: string | null; parseError: string | null; sources: { system: string | null; user: string | null; project: string | null } };
642
- validateConfigShape: (cfg: Record<string, unknown>) => { unknownKeys: string[]; typeErrors: string[] };
643
- buildHealthReport: (target: string) => OxeHealthReport;
644
- suggestNextStep: (target: string, cfg?: { discuss_before_plan?: boolean }) => OxeNextSuggestion;
698
+ health: {
699
+ loadOxeConfigMerged: (targetProject: string) => { config: Record<string, unknown>; path: string | null; parseError: string | null; sources: { system: string | null; user: string | null; project: string | null } };
700
+ validateConfigShape: (cfg: Record<string, unknown>) => { unknownKeys: string[]; typeErrors: string[] };
701
+ buildHealthReport: (target: string) => OxeHealthReport;
702
+ detectWorkspaceMode: (target: string) => { workspaceMode: WorkspaceMode; packageName: string | null; canonicalTreePresent: boolean; commandsTreePresent: boolean };
703
+ shouldSuppressExecutionWorkspaceGates: (workspaceMode: WorkspaceMode, phase?: string | null, activeSession?: string | null, activeRun?: Record<string, unknown> | null) => boolean;
704
+ suggestNextStep: (target: string, cfg?: { discuss_before_plan?: boolean }) => OxeNextSuggestion;
645
705
  oxePaths: (target: string) => Record<string, string>;
646
706
  parseStatePhase: (stateText: string) => string | null;
647
707
  parseLastScanDate: (stateText: string) => Date | null;
@@ -654,10 +714,12 @@ export interface OxeSdk {
654
714
  copilotIntegrationReport: (target: string) => CopilotIntegrationReport;
655
715
  planAgentsWarnings: (target: string) => string[];
656
716
  phaseCoherenceWarnings: (phase: string, paths: Record<string, string>) => string[];
657
- specSectionWarnings: (specPath: string, requiredHeadings: string[]) => string[];
658
- planWaveWarningsFixed: (planPath: string, maxPerWave: number) => string[];
659
- planTaskAceiteWarnings: (planPath: string) => string[];
660
- verifyGapsWithoutSummaryWarning: (verifyPath: string, summaryPath: string) => string | null;
717
+ specSectionWarnings: (specPath: string, requiredHeadings: string[]) => string[];
718
+ planWaveWarningsFixed: (planPath: string, maxPerWave: number) => string[];
719
+ planTaskAceiteWarnings: (planPath: string) => string[];
720
+ buildExecutionRationality: (paths?: Record<string, string | null | undefined>) => ExecutionRationalitySummary;
721
+ executionRationalityWarningsFromSummary: (summary: ExecutionRationalitySummary) => string[];
722
+ verifyGapsWithoutSummaryWarning: (verifyPath: string, summaryPath: string) => string | null;
661
723
  expandExecutionProfile: (profile: string) => Record<string, unknown>;
662
724
  ALLOWED_CONFIG_KEYS: string[];
663
725
  EXECUTION_PROFILES: string[];
@@ -733,6 +795,9 @@ export interface OxeSdk {
733
795
  loadRecoveryFixtureReport: (projectRoot: string) => RuntimeSmokeReport;
734
796
  loadMultiAgentSoakReport: (projectRoot: string) => RuntimeSmokeReport;
735
797
  buildReleaseManifest: (projectRoot: string, options?: Record<string, unknown>) => ReleaseManifest;
798
+ inspectCanonicalSource: (projectRoot: string) => Record<string, unknown>;
799
+ evaluateReleaseManifest: (manifest: ReleaseManifest, options?: Record<string, unknown>) => ReleaseConsistencyResult;
800
+ inspectReleaseReadiness: (projectRoot: string, options?: Record<string, unknown>) => ReleaseConsistencyResult;
736
801
  checkReleaseConsistency: (projectRoot: string, options?: Record<string, unknown>) => ReleaseConsistencyResult;
737
802
  };
738
803
 
@@ -8,9 +8,9 @@ Copie `oxe/templates/config.template.json` para **`.oxe/config.json`** no seu pr
8
8
  |-------|------|-------------|
9
9
  | `profile` | string | Profile de execução: `balanced` (padrão) \| `strict` \| `fast` \| `legacy`. Expande automaticamente outras keys — keys explícitas prevalecem. Ver tabela abaixo. |
10
10
  | `discuss_before_plan` | boolean | Se `true`, o fluxo recomenda **`oxe:discuss`** entre spec e plan. |
11
- | `verification_depth` | string | Profundidade da verificação: `standard` (padrão) \| `thorough` (ativa Camada 5 — validate-gaps automático) \| `quick` (skip camadas 3–4 e UAT). |
12
- | `plan_confidence_threshold` | number | Limiar mínimo de confiança para o `execute` aceitar um `PLAN.md`. Padrão: `70`. Abaixo disso, o fluxo deve reduzir incerteza antes de implementar. |
13
- | `security_in_verify` | boolean | Se `true`, executa auditoria OWASP automaticamente no **verify** como **Camada 6** (produz `.oxe/SECURITY.md`). Achados P0 bloqueiam `verify_complete`. Padrão: `false`. |
11
+ | `verification_depth` | string | Profundidade da verificação: `standard` (padrão) \| `thorough` (ativa Camada 5 — validate-gaps automático) \| `quick` (skip camadas 3–4 e UAT). |
12
+ | `plan_confidence_threshold` | number | Limiar mínimo de confiança para o `execute` aceitar um `PLAN.md`. Padrão canónico: `90`, com gate estrito (`Confiança` precisa ser **maior que** o limiar). Valores menores que 90 não reduzem esse gate. |
13
+ | `security_in_verify` | boolean | Se `true`, executa auditoria OWASP automaticamente no **verify** como **Camada 6** (produz `.oxe/SECURITY.md`). Achados P0 bloqueiam `verify_complete`. Padrão: `false`. |
14
14
  | `after_verify_suggest_pr` | boolean | Se `true`, o workflow **verify** inclui checklist de PR no fim. |
15
15
  | `after_verify_draft_commit` | boolean | Se `true`, o **verify** propõe rascunho de mensagem de commit alinhado aos critérios de aceite. |
16
16
  | `after_verify_suggest_uat` | boolean | Se `true`, o **verify** gera checklist UAT (Camada 4). Ativo automaticamente com `profile: strict`. |
@@ -16,7 +16,7 @@ updated: YYYY-MM-DD
16
16
  - **Active run:** `.oxe/ACTIVE-RUN.json` ou artefato equivalente de sessão
17
17
  - **Trace log:** `.oxe/OXE-EVENTS.ndjson` ou artefato equivalente de sessão
18
18
  - **Autoavaliação do plano:** melhor=`sim|não` | confiança=`NN%`
19
- - **Limiar de execução:** `70%`
19
+ - **Limiar de execução:** `>90%`
20
20
 
21
21
  ## Onda atual
22
22