oxe-cc 1.5.0 → 1.5.1
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/.cursor/commands/oxe-dashboard.md +2 -2
- package/.cursor/commands/oxe-execute.md +2 -2
- package/.cursor/commands/oxe-plan.md +2 -2
- package/.github/prompts/oxe-dashboard.prompt.md +2 -2
- package/.github/prompts/oxe-execute.prompt.md +2 -2
- package/.github/prompts/oxe-plan.prompt.md +2 -2
- package/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/bin/lib/oxe-context-engine.cjs +9 -4
- package/bin/lib/oxe-dashboard.cjs +119 -53
- package/bin/lib/oxe-project-health.cjs +368 -111
- package/bin/lib/oxe-rationality.cjs +385 -0
- package/bin/oxe-cc.js +57 -31
- package/commands/oxe/dashboard.md +2 -2
- package/commands/oxe/execute.md +2 -2
- package/commands/oxe/plan.md +2 -2
- package/docs/RUNTIME-SMOKE-MATRIX.md +1 -1
- package/lib/sdk/index.cjs +10 -6
- package/lib/sdk/index.d.ts +78 -24
- package/oxe/templates/CONFIG.md +1 -1
- package/oxe/templates/EXECUTION-RUNTIME.template.md +1 -1
- package/oxe/templates/FIXTURE-PACK.template.json +34 -0
- package/oxe/templates/FIXTURE-PACK.template.md +21 -0
- package/oxe/templates/IMPLEMENTATION-PACK.template.json +52 -0
- package/oxe/templates/IMPLEMENTATION-PACK.template.md +36 -0
- package/oxe/templates/PLAN.template.md +46 -37
- package/oxe/templates/REFERENCE-ANCHORS.template.md +24 -0
- package/oxe/templates/config.template.json +1 -1
- package/oxe/workflows/execute.md +36 -20
- package/oxe/workflows/next.md +1 -1
- package/oxe/workflows/plan.md +80 -22
- package/oxe/workflows/references/flow-robustness-contract.md +3 -3
- package/oxe/workflows/references/workflow-runtime-contracts.json +127 -95
- package/oxe/workflows/verify.md +4 -4
- package/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/vscode-extension/oxe-agents-1.5.1.vsix +0 -0
- package/vscode-extension/package.json +1 -1
|
@@ -9,7 +9,7 @@ oxe_tool_profile: read_heavy
|
|
|
9
9
|
oxe_confidence_policy: explicit
|
|
10
10
|
oxe_context_tier: standard
|
|
11
11
|
oxe_contract_version: 2.0.0
|
|
12
|
-
oxe_semantics_hash:
|
|
12
|
+
oxe_semantics_hash: ebb4473c14e5b080
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
OXE — visualizar runtime, ondas, checkpoints e saúde operacional da trilha
|
|
@@ -25,7 +25,7 @@ OXE — visualizar runtime, ondas, checkpoints e saúde operacional da trilha
|
|
|
25
25
|
- **Política de confiança:** explícita
|
|
26
26
|
- **Tier de contexto padrão:** padrão
|
|
27
27
|
- **Versão do contrato:** 2.0.0
|
|
28
|
-
- **Checksum semântico:** `
|
|
28
|
+
- **Checksum semântico:** `ebb4473c14e5b080`
|
|
29
29
|
- **Entrada de contexto prioritária:** `.oxe/context/packs/dashboard.md` e `.oxe/context/packs/dashboard.json`
|
|
30
30
|
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
31
31
|
- **Inspeção estruturada:** `oxe-cc context inspect --workflow dashboard --json`
|
|
@@ -9,7 +9,7 @@ oxe_tool_profile: write_bounded
|
|
|
9
9
|
oxe_confidence_policy: explicit
|
|
10
10
|
oxe_context_tier: standard
|
|
11
11
|
oxe_contract_version: 2.0.0
|
|
12
|
-
oxe_semantics_hash:
|
|
12
|
+
oxe_semantics_hash: 7b3446b77aef9353
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
OXE — Executar plano (solo ou com agentes): escolha Completo (1 sessão) | Por onda | Por tarefa para controlar requisições
|
|
@@ -25,7 +25,7 @@ OXE — Executar plano (solo ou com agentes): escolha Completo (1 sessão) | Por
|
|
|
25
25
|
- **Política de confiança:** explícita
|
|
26
26
|
- **Tier de contexto padrão:** padrão
|
|
27
27
|
- **Versão do contrato:** 2.0.0
|
|
28
|
-
- **Checksum semântico:** `
|
|
28
|
+
- **Checksum semântico:** `7b3446b77aef9353`
|
|
29
29
|
- **Entrada de contexto prioritária:** `.oxe/context/packs/execute.md` e `.oxe/context/packs/execute.json`
|
|
30
30
|
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
31
31
|
- **Inspeção estruturada:** `oxe-cc context inspect --workflow execute --json`
|
|
@@ -9,7 +9,7 @@ oxe_tool_profile: mixed
|
|
|
9
9
|
oxe_confidence_policy: rubric
|
|
10
10
|
oxe_context_tier: standard
|
|
11
11
|
oxe_contract_version: 2.0.0
|
|
12
|
-
oxe_semantics_hash:
|
|
12
|
+
oxe_semantics_hash: 5c589398cb807029
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
OXE — Gera .oxe/PLAN.md com verificação por tarefa
|
|
@@ -25,7 +25,7 @@ OXE — Gera .oxe/PLAN.md com verificação por tarefa
|
|
|
25
25
|
- **Política de confiança:** rubrica
|
|
26
26
|
- **Tier de contexto padrão:** padrão
|
|
27
27
|
- **Versão do contrato:** 2.0.0
|
|
28
|
-
- **Checksum semântico:** `
|
|
28
|
+
- **Checksum semântico:** `5c589398cb807029`
|
|
29
29
|
- **Entrada de contexto prioritária:** `.oxe/context/packs/plan.md` e `.oxe/context/packs/plan.json`
|
|
30
30
|
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
31
31
|
- **Inspeção estruturada:** `oxe-cc context inspect --workflow plan --json`
|
|
@@ -11,7 +11,7 @@ oxe_tool_profile: read_heavy
|
|
|
11
11
|
oxe_confidence_policy: explicit
|
|
12
12
|
oxe_context_tier: standard
|
|
13
13
|
oxe_contract_version: 2.0.0
|
|
14
|
-
oxe_semantics_hash:
|
|
14
|
+
oxe_semantics_hash: ebb4473c14e5b080
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
<!-- oxe-reasoning-contract:start -->
|
|
@@ -25,7 +25,7 @@ oxe_semantics_hash: 37f74d8be3442fe1
|
|
|
25
25
|
- **Política de confiança:** explícita
|
|
26
26
|
- **Tier de contexto padrão:** padrão
|
|
27
27
|
- **Versão do contrato:** 2.0.0
|
|
28
|
-
- **Checksum semântico:** `
|
|
28
|
+
- **Checksum semântico:** `ebb4473c14e5b080`
|
|
29
29
|
- **Entrada de contexto prioritária:** `.oxe/context/packs/dashboard.md` e `.oxe/context/packs/dashboard.json`
|
|
30
30
|
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
31
31
|
- **Inspeção estruturada:** `oxe-cc context inspect --workflow dashboard --json`
|
|
@@ -11,7 +11,7 @@ oxe_tool_profile: write_bounded
|
|
|
11
11
|
oxe_confidence_policy: explicit
|
|
12
12
|
oxe_context_tier: standard
|
|
13
13
|
oxe_contract_version: 2.0.0
|
|
14
|
-
oxe_semantics_hash:
|
|
14
|
+
oxe_semantics_hash: 7b3446b77aef9353
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
<!-- oxe-reasoning-contract:start -->
|
|
@@ -25,7 +25,7 @@ oxe_semantics_hash: 14ddb483209b28b3
|
|
|
25
25
|
- **Política de confiança:** explícita
|
|
26
26
|
- **Tier de contexto padrão:** padrão
|
|
27
27
|
- **Versão do contrato:** 2.0.0
|
|
28
|
-
- **Checksum semântico:** `
|
|
28
|
+
- **Checksum semântico:** `7b3446b77aef9353`
|
|
29
29
|
- **Entrada de contexto prioritária:** `.oxe/context/packs/execute.md` e `.oxe/context/packs/execute.json`
|
|
30
30
|
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
31
31
|
- **Inspeção estruturada:** `oxe-cc context inspect --workflow execute --json`
|
|
@@ -11,7 +11,7 @@ oxe_tool_profile: mixed
|
|
|
11
11
|
oxe_confidence_policy: rubric
|
|
12
12
|
oxe_context_tier: standard
|
|
13
13
|
oxe_contract_version: 2.0.0
|
|
14
|
-
oxe_semantics_hash:
|
|
14
|
+
oxe_semantics_hash: 5c589398cb807029
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
<!-- oxe-reasoning-contract:start -->
|
|
@@ -25,7 +25,7 @@ oxe_semantics_hash: 7809d830a5f5ff4a
|
|
|
25
25
|
- **Política de confiança:** rubrica
|
|
26
26
|
- **Tier de contexto padrão:** padrão
|
|
27
27
|
- **Versão do contrato:** 2.0.0
|
|
28
|
-
- **Checksum semântico:** `
|
|
28
|
+
- **Checksum semântico:** `5c589398cb807029`
|
|
29
29
|
- **Entrada de contexto prioritária:** `.oxe/context/packs/plan.md` e `.oxe/context/packs/plan.json`
|
|
30
30
|
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
31
31
|
- **Inspeção estruturada:** `oxe-cc context inspect --workflow plan --json`
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,31 @@ Todas as versões seguem [Semantic Versioning](https://semver.org/). As mudança
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.5.1] — 2026-04-22
|
|
8
|
+
|
|
9
|
+
### Rational Execution Readiness
|
|
10
|
+
|
|
11
|
+
- `/oxe-plan` passou a exigir e propagar artefatos racionais de execução: `IMPLEMENTATION-PACK`, `REFERENCE-ANCHORS` e `FIXTURE-PACK`
|
|
12
|
+
- `/oxe-execute` agora é `pack-first` e bloqueia mutação quando confiança `<= 90%`, quando os packs estão incompletos ou quando há `critical_gap` aberto
|
|
13
|
+
- `doctor`, `status --json`, dashboard e SDK passaram a expor `implementationPackReady`, `referenceAnchorsReady`, `fixturePackReady`, `executionRationalityReady` e `criticalExecutionGaps`
|
|
14
|
+
|
|
15
|
+
### Session Compatibility
|
|
16
|
+
|
|
17
|
+
- o health report agora faz fallback explícito entre artefatos session-scoped e artefatos ainda materializados na raiz `.oxe/`, evitando falso negativo de readiness em workspaces legados
|
|
18
|
+
- o gate racional foi limitado ao estágio pré-execução; depois de `executing`/`verify_complete`, os packs continuam diagnósticos, mas não reescrevem o próximo passo do ciclo
|
|
19
|
+
|
|
20
|
+
### Publication Alignment
|
|
21
|
+
|
|
22
|
+
- versão alinhada para `1.5.1` em pacote raiz, runtime package, extensão VS Code, README e lockfile
|
|
23
|
+
- matriz pública de smoke runtime atualizada para refletir a release `1.5.1`
|
|
24
|
+
|
|
25
|
+
### Validation
|
|
26
|
+
|
|
27
|
+
- `npm test`
|
|
28
|
+
- `npm run scan:assets`
|
|
29
|
+
- `npm run release:manifest`
|
|
30
|
+
- `npm run build:vscode-ext`
|
|
31
|
+
|
|
7
32
|
## [1.5.0] — 2026-04-21
|
|
8
33
|
|
|
9
34
|
### Release Readiness 5/5
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/oxe-cc)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
|
|
10
|
-
**Versão:** `1.5.
|
|
10
|
+
**Versão:** `1.5.1` · [package.json](package.json)
|
|
11
11
|
|
|
12
12
|
**Framework OXE — Orchestrated eXperience Engineering**
|
|
13
13
|
|
|
@@ -599,7 +599,7 @@ Arquivo `.oxe/config.json`. Principais opções:
|
|
|
599
599
|
|-------|--------|-----------|
|
|
600
600
|
| `profile` | `"balanced"` | `strict` / `balanced` / `fast` / `legacy` |
|
|
601
601
|
| `verification_depth` | `"standard"` | `"thorough"` ativa gaps automático no verify (Camada 5) |
|
|
602
|
-
| `plan_confidence_threshold` | `
|
|
602
|
+
| `plan_confidence_threshold` | `90` | Limiar canónico para `execute` aceitar um `PLAN.md`; a confiança precisa ser **maior que** esse valor |
|
|
603
603
|
| `security_in_verify` | `false` | `true` ativa OWASP automático no verify (Camada 6) |
|
|
604
604
|
| `discuss_before_plan` | `false` | Exige aprovação de decisões antes do plano |
|
|
605
605
|
| `scale_adaptive` | `true` | Scan sugere o profile pelo tamanho do projeto |
|
|
@@ -223,10 +223,15 @@ function resolveArtifactCandidates(projectRoot, activeSession) {
|
|
|
223
223
|
session_manifest: withFallback('session_manifest', 'session', scoped.sessionManifest || null, null, 'session'),
|
|
224
224
|
sessions_index: withFallback('sessions_index', 'session_index', base.sessionsIndex, null, 'project'),
|
|
225
225
|
execution_state: withFallback('execution_state', 'state', scoped.executionState || null, null, 'session'),
|
|
226
|
-
spec: withFallback('spec', 'spec', scoped.spec, base.spec),
|
|
227
|
-
discuss: withFallback('discuss', 'discuss', scoped.discuss, base.discuss),
|
|
228
|
-
plan: withFallback('plan', 'plan', scoped.plan, base.plan),
|
|
229
|
-
|
|
226
|
+
spec: withFallback('spec', 'spec', scoped.spec, base.spec),
|
|
227
|
+
discuss: withFallback('discuss', 'discuss', scoped.discuss, base.discuss),
|
|
228
|
+
plan: withFallback('plan', 'plan', scoped.plan, base.plan),
|
|
229
|
+
implementation_pack_md: withFallback('implementation_pack_md', 'execution_contract', scoped.implementationPackMd, base.implementationPackMd),
|
|
230
|
+
implementation_pack_json: withFallback('implementation_pack_json', 'execution_contract', scoped.implementationPackJson, base.implementationPackJson),
|
|
231
|
+
reference_anchors: withFallback('reference_anchors', 'reference_anchors', scoped.referenceAnchors, base.referenceAnchors),
|
|
232
|
+
fixture_pack_md: withFallback('fixture_pack_md', 'fixtures', scoped.fixturePackMd, base.fixturePackMd),
|
|
233
|
+
fixture_pack_json: withFallback('fixture_pack_json', 'fixtures', scoped.fixturePackJson, base.fixturePackJson),
|
|
234
|
+
plan_agents: withFallback('plan_agents', 'plan_agents', scoped.planAgents, base.planAgents),
|
|
230
235
|
quick: withFallback('quick', 'plan', scoped.quick, base.quick),
|
|
231
236
|
runtime: withFallback('runtime', 'runtime', scoped.runtime, base.runtime),
|
|
232
237
|
checkpoints: withFallback('checkpoints', 'checkpoints', scoped.checkpoints, base.checkpoints),
|
|
@@ -152,35 +152,55 @@ function parseVerify(md) {
|
|
|
152
152
|
return { criteria, mentionedCriteria: Array.from(new Set((md.match(/\bA\d+\b/g) || []).map((x) => x.toUpperCase()))), failed: /\b(verify_failed|falhou|falha|reprovad)\b/i.test(md), passed: /\b(verify_complete|aprovad|passou|sucesso)\b/i.test(md) };
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
function confidenceBand(confidence, threshold) {
|
|
156
|
-
|
|
157
|
-
if (confidence
|
|
158
|
-
if (confidence
|
|
159
|
-
if (confidence >=
|
|
160
|
-
return '
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (ctx.plan.selfEvaluation
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (ctx.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
155
|
+
function confidenceBand(confidence, threshold) {
|
|
156
|
+
const normalizedThreshold = health.normalizePlanConfidenceThreshold(threshold);
|
|
157
|
+
if (confidence == null) return 'unknown';
|
|
158
|
+
if (health.isExecutablePlanConfidence(confidence, normalizedThreshold)) return 'ready';
|
|
159
|
+
if (confidence >= Math.max(80, normalizedThreshold - 10)) return 'rational_but_not_ready';
|
|
160
|
+
if (confidence >= 50) return 'needs_refinement';
|
|
161
|
+
return 'do_not_execute';
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function computeReadiness(ctx, threshold) {
|
|
165
|
+
const normalizedThreshold = health.normalizePlanConfidenceThreshold(threshold);
|
|
166
|
+
const blockers = [];
|
|
167
|
+
const warnings = [...ctx.diagnostics.reviewWarnings, ...ctx.diagnostics.runtimeWarnings, ...ctx.diagnostics.planWarnings];
|
|
168
|
+
if (!ctx.plan.selfEvaluation || !ctx.plan.selfEvaluation.hasSection) blockers.push('self_evaluation:missing');
|
|
169
|
+
if (ctx.plan.selfEvaluation && Array.isArray(ctx.plan.selfEvaluation.warnings) && ctx.plan.selfEvaluation.warnings.length) {
|
|
170
|
+
blockers.push(`self_evaluation:warnings:${ctx.plan.selfEvaluation.warnings.length}`);
|
|
171
|
+
}
|
|
172
|
+
if (ctx.planReviewStatus !== 'approved') blockers.push(`review_status:${ctx.planReviewStatus || 'draft'}`);
|
|
173
|
+
if (ctx.plan.selfEvaluation.bestPlan === 'não') blockers.push('best_plan:no');
|
|
174
|
+
if (ctx.plan.selfEvaluation.confidence == null) blockers.push('confidence:missing');
|
|
175
|
+
else if (!health.isExecutablePlanConfidence(ctx.plan.selfEvaluation.confidence, normalizedThreshold)) {
|
|
176
|
+
blockers.push(`confidence:${ctx.plan.selfEvaluation.confidence}%<=${normalizedThreshold}%`);
|
|
177
|
+
}
|
|
178
|
+
if (!ctx.executionRationality || !ctx.executionRationality.implementationPackReady) {
|
|
179
|
+
blockers.push('implementation_pack:not_ready');
|
|
180
|
+
}
|
|
181
|
+
if (!ctx.executionRationality || !ctx.executionRationality.referenceAnchorsReady) {
|
|
182
|
+
blockers.push('reference_anchors:not_ready');
|
|
183
|
+
}
|
|
184
|
+
if (!ctx.executionRationality || !ctx.executionRationality.fixturePackReady) {
|
|
185
|
+
blockers.push('fixture_pack:not_ready');
|
|
186
|
+
}
|
|
187
|
+
if (ctx.checkpoints.parsed.some((x) => /pending_approval/i.test(x.status))) blockers.push('checkpoint:pending_approval');
|
|
188
|
+
if (ctx.runtime.parsed.status === 'blocked') blockers.push('runtime:blocked');
|
|
189
|
+
if (ctx.spec.uncoveredCriteria.length) warnings.push(`${ctx.spec.uncoveredCriteria.length} critérios sem cobertura no plano`);
|
|
190
|
+
if (ctx.executionRationality && Array.isArray(ctx.executionRationality.criticalExecutionGaps)) {
|
|
191
|
+
warnings.push(...ctx.executionRationality.criticalExecutionGaps);
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
go: blockers.length === 0,
|
|
195
|
+
decision: blockers.length === 0 ? 'go' : 'no-go',
|
|
196
|
+
threshold: normalizedThreshold,
|
|
197
|
+
confidence: ctx.plan.selfEvaluation.confidence,
|
|
198
|
+
confidenceBand: confidenceBand(ctx.plan.selfEvaluation.confidence, normalizedThreshold),
|
|
199
|
+
checkpointPending: blockers.includes('checkpoint:pending_approval'),
|
|
200
|
+
blockers,
|
|
201
|
+
warnings,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
184
204
|
|
|
185
205
|
function buildCoverageMatrix(spec, plan, verify) {
|
|
186
206
|
const taskMap = new Map();
|
|
@@ -202,18 +222,27 @@ function buildCoverageMatrix(spec, plan, verify) {
|
|
|
202
222
|
}));
|
|
203
223
|
}
|
|
204
224
|
|
|
205
|
-
function computeCalibration(phase, confidence, verify) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
if (
|
|
212
|
-
if (confidence
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
225
|
+
function computeCalibration(phase, confidence, verify, threshold) {
|
|
226
|
+
const normalizedThreshold = health.normalizePlanConfidenceThreshold(threshold);
|
|
227
|
+
if (confidence == null) return { status: 'pending', summary: 'Calibração indisponível antes do verify.' };
|
|
228
|
+
const low = String(phase || '').toLowerCase();
|
|
229
|
+
const completed = low === 'verify_complete' || verify.passed;
|
|
230
|
+
const failed = low === 'verify_failed' || verify.failed;
|
|
231
|
+
if (!completed && !failed) return { status: 'pending', summary: 'Calibração só fecha após verify.' };
|
|
232
|
+
if (health.isExecutablePlanConfidence(confidence, normalizedThreshold) && failed) {
|
|
233
|
+
return { status: 'overconfident', summary: `Confiança ${confidence}% acima do gate executável, mas o verify falhou.` };
|
|
234
|
+
}
|
|
235
|
+
if (!health.isExecutablePlanConfidence(confidence, normalizedThreshold) && failed) {
|
|
236
|
+
return { status: 'calibrated-risk', summary: `O plano já sinalizava risco (${confidence}%) abaixo do gate executável e o verify confirmou a fragilidade.` };
|
|
237
|
+
}
|
|
238
|
+
if (!health.isExecutablePlanConfidence(confidence, normalizedThreshold) && completed) {
|
|
239
|
+
return { status: 'underconfident', summary: `O resultado final foi melhor que a confiança inicial (${confidence}%), mas o plano ainda não superava o gate executável.` };
|
|
240
|
+
}
|
|
241
|
+
if (health.isExecutablePlanConfidence(confidence, normalizedThreshold) && completed) {
|
|
242
|
+
return { status: 'well-calibrated', summary: `Alta confiança executável (${confidence}%) e verify coerente com a expectativa.` };
|
|
243
|
+
}
|
|
244
|
+
return { status: 'acceptable', summary: `Confiança ${confidence}% e verify dentro da faixa esperada.` };
|
|
245
|
+
}
|
|
217
246
|
|
|
218
247
|
function readRepositoryContext(codebaseDir) {
|
|
219
248
|
const names = ['OVERVIEW.md', 'STACK.md', 'STRUCTURE.md', 'TESTING.md', 'CONCERNS.md', 'INTEGRATIONS.md'];
|
|
@@ -353,8 +382,9 @@ function loadDashboardContext(projectRoot, opts = {}) {
|
|
|
353
382
|
planReviewStatus: report.planReviewStatus || 'draft',
|
|
354
383
|
state: { path: globalPaths.state, raw: stateText, parsed: { phase: health.parseStatePhase(stateText), activeSession, runtimeStatus: firstMatch(stateText, /\*\*runtime_status:\*\*\s*([^\n]+)/i) } },
|
|
355
384
|
spec: { path: p.spec, raw: specText, objective: spec.objective, criteria: spec.criteria, uncoveredCriteria: spec.criteria.filter((c) => !plan.tasks.some((t) => (t.aceite || []).includes(c.id))) },
|
|
356
|
-
plan: { path: p.plan, raw: planText, tasks: plan.tasks, waves: plan.waves, totalTasks: plan.totalTasks, selfEvaluation: report.planSelfEvaluation },
|
|
357
|
-
|
|
385
|
+
plan: { path: p.plan, raw: planText, tasks: plan.tasks, waves: plan.waves, totalTasks: plan.totalTasks, selfEvaluation: report.planSelfEvaluation },
|
|
386
|
+
executionRationality: report.executionRationality || null,
|
|
387
|
+
runtime: { path: p.runtime, raw: runtimeText, summary: summarizeText(runtimeText, 800), parsed: runtime },
|
|
358
388
|
activeRun: activeRunState,
|
|
359
389
|
runtimeCanonical: activeRunState && activeRunState.canonical_state ? activeRunState.canonical_state : null,
|
|
360
390
|
compiledGraph: activeRunState && activeRunState.compiled_graph ? activeRunState.compiled_graph : null,
|
|
@@ -374,9 +404,14 @@ function loadDashboardContext(projectRoot, opts = {}) {
|
|
|
374
404
|
promotionReadiness: report.promotionReadiness || null,
|
|
375
405
|
recoveryState: report.recoveryState || null,
|
|
376
406
|
multiAgent: report.multiAgent || null,
|
|
377
|
-
providerCatalog: report.providerCatalog || null,
|
|
378
|
-
|
|
379
|
-
|
|
407
|
+
providerCatalog: report.providerCatalog || null,
|
|
408
|
+
implementationPackReady: report.implementationPackReady,
|
|
409
|
+
referenceAnchorsReady: report.referenceAnchorsReady,
|
|
410
|
+
fixturePackReady: report.fixturePackReady,
|
|
411
|
+
executionRationalityReady: report.executionRationalityReady,
|
|
412
|
+
criticalExecutionGaps: report.criticalExecutionGaps || [],
|
|
413
|
+
warnings: report.enterpriseWarn || [],
|
|
414
|
+
},
|
|
380
415
|
tracing: { path: operational.operationalPaths(projectRoot, activeSession || null).events, events: traceEvents, summary: traceSummary },
|
|
381
416
|
checkpoints: { path: p.checkpoints, raw: checkpointsText, parsed: checkpoints },
|
|
382
417
|
verify: { path: p.verify, raw: verifyText, summary: summarizeText(verifyText, 800), parsed: verify },
|
|
@@ -422,13 +457,44 @@ function loadDashboardContext(projectRoot, opts = {}) {
|
|
|
422
457
|
summary: `login=${ctx.azure.authStatus && ctx.azure.authStatus.login_active ? 'ativo' : 'ausente'} · subscription=${ctx.azure.profile && (ctx.azure.profile.subscription_name || ctx.azure.profile.subscription_id) || '—'} · total=${inventorySummary.total} · sb=${inventorySummary.servicebus || 0} · eg=${inventorySummary.eventgrid || 0} · sql=${inventorySummary.sql || 0}`,
|
|
423
458
|
};
|
|
424
459
|
}
|
|
425
|
-
ctx.readiness = computeReadiness(ctx,
|
|
426
|
-
ctx.coverage = buildCoverageMatrix(ctx.spec, ctx.plan, verify);
|
|
427
|
-
ctx.calibration = computeCalibration(ctx.phase, ctx.plan.selfEvaluation.confidence, verify);
|
|
428
|
-
ctx.visual = {
|
|
429
|
-
flow: { nodes: [{ label: 'STATE', status: 'done' }, { label: 'SPEC', status: ctx.spec.raw ? 'done' : 'pending' }, { label: 'PLAN', status: ctx.plan.raw ? 'done' : 'pending' }, { label: 'REVIEW', status: ctx.planReviewStatus === 'approved' ? 'done' : /(rejected|needs_revision)/i.test(ctx.planReviewStatus) ? 'blocked' : 'active' }, { label: 'EXECUTE', status: ctx.runtime.parsed.status === 'running' ? 'active' : ctx.runtime.raw ? 'done' : 'pending' }, { label: 'CHECKPOINTS', status: ctx.readiness.checkpointPending ? 'active' : ctx.checkpoints.parsed.length ? 'done' : 'pending' }, { label: 'VERIFY', status: ctx.verify.raw ? 'done' : 'pending' }, { label: 'LESSONS', status: 'pending' }] },
|
|
430
|
-
artifactGraph: [
|
|
431
|
-
|
|
460
|
+
ctx.readiness = computeReadiness(ctx, report.planConfidenceThreshold || 90);
|
|
461
|
+
ctx.coverage = buildCoverageMatrix(ctx.spec, ctx.plan, verify);
|
|
462
|
+
ctx.calibration = computeCalibration(ctx.phase, ctx.plan.selfEvaluation.confidence, verify, ctx.readiness.threshold);
|
|
463
|
+
ctx.visual = {
|
|
464
|
+
flow: { nodes: [{ label: 'STATE', status: 'done' }, { label: 'SPEC', status: ctx.spec.raw ? 'done' : 'pending' }, { label: 'PLAN', status: ctx.plan.raw ? 'done' : 'pending' }, { label: 'REVIEW', status: ctx.planReviewStatus === 'approved' ? 'done' : /(rejected|needs_revision)/i.test(ctx.planReviewStatus) ? 'blocked' : 'active' }, { label: 'EXECUTE', status: ctx.runtime.parsed.status === 'running' ? 'active' : ctx.runtime.raw ? 'done' : 'pending' }, { label: 'CHECKPOINTS', status: ctx.readiness.checkpointPending ? 'active' : ctx.checkpoints.parsed.length ? 'done' : 'pending' }, { label: 'VERIFY', status: ctx.verify.raw ? 'done' : 'pending' }, { label: 'LESSONS', status: 'pending' }] },
|
|
465
|
+
artifactGraph: [
|
|
466
|
+
{ id: 'state', label: 'STATE', path: ctx.state.path, detail: ctx.phase || 'índice global', status: 'done' },
|
|
467
|
+
{ id: 'spec', label: 'SPEC', path: ctx.spec.path, detail: ctx.spec.objective || 'contrato', status: ctx.spec.raw ? 'done' : 'pending' },
|
|
468
|
+
{ id: 'plan', label: 'PLAN', path: ctx.plan.path, detail: `${ctx.plan.totalTasks} tarefas`, status: ctx.plan.raw ? 'done' : 'pending' },
|
|
469
|
+
{
|
|
470
|
+
id: 'implementation-pack',
|
|
471
|
+
label: 'IMPLEMENTATION PACK',
|
|
472
|
+
path: ctx.executionRationality && ctx.executionRationality.implementationPack ? ctx.executionRationality.implementationPack.path : '—',
|
|
473
|
+
detail: ctx.executionRationality && ctx.executionRationality.implementationPack ? `${ctx.executionRationality.implementationPack.taskCount || 0} contratos` : 'sem contrato',
|
|
474
|
+
status: ctx.executionRationality && ctx.executionRationality.implementationPackReady ? 'done' : 'blocked',
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
id: 'reference-anchors',
|
|
478
|
+
label: 'REFERENCE ANCHORS',
|
|
479
|
+
path: ctx.executionRationality && ctx.executionRationality.referenceAnchors ? ctx.executionRationality.referenceAnchors.path : '—',
|
|
480
|
+
detail: ctx.executionRationality && ctx.executionRationality.referenceAnchors ? `${ctx.executionRationality.referenceAnchors.anchors ? ctx.executionRationality.referenceAnchors.anchors.length : 0} âncoras` : 'sem âncoras',
|
|
481
|
+
status: ctx.executionRationality && ctx.executionRationality.referenceAnchorsReady ? 'done' : 'blocked',
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
id: 'fixture-pack',
|
|
485
|
+
label: 'FIXTURE PACK',
|
|
486
|
+
path: ctx.executionRationality && ctx.executionRationality.fixturePack ? ctx.executionRationality.fixturePack.path : '—',
|
|
487
|
+
detail: ctx.executionRationality && ctx.executionRationality.fixturePack ? `${ctx.executionRationality.fixturePack.fixtureCount || 0} fixtures` : 'sem fixtures',
|
|
488
|
+
status: ctx.executionRationality && ctx.executionRationality.fixturePackReady ? 'done' : 'blocked',
|
|
489
|
+
},
|
|
490
|
+
{ id: 'review', label: 'PLAN REVIEW', path: ctx.review.markdownPath, detail: ctx.planReviewStatus, status: ctx.planReviewStatus === 'approved' ? 'done' : 'active' },
|
|
491
|
+
{ id: 'runtime', label: 'RUNTIME', path: ctx.runtime.path, detail: ctx.runtime.parsed.status || 'sem status', status: ctx.runtime.raw ? 'active' : 'pending' },
|
|
492
|
+
{ id: 'active-run', label: 'ACTIVE RUN', path: operational.operationalPaths(projectRoot, activeSession || null).activeRun, detail: ctx.activeRun && ctx.activeRun.run_id ? `${ctx.activeRun.run_id} · ${ctx.activeRun.status}` : 'sem run ativo', status: ctx.activeRun ? 'active' : 'pending' },
|
|
493
|
+
{ id: 'events', label: 'TRACE', path: operational.operationalPaths(projectRoot, activeSession || null).events, detail: `${ctx.tracing.summary.total} evento(s)`, status: ctx.tracing.summary.total ? 'done' : 'pending' },
|
|
494
|
+
{ id: 'checkpoints', label: 'CHECKPOINTS', path: ctx.checkpoints.path, detail: `${ctx.checkpoints.parsed.length} gates`, status: ctx.readiness.checkpointPending ? 'active' : 'pending' },
|
|
495
|
+
{ id: 'verify', label: 'VERIFY', path: ctx.verify.path, detail: ctx.calibration.status, status: ctx.verify.raw ? 'done' : 'pending' },
|
|
496
|
+
],
|
|
497
|
+
};
|
|
432
498
|
if (ctx.azure) {
|
|
433
499
|
ctx.visual.artifactGraph.push(
|
|
434
500
|
{
|