Refocus Ranker as Prioritix idea-layer sorting
This commit is contained in:
@@ -159,6 +159,42 @@ try {
|
||||
assert.equal(messyIdeaOnly.handoff.readiness.status, 'usable-with-warnings');
|
||||
assert.ok(messyIdeaOnly.handoff.readiness.nextChecks.some(item => /source artifact id if this came from Scattermind/i.test(item)));
|
||||
|
||||
const prioritixLayerResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
idea: 'A simple product for freelancers to package tiny fixed-price offers.',
|
||||
optionsText: `Idea: A simple product for freelancers to package tiny fixed-price offers.
|
||||
Validation questions:
|
||||
A) Will freelancers pay for critique before software?
|
||||
B) Which offer type hurts enough to buy help?
|
||||
Feedback themes:
|
||||
- They want templates
|
||||
- They distrust generic AI copy
|
||||
Features:
|
||||
1. Offer builder with 5 questions
|
||||
2. Public mini-page for one offer
|
||||
3. Stripe payment link helper
|
||||
Constraints:
|
||||
I only have one weekend and no audience.
|
||||
Instruction:
|
||||
Sort the idea layer, not my constraints.`,
|
||||
context: 'Solo builder. Either validation questions, feedback, or features may be useful for the first Prioritix run.',
|
||||
mode: 'validation',
|
||||
}),
|
||||
});
|
||||
assert.equal(prioritixLayerResponse.status, 200);
|
||||
const prioritixLayer = await prioritixLayerResponse.json();
|
||||
const prioritixTitles = prioritixLayer.ranked.map(item => item.title);
|
||||
assert.equal(prioritixLayer.input.optionCount, 7, 'Prioritix should extract mixed idea-layer items and ignore context/instruction sections');
|
||||
assert.ok(prioritixTitles.some(title => /Will freelancers pay for critique before software/i.test(title)));
|
||||
assert.ok(prioritixTitles.some(title => /Which offer type hurts enough to buy help/i.test(title)));
|
||||
assert.ok(prioritixTitles.some(title => /They want templates/i.test(title)));
|
||||
assert.ok(prioritixTitles.some(title => /Offer builder with 5 questions/i.test(title)));
|
||||
assert.ok(!prioritixTitles.some(title => /I only have one weekend|Sort the idea layer|Instruction|Constraints/i.test(title)), 'constraints/instructions must not become ranked items');
|
||||
assert.ok(!prioritixTitles.includes('A'));
|
||||
assert.ok(!prioritixTitles.includes('B'));
|
||||
|
||||
const hardRailResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
||||
Reference in New Issue
Block a user