spets 0.1.75 → 0.1.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -945,44 +945,37 @@ function buildClarifyPrompt(params) {
|
|
|
945
945
|
parts.push("");
|
|
946
946
|
const hasPreviousDecisions = params.previousDecisions && params.previousDecisions.length > 0;
|
|
947
947
|
if (hasPreviousDecisions) {
|
|
948
|
-
parts.push("## Previous Decisions
|
|
948
|
+
parts.push("## Previous Decisions to Review");
|
|
949
949
|
parts.push("");
|
|
950
|
-
parts.push("The user has
|
|
950
|
+
parts.push("The user has responded to previous decisions. Review each one:");
|
|
951
951
|
parts.push("");
|
|
952
952
|
for (const entry of params.previousDecisions) {
|
|
953
953
|
const selectedOption = entry.decision.options.find((o) => o.id === entry.answer.selectedOptionId);
|
|
954
954
|
let label;
|
|
955
955
|
if (entry.answer.selectedOptionId === "ai") {
|
|
956
|
-
label = `AI recommendation
|
|
956
|
+
label = `Selected: AI recommendation`;
|
|
957
957
|
} else if (selectedOption) {
|
|
958
|
-
label = selectedOption.label
|
|
958
|
+
label = `Selected: ${selectedOption.label}`;
|
|
959
959
|
} else {
|
|
960
|
-
label = `
|
|
961
|
-
}
|
|
962
|
-
parts.push(`\u2705 **${entry.decision.decision}**: ${label}`);
|
|
963
|
-
if (entry.answer.customInput && entry.answer.customInput !== entry.answer.selectedOptionId) {
|
|
964
|
-
parts.push(` User's note: ${entry.answer.customInput}`);
|
|
960
|
+
label = `User's response: "${entry.answer.selectedOptionId}"`;
|
|
965
961
|
}
|
|
962
|
+
parts.push(`**Q: ${entry.decision.decision}**`);
|
|
963
|
+
parts.push(`\u2192 ${label}`);
|
|
966
964
|
parts.push("");
|
|
967
965
|
}
|
|
968
|
-
parts.push("
|
|
969
|
-
parts.push("");
|
|
970
|
-
parts.push('1. If user gave ANY positive response ("good", "great", "fine", "I like", "perfect", etc.) \u2192 that decision is DONE');
|
|
971
|
-
parts.push("2. If user selected an option or gave custom input \u2192 that decision is DONE");
|
|
972
|
-
parts.push('3. NEVER ask the same question with different wording (e.g., "option IDs" vs "ID display" = SAME topic)');
|
|
973
|
-
parts.push("4. If user asked for clarification \u2192 explain better and re-ask THAT SPECIFIC decision only");
|
|
966
|
+
parts.push("## Your Task");
|
|
974
967
|
parts.push("");
|
|
975
|
-
parts.push(
|
|
968
|
+
parts.push("Review each response above and determine:");
|
|
976
969
|
parts.push("");
|
|
977
|
-
parts.push("
|
|
970
|
+
parts.push('1. **RESOLVED**: User gave a clear preference (selected option, said "good/great/fine/ok", or gave specific direction)');
|
|
971
|
+
parts.push(`2. **NEEDS CLARIFICATION**: User asked a question ("what does X mean?", "can you explain?", "I don't understand")`);
|
|
978
972
|
parts.push("");
|
|
979
|
-
parts.push("
|
|
973
|
+
parts.push("Then output:");
|
|
974
|
+
parts.push('- If ALL resolved \u2192 `{"ready": true, "decisions": [], "summary": "..."}`');
|
|
975
|
+
parts.push("- If ANY needs clarification \u2192 Re-ask ONLY those specific questions with better explanations");
|
|
980
976
|
parts.push("");
|
|
981
|
-
parts.push("
|
|
982
|
-
parts.push('{"ready": true, "decisions": [], "summary": "Proceeding with: [brief summary of user choices]"}');
|
|
983
|
-
parts.push("```");
|
|
977
|
+
parts.push("**IMPORTANT**: Do NOT ask new questions about the same topics. Only re-ask if user explicitly asked for clarification.");
|
|
984
978
|
parts.push("");
|
|
985
|
-
parts.push("Do NOT output anything else. Do NOT generate new decisions.");
|
|
986
979
|
} else {
|
|
987
980
|
parts.push("## Your Task");
|
|
988
981
|
parts.push("");
|