feat(confidence-engine): expose focused-investigation inputs in composed checkpoint

Add focusedInvestigationInput {targetDescription, question, answer} to
composeDeepInvestigationCheckpoint() return object. These are the actual
invocation values: targetDescription from situationGraph node, question
is previousQuestion (NOT node.openQuestion), answer is function param.

Deterministic verification: syntax check passed; source-inspection test
assertions E10/E11 added and pass (0 failures). Call-count ownership:
up to 3 live generateReconstruction calls (focusedDeconstruct +
reconsiderCompletedEpisode + synthesizeCurrentUnderstanding).

No provider, graph, or production behavior changed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
robbond
2026-10-09 13:47:54 +01:00
co-authored by Claude Code
parent d0f357877d
commit d12615075d
4 changed files with 26 additions and 4 deletions
+10
View File
@@ -688,5 +688,15 @@ Ensure these remain visible and are not accidentally promoted to tester blockers
Tested canonical uncertainty description as initial display instead of generated question. Changed `lib/presentation/facilitator-view-adapter.js` lines ~277–281 to prefer `description` over `openQuestion`. Deterministic tests: 54/54 PASS (including both adapter test files). Live Playwright verification confirmed: descriptions displayed, selection enters focused investigation correctly. Graph identity and reasoning-state ownership unchanged. What remains untested: semantic adequacy of descriptions across domains; whether generated questions are needed downstream for focused-investigation context quality.
### Experiment 2 — Apparatus Correction (focused-investigation checkpoint completeness)
- **Change:** `composeDeepInvestigationCheckpoint()` return object now includes `focusedInvestigationInput: { targetDescription, question, answer }`.
- **`targetDescription`:** derived from `situationGraph.nodes.find(n => n.id === targetNodeId)?.description ?? ""`, declared as module-level `let` before deconstruction block.
- **`question`:** equals `previousQuestion ?? ""` — **NOT** `node.openQuestion`. Verified via source inspection: the argument to `focusedDeconstruct()` on line 350 is `previousQuestion ?? ""`.
- **`answer`:** direct function parameter value, no transformation.
- **Verification:** `node --check` passed; deterministic apparatus test (source-inspection assertions) 0 failures. New assertion E10/E11 added to existing test.
- **Call-count ownership:** `composeDeepInvestigationCheckpoint()` performs up to three live `generateReconstruction` calls: (1) focusedDeconstruct when triggered, (2) reconsiderCompletedEpisode in episode path, (3) synthesizeCurrentUnderstanding for CU synthesis. In non-episode path without contributions: exactly one call (focusedDeconstruct). Source references: helper lines 302, 393, 449.
- **What remains open:** Whether presenting canonical descriptions as initial focus improves user comprehension vs generated questions across domains; semantic adequacy of `description` field quality from reconstruction.
**Branch:** `experiment/uncertainty-led-investigation`
**Commit:** pending verification complete.