Commit Graph
235 Commits
Author SHA1 Message Date
robbond 273f715ae0 fix: complete scope-aware condition status evaluation
Handle the actual long-investigation fixture wording without rewriting conditions or evidence.

Fixes:
- Add 'is achievable' to future-feasibility phrase list so present-state evidence correctly leaves future conditions unresolved (different_timeframe scope)
- Add 'european equivalent' to differentiation related keywords so observation-5 evidence directly shares the differentiation concept with the condition (direct_match scope)

Updates:
- decision-condition-status tests to use present-state condition text where needed, and correct expectations for the two actual fixture cases
- Evidence-condition-scope tests for both actual fixture examples
- Design evolution log with Experiment 25B findings confirming long-investigation statuses
2026-08-06 13:05:29 +01:00
robbond eb12a9ce49 experiment: qualify condition status by evidence scope 2026-08-06 12:40:07 +01:00
robbond 1a9a9a94fe experiment: compare evidence and condition scope 2026-08-06 11:36:42 +01:00
robbond da291c715b experiment: derive condition status from answer evidence 2026-08-06 11:17:17 +01:00
robbond aabb797e5d experiment: classify answer evidence direction
Move EVIDENCE_DIRECTION_GROUPS out of the mock fixture library into
lib/graph/evidence-direction.js where it belongs. Remove unused
DECISION_CONDITIONS and CONTRADICTION_KEYWORDS exports from scenarios.

Add Experiment 24A entry to the design log.
2026-08-06 10:32:48 +01:00
robbond 3119635211 experiment: assess decision condition status 2026-08-06 09:04:06 +01:00
robbond 32aa3f237a experiment: test questions against decision conditions 2026-08-06 08:36:44 +01:00
robbond 89650b44df experiment: test question relevance against decision target 2026-08-06 06:19:09 +01:00
robbond 7c3d1e7355 experiment: evaluate question importance across long investigation 2026-08-05 19:56:06 +01:00
robbond 445aaa7b37 experiment: add passive question importance test 2026-08-05 19:48:11 +01:00
robbond fda3c9c02d docs: principles and story docs 2026-08-05 19:34:57 +01:00
robbond 1df4669b32 experiment: add passive behaviour selection
Implement Experiment 19: deterministic behaviour selector with five
behaviours (Acknowledge, Clarify, Summarise, Continue, Pause).

- lib/behaviour-selection/behaviour-selector.js — Pure function selector
  applying v0.1 rules in priority order (acknowledge > clarify > summarise >
  pause > continue). Defaults to Continue with low confidence when no rule
  matches or assessment is incomplete. Guards against partial objects.

- tests/behaviour-selector.test.js — 51 tests covering all five behaviours,
  priority ordering, contract conformance, determinism, edge cases, and
  scenario-based validation with mock investigations.

- docs/design-evolution-log.md — Close Experiment 18 (record what assessor
  enabled for Behaviour Selection), add Experiment 19 section with hypothesis,
  scope, evaluation criteria, and open questions.

Passive integration only: no changes to reasoning engine, prompts, graph
generation, decomposition, narrative generation, API contracts, UI behaviour,
or Ollama integration.
2026-08-05 18:26:31 +01:00
robbond 1273861f0c exp(18): implement investigation state assessment layer
Implement the three-dimensional assessment (phase, progress, conversation
health) that sits between narrative and behaviour selection.

Key changes:
- lib/assessment/investigation-state-assessor.js: assessor module with
  countObservations, assessPhase, assessProgress, assessConversationHealth,
  assessInvestigationState — deterministic classifiers using known rules
- tests/investigation-state-assessor.test.js: 51 tests covering phase
  classification (orienting→concluding), progress thresholds, health
  conditions, confidence aggregation, edge cases, and observation counting
- lib/graph/orchestrator.js: integration calls passing correctly-shaped input
  to assessInvestigationState() at three call sites (~552, ~904, ~1013)

Design decisions encoded in this iteration:
- countObservations counts nodes with known/resolved status + high-confidence
  non-unknown non-state nodes (not just explicit observation-kind nodes)
- Phase uses seven values including cannot_determine for insufficient data
- Progress uses resolution ratio thresholds: accelerating (>0.6), steady
  (0.2-0.6), stalled (<0.2 with ≥1 resolved)
- Overall confidence = minimum across all three dimensions (conservative)

Also adds investigation-state-assessment-contract.md and updates
design-evolution-log, investigation-state-assessment.md (status header),
and investigation-turn-cycle.md (implementation status table).
2026-08-05 17:52:18 +01:00
robbond a0a76d6171 docs: narrow behaviour-selection to v0.1 implementation brief
Compress the speculative 452-line architecture spec into a constraint-focused
experiment brief. Reduce the initial behaviour set to five patterns
(Acknowledge, Clarify, Summarise, Continue, Pause) — the smallest useful
subset for testing whether behaviour selection improves over 'always ask'.

Remove: arbitrary weights/scores, convergence requirements, phase-constrained
tables (design preferences not discoveries), rationale output infrastructure,
Behaviour Readiness dimension specs.

Keep: five behaviours with plain condition-matching rules, explicit v0.1 scope
boundary, Future Considerations section for deferred architecture items.

Also add Behaviour Selection entry to reasoning-contract-backlog and mark
Stage 4 (State Assessment) as implemented in investigation-turn-cycle.
2026-08-05 17:52:01 +01:00
robbond e44785365c architecture: define investigation turn cycle 2026-08-05 16:14:22 +01:00
robbond cb0c779019 architecture: introduce investigation state assessment
Close Experiment 15 (Facilitator Behaviour Specification).

Introduce Experiment 16 — Investigation State Assessment.

- Create docs/investigation-state-assessment.md with 7 assessment dimensions:
  Current Investigation Phase, Investigation Progress, Evidence Quality,
  Understanding Trajectory, Uncertainty Trend, Conversation Health,
  and Behaviour Readiness. Each dimension includes purpose, observable
  signals, possible values, and how behaviours may consume it.

- Document 6 assessment principles (Assess Not Decide, All Signals
  Traceable to Narrative, Descriptive Not Prescriptive, Convergence Over
  Single Signal, Stateful Across Turns, Uncertainty About Assessment Is
  Itself Assessable).

- Include exploratory decision matrix linking investigation states to
  likely behaviours with reasons.

- Prepend Behaviour Selection section to docs/facilitator-behaviour.md
  recording that behaviours are selected from Investigation State
  Assessment and do not inspect graph nodes directly.

- Update docs/design-evolution-log.md: close Experiment 15, add
  Experiment 16 closure, record emerging architecture with the new layer
  between Narrative and Behaviour Selection.

No implementation. Documentation only. No changes to reasoning engine,
graph generation, prompts, orchestrator, APIs, Ollama integration, or UI.
2026-08-05 16:09:24 +01:00
robbond fd59845231 experiment(15): specify facilitator behaviour — behavioural model for Phase 5
- Create docs/facilitator-behaviour.md: behavioural specification of the
  Confidence Engine with 14 identified behaviours (Orient, Acknowledge,
  Observe pattern, Clarify, Validate, Connect, Challenge assumption, Refine
  understanding, Expose uncertainty, Decide direction, Know when to pause,
  Avoid premature closure, Communicate confidence honestly, Progressively
  narrow focus).

- Update docs/design-evolution-log.md: add Experiment 15 entry documenting
  what Experiment 14 proved, what emerged (the gap is behavioural not visual),
  and why the next phase focuses on conversation behaviour over UI.

- Update .claude/ux-guidelines.md: add Facilitator Behaviour section with
  core behavioural principles, anti-patterns, state-aware selection criteria,
  and architecture relationship.

No code changes — this is a behavioural specification for future implementation.
2026-08-05 16:02:32 +01:00
robbond 863a4589b3 architecture: introduce investigation narrative layer 2026-08-05 15:53:22 +01:00
robbond 6eaf0fc246 experiment: improve semantic graph projection
Experiment 13 — Semantic Facilitator Translation

- Classify nodes by semantic role (observation, question, explanation,
  scaffolding, relationship) rather than graph kind. Scaffolding suppressed
  entirely before section routing.
- Three-tier filtering: scaffolding patterns > internal vocabulary > technical
  summary patterns. Prevents structural noise from contaminating user-facing
  sections.
- Deduplicate by normalised text — merge duplicate observations expressing the
  same finding.
- Route resolved unknowns and assumptions to known section with epistemic
  labels instead of treating them as unresolved questions.
- Prefer concrete observations (numbers, change language, temporal refs) over
  abstract labels in ranking.
- Closed Experiment 12 as confirmed. Added Experiment 13 documentation.
- Updated UX guidelines with Semantic Projection principles.
- 37 tests: filtering, classification, deduplication, ranking, framing, mock
  data integration, edge cases.
2026-08-05 15:26:29 +01:00
robbond 1998b84ae1 experiment: facilitator view from reasoning graph 2026-08-05 15:00:42 +01:00
robbond a7b7dda91f fix: define hasGraph in ReasoningWorkspace scope for Experiment 11 toggle 2026-08-05 14:41:11 +01:00
robbond ebea15c970 experiment: facilitator progress panel (Version B) 2026-08-05 14:37:43 +01:00
robbond 54acf0d565 experiment: stabilise conversation and reference lanes 2026-08-05 13:24:04 +01:00
robbond 8e96907209 experiment: improve investigation rhythm 2026-08-05 13:16:04 +01:00
robbond 7e18d0b53f experiment: align investigation response input 2026-08-05 13:03:15 +01:00
robbond 1cf71d6ce2 experiment: reduce initial observation input 2026-08-05 12:51:48 +01:00
robbond 46f2d12726 exp(06): focused investigation — visual hierarchy without layout changes
Emphasise the active investigation card through stronger elevation,
clearer borders, and improved spacing. Quiet supporting panels by
reducing border opacity, softening heading weight, and lowering
text contrast — making them available without competing for attention.

Facilitator card receives a warm surface tint to read as a briefing
card rather than a generic panel.

Documentation: close experiment 05 with findings, add experiment 06
to the design evolution log, add Attention Hierarchy to UX guidelines,
defer dark mode to a future Investigation Mode experiment.

Presentation changes only — no reasoning, prompts, graph, API, or
backend modifications.
2026-08-05 12:41:13 +01:00
robbond f46c419168 fix: restore missing </form> closing tag in landing layout 2026-08-05 12:27:00 +01:00
robbond d1e6c2e032 experiment: facilitator panel beside workspace (Exp 05)
- Replace stacked landing with responsive two-column layout
- Left panel (1/3 desktop): facilitator intro card with dismiss checkbox
- Right panel (2/3 desktop): Tell me what's happening textarea + Analyse
- Mobile/tablet stack vertically as before
- 'Don't show' uses sessionStorage; future: user profile settings
- Close Exp 04 (Partially confirmed) in evolution log
- Add Exp 05 entry + Facilitator Behaviour UX section
2026-08-05 12:25:44 +01:00
robbond 048f31f43b experiment: replace landing with workshop introduction
- Added Welcome card (Before we begin) to idle state
- Reduced textarea from 10 to 6 rows
- Added reassurance text below Analyse button
- Removed redundant empty-state placeholder
- Closed Experiment 03 (Partially confirmed) in evolution log
- Added Experiment 04: Facilitated Workshop Introduction
- Added Entry Experience section to UX guidelines
2026-08-05 12:14:30 +01:00
robbond 742bd09ddc experiment: separate conversation from workspace 2026-08-05 12:03:08 +01:00
robbond 1cb79cb36b fix: resolve nested ternary JSX syntax error 2026-08-05 11:52:11 +01:00
robbond e9ab1ec5ee experiment: organise workspace into cognitive zones 2026-08-05 11:42:20 +01:00
robbond 236d14f86c experiment: widen investigation canvas 2026-08-05 11:33:18 +01:00
robbond c584e9915b doc: upodated deisgn evolution log 2026-08-05 11:26:36 +01:00
robbond d6b8eb0f90 feat: explore facilitated investigation workspace
Phase 4 UX exploration — workshop desk metaphor.

Workspace layout changes:
- Investigation Map promoted from preview to workspace artefact
- Understanding card given wider surface (lg:col-span-2)
- Grid shifts from equal-column to cognitive-weighted widths (lg:grid-cols-5)
- Mobile remains stacked; tablet simplifies naturally
- Desktop exploits wider working canvas

Layout structured by cognitive activity:
  Active workspace zone (Question + Response)
  Supporting workspace (Understanding, Map)
  Reference row (Situation, History)
2026-08-05 11:22:18 +01:00
robbond cf05c969bf feat: begin responsive workspace layout 2026-08-05 10:51:44 +01:00
robbond 2f87cca88d style: polish investigation workspace
- Summary panel: hide meaningless metrics (questions answered/remaining) until genuinely in progress; remove placeholder timestamps
- Understanding card: increased visual importance via larger heading, lighter border, more padding
- History section: reduced labels to brief forms ('History', 'Situation'), removed uppercase decorative labels from headings
- Investigation Map Preview: lighter borders, muted text, subtle background to signal provisional state
- Turn history cards: removed redundant subheadings ('Your answer', 'What changed') and divider lines
- Button label: 'Update situation' → 'Update'; padding consistent with design tokens
- Condition clarity fix: '!hasSelectedQuestion === false' → 'hasSelectedQuestion'
- Workspace polish section added to UX guidelines
2026-08-05 10:30:22 +01:00
robbond 86d9bc3f48 refactor: clarify investigation map as ux placeholder 2026-08-05 10:20:28 +01:00
robbond ce673b8eb4 feat: add investigation map workspace view 2026-08-05 10:10:16 +01:00
robbond a4dc165385 fix: show initial analysis reasoning state 2026-08-05 10:02:10 +01:00
robbond 607a2d4a58 fix: ensure loading overlay renders during analyse 2026-08-05 09:51:17 +01:00
robbond 7f3dc076b6 fix: pass isLoading prop to update LoadingOverlay 2026-08-05 09:19:31 +01:00
robbond 553bdb1bdd fix: allow loading render before awaiting (prevent React batching) 2026-08-05 09:16:56 +01:00
robbond 6ae167175c fix: move LoadingOverlay outside hasSelectedQuestion gate 2026-08-05 09:09:18 +01:00
robbond 975a965b10 fix: JSX comment inside ternary breaks parsing 2026-08-05 08:51:10 +01:00
robbond 592962325d feat: add mock-mode docs and additional e2e tests (long investigation, recovery states) 2026-08-05 08:38:44 +01:00
robbond 61210c1200 fix: localise update reasoning state 2026-08-05 08:36:18 +01:00
robbond 6d11c1d503 fix: unify reasoning mode across submissions 2026-08-05 08:27:22 +01:00
robbond c87fd65e13 fix: stabilise happy path playwright journeys 2026-08-05 08:00:18 +01:00