Accept comma-separated Scattermind build labels

This commit is contained in:
OpenClaw Bot
2026-05-27 19:50:39 +02:00
parent fae434391b
commit 85e2a83d3b
2 changed files with 31 additions and 1 deletions
+30
View File
@@ -361,6 +361,36 @@ try {
assert.match(paidLabel.brief.decisionReceipt.sourceAnchor, /concept-map\.lenses\.channel/); assert.match(paidLabel.brief.decisionReceipt.sourceAnchor, /concept-map\.lenses\.channel/);
assert.deepEqual(paidLabel.handoff.warnings, []); assert.deepEqual(paidLabel.handoff.warnings, []);
const commaLabelResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
sourceName: 'Scattermind',
artifactId: 'concept_map_comma_labels',
originalPrompt: 'Scattermind generated the current paid prompt style with comma-separated Build Order labels.',
context: 'Solo builder. Manual proof first. Avoid dashboards and account systems until evidence exists.',
conceptMap: {
working_name: 'Comma label paid output',
lenses: {
channel: {
title: 'Build Order',
content: 'Build first, run a concierge preview from one Concept Map. Test manually, ask three tired users what they would do next. Defer, polished exports and saved history. Probably noise, account dashboard and team voting before proof.',
},
},
},
}),
});
assert.equal(commaLabelResponse.status, 200);
const commaLabel = await commaLabelResponse.json();
assert.equal(commaLabel.input.optionCount, 4, 'current Scattermind paid prompt allows comma-separated Build Order labels');
assert.equal(commaLabel.ranked.find(item => item.id === 'build-order-1').title, 'run a concierge preview from one Concept Map');
assert.equal(commaLabel.buildOrder.doFirst[0], 'build-order-1');
assert.equal(commaLabel.ranked.find(item => item.id === 'build-order-2').lane.id, 'test');
assert.equal(commaLabel.ranked.find(item => item.id === 'build-order-3').lane.id, 'defer');
assert.equal(commaLabel.ranked.find(item => item.id === 'build-order-4').lane.id, 'park');
assert.match(commaLabel.handoff.itemTrace.find(item => item.id === 'build-order-1').sourceQuote, /Build first, run a concierge preview/);
assert.deepEqual(commaLabel.handoff.warnings, []);
const hintedResponse = await fetch(`${base}/api/rank-feedback`, { const hintedResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
+1 -1
View File
@@ -1121,7 +1121,7 @@ function normalizeCandidateGroup(group = []) {
return normalizeOptionIds(options); return normalizeOptionIds(options);
} }
const buildOrderLabelSeparator = '\\s*(?::|[-–—])\\s*'; const buildOrderLabelSeparator = '\\s*(?::|,|[-–—])\\s*';
const buildOrderLabelPattern = '(build first|build this first|start here|start with|start by|ship first|ship this first|first week|week one|first-week build order|continue first|make tangible first|make tangible|try next|test first|prove first|evidence next|learn next|test manually|validate next|hold for later|leave out|skip for now|not yet|defer|set aside|out of scope|probably noise|park|do not build yet|don\'t build yet)'; const buildOrderLabelPattern = '(build first|build this first|start here|start with|start by|ship first|ship this first|first week|week one|first-week build order|continue first|make tangible first|make tangible|try next|test first|prove first|evidence next|learn next|test manually|validate next|hold for later|leave out|skip for now|not yet|defer|set aside|out of scope|probably noise|park|do not build yet|don\'t build yet)';
const buildOrderLabelRegex = new RegExp(`^${buildOrderLabelPattern}${buildOrderLabelSeparator}`, 'i'); const buildOrderLabelRegex = new RegExp(`^${buildOrderLabelPattern}${buildOrderLabelSeparator}`, 'i');