Commit Graph
126 Commits
Author SHA1 Message Date
robbond 0752c53a25 feat(confidence-engine): accept episode evidence at graph application 2026-09-01 08:30:26 +01:00
robbond 6b77e32771 feat(confidence-engine): accept completed episode reasoning input 2026-09-01 06:59:04 +01:00
robbond efa39f52de feat(confidence-engine): prepare completed episode evidence 2026-09-01 06:48:55 +01:00
robbond 8e941b0c7b fix(confidence-engine): resolve synthesis model configuration 2026-08-31 07:32:04 +01:00
robbond ff1119b4d5 feat(confidence-engine): establish current understanding synthesis seam 2026-08-30 18:48:38 +01:00
robbond e221bd3bf8 feat(confidence-engine): isolate finding-informed understanding 2026-08-28 08:16:37 +01:00
robbond 166ee91698 feat(confidence-engine): persist canonical investigation state 2026-08-27 16:21:41 +01:00
robbond ba956eeb3a refactor(confidence-engine): add investigation storage provider 2026-08-27 15:24:38 +01:00
robbond 3235c35cf0 feat(confidence-engine): add focused finding handoff plumbing 2026-08-26 16:07:21 +01:00
robbond fdb173d0e9 feat(confidence-engine): anchor focused frontier to investigation relevance 2026-08-26 12:16:41 +01:00
robbond 42a7e82d88 feat(confidence-engine): tighten focused relationship attribution 2026-08-26 07:56:27 +01:00
robbond 112739b8e5 feat(confidence-engine): checkpoint focused deconstruction reasoning 2026-08-25 15:10:09 +01:00
robbond 9d670822a3 feat(confidence-engine): preserve focused deconstruction semantic fidelity 2026-08-24 10:11:06 +01:00
robbond 517d780e2c checkpoint: preserve semantic decomposition investigation state 2026-08-22 08:21:29 +01:00
robbond 41afd9b49f checkpoint: preserve reflection and response-contract work 2026-08-21 14:29:39 +01:00
robbond 4b264c5681 test(ui): make inferred questions originate branches 2026-08-20 14:29:42 +01:00
robbond 49c4b904df test(ui): checkpoint branch scoped fixture 2026-08-20 07:43:18 +01:00
robbond 7add85d8d2 feat(experiment): checkpoint focused investigation boundaries 2026-08-19 05:41:32 +01:00
robbond 4a34dcc361 test(experiment): ground RTO apparatus in real fixture 2026-08-18 12:39:19 +01:00
robbond 25a88c5fc3 feat: multi-thread experimental apparatus (RTO.A1)
Add fixture-only apparatus for representing multiple concurrent open
investigation items within a fixed case context.

New scenario 'multi-thread' exposes:
- A fixed central situation statement and case summary (product-launch
  timing decision, drawn from existing pre-anchored-product-launch
  data)
- Three open investigation items — none compulsory: enterprise customer
  signing probability, competitor timing, financial viability comparison
- One engine recommendation (mt-ent-customer-signing, ordered first)
- User selection of any item; chosen item becomes visually primary while
  others remain visible as context
- Experimental state isolated in _experimental / _experimentalState —
  never aliases production graph fields
2026-08-18 10:39:16 +01:00
robbond 772ae495c6 fix(reasoning): preserve investigation ownership across selection and question rejection 2026-08-17 17:58:45 +01:00
robbond 6ca8381b99 fix(reasoning): correct insufficient-observation comparability state 2026-08-17 09:32:21 +01:00
robbond ade445e453 fix(reasoning): reconcile evidence and preserve deterministic continuation 2026-08-17 08:06:08 +01:00
robbond b181c3ea75 fix(reasoning): enforce confirmation-gated decision closure
- reconcileDecisionClosureOwnership normaliser between reconciliation and validation (Boundary B)
- Strips terminal parent updates without explicit user confirmation; preserves all other proposal work
- Strips parent from resolvedUnknownNodeIds bookkeeping on no-confirmation strip
- Restores reconciler-forced resolved→unknown for synthetic updates too
- Prevents hybrid unknown+value states by nulling newValue in all stripping paths
- No-op update created when reconciler synthesized the entry to prevent downstream errors

Prompt:
- Rule #143 rewritten from evidence-sufficiency to explicit-confirmation gate
- Directs model to use possibleInference for directional conclusions when confirmation absent

Regression preservation:
- 60B.43 lifecycle invariant restored via explicit confirmation phrases in fixture answers
- 60B.49 reconciliation auto-add invariant restored under confirmed closure flow
- Test apparatus fixed: structuralActionRequired required with userSupportedMeaning (validator constraint)

New coverage:
- 10 tests for all 60B.79/80 coverage requirements
- 5 prompt alignment tests for Rule #143
2026-08-15 11:34:39 +01:00
robbond 912680b967 fix(reasoning): recognise decision in sufficiency question 2026-08-14 19:04:17 +01:00
robbond 8311a176a5 fix(reasoning): ask for missing sufficiency confirmation 2026-08-14 18:01:27 +01:00
robbond 36b4f47097 refactor(reasoning): extract decision sufficiency 2026-08-14 15:37:24 +01:00
robbond bce05f779b feat(reasoning): integrate explicit decision-sufficiency closure (60B.64)
Add two new capabilities:

1. isUserConfirmationOfNoRemainingUncertainty(answer) — bounded,
   deterministic raw-answer confirmation that no other material uncertainty
   remains after a decision factor has been resolved. Matches an explicit
   phrase family (e.g. 'no remaining material uncertainty', 'no other
   material uncertainties remain') plus two bounded regex patterns, while
   rejecting contradictory wording ('still another material uncertainty',
   'I am not saying...').

2. Decision-sufficiency closure integration point in applyValidatedProposal,
   positioned after post-mutation/post-propagation and before final
   active-target selection. When all represented material factors are
   resolved AND the raw user answer confirms sufficiency, resolves the
   existing parent decision in place (status → 'resolved') and clears
   the active unknown target.

Uses a virtual 'resolved this turn' set because node statuses have not
yet been reconciled at the integration point. Tests cover: exact fixture
wording from 60B.56, bounded paraphrases, absence-of-confirmation
(non-closure), remaining-factors (blockage), contradictory wording
(rejection), negated phrases (rejection), and vague completion language
(exclusion).
2026-08-14 14:21:33 +01:00
robbond 5ef2b5a3c7 feat(reasoning): detect remaining decision factors 2026-08-14 13:31:28 +01:00
robbond 54e2e2186b fix(reasoning): reconcile closure selection state 2026-08-14 11:02:00 +01:00
robbond 6b13e67c05 fix(reasoning): enforce terminal post-mutation eligibility 2026-08-14 09:11:08 +01:00
robbond 34eb0cd4e3 fix(reasoning): exclude terminal nodes from active selector 2026-08-14 09:02:08 +01:00
robbond 437aadc587 fix(reasoning): honor explicit whether propositions 2026-08-14 07:01:23 +01:00
robbond d26bbfebdf fix(reasoning): support uncertainty-over propositions 2026-08-14 06:31:33 +01:00
robbond 1f361e2d93 fix(reasoning): preserve explicit uncertainty propositions 2026-08-14 06:16:14 +01:00
robbond f955b875af fix(reasoning): clean proposition question formulation 2026-08-13 17:45:28 +01:00
robbond 8cca70774c fix(reasoning): narrow decision audience question routing 2026-08-13 16:58:32 +01:00
robbond d871a8c5c4 fix(reasoning): scope structural context admission 2026-08-13 12:49:42 +01:00
robbond 54bc48342b fix(reasoning): preserve ready material question target 2026-08-13 09:36:10 +01:00
robbond 5ce5e7349b feat(reasoning): add decision materiality rule 2026-08-13 07:24:16 +01:00
robbond 57c9f2205e feat: add 'option' node kind and 'contained_in' edge — 60A.3
Implementation of Candidate B (unknown+option) from decision architecture
design in 60A.2. Adds two new primitives to the situation graph:

Schema (lib/graph/schema.js):
- SituationKind.option — a choice available within a decision context
- SituationRelationship.contained_in — links option → its parent unknown context

Prompt rules (lib/graph/prompt-builder.js):
- Section added: Decision Option Structure Rules with 5 numbered instructions
  governing when/how to create option nodes, link them via contained_in,
  attach consequences to specific options, and handle do-nothing alternatives.
  Explicitly forbids alternative_to edges and is_baseline/is_default flags.

Tests (446 new lines):
- schema.test.js: +300 — enum completeness updates, option kind validation,
  contained_in edge validation, native two-option graph fixture (~25 new tests)
- prompt-builder.test.js: +133 — focused rules verification for all 5 rule points,
  negative checks (no relocation/savings/example-specific wording, no alternative_to
  requirement, baseline flag prohibition context)

No production code paths affected beyond the two enum additions; existing node and
edge kinds remain unchanged. No Ollama calls, no live API calls.
2026-08-12 19:39:58 +01:00
robbond fa42a2643a fix(graph): preserve grammar for question-like unknown labels 2026-08-12 15:02:56 +01:00
robbond bd3c7d59ae fix(graph): make structural action contract authoritative 2026-08-12 08:15:41 +01:00
robbond 6aef806845 feat(graph): add structuralActionRequired contract (57J.67)
- Add structuralActionRequired field to graphUpdateSchema (optional boolean nullable)
- Validate declaration consistency in validateGraphUpdate():
  - true requires meaningful mutation (addedNodes/updatedNodes/addedEdges)
  - false permits intentional no-op when userSupportedMeaning populated
  - null/absent with meaning → reject
  - true/false mismatch on output shape → reject
  - preserve legacy no-op guard for non-contract paths
- Update prompt-builder: add field to required list, insert contract section between rules and Additional Guidance with two mandatory sentences
- 50 new tests: schema validation (4), prompt builder content checks (10), utils contract matrix (10), plus 26 existing suite migrations

All 197 graph tests pass.
2026-08-12 07:26:26 +01:00
robbond bf1f219256 prompt: require candidate question for new unknowns 2026-08-11 18:51:22 +01:00
robbond b8e6745c15 prompt: distinguish uncertainty identity from topical overlap 2026-08-11 17:47:12 +01:00
robbond 7d06cd3c47 reasoning: use structured semantic fidelity contract 2026-08-11 16:45:00 +01:00
robbond a5dd9d3f1a prompt: add existing-first uncertainty fallback
Add one explicit action-order rule in Additional Guidance for when
rule #6 applies to explicitly unresolved uncertainty:

1. First check whether an existing unresolved node already represents
   the same uncertainty.
2. If so, update/refine that existing structure rather than creating
   a duplicate.
3. If no such node exists, add a new unknown that directly represents
   the unresolved uncertainty.
4. Do not use an edge alone to represent a previously unrepresented
   uncertainty.

14 focused prompt tests verify: existing-first ordering, reuse path,
fallback-to-add, related-node-insufficient, edge-only-prohibited,
possibleInference separation, resolution path preserved, duplicate
contract preserved, scope uncertainty-only, fidelity/traceability
preserved, noop validator untouched, no semantic classifier added.
2026-08-11 14:12:42 +01:00
robbond 359ccc4ba9 prompt: remove semantic-only mutation conflict 2026-08-11 13:22:29 +01:00
robbond 6adcd817e1 reasoning: require structural progress for supported meaning 2026-08-11 12:32:03 +01:00