claudia-mentor 0.5.1 → 0.5.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.
|
@@ -108,6 +108,7 @@ def main():
|
|
|
108
108
|
|
|
109
109
|
is_beginner = experience == "beginner"
|
|
110
110
|
coaching_note = None
|
|
111
|
+
user_msg = None
|
|
111
112
|
|
|
112
113
|
# --- Stuck detection ---
|
|
113
114
|
# Gate: moderate+ for beginners, high for everyone else
|
|
@@ -124,6 +125,7 @@ def main():
|
|
|
124
125
|
"'What happened right before you got stuck?' "
|
|
125
126
|
"If they've been working on something, reference it specifically."
|
|
126
127
|
)
|
|
128
|
+
user_msg = "Claudia is helping Claude ask you the right questions."
|
|
127
129
|
break
|
|
128
130
|
|
|
129
131
|
# --- Vague prompt coaching (high proactivity only) ---
|
|
@@ -138,12 +140,14 @@ def main():
|
|
|
138
140
|
"questions before diving in. For example: What file are you working on? "
|
|
139
141
|
"What did you expect to happen vs what actually happened?"
|
|
140
142
|
)
|
|
143
|
+
user_msg = "Claudia is coaching Claude to ask you clarifying questions first."
|
|
141
144
|
elif pattern_type == "too-short":
|
|
142
145
|
coaching_note = (
|
|
143
146
|
"Claudia note: The user's prompt is very short and lacks context. "
|
|
144
147
|
"Gently ask them to elaborate — what specifically do they want to know? "
|
|
145
148
|
"What are they trying to build or fix?"
|
|
146
149
|
)
|
|
150
|
+
user_msg = "Claudia is nudging Claude to help you be more specific."
|
|
147
151
|
elif pattern_type == "single-word":
|
|
148
152
|
# Single-word confirmations are fine in context, skip
|
|
149
153
|
sys.exit(0)
|
|
@@ -157,6 +161,7 @@ def main():
|
|
|
157
161
|
"a gentle nudge to be more specific. Before responding, consider asking: "
|
|
158
162
|
"What are you trying to accomplish? Is there a specific file or error involved?"
|
|
159
163
|
)
|
|
164
|
+
user_msg = "Claudia is nudging Claude to help you be more specific."
|
|
160
165
|
|
|
161
166
|
# Check for ALL CAPS (frustration signal)
|
|
162
167
|
if not coaching_note and prompt.isupper() and len(prompt) > 10:
|
|
@@ -164,17 +169,15 @@ def main():
|
|
|
164
169
|
"Claudia note: The user seems frustrated (all caps). Acknowledge their frustration "
|
|
165
170
|
"briefly, then help them break the problem down step by step. Stay calm and supportive."
|
|
166
171
|
)
|
|
172
|
+
user_msg = "Claudia noticed you might be frustrated. She's telling Claude to slow down and help."
|
|
167
173
|
|
|
168
174
|
if coaching_note:
|
|
169
175
|
state["count"] += 1
|
|
170
176
|
save_state(session_id, state)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"systemMessage": visible,
|
|
176
|
-
})
|
|
177
|
-
print(output)
|
|
177
|
+
result = {"additionalContext": coaching_note}
|
|
178
|
+
if user_msg:
|
|
179
|
+
result["systemMessage"] = user_msg
|
|
180
|
+
print(json.dumps(result))
|
|
178
181
|
|
|
179
182
|
sys.exit(0)
|
|
180
183
|
|
|
@@ -178,12 +178,10 @@ def main():
|
|
|
178
178
|
if parts:
|
|
179
179
|
save_state(session_id, state)
|
|
180
180
|
# systemMessage shows tip to user; greeting is for Claude's context only
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
})
|
|
186
|
-
print(output)
|
|
181
|
+
result = {"additionalContext": "\n\n".join(parts)}
|
|
182
|
+
if tip:
|
|
183
|
+
result["systemMessage"] = tip
|
|
184
|
+
print(json.dumps(result))
|
|
187
185
|
|
|
188
186
|
sys.exit(0)
|
|
189
187
|
|
package/package.json
CHANGED