Accept Scattermind action-set rank feedback

This commit is contained in:
OpenClaw Bot
2026-05-26 22:43:17 +02:00
parent c6b3f2340d
commit ce2e9a65b7
3 changed files with 48 additions and 6 deletions
+30 -1
View File
@@ -110,7 +110,36 @@ try {
assert.ok(hinted.ranked[0].factors.metricHints.value >= 9);
assert.ok(hinted.ranked.find(item => item.id === 'ai-autopilot-roadmap').metrics.risk > hinted.ranked[0].metrics.risk);
console.log(JSON.stringify({ ok: true, top: data.ranked[0].id, hintedTop: hinted.ranked[0].id, provenance: data.input.provenance, buildOrder: data.buildOrder }, null, 2));
const actionsResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
schema: 'prioritix-feature-set-v1',
sourceName: 'Scattermind',
artifactId: 'concept_map_actions',
snapshotTitle: 'Workshop idea continuation',
originalPrompt: 'I want to turn a workshop idea into the first useful thing to build.',
idea: 'Scattermind emitted next actions rather than feature objects; Ranker should still defend build order.',
context: 'Candidate action set from Concept Map. Keep it action-first and avoid generic workspace layers.',
mode: 'mvp',
featureSet: {
actions: [
{ id: 'manual-preview', action: 'Manual build-order preview', why: 'A user sees one defended next move before any app machinery exists.', evidence: 'Can two tired users explain what to do next?', validationSteps: ['Create one static preview from the Concept Map'], suggestedLane: 'do-first', sourceSection: 'concept-map.nextActions' },
{ id: 'saved-workspace', action: 'Saved project workspace', why: 'Keep every idea and roadmap in an account dashboard.', dependencies: ['auth', 'database permissions', 'workspace model', 'sync'], risk: 'Dashboard swamp before the continuation proof.', suggestedLane: 'park', sourceSection: 'concept-map.parkingLot' },
{ id: 'text-export', action: 'Copyable decision brief', why: 'Let the user paste the defended order into notes or a chat.', evidence: 'Does a plain text brief help them act within 48 hours?', validationSteps: ['Export the top lane and concerns as text'], suggestedLane: 'validate-next', sourceSection: 'concept-map.nextActions' },
],
},
}),
});
assert.equal(actionsResponse.status, 200);
const actions = await actionsResponse.json();
assert.equal(actions.input.optionCount, 3);
assert.equal(actions.ranked[0].id, 'manual-preview', 'action-shaped Concept Map next moves should be rankable without a features wrapper');
assert.equal(actions.ranked.find(item => item.id === 'manual-preview').provenance.sourceSection, 'concept-map.nextActions');
assert.equal(actions.ranked.find(item => item.id === 'saved-workspace').lane.id, 'park');
assert.deepEqual(actions.handoff.warnings, []);
console.log(JSON.stringify({ ok: true, top: data.ranked[0].id, hintedTop: hinted.ranked[0].id, actionTop: actions.ranked[0].id, provenance: data.input.provenance, buildOrder: data.buildOrder }, null, 2));
} finally {
server.kill('SIGTERM');
}