feat: decompose composite unknowns before questioning

This commit is contained in:
2026-08-02 19:24:38 +01:00
parent b1c633ba5c
commit 0723c2f49a
9 changed files with 768 additions and 25 deletions
+7 -2
View File
@@ -1047,8 +1047,13 @@ describe("lib/graph/orchestrator startCase", () => {
relationshipAssessed: true,
resolvedReasoningNodeIds: ["reasoning:comparability"],
emergentReasoningNodeCreated: true,
atomicityAssessment: "composite",
decompositionPerformed: true,
childUnknownCount: 5,
});
expect(result.diagnostics.emergentReasoningNodeId).toBeTruthy();
expect(result.diagnostics.childNodeIds).toHaveLength(5);
expect(result.diagnostics.atomicityReason).toContain("Decomposed");
expect(result.diagnostics.emergentReasoningNodeReason).toContain(
"backed by the graph",
);
@@ -1080,8 +1085,8 @@ describe("lib/graph/orchestrator startCase", () => {
},
]);
expect(result.selectedQuestion?.nodeId).toBe(result.newActiveUnknownNodeId);
expect(result.selectedQuestion?.question).toMatch(
/^What changed during that period that could help explain why /,
expect(result.selectedQuestion?.question).toBe(
"What evidence would clarify timing or measurement basis?",
);
expect(result.selectedQuestion?.question.toLowerCase()).not.toMatch(
/same basis|dso|receivables|debtor days|working capital/,