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
package/lib/sdk/index.d.ts
CHANGED
|
@@ -225,17 +225,62 @@ export interface AuditSummary {
|
|
|
225
225
|
actions: Record<string, number>;
|
|
226
226
|
}
|
|
227
227
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface ExecutionImplementationPackSummary {
|
|
241
|
+
path: string | null;
|
|
242
|
+
exists: boolean;
|
|
243
|
+
parseError: string | null;
|
|
244
|
+
ready: boolean;
|
|
245
|
+
tasks: Array<Record<string, unknown>>;
|
|
246
|
+
taskCount: number;
|
|
247
|
+
mutatingTasks: number;
|
|
248
|
+
criticalGaps: string[];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface ExecutionReferenceAnchorsSummary {
|
|
252
|
+
path: string | null;
|
|
253
|
+
exists: boolean;
|
|
254
|
+
ready: boolean;
|
|
255
|
+
anchors: Array<Record<string, unknown>>;
|
|
256
|
+
missingCriticalCount: number;
|
|
257
|
+
staleCount: number;
|
|
258
|
+
criticalGaps: string[];
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface ExecutionFixturePackSummary {
|
|
262
|
+
path: string | null;
|
|
263
|
+
exists: boolean;
|
|
264
|
+
parseError: string | null;
|
|
265
|
+
ready: boolean;
|
|
266
|
+
fixtures: Array<Record<string, unknown>>;
|
|
267
|
+
fixtureCount: number;
|
|
268
|
+
criticalGaps: string[];
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface ExecutionRationalitySummary {
|
|
272
|
+
applicable: boolean;
|
|
273
|
+
planTaskCount: number;
|
|
274
|
+
externalReferenceCount: number;
|
|
275
|
+
implementationPackReady: boolean;
|
|
276
|
+
referenceAnchorsReady: boolean;
|
|
277
|
+
fixturePackReady: boolean;
|
|
278
|
+
executionRationalityReady: boolean;
|
|
279
|
+
criticalExecutionGaps: string[];
|
|
280
|
+
implementationPack: ExecutionImplementationPackSummary;
|
|
281
|
+
referenceAnchors: ExecutionReferenceAnchorsSummary;
|
|
282
|
+
fixturePack: ExecutionFixturePackSummary;
|
|
283
|
+
}
|
|
239
284
|
|
|
240
285
|
/** Relatório retornado por `health.buildHealthReport` e incluído em `runDoctorChecks`.healthReport. */
|
|
241
286
|
export interface OxeHealthReport {
|
|
@@ -260,10 +305,16 @@ export interface OxeHealthReport {
|
|
|
260
305
|
copilotWarn?: string[];
|
|
261
306
|
copilot?: CopilotIntegrationReport | null;
|
|
262
307
|
summaryGapWarn: string | null;
|
|
263
|
-
specWarn: string[];
|
|
264
|
-
planWarn: string[];
|
|
265
|
-
planSelfEvaluation?: Record<string, unknown> | null;
|
|
266
|
-
|
|
308
|
+
specWarn: string[];
|
|
309
|
+
planWarn: string[];
|
|
310
|
+
planSelfEvaluation?: Record<string, unknown> | null;
|
|
311
|
+
implementationPackReady?: boolean;
|
|
312
|
+
referenceAnchorsReady?: boolean;
|
|
313
|
+
fixturePackReady?: boolean;
|
|
314
|
+
executionRationalityReady?: boolean;
|
|
315
|
+
criticalExecutionGaps?: string[];
|
|
316
|
+
executionRationality?: ExecutionRationalitySummary | null;
|
|
317
|
+
planReviewStatus?: string | null;
|
|
267
318
|
activeRun?: Record<string, unknown> | null;
|
|
268
319
|
eventsSummary?: Record<string, unknown> | null;
|
|
269
320
|
memoryLayers?: Record<string, unknown> | null;
|
|
@@ -616,11 +667,12 @@ export interface OxeSdk {
|
|
|
616
667
|
readMinNode: (packageRoot: string) => number;
|
|
617
668
|
|
|
618
669
|
/** Parsing de artefatos OXE. */
|
|
619
|
-
parsePlan: (planMd: string) => ParsedPlan;
|
|
620
|
-
parseHypotheses: (planText: string) => CriticalHypothesis[];
|
|
621
|
-
parseConfidenceVector: (planText: string) => ConfidenceVector | null;
|
|
622
|
-
|
|
623
|
-
|
|
670
|
+
parsePlan: (planMd: string) => ParsedPlan;
|
|
671
|
+
parseHypotheses: (planText: string) => CriticalHypothesis[];
|
|
672
|
+
parseConfidenceVector: (planText: string) => ConfidenceVector | null;
|
|
673
|
+
parseExecutionPlanTasks: (planPath: string | null) => Array<Record<string, unknown>>;
|
|
674
|
+
parseSpec: (specMd: string) => ParsedSpec;
|
|
675
|
+
parseState: (stateMd: string) => ParsedState;
|
|
624
676
|
validateDecisionFidelity: (discussMd: string, planMd: string) => DecisionFidelityResult;
|
|
625
677
|
parseLessonsMetrics: (metricsJson: string) => LessonMetric[];
|
|
626
678
|
updateLessonMetric: (metrics: LessonMetric[], lessonId: string, outcome: LessonOutcome) => LessonMetric[];
|
|
@@ -654,10 +706,12 @@ export interface OxeSdk {
|
|
|
654
706
|
copilotIntegrationReport: (target: string) => CopilotIntegrationReport;
|
|
655
707
|
planAgentsWarnings: (target: string) => string[];
|
|
656
708
|
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
|
-
|
|
709
|
+
specSectionWarnings: (specPath: string, requiredHeadings: string[]) => string[];
|
|
710
|
+
planWaveWarningsFixed: (planPath: string, maxPerWave: number) => string[];
|
|
711
|
+
planTaskAceiteWarnings: (planPath: string) => string[];
|
|
712
|
+
buildExecutionRationality: (paths?: Record<string, string | null | undefined>) => ExecutionRationalitySummary;
|
|
713
|
+
executionRationalityWarningsFromSummary: (summary: ExecutionRationalitySummary) => string[];
|
|
714
|
+
verifyGapsWithoutSummaryWarning: (verifyPath: string, summaryPath: string) => string | null;
|
|
661
715
|
expandExecutionProfile: (profile: string) => Record<string, unknown>;
|
|
662
716
|
ALLOWED_CONFIG_KEYS: string[];
|
|
663
717
|
EXECUTION_PROFILES: string[];
|
package/oxe/templates/CONFIG.md
CHANGED
|
@@ -9,7 +9,7 @@ Copie `oxe/templates/config.template.json` para **`.oxe/config.json`** no seu pr
|
|
|
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
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: `
|
|
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
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,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:**
|
|
19
|
+
- **Limiar de execução:** `>90%`
|
|
20
20
|
|
|
21
21
|
## Onda atual
|
|
22
22
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1",
|
|
3
|
+
"generated_at": "YYYY-MM-DDTHH:MM:SSZ",
|
|
4
|
+
"ready": false,
|
|
5
|
+
"critical_gaps": [],
|
|
6
|
+
"fixtures": [
|
|
7
|
+
{
|
|
8
|
+
"id": "FX-01",
|
|
9
|
+
"task_id": "T1",
|
|
10
|
+
"status": "ready",
|
|
11
|
+
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"kind": "payload",
|
|
14
|
+
"ref": ".oxe/investigations/fixtures/example-input.json",
|
|
15
|
+
"summary": "payload base para validar o fluxo"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"expected_outputs": [
|
|
19
|
+
{
|
|
20
|
+
"kind": "status",
|
|
21
|
+
"summary": "deve concluir sem erro e persistir o artefato esperado"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"expected_checks": [
|
|
25
|
+
"npm test -- example"
|
|
26
|
+
],
|
|
27
|
+
"critical_fields": [
|
|
28
|
+
"id",
|
|
29
|
+
"status"
|
|
30
|
+
],
|
|
31
|
+
"critical_gaps": []
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# OXE — Fixture Pack
|
|
2
|
+
|
|
3
|
+
> Fixtures mínimos para reduzir improviso em parsing, integração, transformação, migração e builders.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
- **Status:** ready | not_ready | not_applicable
|
|
8
|
+
- **Critical gaps abertos:** nenhum | listar
|
|
9
|
+
|
|
10
|
+
## Fixtures
|
|
11
|
+
|
|
12
|
+
### FX-01 — T1
|
|
13
|
+
|
|
14
|
+
- **Task:** T1
|
|
15
|
+
- **Status:** ready | missing | not_applicable
|
|
16
|
+
- **Inputs:** payload, arquivo exemplo, query, blob ou mensagem
|
|
17
|
+
- **Expected outputs:** linha, evento, arquivo, rowset, status etc.
|
|
18
|
+
- **Expected checks:** `...`
|
|
19
|
+
- **Campos críticos / offsets:** ...
|
|
20
|
+
- **Smoke command:** `...`
|
|
21
|
+
- **Critical gaps:** nenhum | listar
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1",
|
|
3
|
+
"generated_at": "YYYY-MM-DDTHH:MM:SSZ",
|
|
4
|
+
"ready": false,
|
|
5
|
+
"critical_gaps": [],
|
|
6
|
+
"tasks": [
|
|
7
|
+
{
|
|
8
|
+
"id": "T1",
|
|
9
|
+
"title": "substituir pelo título da tarefa",
|
|
10
|
+
"mode": "mutating",
|
|
11
|
+
"ready": false,
|
|
12
|
+
"exact_paths": [
|
|
13
|
+
"src/example.ts"
|
|
14
|
+
],
|
|
15
|
+
"write_set": "closed",
|
|
16
|
+
"symbols": [
|
|
17
|
+
{
|
|
18
|
+
"kind": "function",
|
|
19
|
+
"name": "exampleHandler",
|
|
20
|
+
"path": "src/example.ts",
|
|
21
|
+
"signature": "(input: ExampleInput) => ExampleOutput"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"contracts": [
|
|
25
|
+
{
|
|
26
|
+
"name": "example-contract",
|
|
27
|
+
"input_shape": "ExampleInput",
|
|
28
|
+
"output_shape": "ExampleOutput",
|
|
29
|
+
"invariants": [
|
|
30
|
+
"não perder campos obrigatórios"
|
|
31
|
+
],
|
|
32
|
+
"not_allowed": [
|
|
33
|
+
"mutar schema fora do write set"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"snippets": [
|
|
38
|
+
{
|
|
39
|
+
"source_ref": "not_applicable",
|
|
40
|
+
"path": "not_applicable",
|
|
41
|
+
"summary": "not_applicable",
|
|
42
|
+
"status": "not_applicable"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"expected_checks": [
|
|
46
|
+
"npm test -- example"
|
|
47
|
+
],
|
|
48
|
+
"requires_fixture": false,
|
|
49
|
+
"critical_gaps": []
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# OXE — Implementation Pack
|
|
2
|
+
|
|
3
|
+
> Contrato racional de implementação por tarefa. Este arquivo complementa o `PLAN.md` e fecha write-set, symbols, contracts e checks esperados antes do `/oxe-execute`.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
- **Status:** ready | not_ready | not_applicable
|
|
8
|
+
- **Critical gaps abertos:** nenhum | listar
|
|
9
|
+
- **Fonte:** `PLAN.md` + código real + anchors locais
|
|
10
|
+
|
|
11
|
+
## Tarefas
|
|
12
|
+
|
|
13
|
+
### T1 — (título)
|
|
14
|
+
|
|
15
|
+
- **Mode:** mutating | docs_only | external | not_applicable
|
|
16
|
+
- **Ready:** true | false
|
|
17
|
+
- **Exact paths:** `src/...`, `config/...`
|
|
18
|
+
- **Write set:** closed | external | not_applicable
|
|
19
|
+
- **Symbols alvo:**
|
|
20
|
+
- `kind:name(path)` — assinatura ou shape esperado
|
|
21
|
+
- **Contracts:**
|
|
22
|
+
- **Nome:** (ex.: payload parser)
|
|
23
|
+
- **Entrada:** ...
|
|
24
|
+
- **Saída:** ...
|
|
25
|
+
- **Invariants:** ...
|
|
26
|
+
- **Not allowed:** ...
|
|
27
|
+
- **Expected checks:**
|
|
28
|
+
- `...`
|
|
29
|
+
- **Requires fixture:** true | false
|
|
30
|
+
- **Snippet/base local:** path ou `not_applicable`
|
|
31
|
+
- **Critical gaps:** nenhum | listar
|
|
32
|
+
|
|
33
|
+
## Observações
|
|
34
|
+
|
|
35
|
+
- Use caminhos exatos; não usar `...`.
|
|
36
|
+
- Tarefa mutável sem `symbols`, `contracts`, `write_set: closed` e `expected_checks` não deve sustentar confiança `> 90%`.
|
|
@@ -14,35 +14,36 @@ inputs: []
|
|
|
14
14
|
|
|
15
15
|
> Gerado a partir de `.oxe/SPEC.md`. Cada tarefa deve ter bloco **Verificar**.
|
|
16
16
|
|
|
17
|
-
## Resumo
|
|
18
|
-
|
|
19
|
-
- **Spec vinculada:** (data ou versão informal)
|
|
20
|
-
- **Ondas:** (número)
|
|
21
|
-
- **Tarefas:** (número)
|
|
17
|
+
## Resumo
|
|
18
|
+
|
|
19
|
+
- **Spec vinculada:** (data ou versão informal)
|
|
20
|
+
- **Ondas:** (número)
|
|
21
|
+
- **Tarefas:** (número)
|
|
22
|
+
- **Artefatos racionais:** `IMPLEMENTATION-PACK`, `REFERENCE-ANCHORS`, `FIXTURE-PACK`
|
|
22
23
|
|
|
23
24
|
## Autoavaliação do Plano
|
|
24
25
|
|
|
25
26
|
- **Melhor plano atual:** sim
|
|
26
|
-
- **Confiança:**
|
|
27
|
+
- **Confiança:** 92%
|
|
27
28
|
- **Base da confiança:**
|
|
28
|
-
- Completude dos requisitos:
|
|
29
|
-
- Dependências conhecidas:
|
|
30
|
-
- Risco técnico:
|
|
31
|
-
- Impacto no código existente:
|
|
32
|
-
- Clareza da validação / testes:
|
|
33
|
-
- Lacunas externas / decisões pendentes:
|
|
29
|
+
- Completude dos requisitos: 23/25
|
|
30
|
+
- Dependências conhecidas: 14/15
|
|
31
|
+
- Risco técnico: 18/20
|
|
32
|
+
- Impacto no código existente: 14/15
|
|
33
|
+
- Clareza da validação / testes: 14/15
|
|
34
|
+
- Lacunas externas / decisões pendentes: 9/10
|
|
34
35
|
- **Principais incertezas:** (0–3 bullets)
|
|
35
36
|
- **Alternativas descartadas:** (1–2 linhas)
|
|
36
37
|
- **Condição para replanejar:** (critério objetivo)
|
|
37
38
|
|
|
38
39
|
<confidence_vector cycle="C-NN" generated_at="YYYY-MM-DDTHH:MM:SSZ">
|
|
39
|
-
<dim name="requirements" score="0.
|
|
40
|
-
<dim name="dependencies" score="0.
|
|
41
|
-
<dim name="technical_risk" score="0.
|
|
42
|
-
<dim name="code_impact" score="0.
|
|
43
|
-
<dim name="validation" score="0.
|
|
44
|
-
<dim name="open_gaps" score="0.
|
|
45
|
-
<global score="0.
|
|
40
|
+
<dim name="requirements" score="0.92" weight="25" note="completude dos requisitos" />
|
|
41
|
+
<dim name="dependencies" score="0.93" weight="15" note="dependências conhecidas" />
|
|
42
|
+
<dim name="technical_risk" score="0.90" weight="20" note="risco técnico — ajustar se H* pendentes" />
|
|
43
|
+
<dim name="code_impact" score="0.93" weight="15" note="impacto no código existente" />
|
|
44
|
+
<dim name="validation" score="0.93" weight="15" note="clareza da validação / testes" />
|
|
45
|
+
<dim name="open_gaps" score="0.90" weight="10" note="lacunas externas / decisões pendentes" />
|
|
46
|
+
<global score="0.92" gate="proceed" />
|
|
46
47
|
</confidence_vector>
|
|
47
48
|
|
|
48
49
|
<!--
|
|
@@ -66,11 +67,18 @@ inputs: []
|
|
|
66
67
|
</hypothesis>
|
|
67
68
|
-->
|
|
68
69
|
|
|
69
|
-
## Dependências globais
|
|
70
|
-
|
|
71
|
-
- (ex.: branch base, feature flags, migrations)
|
|
72
|
-
|
|
73
|
-
##
|
|
70
|
+
## Dependências globais
|
|
71
|
+
|
|
72
|
+
- (ex.: branch base, feature flags, migrations)
|
|
73
|
+
|
|
74
|
+
## Artefatos racionais de execução
|
|
75
|
+
|
|
76
|
+
- **IMPLEMENTATION-PACK:** `ready | not_ready | not_applicable`
|
|
77
|
+
- **REFERENCE-ANCHORS:** `ready | not_ready | not_applicable`
|
|
78
|
+
- **FIXTURE-PACK:** `ready | not_ready | not_applicable`
|
|
79
|
+
- **Critical gaps abertos:** (nenhum | listar IDs/causas)
|
|
80
|
+
|
|
81
|
+
## Replanejamento
|
|
74
82
|
|
|
75
83
|
> Preencher apenas em **--replan** ou após verify falhado. Manter histórico legível.
|
|
76
84
|
|
|
@@ -80,18 +88,19 @@ inputs: []
|
|
|
80
88
|
|
|
81
89
|
## Tarefas
|
|
82
90
|
|
|
83
|
-
### T1 — (título)
|
|
84
|
-
|
|
85
|
-
- **Arquivos prováveis:** `…`
|
|
86
|
-
- **Depende de:** —
|
|
87
|
-
- **Onda:** 1
|
|
88
|
-
- **Complexidade:** S
|
|
89
|
-
- **Verificar:**
|
|
90
|
-
- Comando: `…`
|
|
91
|
-
- Manual: (opcional) …
|
|
92
|
-
- **Implementar:** o mínimo para fazer a verificação acima passar.
|
|
93
|
-
- **Aceite vinculado:** A1, A2 (IDs da tabela de critérios em SPEC.md)
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
### T1 — (título)
|
|
92
|
+
|
|
93
|
+
- **Arquivos prováveis:** `…`
|
|
94
|
+
- **Depende de:** —
|
|
95
|
+
- **Onda:** 1
|
|
96
|
+
- **Complexidade:** S
|
|
97
|
+
- **Verificar:**
|
|
98
|
+
- Comando: `…`
|
|
99
|
+
- Manual: (opcional) …
|
|
100
|
+
- **Implementar:** o mínimo para fazer a verificação acima passar.
|
|
101
|
+
- **Aceite vinculado:** A1, A2 (IDs da tabela de critérios em SPEC.md)
|
|
102
|
+
- **Contrato racional:** ver `IMPLEMENTATION-PACK.json` (task `T1`)
|
|
103
|
+
|
|
104
|
+
---
|
|
96
105
|
|
|
97
106
|
_(Adicione T2, T3, … conforme o comando oxe:plan.)_
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# OXE — Reference Anchors
|
|
2
|
+
|
|
3
|
+
> Materialização de referências críticas usadas pelo plano. Toda referência externa, predecessor, layout ou contrato que sustente uma tarefa deve virar âncora reproduzível aqui.
|
|
4
|
+
|
|
5
|
+
<reference_anchors version="1" ready="false" status="not_ready">
|
|
6
|
+
<anchor
|
|
7
|
+
id="RA-01"
|
|
8
|
+
task="T1"
|
|
9
|
+
critical="true"
|
|
10
|
+
status="resolved"
|
|
11
|
+
source_type="local"
|
|
12
|
+
path=".oxe/investigations/externals/exemplo.txt"
|
|
13
|
+
source_ref="external-ref: exemplo">
|
|
14
|
+
<relevance>Por que esta referência sustenta a tarefa.</relevance>
|
|
15
|
+
<action>copy | adapt | consult</action>
|
|
16
|
+
<summary>Resumo semântico curto do trecho relevante ou do contrato.</summary>
|
|
17
|
+
</anchor>
|
|
18
|
+
</reference_anchors>
|
|
19
|
+
|
|
20
|
+
## Regras
|
|
21
|
+
|
|
22
|
+
- Se não houver referência aplicável, usar `<reference_anchors ... status="not_applicable" ready="true">`.
|
|
23
|
+
- `critical="true"` exige `status="resolved"` antes do execute.
|
|
24
|
+
- `path` deve ser reproduzível no workspace ou materializado em `.oxe/investigations/externals/`.
|
package/oxe/workflows/execute.md
CHANGED
|
@@ -120,9 +120,16 @@ Quando o comando `**Verificar:**` de uma tarefa `Tn` falha, **não parar silenci
|
|
|
120
120
|
<context>
|
|
121
121
|
**Contrato de raciocínio:** aplicar `oxe/workflows/references/reasoning-execution.md`. Antes de mutar, fazer reconhecimento curto; durante a execução, operar no menor write set viável e validar após cada fatia relevante.
|
|
122
122
|
|
|
123
|
-
**Contrato de robustez:** seguir `oxe/workflows/references/flow-robustness-contract.md`. Antes de executar, validar os artefatos obrigatórios e o gate do plano.
|
|
124
|
-
|
|
125
|
-
**Context pack prioritário:** antes de abrir o conjunto amplo de artefatos, resolver `.oxe/context/packs/execute.md` e `.oxe/context/packs/execute.json` como entrada principal do passo. Se o pack estiver fresco/coerente, usar `read_order` e `selected_artifacts` para limitar o reconhecimento inicial à onda/tarefa atual. Se estiver stale, ausente ou com lacunas críticas, fazer fallback explícito para leitura direta e registrar isso no runtime ou no resumo da execução.
|
|
123
|
+
**Contrato de robustez:** seguir `oxe/workflows/references/flow-robustness-contract.md`. Antes de executar, validar os artefatos obrigatórios e o gate do plano.
|
|
124
|
+
|
|
125
|
+
**Context pack prioritário:** antes de abrir o conjunto amplo de artefatos, resolver `.oxe/context/packs/execute.md` e `.oxe/context/packs/execute.json` como entrada principal do passo. Se o pack estiver fresco/coerente, usar `read_order` e `selected_artifacts` para limitar o reconhecimento inicial à onda/tarefa atual. Se estiver stale, ausente ou com lacunas críticas, fazer fallback explícito para leitura direta e registrar isso no runtime ou no resumo da execução.
|
|
126
|
+
|
|
127
|
+
**Artefatos racionais obrigatórios:** quando a execução vier de `PLAN.md`, ler antes da primeira mutação:
|
|
128
|
+
- `IMPLEMENTATION-PACK.md` / `IMPLEMENTATION-PACK.json`
|
|
129
|
+
- `REFERENCE-ANCHORS.md`
|
|
130
|
+
- `FIXTURE-PACK.md` / `FIXTURE-PACK.json`
|
|
131
|
+
|
|
132
|
+
O `execute` é **pack-first**, não apenas `plan-first`. Esses artefatos existem para impedir improviso de paths, interfaces, referências externas e fixtures. Se estiverem ausentes, inconsistentes ou com `critical_gap`, a execução deve bloquear e devolver para replanejamento.
|
|
126
133
|
|
|
127
134
|
**Runtime operacional:** usar `EXECUTION-RUNTIME.md` do escopo resolvido como artefato tático da execução. Ele deve refletir agentes ativos, onda atual, handoffs, evidências, retries, checkpoints pendentes e tarefas bloqueadas. O `PLAN.md` continua estratégico; o runtime regista a operação do ciclo.
|
|
128
135
|
|
|
@@ -182,14 +189,20 @@ Se condições não atendidas: responder sem persona; sugerir `/oxe-plan-agent`
|
|
|
182
189
|
- se estiver stale, incompleto ou ausente, declarar `fallback para leitura direta` antes de seguir.
|
|
183
190
|
1b. **Verificação de hipóteses críticas:** se o context pack contiver o campo `hypotheses` com entradas `status: pending` cujo `checkpoint` coincide com a onda atual — validar cada uma antes de iniciar qualquer mutação. Se a hipótese for refutada, registrar bloqueio explícito em `EXECUTION-RUNTIME.md` e não editar código antes de resolver. Se for validada, atualizar `status: validated` no `PLAN.md`.
|
|
184
191
|
1c. Fazer reconhecimento curto dos artefatos e arquivos prováveis da onda atual antes da primeira mudança. Com pack válido, limitar essa leitura aos artefatos de `read_order` e aos arquivos prováveis da onda; sem pack válido, expandir só o necessário.
|
|
185
|
-
2. Se existir `PLAN.md`, validar a seção `## Autoavaliação do Plano` antes de qualquer implementação:
|
|
186
|
-
- `Melhor plano atual` deve ser `sim`;
|
|
187
|
-
- `Confiança` deve existir em `0–100%`;
|
|
188
|
-
-
|
|
189
|
-
- se
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
-
|
|
192
|
+
2. Se existir `PLAN.md`, validar a seção `## Autoavaliação do Plano` antes de qualquer implementação:
|
|
193
|
+
- `Melhor plano atual` deve ser `sim`;
|
|
194
|
+
- `Confiança` deve existir em `0–100%`;
|
|
195
|
+
- o bloco `<confidence_vector>` deve existir e ser coerente com a confiança declarada;
|
|
196
|
+
- se `.oxe/config.json` definir `plan_confidence_threshold`, usar esse limiar respeitando o piso canónico de `90%`; senão, usar `90%`;
|
|
197
|
+
- se a confiança não superar o limiar (`<=`) ou se a autoavaliação estiver incompleta, **não executar**. Registrar o bloqueio e orientar redução de incerteza (`/oxe-discuss`, `/oxe-research` ou `/oxe-plan --replan`).
|
|
198
|
+
2a. Antes da primeira mutação, validar os artefatos racionais do plano:
|
|
199
|
+
- `IMPLEMENTATION-PACK.json` deve existir, estar `ready`, cobrir cada `Tn` mutável e usar `exact_paths` sem `...`, `symbols`, `contracts`, `write_set: "closed"` e `expected_checks`;
|
|
200
|
+
- `REFERENCE-ANCHORS.md` deve existir e manter todas as âncoras críticas em `status: resolved`;
|
|
201
|
+
- `FIXTURE-PACK.json` deve existir, estar `ready` e cobrir tarefas de parser/layout/integração/transformação/fila/migração/builder;
|
|
202
|
+
- se algum pack tiver `critical_gap`, **não executar**. Registrar o bloqueio explicitamente em `EXECUTION-RUNTIME.md` / `STATE.md` e recomendar um único próximo passo: normalmente `/oxe-plan --replan`.
|
|
203
|
+
3. Antes da primeira mudança, verificar `CHECKPOINTS.md` e `EXECUTION-RUNTIME.md` do escopo resolvido:
|
|
204
|
+
- se houver checkpoint `pending_approval` que se aplique à onda atual, **não avançar**;
|
|
205
|
+
- inicializar ou atualizar o runtime com onda atual, status, agentes ativos, handoffs e evidências esperadas.
|
|
193
206
|
3a. **Caminho padrão do runtime enterprise:** se `oxe-cc runtime` estiver disponível:
|
|
194
207
|
- executar ou solicitar `oxe-cc runtime compile --dir <projeto>` antes da primeira mutação;
|
|
195
208
|
- se compilar com sucesso, tratar `ACTIVE-RUN.json`, `.oxe/runs/<run_id>.json`, `compiled_graph` e `canonical_state` como estado operacional primário da execução;
|
|
@@ -209,11 +222,12 @@ Se condições não atendidas: responder sem persona; sugerir `/oxe-plan-agent`
|
|
|
209
222
|
- O mesmo gate aplica-se em Azure `apply` quando `scope: apply` ou `all`
|
|
210
223
|
6. **Seleção de modo** (apenas se PLAN.md com 2+ ondas e `execute_mode` não definido em STATE): se o argumento já for `A`, `B` ou `C`, usá-lo diretamente; senão apresentar opções A/B/C e aguardar escolha; registrar em STATE.md.
|
|
211
224
|
7. Identificar **onda ou bloco atual**: no PLAN, todas as tarefas da mesma onda sem dependências pendentes; no QUICK, passos ainda não marcados como feitos.
|
|
212
|
-
8. Listar no chat: tarefas/passos desta onda, arquivos prováveis, comando **Verificar** de cada tarefa.
|
|
213
|
-
8a. Antes de implementar, explicitar no chat:
|
|
214
|
-
- **Contexto lido** (incluindo se veio de pack fresco ou de fallback)
|
|
215
|
-
- **
|
|
216
|
-
- **
|
|
225
|
+
8. Listar no chat: tarefas/passos desta onda, arquivos prováveis, comando **Verificar** de cada tarefa.
|
|
226
|
+
8a. Antes de implementar, explicitar no chat:
|
|
227
|
+
- **Contexto lido** (incluindo se veio de pack fresco ou de fallback)
|
|
228
|
+
- **Artefatos racionais lidos** (implementation/anchors/fixtures e eventuais gaps)
|
|
229
|
+
- **Alvo da mudança**
|
|
230
|
+
- **Validação prevista**
|
|
217
231
|
9. **Implementar** conforme o modo escolhido:
|
|
218
232
|
- **Modo Completo:** executar todas as ondas em sequência com verificação inline entre ondas; sumarizar ao final.
|
|
219
233
|
- **Modo Por onda:** executar onda atual, apresentar checklist, parar.
|
|
@@ -239,9 +253,11 @@ Se condições não atendidas: responder sem persona; sugerir `/oxe-plan-agent`
|
|
|
239
253
|
- [ ] Onda ou bloco de passos explicitado antes de "implementar".
|
|
240
254
|
- [ ] Checklist da onda apresentado ou refletido no STATE.md.
|
|
241
255
|
- [ ] STATE.md registra progresso (Tn ou passos) e próximo passo.
|
|
242
|
-
- [ ] Verificação alinhada ao bloco **Verificar** do PLAN ou QUICK.
|
|
243
|
-
- [ ]
|
|
244
|
-
- [ ]
|
|
245
|
-
- [ ]
|
|
256
|
+
- [ ] Verificação alinhada ao bloco **Verificar** do PLAN ou QUICK.
|
|
257
|
+
- [ ] Com `PLAN.md`, `IMPLEMENTATION-PACK`, `REFERENCE-ANCHORS` e `FIXTURE-PACK` foram lidos e validados antes da primeira mutação.
|
|
258
|
+
- [ ] Se qualquer artefato racional estiver ausente ou inconsistente, a execução bloqueia explicitamente e recomenda `/oxe-plan --replan`.
|
|
259
|
+
- [ ] OBS pendentes verificadas antes de cada onda: `blocking` resolvidos antes de avançar, `adjustment` incorporados como restrições, `info`/legado incorporados normalmente.
|
|
260
|
+
- [ ] Com quick-agents ativos: cada agente trabalha só em seus `steps[]`; ao concluir, `quick-agents.json` → `done`.
|
|
261
|
+
- [ ] Com blueprint schema 2 válido: não adotar persona para pedidos fora das `Tn`; `runId` alinhado entre JSON e STATE; handoffs escritos quando protocolo exige.
|
|
246
262
|
- [ ] Quando `oxe-cc runtime` estiver disponível, `runtime compile` foi tentado antes da primeira mutação e `runtime project` foi usado para reprojetar artefatos após a onda/bloco.
|
|
247
263
|
</success_criteria>
|
package/oxe/workflows/next.md
CHANGED
|
@@ -22,7 +22,7 @@ Inspecionar `.oxe/STATE.md` global, a sessão ativa quando existir, e a existên
|
|
|
22
22
|
- Senão → **execute** (há passos curtos a implementar).
|
|
23
23
|
4. Se não houver `SPEC.md` no escopo resolvido e não for quick intencional declarado → **spec** (passo único).
|
|
24
24
|
5. Se houver SPEC no escopo resolvido mas não PLAN → se `.oxe/config.json` tiver `discuss_before_plan: true` e faltar **`DISCUSS.md`** com decisões → **discuss**; senão → **plan**.
|
|
25
|
-
6. Se PLAN existe mas a seção **Autoavaliação do Plano** disser `Melhor plano atual: não`, ou a `Confiança`
|
|
25
|
+
6. Se PLAN existe mas a seção **Autoavaliação do Plano** estiver incompleta, disser `Melhor plano atual: não`, ou a `Confiança` não superar o limiar configurado (padrão canónico `>90%`), o próximo passo deve ser **plan** (replanejar) ou **discuss/research** se a própria autoavaliação indicar isso.
|
|
26
26
|
7. Se PLAN existe, **VERIFY.md** ainda **não** existe ou está claramente antes da implementação atual → **execute** (onda atual).
|
|
27
27
|
8. Se PLAN existe e VERIFY falta após implementação declarada → **verify**.
|
|
28
28
|
9. Se VERIFY indica falha ou gaps não resolvidos → **plan** (replanejamento) como passo único, com referência a `SUMMARY.md`.
|