vibe-learning-opencode 0.1.5 → 0.1.7

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 +52 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -89,13 +89,24 @@ Flow:
89
89
  - Round 3: (if needed) Give hint and ask again
90
90
  - FINAL STEP (MANDATORY): Call record_learning tool, THEN say "Good! Implementing now."
91
91
 
92
- \u26A0\uFE0F CRITICAL - After final round, IMMEDIATELY call:
92
+ \u26A0\uFE0F CRITICAL - After final round, call BOTH tools:
93
+
94
+ 1. Record learning result:
93
95
  mcp__vibe-learning__record_learning({
94
- concept_id: "kebab-case-concept", // e.g., "redis-caching"
96
+ concept_id: "kebab-case-concept",
95
97
  level: 3,
96
98
  result: "correct" | "partial" | "skipped"
97
99
  })
98
- DO NOT say "Implementing now" until record_learning is called.
100
+
101
+ 2. Record 1-2 unknown unknowns (related concepts user might not know):
102
+ mcp__vibe-learning__record_unknown_unknown({
103
+ concept_id: "related-concept",
104
+ related_to: "main-concept",
105
+ context: "brief context",
106
+ why_important: "why important"
107
+ })
108
+
109
+ THEN say "Good! Implementing now."
99
110
 
100
111
  ONE question per message. Wait for answer.`,
101
112
  "senior-light": `Execute NOW: Call mcp__vibe-learning__set_mode with mode="senior_light". Confirm mode changed.
@@ -117,13 +128,22 @@ Flow:
117
128
  - Round 3: If Round 2 vague, "[Round 3/3] Hint: [hint]. What do you think?"
118
129
  - FINAL STEP (MANDATORY): Call record_learning, THEN say "Good thinking! Implementing now."
119
130
 
120
- \u26A0\uFE0F CRITICAL - After final round, IMMEDIATELY call:
121
- mcp__vibe-learning__record_learning({
131
+ \u26A0\uFE0F CRITICAL - After final round, call BOTH tools:
132
+
133
+ 1. mcp__vibe-learning__record_learning({
122
134
  concept_id: "kebab-case-concept",
123
135
  level: 3,
124
136
  result: "correct" | "partial" | "skipped"
125
137
  })
126
- DO NOT say "Implementing now" until record_learning is called.
138
+
139
+ 2. mcp__vibe-learning__record_unknown_unknown({
140
+ concept_id: "related-concept",
141
+ related_to: "main-concept",
142
+ context: "brief context",
143
+ why_important: "why important"
144
+ })
145
+
146
+ THEN say "Good thinking! Implementing now."
127
147
 
128
148
  ONE question per round. Be strict like a real senior.`,
129
149
  before: `[VibeLearning - Before Mode]
@@ -135,18 +155,34 @@ Then proceed regardless of answer.`,
135
155
  Briefly mention one alternative while implementing.
136
156
  Example: "Using X, but Y is also an option if you need Z."`
137
157
  };
138
- var AUTO_LEARNING_PROMPT = `[VibeLearning - Learning Time]
158
+ var AUTO_LEARNING_PROMPT = `[VibeLearning - Task Completion]
159
+
160
+ Task completed. Execute these steps NOW (in order):
161
+
162
+ **STEP 1: Identify Concepts (ALWAYS DO THIS)**
163
+ Identify 1-3 key concepts used in this task. Use kebab-case (e.g., "redis-caching", "jwt-auth", "react-hooks").
164
+
165
+ **STEP 2: Record Unknown Unknowns (ALWAYS DO THIS)**
166
+ For each concept, think of 1-2 related concepts the user might not know.
167
+ Call mcp__vibe-learning__record_unknown_unknown for each:
168
+ - concept_id: the unknown concept (e.g., "cache-stampede")
169
+ - related_to: the concept from the task (e.g., "redis-caching")
170
+ - context: brief context of how it relates
171
+ - why_important: why they should learn it
172
+
173
+ Example: Task used JWT auth \u2192 record "refresh-token-rotation", "token-revocation"
139
174
 
140
- Task completed. Execute these steps NOW:
175
+ **STEP 3: Register Main Concept (ALWAYS DO THIS)**
176
+ Call mcp__vibe-learning__get_concept_level for the main concept to register it in the learning system.
141
177
 
142
- 1. Call mcp__vibe-learning__should_ask_question
143
- 2. If shouldAsk is true:
144
- - Call mcp__vibe-learning__get_concept_level with a relevant concept from this task
145
- - Ask a level-appropriate question (L1: recognition, L2: understanding, L3: comparison, L4: edge cases, L5: design)
146
- - After user answers, call mcp__vibe-learning__record_learning
147
- 3. If shouldAsk is false, briefly mention cooldown
178
+ **STEP 4: Ask Learning Question (CONDITIONAL)**
179
+ Call mcp__vibe-learning__should_ask_question to check.
180
+ - If shouldAsk is true AND mode is not "off":
181
+ - Ask a level-appropriate question (L1-L5)
182
+ - After user answers, call mcp__vibe-learning__record_learning
183
+ - If shouldAsk is false: briefly mention cooldown status
148
184
 
149
- Ask naturally, like conversation.`;
185
+ Ask naturally, like conversation. Keep it brief.`;
150
186
  function parseLearnCommand(text) {
151
187
  const lower = text.toLowerCase().trim();
152
188
  if (lower === "/learn" || lower === "/learn status")
@@ -211,7 +247,7 @@ var VibeLearningPlugin = (ctx) => {
211
247
  const concept = extractConceptFromPath(filePath);
212
248
  if (concept)
213
249
  addConcept(concept);
214
- if (toolCount >= CONFIG.TOOL_THRESHOLD && currentMode !== "off") {
250
+ if (toolCount >= CONFIG.TOOL_THRESHOLD) {
215
251
  const now = Date.now();
216
252
  if (now - lastLearningPrompt >= CONFIG.COOLDOWN_MS) {
217
253
  toolCount = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-learning-opencode",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "VibeLearning plugin for OpenCode - spaced repetition learning while coding",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",