oxe-cc 0.7.0 → 0.9.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.
- package/.cursor/commands/oxe-ask.md +34 -0
- package/.cursor/commands/oxe-capabilities.md +34 -0
- package/.cursor/commands/oxe-checkpoint.md +34 -0
- package/.cursor/commands/oxe-compact.md +33 -0
- package/.cursor/commands/oxe-dashboard.md +34 -0
- package/.cursor/commands/oxe-debug.md +34 -0
- package/.cursor/commands/oxe-discuss.md +34 -0
- package/.cursor/commands/oxe-execute.md +34 -0
- package/.cursor/commands/oxe-forensics.md +34 -0
- package/.cursor/commands/oxe-help.md +33 -0
- package/.cursor/commands/oxe-loop.md +34 -0
- package/.cursor/commands/oxe-milestone.md +34 -0
- package/.cursor/commands/oxe-next.md +33 -0
- package/.cursor/commands/oxe-obs.md +34 -0
- package/.cursor/commands/oxe-plan-agent.md +33 -0
- package/.cursor/commands/oxe-plan.md +34 -0
- package/.cursor/commands/oxe-project.md +34 -0
- package/.cursor/commands/oxe-quick.md +34 -0
- package/.cursor/commands/oxe-research.md +34 -0
- package/.cursor/commands/oxe-retro.md +34 -0
- package/.cursor/commands/oxe-review-pr.md +34 -0
- package/.cursor/commands/oxe-route.md +34 -0
- package/.cursor/commands/oxe-scan.md +34 -0
- package/.cursor/commands/oxe-security.md +34 -0
- package/.cursor/commands/oxe-session.md +34 -0
- package/.cursor/commands/oxe-skill.md +45 -0
- package/.cursor/commands/oxe-spec.md +34 -0
- package/.cursor/commands/oxe-ui-review.md +34 -0
- package/.cursor/commands/oxe-ui-spec.md +34 -0
- package/.cursor/commands/oxe-update.md +33 -0
- package/.cursor/commands/oxe-validate-gaps.md +34 -0
- package/.cursor/commands/oxe-verify.md +34 -0
- package/.cursor/commands/oxe-workstream.md +34 -0
- package/.cursor/commands/oxe.md +38 -2
- package/.github/copilot-instructions.md +20 -5
- package/.github/prompts/oxe-ask.prompt.md +33 -0
- package/.github/prompts/oxe-capabilities.prompt.md +33 -0
- package/.github/prompts/oxe-checkpoint.prompt.md +45 -12
- package/.github/prompts/oxe-compact.prompt.md +44 -11
- package/.github/prompts/oxe-dashboard.prompt.md +33 -0
- package/.github/prompts/oxe-debug.prompt.md +45 -12
- package/.github/prompts/oxe-discuss.prompt.md +33 -0
- package/.github/prompts/oxe-execute.prompt.md +45 -12
- package/.github/prompts/oxe-forensics.prompt.md +45 -12
- package/.github/prompts/oxe-help.prompt.md +42 -9
- package/.github/prompts/oxe-loop.prompt.md +45 -12
- package/.github/prompts/oxe-milestone.prompt.md +45 -12
- package/.github/prompts/oxe-next.prompt.md +42 -9
- package/.github/prompts/oxe-obs.prompt.md +45 -12
- package/.github/prompts/oxe-plan-agent.prompt.md +43 -10
- package/.github/prompts/oxe-plan.prompt.md +45 -12
- package/.github/prompts/oxe-project.prompt.md +45 -12
- package/.github/prompts/oxe-quick.prompt.md +45 -12
- package/.github/prompts/oxe-research.prompt.md +45 -12
- package/.github/prompts/oxe-retro.prompt.md +45 -12
- package/.github/prompts/oxe-review-pr.prompt.md +45 -12
- package/.github/prompts/oxe-route.prompt.md +45 -12
- package/.github/prompts/oxe-scan.prompt.md +45 -12
- package/.github/prompts/oxe-security.prompt.md +45 -12
- package/.github/prompts/oxe-session.prompt.md +33 -0
- package/.github/prompts/oxe-skill.prompt.md +45 -0
- package/.github/prompts/oxe-spec.prompt.md +45 -12
- package/.github/prompts/oxe-ui-review.prompt.md +45 -12
- package/.github/prompts/oxe-ui-spec.prompt.md +45 -12
- package/.github/prompts/oxe-update.prompt.md +44 -11
- package/.github/prompts/oxe-validate-gaps.prompt.md +45 -12
- package/.github/prompts/oxe-verify.prompt.md +45 -12
- package/.github/prompts/oxe-workstream.prompt.md +45 -12
- package/.github/prompts/oxe.prompt.md +45 -12
- package/AGENTS.md +6 -4
- package/CHANGELOG.md +45 -0
- package/README.md +38 -8
- package/bin/banner.txt +1 -1
- package/bin/lib/oxe-agent-install.cjs +69 -55
- package/bin/lib/oxe-context-engine.cjs +866 -0
- package/bin/lib/oxe-dashboard.cjs +605 -588
- package/bin/lib/oxe-operational.cjs +105 -0
- package/bin/lib/oxe-plugins.cjs +115 -0
- package/bin/lib/oxe-project-health.cjs +1139 -666
- package/bin/lib/oxe-runtime-semantics.cjs +459 -0
- package/bin/lib/oxe-security.cjs +64 -0
- package/bin/oxe-cc.js +615 -46
- package/commands/oxe/ask.md +33 -0
- package/commands/oxe/capabilities.md +33 -0
- package/commands/oxe/checkpoint.md +49 -16
- package/commands/oxe/compact.md +43 -10
- package/commands/oxe/dashboard.md +33 -0
- package/commands/oxe/debug.md +49 -16
- package/commands/oxe/discuss.md +33 -0
- package/commands/oxe/execute.md +49 -16
- package/commands/oxe/forensics.md +49 -16
- package/commands/oxe/help.md +44 -11
- package/commands/oxe/loop.md +50 -17
- package/commands/oxe/milestone.md +49 -16
- package/commands/oxe/next.md +45 -12
- package/commands/oxe/obs.md +49 -16
- package/commands/oxe/oxe.md +49 -16
- package/commands/oxe/plan-agent.md +48 -15
- package/commands/oxe/plan.md +48 -15
- package/commands/oxe/project.md +49 -16
- package/commands/oxe/quick.md +49 -16
- package/commands/oxe/research.md +49 -16
- package/commands/oxe/retro.md +49 -16
- package/commands/oxe/review-pr.md +49 -16
- package/commands/oxe/route.md +44 -11
- package/commands/oxe/scan.md +49 -16
- package/commands/oxe/security.md +49 -16
- package/commands/oxe/session.md +33 -0
- package/commands/oxe/skill.md +49 -0
- package/commands/oxe/spec.md +47 -14
- package/commands/oxe/ui-review.md +49 -16
- package/commands/oxe/ui-spec.md +49 -16
- package/commands/oxe/update.md +49 -16
- package/commands/oxe/validate-gaps.md +49 -16
- package/commands/oxe/verify.md +48 -15
- package/commands/oxe/workstream.md +49 -16
- package/lib/sdk/index.cjs +140 -7
- package/lib/sdk/index.d.ts +266 -1
- package/oxe/templates/HYPOTHESES.template.md +33 -0
- package/oxe/templates/PLAN.template.md +53 -22
- package/oxe/templates/SESSION.template.md +2 -0
- package/oxe/templates/SKILL.template.md +26 -0
- package/oxe/templates/WORKFLOW_AUTHORING.md +18 -2
- package/oxe/templates/config.template.json +16 -14
- package/oxe/workflows/ask.md +28 -7
- package/oxe/workflows/capabilities.md +2 -0
- package/oxe/workflows/dashboard.md +12 -2
- package/oxe/workflows/debug.md +9 -4
- package/oxe/workflows/discuss.md +12 -6
- package/oxe/workflows/execute.md +34 -12
- package/oxe/workflows/forensics.md +14 -9
- package/oxe/workflows/help.md +20 -9
- package/oxe/workflows/loop.md +13 -7
- package/oxe/workflows/next.md +6 -4
- package/oxe/workflows/plan-agent.md +3 -2
- package/oxe/workflows/plan.md +26 -3
- package/oxe/workflows/quick.md +10 -3
- package/oxe/workflows/references/reasoning-discovery.md +28 -0
- package/oxe/workflows/references/reasoning-execution.md +29 -0
- package/oxe/workflows/references/reasoning-planning.md +32 -0
- package/oxe/workflows/references/reasoning-review.md +29 -0
- package/oxe/workflows/references/reasoning-status.md +24 -0
- package/oxe/workflows/references/workflow-runtime-contracts.json +879 -0
- package/oxe/workflows/research.md +8 -2
- package/oxe/workflows/retro.md +7 -2
- package/oxe/workflows/review-pr.md +12 -8
- package/oxe/workflows/route.md +16 -13
- package/oxe/workflows/security.md +3 -2
- package/oxe/workflows/session.md +44 -0
- package/oxe/workflows/skill.md +44 -0
- package/oxe/workflows/spec.md +21 -18
- package/oxe/workflows/ui-review.md +13 -7
- package/oxe/workflows/update.md +3 -1
- package/oxe/workflows/validate-gaps.md +12 -6
- package/oxe/workflows/verify-audit.md +73 -0
- package/oxe/workflows/verify.md +40 -16
- package/package.json +4 -3
package/commands/oxe/verify.md
CHANGED
|
@@ -1,15 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: oxe:verify
|
|
3
|
-
description: Valida implementação contra SPEC e PLAN; produz checklist e gaps
|
|
4
|
-
argument-hint: "[Tn opcional — focar uma tarefa]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Bash
|
|
9
|
-
- Glob
|
|
10
|
-
- Grep
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
---
|
|
2
|
+
name: oxe:verify
|
|
3
|
+
description: Valida implementação contra SPEC e PLAN; produz checklist e gaps
|
|
4
|
+
argument-hint: "[Tn opcional — focar uma tarefa]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
oxe_workflow_slug: verify
|
|
12
|
+
oxe_reasoning_mode: review
|
|
13
|
+
oxe_question_policy: none
|
|
14
|
+
oxe_output_contract: findings
|
|
15
|
+
oxe_tool_profile: review_heavy
|
|
16
|
+
oxe_confidence_policy: explicit
|
|
17
|
+
oxe_context_tier: standard
|
|
18
|
+
oxe_contract_version: 2.0.0
|
|
19
|
+
oxe_semantics_hash: 442bb4594208d058
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<!-- oxe-reasoning-contract:start -->
|
|
23
|
+
|
|
24
|
+
**Contrato de raciocínio OXE deste comando**
|
|
25
|
+
- **Workflow:** verify
|
|
26
|
+
- **Modo:** revisão
|
|
27
|
+
- **Perguntas:** nenhuma
|
|
28
|
+
- **Saída esperada:** achados
|
|
29
|
+
- **Perfil de ferramentas:** revisão intensa
|
|
30
|
+
- **Política de confiança:** explícita
|
|
31
|
+
- **Tier de contexto padrão:** padrão
|
|
32
|
+
- **Versão do contrato:** 2.0.0
|
|
33
|
+
- **Checksum semântico:** `442bb4594208d058`
|
|
34
|
+
- **Entrada de contexto prioritária:** `.oxe/context/packs/verify.md` e `.oxe/context/packs/verify.json`
|
|
35
|
+
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
36
|
+
- **Inspeção estruturada:** `oxe-cc context inspect --workflow verify --json`
|
|
37
|
+
- Apresentar findings primeiro, ordenados por severidade e evidência.
|
|
38
|
+
- Separar bug, risco, regressão e lacuna de teste.
|
|
39
|
+
- Se não houver findings, declarar isso explicitamente e listar riscos residuais.
|
|
40
|
+
- **Seções esperadas:** Findings · Perguntas abertas · Riscos residuais · Resumo
|
|
41
|
+
- **Bloqueios formais:** missing:state
|
|
42
|
+
- **Referência canónica:** `oxe/workflows/references/reasoning-review.md`
|
|
43
|
+
|
|
44
|
+
<!-- oxe-reasoning-contract:end -->
|
|
45
|
+
|
|
46
|
+
**Workflow canónico:** `oxe/workflows/verify.md`
|
|
47
|
+
|
|
48
|
+
Execute integralmente esse ficheiro. Se `$ARGUMENTS` indicar um id de tarefa (ex. `T2`), restringir a verificação a essa tarefa.
|
|
@@ -1,16 +1,49 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: oxe:workstream
|
|
3
|
-
description: "Trilhas paralelas — list, new <nome>, switch <nome>, status, close <nome> — artefatos independentes em .oxe/workstreams/<nome>/"
|
|
4
|
-
argument-hint: "list | new <nome> | switch <nome> | status | close <nome>"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Bash
|
|
8
|
-
- Glob
|
|
9
|
-
- Grep
|
|
10
|
-
- Write
|
|
11
|
-
- Task
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
---
|
|
2
|
+
name: oxe:workstream
|
|
3
|
+
description: "Trilhas paralelas — list, new <nome>, switch <nome>, status, close <nome> — artefatos independentes em .oxe/workstreams/<nome>/"
|
|
4
|
+
argument-hint: "list | new <nome> | switch <nome> | status | close <nome>"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
- Write
|
|
11
|
+
- Task
|
|
12
|
+
oxe_workflow_slug: workstream
|
|
13
|
+
oxe_reasoning_mode: execution
|
|
14
|
+
oxe_question_policy: ask_high_impact_only
|
|
15
|
+
oxe_output_contract: execution
|
|
16
|
+
oxe_tool_profile: write_bounded
|
|
17
|
+
oxe_confidence_policy: explicit
|
|
18
|
+
oxe_context_tier: standard
|
|
19
|
+
oxe_contract_version: 2.0.0
|
|
20
|
+
oxe_semantics_hash: 82d171363381cc0d
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<!-- oxe-reasoning-contract:start -->
|
|
24
|
+
|
|
25
|
+
**Contrato de raciocínio OXE deste comando**
|
|
26
|
+
- **Workflow:** workstream
|
|
27
|
+
- **Modo:** execução
|
|
28
|
+
- **Perguntas:** perguntar só alto impacto
|
|
29
|
+
- **Saída esperada:** execução
|
|
30
|
+
- **Perfil de ferramentas:** mutação limitada
|
|
31
|
+
- **Política de confiança:** explícita
|
|
32
|
+
- **Tier de contexto padrão:** padrão
|
|
33
|
+
- **Versão do contrato:** 2.0.0
|
|
34
|
+
- **Checksum semântico:** `82d171363381cc0d`
|
|
35
|
+
- **Entrada de contexto prioritária:** `.oxe/context/packs/workstream.md` e `.oxe/context/packs/workstream.json`
|
|
36
|
+
- **Regra pack-first:** ler o context pack primeiro; se estiver stale, incompleto ou ausente, cair para leitura direta com fallback explícito.
|
|
37
|
+
- **Inspeção estruturada:** `oxe-cc context inspect --workflow workstream --json`
|
|
38
|
+
- Fazer reconhecimento curto antes de editar ou executar mutações.
|
|
39
|
+
- Trabalhar no menor write set viável e validar após cada fatia relevante.
|
|
40
|
+
- Parar e explicitar o bloqueio quando houver hipótese crítica não verificada.
|
|
41
|
+
- **Seções esperadas:** Contexto lido · Alvo da mudança · Validação executada · Resultado · Próximo passo
|
|
42
|
+
- **Bloqueios formais:** missing:state · missing:plan
|
|
43
|
+
- **Referência canónica:** `oxe/workflows/references/reasoning-execution.md`
|
|
44
|
+
|
|
45
|
+
<!-- oxe-reasoning-contract:end -->
|
|
46
|
+
|
|
47
|
+
**Workflow canónico:** `oxe/workflows/workstream.md`
|
|
48
|
+
|
|
49
|
+
Execute integralmente esse ficheiro na raiz do repositório em que estás a trabalhar. Usa o texto em `$ARGUMENTS` como subcomando e contexto.
|
package/lib/sdk/index.cjs
CHANGED
|
@@ -17,6 +17,8 @@ const plugins = require('../../bin/lib/oxe-plugins.cjs');
|
|
|
17
17
|
const dashboard = require('../../bin/lib/oxe-dashboard.cjs');
|
|
18
18
|
const operational = require('../../bin/lib/oxe-operational.cjs');
|
|
19
19
|
const azure = require('../../bin/lib/oxe-azure.cjs');
|
|
20
|
+
const context = require('../../bin/lib/oxe-context-engine.cjs');
|
|
21
|
+
const runtimeSemantics = require('../../bin/lib/oxe-runtime-semantics.cjs');
|
|
20
22
|
|
|
21
23
|
const PACKAGE_ROOT = path.join(__dirname, '..', '..');
|
|
22
24
|
|
|
@@ -138,6 +140,70 @@ function parsePlan(planMd) {
|
|
|
138
140
|
* requiredSections: string[],
|
|
139
141
|
* }}
|
|
140
142
|
*/
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Parseia o arquivo lessons-metrics.json retornando o array de lições com métricas.
|
|
146
|
+
* @param {string} metricsJson — conteúdo do arquivo lessons-metrics.json
|
|
147
|
+
* @returns {Array<{ id: string, rule: string, type: string, applied_cycles: string[], outcomes: Array<{ cycle: string, verify_status: string, saved_hours?: number, failure_condition?: string }>, success_rate: number, status: string, deprecation_threshold: number }>}
|
|
148
|
+
*/
|
|
149
|
+
function parseLessonsMetrics(metricsJson) {
|
|
150
|
+
try {
|
|
151
|
+
const data = JSON.parse(String(metricsJson || '{}'));
|
|
152
|
+
return Array.isArray(data.lessons) ? data.lessons : [];
|
|
153
|
+
} catch {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Atualiza a métrica de uma lição com um novo outcome e recalcula success_rate.
|
|
160
|
+
* @param {ReturnType<typeof parseLessonsMetrics>} metrics
|
|
161
|
+
* @param {string} lessonId
|
|
162
|
+
* @param {{ cycle: string, verify_status: string, saved_hours?: number, failure_condition?: string }} outcome
|
|
163
|
+
* @returns {ReturnType<typeof parseLessonsMetrics>}
|
|
164
|
+
*/
|
|
165
|
+
function updateLessonMetric(metrics, lessonId, outcome) {
|
|
166
|
+
const arr = Array.isArray(metrics) ? metrics.slice() : [];
|
|
167
|
+
const idx = arr.findIndex((l) => l.id === lessonId);
|
|
168
|
+
if (idx === -1) return arr;
|
|
169
|
+
|
|
170
|
+
const lesson = { ...arr[idx] };
|
|
171
|
+
lesson.outcomes = [...(lesson.outcomes || []), outcome];
|
|
172
|
+
if (!lesson.applied_cycles.includes(outcome.cycle)) {
|
|
173
|
+
lesson.applied_cycles = [...lesson.applied_cycles, outcome.cycle];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const total = lesson.outcomes.length;
|
|
177
|
+
const successes = lesson.outcomes.filter((o) => o.verify_status === 'complete').length;
|
|
178
|
+
lesson.success_rate = total > 0 ? Math.round((successes / total) * 100) / 100 : 0;
|
|
179
|
+
|
|
180
|
+
const threshold = typeof lesson.deprecation_threshold === 'number' ? lesson.deprecation_threshold : 0.5;
|
|
181
|
+
if (lesson.success_rate < threshold && total >= 3) {
|
|
182
|
+
lesson.status = 'deprecated';
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
arr[idx] = lesson;
|
|
186
|
+
return arr;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Marca como 'deprecated' todas as lições com success_rate abaixo do threshold e ≥ minObservations.
|
|
191
|
+
* @param {ReturnType<typeof parseLessonsMetrics>} metrics
|
|
192
|
+
* @param {number} [threshold=0.5]
|
|
193
|
+
* @param {number} [minObservations=3]
|
|
194
|
+
* @returns {ReturnType<typeof parseLessonsMetrics>}
|
|
195
|
+
*/
|
|
196
|
+
function deprecateLowEffectiveness(metrics, threshold = 0.5, minObservations = 3) {
|
|
197
|
+
return (Array.isArray(metrics) ? metrics : []).map((lesson) => {
|
|
198
|
+
const observations = (lesson.outcomes || []).length;
|
|
199
|
+
const rate = typeof lesson.success_rate === 'number' ? lesson.success_rate : 1;
|
|
200
|
+
if (lesson.status !== 'deprecated' && observations >= minObservations && rate < threshold) {
|
|
201
|
+
return { ...lesson, status: 'deprecated' };
|
|
202
|
+
}
|
|
203
|
+
return lesson;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
141
207
|
function parseSpec(specMd) {
|
|
142
208
|
// Objetivo
|
|
143
209
|
const objMatch = specMd.match(/##\s*Objetivo\s*\n+([\s\S]*?)(?=\n##\s|\n#[^\#]|$)/im);
|
|
@@ -146,9 +212,14 @@ function parseSpec(specMd) {
|
|
|
146
212
|
// Tabela de critérios
|
|
147
213
|
/** @type {Array<{ id: string, criterion: string, howToVerify: string }>} */
|
|
148
214
|
const criteria = [];
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
215
|
+
const criteriaIdx = specMd.search(/##\s*Crit.rios.*?aceite/im);
|
|
216
|
+
if (criteriaIdx !== -1) {
|
|
217
|
+
const afterSection = specMd.slice(criteriaIdx);
|
|
218
|
+
const nextHeadingMatch = afterSection.slice(3).match(/\n#{1,3} /);
|
|
219
|
+
const sectionText = nextHeadingMatch
|
|
220
|
+
? afterSection.slice(0, nextHeadingMatch.index + 3 + 1)
|
|
221
|
+
: afterSection;
|
|
222
|
+
const rows = sectionText.split('\n').filter((l) => l.trimStart().startsWith('|'));
|
|
152
223
|
for (const row of rows) {
|
|
153
224
|
const cells = row.split('|').map((c) => c.trim()).filter(Boolean);
|
|
154
225
|
if (cells.length >= 2 && /^A\d+$/i.test(cells[0])) {
|
|
@@ -244,9 +315,14 @@ function parseState(stateMd) {
|
|
|
244
315
|
function validateDecisionFidelity(discussMd, planMd) {
|
|
245
316
|
// Extrair decisões da tabela D-NN
|
|
246
317
|
const decisionRows = [];
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
249
|
-
const
|
|
318
|
+
const decisoesIdx = discussMd.search(/##\s*Decis.es/im);
|
|
319
|
+
if (decisoesIdx !== -1) {
|
|
320
|
+
const afterSection = discussMd.slice(decisoesIdx);
|
|
321
|
+
const nextHeadingMatch = afterSection.slice(3).match(/\n#{1,3} /);
|
|
322
|
+
const sectionText = nextHeadingMatch
|
|
323
|
+
? afterSection.slice(0, nextHeadingMatch.index + 3 + 1)
|
|
324
|
+
: afterSection;
|
|
325
|
+
const rows = sectionText.split('\n').filter((l) => l.trimStart().startsWith('|'));
|
|
250
326
|
for (const row of rows) {
|
|
251
327
|
const cells = row.split('|').map((c) => c.trim()).filter(Boolean);
|
|
252
328
|
if (cells.length >= 2 && /^D-\d+$/i.test(cells[0])) {
|
|
@@ -461,11 +537,16 @@ module.exports = {
|
|
|
461
537
|
readPackageMeta,
|
|
462
538
|
readMinNode,
|
|
463
539
|
|
|
464
|
-
/** Parsing de artefatos OXE (PLAN, SPEC, STATE). */
|
|
540
|
+
/** Parsing de artefatos OXE (PLAN, SPEC, STATE, hypotheses, confidence, lessons). */
|
|
465
541
|
parsePlan,
|
|
466
542
|
parseSpec,
|
|
543
|
+
parseHypotheses: context.parseHypotheses,
|
|
544
|
+
parseConfidenceVector: context.parseConfidenceVector,
|
|
467
545
|
parseState,
|
|
468
546
|
validateDecisionFidelity,
|
|
547
|
+
parseLessonsMetrics,
|
|
548
|
+
updateLessonMetric,
|
|
549
|
+
deprecateLowEffectiveness,
|
|
469
550
|
|
|
470
551
|
/** Estado do projeto, SPEC/PLAN, fase, config. */
|
|
471
552
|
health: {
|
|
@@ -480,6 +561,9 @@ module.exports = {
|
|
|
480
561
|
parseLastRetroDate: health.parseLastRetroDate,
|
|
481
562
|
isStaleScan: health.isStaleScan,
|
|
482
563
|
isStaleLessons: health.isStaleLessons,
|
|
564
|
+
copilotWorkspacePaths: health.copilotWorkspacePaths,
|
|
565
|
+
copilotLegacyPaths: health.copilotLegacyPaths,
|
|
566
|
+
copilotIntegrationReport: health.copilotIntegrationReport,
|
|
483
567
|
planAgentsWarnings: health.planAgentsWarnings,
|
|
484
568
|
phaseCoherenceWarnings: health.phaseCoherenceWarnings,
|
|
485
569
|
specSectionWarnings: health.specSectionWarnings,
|
|
@@ -533,6 +617,9 @@ module.exports = {
|
|
|
533
617
|
scanFileForSecrets: security.scanFileForSecrets,
|
|
534
618
|
scanDirForSecretFiles: security.scanDirForSecretFiles,
|
|
535
619
|
validatePlanPaths: security.validatePlanPaths,
|
|
620
|
+
checkFilePermission: security.checkFilePermission,
|
|
621
|
+
checkPermissions: security.checkPermissions,
|
|
622
|
+
globToRegex: security.globToRegex,
|
|
536
623
|
DEFAULT_SECRET_PATTERNS: security.DEFAULT_SECRET_PATTERNS,
|
|
537
624
|
DEFAULT_SECRET_CONTENT_PATTERNS: security.DEFAULT_SECRET_CONTENT_PATTERNS,
|
|
538
625
|
DEFAULT_DENIED_PATH_PATTERNS: security.DEFAULT_DENIED_PATH_PATTERNS,
|
|
@@ -544,6 +631,8 @@ module.exports = {
|
|
|
544
631
|
runHook: plugins.runHook,
|
|
545
632
|
validatePlugins: plugins.validatePlugins,
|
|
546
633
|
initPluginsDir: plugins.initPluginsDir,
|
|
634
|
+
resolvePluginSources: plugins.resolvePluginSources,
|
|
635
|
+
installNpmPlugin: plugins.installNpmPlugin,
|
|
547
636
|
},
|
|
548
637
|
|
|
549
638
|
/** Dashboard local: contexto consolidado e persistência de revisão do plano. */
|
|
@@ -567,6 +656,50 @@ module.exports = {
|
|
|
567
656
|
parseCapabilityManifest: operational.parseCapabilityManifest,
|
|
568
657
|
readCapabilityCatalog: operational.readCapabilityCatalog,
|
|
569
658
|
buildMemoryLayers: operational.buildMemoryLayers,
|
|
659
|
+
replayEvents: operational.replayEvents,
|
|
660
|
+
},
|
|
661
|
+
|
|
662
|
+
/** Context Engine V2: seleção, compressão e inspeção determinística de artefatos. */
|
|
663
|
+
context: {
|
|
664
|
+
contextPaths: context.contextPaths,
|
|
665
|
+
resolveArtifactCandidates: context.resolveArtifactCandidates,
|
|
666
|
+
buildProjectSummary: context.buildProjectSummary,
|
|
667
|
+
buildSessionSummary: context.buildSessionSummary,
|
|
668
|
+
buildPhaseSummary: context.buildPhaseSummary,
|
|
669
|
+
buildContextIndex: context.buildContextIndex,
|
|
670
|
+
buildContextPack: context.buildContextPack,
|
|
671
|
+
inspectContextPack: context.inspectContextPack,
|
|
672
|
+
buildAllContextPacks: context.buildAllContextPacks,
|
|
673
|
+
computeContextQuality: context.computeContextQuality,
|
|
674
|
+
computePackFreshness: context.computePackFreshness,
|
|
675
|
+
resolvePackFile: context.resolvePackFile,
|
|
676
|
+
summarizeText: context.summarizeText,
|
|
677
|
+
extractSemanticFragment: context.extractSemanticFragment,
|
|
678
|
+
parseHypotheses: context.parseHypotheses,
|
|
679
|
+
parseConfidenceVector: context.parseConfidenceVector,
|
|
680
|
+
},
|
|
681
|
+
|
|
682
|
+
/** Semântica canónica multi-runtime para workflows, wrappers e prompts gerados. */
|
|
683
|
+
runtimeSemantics: {
|
|
684
|
+
CONTRACT_VERSION: runtimeSemantics.CONTRACT_VERSION,
|
|
685
|
+
CONTRACTS_PATH: runtimeSemantics.CONTRACTS_PATH,
|
|
686
|
+
CONTRACTS_REGISTRY: runtimeSemantics.CONTRACTS_REGISTRY,
|
|
687
|
+
REQUIRED_CONTRACT_FIELDS: runtimeSemantics.REQUIRED_CONTRACT_FIELDS,
|
|
688
|
+
RUNTIME_METADATA_KEYS: runtimeSemantics.RUNTIME_METADATA_KEYS,
|
|
689
|
+
validateWorkflowContractsRegistry: runtimeSemantics.validateWorkflowContractsRegistry,
|
|
690
|
+
getWorkflowContract: runtimeSemantics.getWorkflowContract,
|
|
691
|
+
getAllWorkflowContracts: runtimeSemantics.getAllWorkflowContracts,
|
|
692
|
+
computeSemanticsHash: runtimeSemantics.computeSemanticsHash,
|
|
693
|
+
getRuntimeMetadataForSlug: runtimeSemantics.getRuntimeMetadataForSlug,
|
|
694
|
+
renderRuntimeMetadataLines: runtimeSemantics.renderRuntimeMetadataLines,
|
|
695
|
+
buildReasoningContractBlock: runtimeSemantics.buildReasoningContractBlock,
|
|
696
|
+
pickRuntimeMetadata: runtimeSemantics.pickRuntimeMetadata,
|
|
697
|
+
splitFrontmatter: runtimeSemantics.splitFrontmatter,
|
|
698
|
+
parseFrontmatterMap: runtimeSemantics.parseFrontmatterMap,
|
|
699
|
+
slugFromPromptFilename: runtimeSemantics.slugFromPromptFilename,
|
|
700
|
+
slugFromCommandFilename: runtimeSemantics.slugFromCommandFilename,
|
|
701
|
+
auditWrapperText: runtimeSemantics.auditWrapperText,
|
|
702
|
+
auditRuntimeTargets: runtimeSemantics.auditRuntimeTargets,
|
|
570
703
|
},
|
|
571
704
|
|
|
572
705
|
/** Provider Azure nativo via Azure CLI. */
|