vibe-learning-opencode 0.1.0 → 0.1.2

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 +69 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38,8 +38,8 @@ function extractConceptFromPath(filePath) {
38
38
  var COMMAND_PROMPTS = {
39
39
  status: `Execute NOW: Call mcp__vibe-learning__get_mode and mcp__vibe-learning__should_ask_question, then show:
40
40
  - Current learning mode
41
- - Daily questions remaining
42
- - Cooldown status`,
41
+ - Cooldown status
42
+ - Consecutive skips`,
43
43
  stats: `Execute NOW: Call mcp__vibe-learning__get_stats with period="month", then format as a dashboard showing:
44
44
  - Total concepts learned
45
45
  - Correct rate percentage
@@ -62,10 +62,59 @@ var COMMAND_PROMPTS = {
62
62
  interview: `Execute NOW: Call mcp__vibe-learning__get_stats with period="month". Then conduct interview-style Level 3-5 questions on the learned concepts.`,
63
63
  pause: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="after" and paused_until set to 1 hour from now (ISO format). Confirm paused.`,
64
64
  off: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="off". Confirm learning is off (recording continues).`,
65
- after: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="after". Confirm mode changed.`,
66
- before: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="before". Confirm mode changed.`,
67
- senior: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="senior". Confirm senior mode enabled.`,
68
- "senior-light": `Execute NOW: Call mcp__vibe-learning__set_mode with mode="senior_light". Confirm mode changed.`
65
+ after: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="after". Confirm mode changed to After mode.
66
+
67
+ After mode behavior: Ask learning questions AFTER task completion.`,
68
+ before: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="before". Confirm mode changed to Before mode.
69
+
70
+ Before mode behavior: Check understanding BEFORE implementation. Ask one question, then proceed.`,
71
+ senior: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="senior". Confirm Senior mode enabled.
72
+
73
+ CRITICAL - FOR ALL SUBSEQUENT TASKS IN THIS SESSION, follow this EXACTLY:
74
+
75
+ **[VibeLearning Senior Mode]**
76
+ [Round 1/3] [One short question]?
77
+
78
+ Flow (MUST follow):
79
+ - Round 1: Show header + "[Round 1/3] Why this approach?"
80
+ - Round 2: ALWAYS ask "[Round 2/3] What alternatives did you consider? Tradeoffs?"
81
+ - Round 3: If Round 2 vague, "[Round 3/3] Hint: [hint]. What do you think?"
82
+ - After 2-3 rounds: "Good thinking! [summary]. Implementing now."
83
+
84
+ \u26A0\uFE0F STRICT RULES:
85
+ - ONE short question per message
86
+ - Wait for answer before next round
87
+ - Minimum 2 rounds before implementing
88
+
89
+ \u274C WRONG: "What about X? And Y? Also Z?"
90
+ \u2705 RIGHT: "[Round 1/3] Why JWT over session-based auth?"`,
91
+ "senior-light": `Execute NOW: Call mcp__vibe-learning__set_mode with mode="senior_light". Confirm mode changed.
92
+
93
+ Senior Light behavior: Present counterarguments but proceed after round 1. Don't block, just give feedback.`
94
+ };
95
+ var MODE_BEHAVIOR_PROMPTS = {
96
+ senior: `Ask ONE question per round. Minimum 2 rounds required.
97
+
98
+ Format (MUST show header on Round 1):
99
+ **[VibeLearning Senior Mode]**
100
+ [Round 1/3] [One short question]?
101
+
102
+ Flow:
103
+ - Round 1: MUST show header + "[Round 1/3] Why this approach?"
104
+ - Round 2: ALWAYS ask "[Round 2/3] What alternatives did you consider? Tradeoffs?"
105
+ (Skip only if user named 2+ alternatives with specific tradeoffs)
106
+ - Round 3: If Round 2 vague, "[Round 3/3] Hint: [hint]. What do you think?"
107
+ - After Round 2/3: "Good thinking! [tradeoff summary]. Implementing now."
108
+
109
+ ONE question per round, one sentence. Be strict like a real senior.`,
110
+ before: `[VibeLearning - Before Mode]
111
+
112
+ Ask ONE short question: "Before implementing, [question]?"
113
+ Then proceed regardless of answer.`,
114
+ senior_light: `[VibeLearning - Senior Light]
115
+
116
+ Briefly mention one alternative while implementing.
117
+ Example: "Using X, but Y is also an option if you need Z."`
69
118
  };
70
119
  var AUTO_LEARNING_PROMPT = `[VibeLearning - Learning Time]
71
120
 
@@ -197,6 +246,20 @@ var VibeLearningPlugin = (ctx) => {
197
246
  }
198
247
  client.app.log({ level: "info", message: `[VibeLearning] Command: ${cmd}` }).catch(() => {
199
248
  });
249
+ } else {
250
+ const modeBehavior = MODE_BEHAVIOR_PROMPTS[currentMode];
251
+ if (modeBehavior && currentMode !== "after" && currentMode !== "off") {
252
+ const trimmed = content.trim();
253
+ if (trimmed.length > 10 && !trimmed.match(/^(yes|no|ok|skip|done|correct|partial|incorrect|got it|이해|알겠|넵|응|아니|스킵)/i)) {
254
+ setTimeout(() => {
255
+ if (lastSessionID) {
256
+ injectPrompt(lastSessionID, modeBehavior);
257
+ }
258
+ }, 100);
259
+ client.app.log({ level: "info", message: `[VibeLearning] Injected ${currentMode} mode behavior` }).catch(() => {
260
+ });
261
+ }
262
+ }
200
263
  }
201
264
  }
202
265
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-learning-opencode",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "VibeLearning plugin for OpenCode - spaced repetition learning while coding",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",