experiment: validate behaviour selection against real assessments

This commit is contained in:
2026-08-06 16:30:10 +01:00
parent 51648e4b8f
commit da3d35f437
4 changed files with 563 additions and 14 deletions
+60
View File
@@ -2264,3 +2264,63 @@ All seven knowledge-management completion criteria are confirmed met by this col
The cold-start validation passed. A genuinely fresh session understood the project state, chose the correct context pack, verified the resume boundary, produced a valid engine-work resume brief, and found no handoff defects — all from three documents alone. No source code was read or changed. The reduced context system works for sessions that did not help create the documents.
Engine and UI experiments remain paused pending Rob's review.
---
## Experiment 39 — Validate Behaviour Selection Against Real Assessment Outputs (2026-08-06)
**Branch:** feature/user-workspace-ux-v0.7
### Hypothesis
The existing deterministic selector produces a useful rhythm across genuine assessment outputs without changing the active engine. If it repeatedly chooses one behaviour, chooses behaviours at the wrong time, or depends on signals the assessor does not actually produce, the experiment should expose that honestly.
### Scenarios Evaluated (from `tests/investigation-state-assessor.test.js` fixture set)
1. **Long investigation** (3 turns: early → deepening → complete terminal)
2. **Contradictory evidence** (3 turns: two conflicting consultants, 0→1→2 resolved unknowns)
3. **Short early** (1 turn: two observations, first unknown, no resolution)
### Behaviour Distribution (7 turns total)
- Acknowledge: 5 (71%)
- Continue: 2 (29%)
- Clarify: 0 (0%)
- Summarise: 0 (0%)
- Pause: 0 (0%)
### Behaviour Sequence by Scenario
**Long investigation:** continue → acknowledge → acknowledge
- Turn 0: phase=cannot_determine, progress=cannot_determine, health=too_narrow → continue (no rule matched)
- Turn 3: phase=focusing, progress=steady, health=healthy → acknowledge
- Turn 4: phase=concluding, progress=steady, health=healthy → acknowledge
**Contradictory evidence:** acknowledge → acknowledge → acknowledge
- Turn 0: phase=focusing, progress=cannot_determine, health=healthy → acknowledge
- Turn 1: phase=focusing, progress=stalled, health=healthy → acknowledge
- Turn 2: phase=focusing, progress=steady, health=healthy → acknowledge
**Short early:** continue
- Turn 0: phase=exploring, progress=cannot_determine, health=healthy → continue
### Sensible Selections (7 of 7)
All selections were classified as sensible per the selection's stated conditions. Acknowledge fires because `health=healthy AND phase confidence≠low` across most states. Continue fires when no specific rule matches (early/cannot_determine/exploring phases).
### Questionable or Inappropriate Selections
**One notable pattern:** Summarise and Pause never fire, even in a concluding terminal state. This is not because the assessor fails to detect "concluding" — it does. It is because Acknowledge (priority 1) fires first when health=healthy, blocking Summarise (priority 3) from ever reaching its turn. This is an **acknowledgement/summarise priority conflict**: acknowledging a conclusion ("you've figured this out!") is not wrong, but "give me a summary" is more useful at terminal states. The current rule ordering does not distinguish "early healthy" from "concluding healthy."
Clarify never fires because no test scenario produces `health=too_broad` — the assessor's "too_broad" trigger (activeUnknownCount > 3 AND resolved < 2) requires more nodes than any scenario in the fixture set has at that stage.
Pause never fires because `health=user_overloaded` is never reached, and while contradictory-turn-1 has phase=focusing + progress=stalled, Acknowledge still blocks it.
### Contract Alignment
Assessor → Selector contract aligns cleanly. The assessor produces all three dimensions (phase, progress, conversationHealth) with the fields the selector expects. No transformation needed between pipeline stages.
### Whether Selector Appears Useful Enough for Another Passive Experiment
The existing selector works but its **behaviour variation is severely constrained by Acknowledge's priority position**. A next passive experiment should test whether reordering or refining the acknowledge condition (e.g., excluding concluding/terminal phases) produces more context-appropriate behaviour — without changing the assessor.
### Status
Pending Rob's review. Five behaviours are too narrow for this to be definitive, and only three scenarios were tested. The dominant pattern (acknowledge in healthy states) may change with different investigation domains.
### Documents Updated
- `docs/design-evolution-log.md` — this entry
- `docs/current-handoff.md` — return-to-work note replaced
---