Add compact decision receipt for Ranker handoff

This commit is contained in:
OpenClaw Bot
2026-05-27 15:56:19 +02:00
parent 10084afb96
commit 55e75bc793
5 changed files with 44 additions and 2 deletions
+10
View File
@@ -1241,6 +1241,15 @@ function createDecisionBrief({ idea, context, mode, ranked, provenance, decision
sourceQuote: top.provenance?.sourceQuote || '',
},
} : null;
const decisionReceipt = top ? {
activeMove: top.title,
activeLane: top.lane?.label || 'Do first',
firstProofStep: nextStepFor(top),
evidenceQuestion: evidenceQuestionFor(top),
doNotStartYet: deferred.slice(0, 3).map(item => item.title),
sourceAnchor: [top.provenance?.sourceSection, top.provenance?.sourceId || top.provenance?.sourceTitle].filter(Boolean).join(' · '),
handoffRule: 'Only the Do first item is active. Validate one proof, then re-rank before promoting anything else.',
} : null;
const assumptions = [
...(decisionContext?.assumptions || []),
...(decisionContext?.constraints || []).map(item => `Constraint: ${item}`),
@@ -1250,6 +1259,7 @@ function createDecisionBrief({ idea, context, mode, ranked, provenance, decision
headline: top ? `Start with ${top.title}` : 'Add options to get a ranked feedback map',
summary: `${theme}${second ? `${second.title}” is the nearest follow-up, not a parallel first step.` : ''}${sourceLabel ? ` Source: ${sourceLabel}.` : ''}`,
quickGlance,
decisionReceipt,
source: provenance ? {
schema: provenance.schema,
source: provenance.source,