claudia-mentor 0.5.0 → 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.
@@ -101,7 +101,10 @@ def main():
101
101
 
102
102
  if tip:
103
103
  save_state(session_id, state)
104
- output = json.dumps({"additionalContext": tip})
104
+ output = json.dumps({
105
+ "additionalContext": tip,
106
+ "systemMessage": tip,
107
+ })
105
108
  print(output)
106
109
 
107
110
  sys.exit(0)
@@ -147,7 +147,11 @@ def main():
147
147
  if celebration:
148
148
  state["achieved"] = list(achieved)
149
149
  save_state(state)
150
- output = json.dumps({"additionalContext": f"Claudia: {celebration}"})
150
+ msg = f"Claudia: {celebration}"
151
+ output = json.dumps({
152
+ "additionalContext": msg,
153
+ "systemMessage": msg,
154
+ })
151
155
  print(output)
152
156
 
153
157
  # Save state even without celebration (for file_count tracking)
@@ -180,7 +180,10 @@ def main():
180
180
  suggestion_text = "Claudia: What's next? Here are some ideas:\n" + "\n".join(
181
181
  f" - {step}" for step in formatted
182
182
  )
183
- output = json.dumps({"additionalContext": suggestion_text})
183
+ output = json.dumps({
184
+ "additionalContext": suggestion_text,
185
+ "systemMessage": suggestion_text,
186
+ })
184
187
  print(output)
185
188
  sys.exit(0)
186
189
 
@@ -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,12 +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
- output = json.dumps({"additionalContext": coaching_note})
172
- print(output)
177
+ result = {"additionalContext": coaching_note}
178
+ if user_msg:
179
+ result["systemMessage"] = user_msg
180
+ print(json.dumps(result))
173
181
 
174
182
  sys.exit(0)
175
183
 
@@ -109,7 +109,8 @@ def main():
109
109
  state["shown_types"] = list(shown_types)
110
110
  save_state(session_id, state)
111
111
  suggestion = RUN_SUGGESTIONS["package.json"][1]
112
- output = json.dumps({"additionalContext": f"Claudia: {suggestion}"})
112
+ msg = f"Claudia: {suggestion}"
113
+ output = json.dumps({"additionalContext": msg, "systemMessage": msg})
113
114
  print(output)
114
115
  sys.exit(0)
115
116
 
@@ -124,7 +125,8 @@ def main():
124
125
  state["shown_types"] = list(shown_types)
125
126
  save_state(session_id, state)
126
127
  suggestion = RUN_SUGGESTIONS[ext][1].format(filename=filename)
127
- output = json.dumps({"additionalContext": f"Claudia: {suggestion}"})
128
+ msg = f"Claudia: {suggestion}"
129
+ output = json.dumps({"additionalContext": msg, "systemMessage": msg})
128
130
  print(output)
129
131
  sys.exit(0)
130
132
 
@@ -177,8 +177,11 @@ def main():
177
177
  parts = [p for p in [greeting, tip] if p]
178
178
  if parts:
179
179
  save_state(session_id, state)
180
- output = json.dumps({"additionalContext": "\n\n".join(parts)})
181
- print(output)
180
+ # systemMessage shows tip to user; greeting is for Claude's context only
181
+ result = {"additionalContext": "\n\n".join(parts)}
182
+ if tip:
183
+ result["systemMessage"] = tip
184
+ print(json.dumps(result))
182
185
 
183
186
  sys.exit(0)
184
187
 
@@ -276,8 +276,11 @@ def main():
276
276
  state["shown_keywords"] = list(shown_keywords)
277
277
  state["revealed_commands"] = list(revealed_commands)
278
278
  save_state(session_id, state)
279
- tip_text = "\n".join(f"\U0001f4a1 Claudia: {tip}" for tip in tips)
280
- output = json.dumps({"additionalContext": tip_text})
279
+ tip_text = "\n".join(f"Claudia: {tip}" for tip in tips)
280
+ output = json.dumps({
281
+ "additionalContext": tip_text,
282
+ "systemMessage": tip_text,
283
+ })
281
284
  print(output)
282
285
  elif shown_keywords != set(state["shown_keywords"]) or revealed_commands != set(state["revealed_commands"]):
283
286
  state["shown_keywords"] = list(shown_keywords)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudia-mentor",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Proactive technology mentor, security advisor, and prompt coach for Claude Code",
5
5
  "author": "Regan O'Malley <regan@reganomalley.com>",
6
6
  "license": "MIT",