spets 0.1.76 → 0.1.77

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 +33 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -945,36 +945,55 @@ 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 to Review");
948
+ parts.push("## Previous Decisions (All Resolved)");
949
949
  parts.push("");
950
- parts.push("The user has responded to previous decisions. Review each one:");
950
+ parts.push("The user has responded to all previous decisions. Each response below is **already resolved** unless the user explicitly asked for clarification.");
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
+ let description = "";
955
956
  if (entry.answer.selectedOptionId === "ai") {
956
- label = `Selected: AI recommendation`;
957
+ const aiOption = entry.decision.options.find((o) => o.id === "ai");
958
+ label = "AI recommendation";
959
+ if (aiOption?.recommendation) {
960
+ const recommended = entry.decision.options.find((o) => o.id === aiOption.recommendation);
961
+ description = recommended ? ` (${recommended.label})` : "";
962
+ }
957
963
  } else if (selectedOption) {
958
- label = `Selected: ${selectedOption.label}`;
964
+ label = selectedOption.label;
965
+ description = selectedOption.description ? ` - ${selectedOption.description}` : "";
959
966
  } else {
960
- label = `User's response: "${entry.answer.selectedOptionId}"`;
967
+ label = entry.answer.selectedOptionId;
968
+ }
969
+ const hasCustomInput = entry.answer.customInput && entry.answer.customInput.trim().length > 0;
970
+ parts.push(`### ${entry.decision.decision} [RESOLVED]`);
971
+ parts.push(`**Selected:** ${label}${description}`);
972
+ if (hasCustomInput) {
973
+ parts.push(`**User comment:** "${entry.answer.customInput}"`);
961
974
  }
962
- parts.push(`**Q: ${entry.decision.decision}**`);
963
- parts.push(`\u2192 ${label}`);
964
975
  parts.push("");
965
976
  }
966
977
  parts.push("## Your Task");
967
978
  parts.push("");
968
- parts.push("Review each response above and determine:");
979
+ parts.push("All decisions above are marked [RESOLVED] by default. Analyze each user response semantically:");
969
980
  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")`);
981
+ parts.push("**RESOLVED (proceed with this choice):**");
982
+ parts.push("- User selected an option (any option selection = resolved)");
983
+ parts.push('- Approval expressions: "ok", "okay", "good", "great", "fine", "sure", "yes", "\uB3D9\uC758", "\uC88B\uC544", "\uADF8\uB807\uAC8C \uD574", "\u3147\u3147"');
984
+ parts.push("- Short affirmations or no comment at all");
972
985
  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");
986
+ parts.push("**NEEDS CLARIFICATION (re-ask with better explanation):**");
987
+ parts.push('- Explicit questions: "\uBB50\uC57C?", "what does X mean?", "\uBB34\uC2A8 \uB73B\uC774\uC57C?", "can you explain?"');
988
+ parts.push(`- Confusion expressions: "\uC774\uD574 \uC548 \uB428", "I don't understand", "\uC124\uBA85\uD574\uC918", "\uC798 \uBAA8\uB974\uACA0\uC5B4"`);
989
+ parts.push('- Requests for more info: "\uB354 \uC54C\uB824\uC918", "tell me more", "\uC608\uC2DC \uC788\uC5B4?"');
976
990
  parts.push("");
977
- parts.push("**IMPORTANT**: Do NOT ask new questions about the same topics. Only re-ask if user explicitly asked for clarification.");
991
+ parts.push("**CRITICAL RULE: When in doubt, treat as RESOLVED.**");
992
+ parts.push("Do NOT re-ask unless user EXPLICITLY expressed confusion or asked a question.");
993
+ parts.push("");
994
+ parts.push("Then output:");
995
+ parts.push('- If ALL resolved \u2192 `{"ready": true, "decisions": [], "summary": "Proceeding with: [list chosen options]"}`');
996
+ parts.push("- If ANY needs clarification \u2192 Re-ask ONLY those with clearer explanations and examples");
978
997
  parts.push("");
979
998
  } else {
980
999
  parts.push("## Your Task");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spets",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "description": "Spec Driven Development Execution Framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",