Strengthen rank feedback decision brief
This commit is contained in:
@@ -598,13 +598,29 @@ function concernFor(option) {
|
||||
return 'The main risk is sequencing: do it only if it supports the first useful proof.';
|
||||
}
|
||||
|
||||
function createDecisionBrief({ idea, context, mode, ranked, provenance }) {
|
||||
function whatWouldChangeRanking(top, second, risky) {
|
||||
if (!top) return ['Add at least two concrete next moves with evidence needed.'];
|
||||
const changes = [];
|
||||
if (top.factors?.evidenceNeeded) changes.push(`If evidence fails for “${top.title}” (${top.factors.evidenceNeeded}), move it out of Do first.`);
|
||||
else changes.push(`If “${top.title}” cannot name a cheap proof step, demote it until the evidence question is clear.`);
|
||||
if (second) changes.push(`If “${second.title}” gets stronger proof or meaningfully lower effort, it can overtake the current first move.`);
|
||||
if (risky && risky.id !== top.id) changes.push(`If the riskiest assumption around “${risky.title}” is answered cheaply, re-rank before building around it.`);
|
||||
changes.push('If the source Concept Map adds new constraints or non-goals, re-run the order instead of editing around stale context.');
|
||||
return changes.slice(0, 4);
|
||||
}
|
||||
|
||||
function createDecisionBrief({ idea, context, mode, ranked, provenance, decisionContext }) {
|
||||
const top = ranked[0];
|
||||
const second = ranked[1];
|
||||
const risky = ranked.slice().sort((a, b) => b.metrics.risk - a.metrics.risk)[0];
|
||||
const deferred = ranked.filter(item => ['defer', 'park'].includes(item.lane.id)).slice(0, 3);
|
||||
const sourceLabel = [provenance?.snapshotTitle, provenance?.artifactId].filter(Boolean).join(' · ');
|
||||
const theme = top ? `The strongest signal is “${top.title}” because ${reasonFor(top)}.` : 'The list needs at least two options before ranking becomes useful.';
|
||||
const assumptions = [
|
||||
...(decisionContext?.assumptions || []),
|
||||
...(decisionContext?.constraints || []).map(item => `Constraint: ${item}`),
|
||||
...(decisionContext?.nonGoals || []).map(item => `Non-goal: ${item}`),
|
||||
].slice(0, 6);
|
||||
return {
|
||||
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}.` : ''}`,
|
||||
@@ -635,6 +651,8 @@ function createDecisionBrief({ idea, context, mode, ranked, provenance }) {
|
||||
'Put it in front of 3–5 real people or run it manually once.',
|
||||
`Do not touch ${deferred[0] ? `“${deferred[0].title}”` : 'the parked ideas'} until the first signal is real.`,
|
||||
] : ['Paste 3–10 options.', 'Choose what the ranking should care about.', 'Run the first-pass judgement.'],
|
||||
assumptions,
|
||||
whatWouldChangeRanking: whatWouldChangeRanking(top, second, risky),
|
||||
caution: 'This is first-pass judgement, not an oracle. Change the criteria if the context changes.',
|
||||
};
|
||||
}
|
||||
@@ -701,7 +719,7 @@ app.post('/api/rank-feedback', (req, res) => {
|
||||
concern: concernFor(rankedOption),
|
||||
};
|
||||
});
|
||||
const brief = createDecisionBrief({ idea, context, mode, ranked: options, provenance });
|
||||
const brief = createDecisionBrief({ idea, context, mode, ranked: options, provenance, decisionContext });
|
||||
const handoff = createHandoffContract({ ranked: options, provenance, decisionContext });
|
||||
res.json({
|
||||
ok: true,
|
||||
|
||||
Reference in New Issue
Block a user