@mrclrchtr/supi-prompt-suggestions 11.3.0 → 11.4.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [11.4.0]
4
+
5
+ - Suggestions now predict your next message, preferring commands such as "push it" over questions, instead of continuing in the assistant's voice. When the assistant asked a question, the suggestion answers it as a command.
6
+
3
7
  ## [11.3.0]
4
8
 
5
9
  - Added package-specific release notes for model-powered prompt suggestions.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "11.3.0",
3
+ "version": "11.4.0",
4
4
  "description": "Shared settings, configuration, reporting, and session infrastructure",
5
5
  "license": "MIT",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-prompt-suggestions",
3
- "version": "11.3.0",
3
+ "version": "11.4.0",
4
4
  "description": "Optional model-powered ghost-text prompt suggestions",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -49,7 +49,7 @@
49
49
  "video": "https://raw.githubusercontent.com/mrclrchtr/supi/main/packages/supi-prompt-suggestions/assets/demo.mp4"
50
50
  },
51
51
  "dependencies": {
52
- "@mrclrchtr/supi-core": "11.3.0"
52
+ "@mrclrchtr/supi-core": "11.4.0"
53
53
  },
54
54
  "bundledDependencies": [
55
55
  "@mrclrchtr/supi-core"
@@ -14,28 +14,38 @@ import {
14
14
  export const GENERATION_TIMEOUT_MS = 20_000;
15
15
 
16
16
  /**
17
- * System prompt instructs the model to suggest a follow-up user message
18
- * (question, answer, or directive) or return the NO_SUGGESTION sentinel
19
- * when none is useful.
17
+ * System prompt instructs the model to predict the user's next message,
18
+ * preferably an imperative command to the assistant, or return the
19
+ * NO_SUGGESTION sentinel when none is useful.
20
20
  *
21
21
  * The model receives no PI, SuPi, project, or conversation context —
22
22
  * only the last assistant message text is sent.
23
23
  */
24
- const SYSTEM_PROMPT =
25
- "You suggest follow-up messages for a coding assistant conversation. " +
26
- "Given the assistant's last message, write a single line the user would type next. " +
27
- "It must be a direct question, answer, or directive — nothing else. " +
28
- "If the assistant asks for a decision, suggest a concise, specific answer to that decision, not the action that would follow from it. " +
29
- "When answering yes/no, include the relevant constraint or option text when present. " +
30
- "Do NOT include greetings, thank-yous, politeness, or conversational filler. " +
31
- "If there is no useful follow-up, respond with exactly the word NO_SUGGESTION and nothing else. " +
32
- "Keep suggestions under 240 characters.";
24
+ const SYSTEM_PROMPT = `You predict the next message a developer types to their coding assistant.
25
+ You receive the assistant's last message. Write the single line the USER would send next.
26
+
27
+ Rules:
28
+ - Write as the user talking to the assistant. Never write in the assistant's voice and never ask the user anything (no "Should I…?", "Do you want…?", "Shall we…?").
29
+ - Prefer a short imperative command that moves the work forward: "Push the branch.", "Run the tests.", "Fix the lint errors."
30
+ - If the assistant asks a question or offers options, answer it as a command that picks the most sensible option, e.g. "Yes, push it to origin." or "Use option 2."
31
+ - Name concrete targets from the message (branch, file, command, option) when they make the command unambiguous.
32
+ - Ask a question only when the user clearly needs information before deciding.
33
+ - No greetings, thanks, politeness, explanations, quotes, or prefixes like "Suggestion:".
34
+ - Keep it under 120 characters.
35
+ - If no useful next message exists, respond with exactly NO_SUGGESTION.
36
+
37
+ Examples (assistant message → your output):
38
+ "Committed as abc123. Not pushed: the branch is 3 commits ahead of origin." → Push the branch to origin.
39
+ "Should I also update the README, or keep the change code-only?" → Update the README too.
40
+ "Two options: A) add a cache, B) batch the requests. Which do you prefer?" → Go with B and batch the requests.
41
+
42
+ Output only the message text.`;
33
43
 
34
44
  // ── Prompt building ────────────────────────────────────────────────────────
35
45
 
36
46
  /** Format the tail text as a completion prompt. */
37
47
  export function buildPrompt(tail: string): string {
38
- return `<assistant_message>\n${tail}\n</assistant_message>\n\nSuggestion:`;
48
+ return `<assistant_message>\n${tail}\n</assistant_message>\n\nUser's next message:`;
39
49
  }
40
50
 
41
51
  // ── Types ───────────────────────────────────────────────────────────────────