feat(confidence-engine): add investigation overview synthesis seam

This commit is contained in:
2026-09-02 14:34:32 +01:00
parent 194a742772
commit 83818c0c71
4 changed files with 817 additions and 1 deletions
+27 -1
View File
@@ -354,7 +354,33 @@ A fresh unanswered Question B displayed stale focused-investigation content from
- Reasoning, prompts, providers, episode preparation unchanged
- Zero-Open-Questions milestone and focused-presentation ownership (v0.52) remain unchanged
### Open defects
### v0.54 — Investigation overview synthesis apparatus established
**Objective:** Establish the smallest reusable seam for a later bounded live experiment answering whether one additional synthesis call can produce a more useful investigation overview than Current Understanding, while keeping established understanding and plausible interpretations epistemically separate.
**Apparatus delivered (no UI integration, no live semantic experiment):**
- **Domain function:** `synthesizeInvestigationOverview()` in `lib/graph/investigation-overview-synthesis.js`
- Accepts `{ situationGraph, findings, plausibleInterpretations }`
- Output contract: `{ understanding, plausibleInterpretations }` — two structurally distinct string fields
- Uses Zod-safeParse validation rejecting any recommendation/decision/confidenceScore/nextAction/priority/readiness leakage
- Epistemic boundary rules: established evidence never promoted to interpretation; interpretations never promoted to understanding
- **Route:** `POST /api/cases/overview` (thin route, parallel to existing `/api/cases/synthesis`)
- **Deterministic tests:** `tests/graph/investigation-overview-synthesis.test.js` — 49 tests covering epistemic boundary integrity, evidence exclusion, interpretation separation, output contract, and full seam
**Plausible interpretation ownership (discovered):**
- Canonical source: `reconstruction.plausibleInterpretations` in `lib/reconstruction/schema.js`
- Schema: `{ id, description, supportingEvidenceIds[], assumptionsRequired[], confidence }`
- Written to graph as `"assumption"` nodes with `status: "provisional"` via `lib/graph/builder.js`
- Presentation-derived (UI renders from reconstructed provisional assumption nodes); canonical state is the reconstruction payload
**Existing CU synthesis unchanged:** `synthesizeCurrentUnderstanding()`, `buildGraphEvidenceProjection()`, `filterEligibleFindings()` untouched.
> v0.54 overview synthesis apparatus established; no live semantic experiment and no UI integration performed yet.
## Open defects
- Empty Done `no_episodic_content`: choosing Done without episodic content can produce `{ success: false, stage: "preparation", error: "no_episodic_content" }` — separate future increment (empty-Done orchestration guard now prevents the 400 in practice by skipping episode processing entirely)