spets 0.1.70 → 0.1.72

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -945,19 +945,31 @@ 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 (ALREADY RESOLVED)");
949
+ parts.push("");
950
+ parts.push("The user has already made the following decisions. These are FINAL - do NOT ask about them again:");
949
951
  parts.push("");
950
952
  for (const entry of params.previousDecisions) {
951
953
  const selectedOption = entry.decision.options.find((o) => o.id === entry.answer.selectedOptionId);
952
- const label = entry.answer.selectedOptionId === "ai" ? `AI recommendation (${entry.decision.aiRecommendation?.optionId})` : selectedOption?.label || entry.answer.selectedOptionId;
953
- parts.push(`**${entry.decision.decision}**: ${label}`);
954
- if (entry.answer.customInput) {
955
- parts.push(` Custom input: ${entry.answer.customInput}`);
954
+ let label;
955
+ if (entry.answer.selectedOptionId === "ai") {
956
+ label = `AI recommendation (${entry.decision.aiRecommendation?.optionId})`;
957
+ } else if (selectedOption) {
958
+ label = selectedOption.label;
959
+ } else {
960
+ label = `Custom decision: "${entry.answer.selectedOptionId}"`;
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}`);
956
965
  }
957
966
  parts.push("");
958
967
  }
959
- parts.push("Based on these decisions, identify any remaining decision points.");
960
- parts.push("Do NOT re-ask about decisions already made.");
968
+ parts.push("Review each previous decision:");
969
+ parts.push("- If the user made a clear choice (even with custom text) \u2192 decision is RESOLVED");
970
+ parts.push('- If the user asked a question or requested clarification (e.g., "what does this mean?", "explain more") \u2192 re-ask with better explanation');
971
+ parts.push("");
972
+ parts.push('If all decisions are truly resolved and no new decisions needed, output `"ready": true`.');
961
973
  parts.push("");
962
974
  } else {
963
975
  parts.push("## Your Task");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spets",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
4
4
  "description": "Spec Driven Development Execution Framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",