Warm up first-screen proof script and headline for non-AI-native users
- proofScriptFor: use plain language when no source artifact is present (no 'Scattermind' name-dropping for raw paste users). Source-aware script is preserved when artifact context exists. - firstScreen.headline: 'One thing now: [title]' replaces 'Build only this first: [title]' — simpler declarative for tired users. - proof script fallback now includes a 'what happens next' sentence so the user knows evidence changes the decision. - Updated check-rank-feedback.mjs headline assertion to match.
This commit is contained in:
@@ -81,7 +81,7 @@ try {
|
|||||||
assert.ok(data.ranked.find(item => item.id === 'bridge-contract').factors.metricHints.value === undefined);
|
assert.ok(data.ranked.find(item => item.id === 'bridge-contract').factors.metricHints.value === undefined);
|
||||||
assert.equal(data.brief.source.artifactId, 'snapshot_123');
|
assert.equal(data.brief.source.artifactId, 'snapshot_123');
|
||||||
assert.equal(data.brief.decisionReceipt.activeMove, data.brief.quickGlance.topPick);
|
assert.equal(data.brief.decisionReceipt.activeMove, data.brief.quickGlance.topPick);
|
||||||
assert.match(data.brief.firstScreen.headline, /Build only this first/);
|
assert.match(data.brief.firstScreen.headline, /One thing now/);
|
||||||
assert.equal(data.brief.firstScreen.primaryAction, data.brief.decisionReceipt.firstProofStep);
|
assert.equal(data.brief.firstScreen.primaryAction, data.brief.decisionReceipt.firstProofStep);
|
||||||
assert.equal(data.brief.firstScreen.proofQuestion, data.brief.decisionReceipt.evidenceQuestion);
|
assert.equal(data.brief.firstScreen.proofQuestion, data.brief.decisionReceipt.evidenceQuestion);
|
||||||
assert.equal(data.brief.firstScreen.proofScript, data.brief.decisionReceipt.proofScript);
|
assert.equal(data.brief.firstScreen.proofScript, data.brief.decisionReceipt.proofScript);
|
||||||
|
|||||||
@@ -1860,14 +1860,16 @@ function evidenceQuestionFor(option) {
|
|||||||
|
|
||||||
function proofScriptFor(option, provenance = {}) {
|
function proofScriptFor(option, provenance = {}) {
|
||||||
if (!option) return '';
|
if (!option) return '';
|
||||||
const sourceName = cleanText(provenance?.source || 'Scattermind', 60);
|
const sourceName = cleanText(provenance?.source || '', 60);
|
||||||
const sourceLabel = cleanText(provenance?.snapshotTitle || provenance?.artifactId || '', 120);
|
const sourceLabel = cleanText(provenance?.snapshotTitle || provenance?.artifactId || '', 120);
|
||||||
const evidence = evidenceQuestionFor(option);
|
const evidence = evidenceQuestionFor(option);
|
||||||
const next = nextStepFor(option);
|
const next = nextStepFor(option);
|
||||||
const setup = sourceLabel
|
const hasSource = Boolean(sourceLabel && sourceName);
|
||||||
? `I have a ${sourceName} build-order recommendation for “${sourceLabel}”.`
|
if (hasSource) {
|
||||||
: 'I am checking the next build move before adding more scope.';
|
const setup = `I have a ${sourceName} build-order recommendation for "${sourceLabel}".`;
|
||||||
return cleanText(`${setup} The proposed first move is “${option.title}”. ${next} The thing I need to learn is: ${evidence}`, 520);
|
return cleanText(`${setup} The proposed first move is "${option.title}". ${next} The thing I need to learn is: ${evidence}`, 520);
|
||||||
|
}
|
||||||
|
return cleanText(`The first move I want to test is "${option.title}". ${next} The thing I need to learn is: ${evidence}. If that produces a clear signal, the next move changes. If not, I need a different first step.`, 520);
|
||||||
}
|
}
|
||||||
|
|
||||||
function nextStepFor(option) {
|
function nextStepFor(option) {
|
||||||
@@ -1962,7 +1964,7 @@ function createDecisionBrief({ idea, context, mode, ranked, provenance, decision
|
|||||||
const activeSuccessSignal = carriedProofSignalFor(top, ranked, 'successSignal');
|
const activeSuccessSignal = carriedProofSignalFor(top, ranked, 'successSignal');
|
||||||
const activeKillSignal = carriedProofSignalFor(top, ranked, 'killSignal');
|
const activeKillSignal = carriedProofSignalFor(top, ranked, 'killSignal');
|
||||||
const firstScreen = top ? {
|
const firstScreen = top ? {
|
||||||
headline: `Build only this first: ${top.title}`,
|
headline: `One thing now: ${top.title}`,
|
||||||
primaryAction: nextStepFor(top),
|
primaryAction: nextStepFor(top),
|
||||||
proofQuestion: evidenceQuestionFor(top),
|
proofQuestion: evidenceQuestionFor(top),
|
||||||
proofScript: activeProofScript,
|
proofScript: activeProofScript,
|
||||||
|
|||||||
Reference in New Issue
Block a user