vibe-learning-opencode 0.1.4 → 0.1.6
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/dist/index.js +76 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,30 +70,42 @@ After mode behavior: Ask learning questions AFTER task completion.`,
|
|
|
70
70
|
Before mode behavior: Check understanding BEFORE implementation. Ask one question, then proceed.`,
|
|
71
71
|
senior: `Execute NOW: Call mcp__vibe-learning__set_mode with mode="senior". Confirm Senior mode enabled.
|
|
72
72
|
|
|
73
|
-
CRITICAL - FOR ALL SUBSEQUENT TASKS
|
|
73
|
+
CRITICAL - FOR ALL SUBSEQUENT TASKS, test understanding like a senior developer:
|
|
74
74
|
|
|
75
75
|
**[VibeLearning Senior Mode]**
|
|
76
|
-
[Round 1/3] [
|
|
77
|
-
_(skip:
|
|
76
|
+
[Round 1/3] [Senior-level question]?
|
|
77
|
+
_(skip: say "skip" to proceed)_
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
Question Style - Test understanding, not gather requirements:
|
|
80
|
+
\u274C WRONG: "What data will you cache?" (requirements gathering)
|
|
81
|
+
\u274C WRONG: "Redis or Memcached?" (tool selection)
|
|
82
|
+
\u2705 RIGHT: "Why do you need caching here?" (reasoning)
|
|
83
|
+
\u2705 RIGHT: "What is cache-aside pattern? How is it different from write-through?" (concept)
|
|
84
|
+
\u2705 RIGHT: "What problems can caching introduce?" (tradeoffs)
|
|
85
|
+
|
|
86
|
+
Flow:
|
|
87
|
+
- Round 1: Test conceptual understanding or ask WHY
|
|
88
|
+
- Round 2: Ask about tradeoffs, edge cases, or compare alternatives
|
|
89
|
+
- Round 3: (if needed) Give hint and ask again
|
|
90
|
+
- FINAL STEP (MANDATORY): Call record_learning tool, THEN say "Good! Implementing now."
|
|
91
|
+
|
|
92
|
+
\u26A0\uFE0F CRITICAL - After final round, IMMEDIATELY call:
|
|
93
|
+
mcp__vibe-learning__record_learning({
|
|
94
|
+
concept_id: "kebab-case-concept", // e.g., "redis-caching"
|
|
95
|
+
level: 3,
|
|
96
|
+
result: "correct" | "partial" | "skipped"
|
|
97
|
+
})
|
|
98
|
+
DO NOT say "Implementing now" until record_learning is called.
|
|
88
99
|
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
100
|
+
After implementation, record 1-2 unknown unknowns:
|
|
101
|
+
mcp__vibe-learning__record_unknown_unknown({
|
|
102
|
+
concept_id: "related-concept",
|
|
103
|
+
related_to: "main-concept",
|
|
104
|
+
context: "brief context",
|
|
105
|
+
why_important: "why important"
|
|
106
|
+
})
|
|
94
107
|
|
|
95
|
-
|
|
96
|
-
\u2705 RIGHT: "[Round 1/3] Why JWT over session-based auth?"`,
|
|
108
|
+
ONE question per message. Wait for answer.`,
|
|
97
109
|
"senior-light": `Execute NOW: Call mcp__vibe-learning__set_mode with mode="senior_light". Confirm mode changed.
|
|
98
110
|
|
|
99
111
|
Senior Light behavior: Present counterarguments but proceed after round 1. Don't block, just give feedback.`
|
|
@@ -104,15 +116,32 @@ var MODE_BEHAVIOR_PROMPTS = {
|
|
|
104
116
|
Format (MUST show header on Round 1):
|
|
105
117
|
**[VibeLearning Senior Mode]**
|
|
106
118
|
[Round 1/3] [One short question]?
|
|
119
|
+
_(skip: say "skip" to proceed)_
|
|
107
120
|
|
|
108
121
|
Flow:
|
|
109
122
|
- Round 1: MUST show header + "[Round 1/3] Why this approach?"
|
|
110
123
|
- Round 2: ALWAYS ask "[Round 2/3] What alternatives did you consider? Tradeoffs?"
|
|
111
124
|
(Skip only if user named 2+ alternatives with specific tradeoffs)
|
|
112
125
|
- Round 3: If Round 2 vague, "[Round 3/3] Hint: [hint]. What do you think?"
|
|
113
|
-
-
|
|
126
|
+
- FINAL STEP (MANDATORY): Call record_learning, THEN say "Good thinking! Implementing now."
|
|
114
127
|
|
|
115
|
-
|
|
128
|
+
\u26A0\uFE0F CRITICAL - After final round, IMMEDIATELY call:
|
|
129
|
+
mcp__vibe-learning__record_learning({
|
|
130
|
+
concept_id: "kebab-case-concept",
|
|
131
|
+
level: 3,
|
|
132
|
+
result: "correct" | "partial" | "skipped"
|
|
133
|
+
})
|
|
134
|
+
DO NOT say "Implementing now" until record_learning is called.
|
|
135
|
+
|
|
136
|
+
After implementation, record 1-2 unknown unknowns:
|
|
137
|
+
mcp__vibe-learning__record_unknown_unknown({
|
|
138
|
+
concept_id: "related-concept",
|
|
139
|
+
related_to: "main-concept",
|
|
140
|
+
context: "brief context",
|
|
141
|
+
why_important: "why important"
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
ONE question per round. Be strict like a real senior.`,
|
|
116
145
|
before: `[VibeLearning - Before Mode]
|
|
117
146
|
|
|
118
147
|
Ask ONE short question: "Before implementing, [question]?"
|
|
@@ -122,18 +151,34 @@ Then proceed regardless of answer.`,
|
|
|
122
151
|
Briefly mention one alternative while implementing.
|
|
123
152
|
Example: "Using X, but Y is also an option if you need Z."`
|
|
124
153
|
};
|
|
125
|
-
var AUTO_LEARNING_PROMPT = `[VibeLearning -
|
|
154
|
+
var AUTO_LEARNING_PROMPT = `[VibeLearning - Task Completion]
|
|
155
|
+
|
|
156
|
+
Task completed. Execute these steps NOW (in order):
|
|
157
|
+
|
|
158
|
+
**STEP 1: Identify Concepts (ALWAYS DO THIS)**
|
|
159
|
+
Identify 1-3 key concepts used in this task. Use kebab-case (e.g., "redis-caching", "jwt-auth", "react-hooks").
|
|
160
|
+
|
|
161
|
+
**STEP 2: Record Unknown Unknowns (ALWAYS DO THIS)**
|
|
162
|
+
For each concept, think of 1-2 related concepts the user might not know.
|
|
163
|
+
Call mcp__vibe-learning__record_unknown_unknown for each:
|
|
164
|
+
- concept_id: the unknown concept (e.g., "cache-stampede")
|
|
165
|
+
- related_to: the concept from the task (e.g., "redis-caching")
|
|
166
|
+
- context: brief context of how it relates
|
|
167
|
+
- why_important: why they should learn it
|
|
168
|
+
|
|
169
|
+
Example: Task used JWT auth \u2192 record "refresh-token-rotation", "token-revocation"
|
|
126
170
|
|
|
127
|
-
|
|
171
|
+
**STEP 3: Register Main Concept (ALWAYS DO THIS)**
|
|
172
|
+
Call mcp__vibe-learning__get_concept_level for the main concept to register it in the learning system.
|
|
128
173
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
174
|
+
**STEP 4: Ask Learning Question (CONDITIONAL)**
|
|
175
|
+
Call mcp__vibe-learning__should_ask_question to check.
|
|
176
|
+
- If shouldAsk is true AND mode is not "off":
|
|
177
|
+
- Ask a level-appropriate question (L1-L5)
|
|
178
|
+
- After user answers, call mcp__vibe-learning__record_learning
|
|
179
|
+
- If shouldAsk is false: briefly mention cooldown status
|
|
135
180
|
|
|
136
|
-
Ask naturally, like conversation.`;
|
|
181
|
+
Ask naturally, like conversation. Keep it brief.`;
|
|
137
182
|
function parseLearnCommand(text) {
|
|
138
183
|
const lower = text.toLowerCase().trim();
|
|
139
184
|
if (lower === "/learn" || lower === "/learn status")
|
|
@@ -198,7 +243,7 @@ var VibeLearningPlugin = (ctx) => {
|
|
|
198
243
|
const concept = extractConceptFromPath(filePath);
|
|
199
244
|
if (concept)
|
|
200
245
|
addConcept(concept);
|
|
201
|
-
if (toolCount >= CONFIG.TOOL_THRESHOLD
|
|
246
|
+
if (toolCount >= CONFIG.TOOL_THRESHOLD) {
|
|
202
247
|
const now = Date.now();
|
|
203
248
|
if (now - lastLearningPrompt >= CONFIG.COOLDOWN_MS) {
|
|
204
249
|
toolCount = 0;
|