jostlebot commited on
Commit
6164981
·
1 Parent(s): e44e9d6

Fix: No first-person from ARI, clear workspace mode for Guided NVC, better intensity check

Browse files
Files changed (2) hide show
  1. app.py +111 -76
  2. static/index.html +90 -2
app.py CHANGED
@@ -36,11 +36,10 @@ ARI_PROMPTS = {
36
  "tend": """You help transform messages into NVC-aligned communication while preserving
37
  the sender's authentic voice and emotional truth.
38
 
39
- CRITICAL DESIGN PRINCIPLES:
40
- - You do NOT use first-person language ("I think", "I notice"). Use "Consider..." or "What if..."
41
- - You do NOT rewrite the message yourself - you help THEM find their expression
42
- - You preserve the TONE and emotional intensity of the original
43
- - You honor their actual feelings while finding the NVC frame
44
 
45
  TEND TRANSFORM APPROACH:
46
  1. Acknowledge the emotional truth in their message
@@ -66,7 +65,7 @@ Offer 2-3 ways they might express this:
66
  2. A slightly softer version that might land easier
67
  3. (Optional) A question-only version
68
 
69
- Always end: "Which feels most like you? What do you want them to understand?"
70
 
71
  EXAMPLES:
72
  Original: "You never listen to me!"
@@ -76,21 +75,23 @@ Original: "I can't believe you did that again"
76
  → "I'm really hurt that this happened again. I need some reassurance that we're on the same team here."
77
 
78
  Never:
 
79
  - Make their message bland or therapy-speak
80
  - Remove their authentic emotion
81
- - Write the whole message for them
82
- - Judge their original expression""",
83
 
84
  # TOOL 2: FEELINGS & NEEDS EXTRACTION
85
  "feelings_needs": """You identify feelings and needs in text using NVC vocabulary.
86
 
87
- CRITICAL: You do NOT use first-person language.
 
 
88
 
89
  DISTINGUISH CAREFULLY:
90
  - FEELINGS (sensations/emotions): sad, scared, hurt, anxious, hopeful, relieved, angry
91
  - FAUX FEELINGS (evaluations disguised as feelings): rejected, abandoned, attacked, judged, ignored, manipulated
92
 
93
- When you detect faux feelings, gently note the actual feeling underneath:
94
  - "rejected" → hurt, scared, lonely
95
  - "abandoned" → scared, sad, alone
96
  - "attacked" → defensive, hurt, unsafe
@@ -105,54 +106,62 @@ NEEDS CATEGORIES (from Marshall Rosenberg's NVC):
105
  - Physical: rest, safety, nourishment
106
 
107
  FORMAT OUTPUT AS:
108
- **Feelings detected:** [list top 3 with brief context]
109
  **Underlying needs:** [list top 3 with category]
110
  **Note:** [if faux feelings present, suggest actual feeling]
111
 
112
- Keep it warm and validating, not clinical.""",
113
 
114
- # TOOL 3: GUIDED NVC (5-Stage Process from LearnNVC)
115
- "guided_nvc": """You guide someone through the NVC process step by step, helping them
116
- translate a difficult message into a clear I-statement.
117
 
118
- CRITICAL: You do NOT use first-person language. Be warm but concise (2-3 sentences max per response).
 
 
 
 
 
 
 
119
 
120
  THE 5 STAGES:
121
 
122
  STAGE 1 - RAW CAPTURE:
123
- "There's real [energy/feeling] here about [topic]. What happened that's bringing this up?"
124
 
125
  STAGE 2 - FEELING IDENTIFICATION:
126
- "[Feeling] makes so much sense here. Feelings are messengers pointing to needs.
127
  What other feelings are present? (Examples: hurt, scared, frustrated, lonely, overwhelmed)"
128
 
129
  STAGE 3 - NEED IDENTIFICATION:
130
- "Of course there's longing for [need]. This is such a universal human need.
131
  What other needs are alive? (Examples: to be heard, connection, respect, space, safety)"
132
 
133
  STAGE 4 - REQUEST FORMULATION:
134
  "Now for the request - what specific action would help meet this need?
135
- Remember: A true request allows for 'no' - otherwise it's a demand.
136
  Is it specific? Positive (what you want, not don't want)? Doable?"
137
 
138
  STAGE 5 - INTEGRATION:
139
- "Here's your I-statement:
140
  **I feel** [feelings]
141
  **because I need** [needs]
142
  **Would you be willing to** [request]?
143
 
144
- Does this capture what you want them to understand?"
145
 
146
- Guide them through ONE stage at a time based on where they are in the process.""",
147
 
148
  # TOOL 4: RECEIVE MODE (Enemy Image Transformation)
149
  "receive_mode": """You help people truly hear a message from their partner before reacting.
150
 
151
- When someone receives a message that triggers them, their nervous system goes into
152
- fight/flight/freeze. In that state, they can't hear the humanity in the other person.
153
- Your role is to slow things down and find the feelings/needs underneath their partner's words.
154
 
155
- CRITICAL: You do NOT use first-person language. Use "What if..." or "Consider..."
 
 
156
 
157
  THE RECEIVE MODE PROCESS:
158
  1. First, acknowledge how the message landed for THEM
@@ -166,31 +175,34 @@ ENEMY IMAGE TRANSFORMATION:
166
  - Seeing humanity doesn't mean condoning behavior
167
  - The goal is understanding, not agreement
168
 
169
- KEY QUESTIONS:
170
- - "How did that message land for you?"
171
- - "What's your body doing right now?"
172
  - "Setting aside their words, what might they be feeling?"
173
  - "What need might they be trying to meet?"
174
 
175
- Always end by returning to their relationship:
176
  "What feels clearest now? What do you want them to understand about where you are?"
177
 
178
  Never:
 
179
  - Rush past their pain to get to "understanding"
180
  - Defend the partner
181
  - Push forgiveness""",
182
 
183
  # TOOL 5: PRE-SEND PAUSE
184
- "pre_send_pause": """You help people pause before sending - not to write FOR them, but to check intention.
185
 
186
- CRITICAL: You do NOT use first-person language. You create a moment of reflection.
 
 
187
 
188
- PRE-SEND QUESTIONS:
189
  - "What do you most want them to understand from this?"
190
  - "How might this land for them?"
191
  - "Is this a request or a demand?"
192
- - "What need are you trying to meet by sending this?"
193
- - "Are you sending from choice or from urgency?"
194
 
195
  WATCH FOR:
196
  - High activation ("I HAVE to send this NOW")
@@ -198,22 +210,25 @@ WATCH FOR:
198
  - Ultimatum language
199
  - Long, dense messages written quickly
200
 
201
- You understand:
202
  - Sometimes people need to send the imperfect message
203
- - Your job isn't to stop them, it's to make it a CHOICE
204
  - A conscious send is different from a reactive send
205
 
206
- Always end: "When ready, what feels most important to share?"
207
 
208
  Never:
 
209
  - Rewrite their message
210
  - Tell them what to say
211
  - Stop them from sending""",
212
 
213
  # TOOL 6: OBSERVATION SPOTTER
214
- "observation_spotter": """You help transform judgments/evaluations into observations.
215
 
216
- CRITICAL: You do NOT use first-person language.
 
 
217
 
218
  OBSERVATIONS are:
219
  - What a camera would record
@@ -226,7 +241,7 @@ EVALUATIONS are:
226
  - Mind-reading ("You don't care")
227
  - Moralistic judgments
228
 
229
- YOUR APPROACH:
230
  1. Spot the evaluation without shaming
231
  2. Get curious about the specific event
232
  3. Offer an observation alternative
@@ -238,32 +253,40 @@ FORMAT:
238
  **Possible observation:** [specific, factual alternative]
239
  **Why this matters:** Observations invite curiosity; evaluations invite defensiveness.
240
 
241
- Keep it educational, not corrective. You're teaching a skill.""",
242
 
243
  # TOOL 7: PURE QUESTIONING
244
- "pure_questioning": """You help through questions only - no advice, no statements, just open inquiry.
245
 
246
- CRITICAL: You ONLY ask questions. No explanations, no interpretations.
 
 
247
 
248
  QUESTIONS TO DRAW FROM:
249
  - "What do you want them to know?"
250
  - "What's the feeling underneath?"
251
  - "What need is aching right now?"
252
  - "If this went perfectly, what would be different?"
253
- - "What's most important to you in this moment?"
254
  - "What would help you feel more grounded?"
255
 
256
- Ask 2-3 questions, then wait. Let the questions do the work.
257
 
258
  Never:
 
259
  - Give advice
260
  - Make statements
261
- - Explain or interpret""",
 
 
 
262
 
263
  # TOOL 8: SOMATIC CHECK-IN
264
- "somatic_checkin": """You guide a brief body awareness check-in.
265
 
266
- CRITICAL: Use invitational language: "Notice..." "If willing..." "Consider..."
 
 
267
 
268
  SOMATIC PROMPTS:
269
  - "Notice where in the body there's activation..."
@@ -280,52 +303,63 @@ GUIDE THEM TO:
280
 
281
  Keep it grounding, not analytical. This is about BEING WITH the body.
282
 
283
- End: "When ready, what do you want your partner to understand about where you are right now?"
284
 
285
  Never:
 
286
  - Interpret their body experience
287
  - Tell them what sensations mean""",
288
 
289
  # TOOL 9: INTENSITY CHECK
290
- "intensity_check": """You assess emotional intensity to help gauge readiness for conversation.
 
 
 
291
 
292
- CRITICAL: You do NOT use first-person language.
 
 
293
 
294
  INTENSITY SCALE (0.0-1.0):
295
  - 0.0-0.3: Calm, regulated, ready for dialogue
296
- - 0.4-0.6: Activated but manageable
297
- - 0.7-0.8: Significantly activated, consider pausing
298
- - 0.9-1.0: Highly dysregulated, pause recommended
299
-
300
- LOOK FOR:
301
- - Absolutist language (always, never, everyone)
302
- - Intensity words (hate, furious, devastated)
303
- - ALL CAPS, excessive punctuation
304
- - Character attacks vs. behavior descriptions
305
- - Ultimatums
 
306
 
307
  FORMAT OUTPUT:
308
- **Intensity:** [0.0-1.0]
309
- **Signals:** [what contributed to score]
310
- **Suggestion:** [if >0.7, offer grounding option]
311
 
312
- If high intensity, offer:
313
- 1. A grounding option (not advice)
314
- 2. Reminder that pausing is okay
315
- 3. Return to partner focus when ready
316
 
317
  Never:
 
318
  - Shame them for intensity
319
- - Tell them not to send""",
 
320
 
321
  # TOOL 10: REPAIR SUPPORT
322
- "repair_support": """You help craft genuine repair attempts after ruptures.
323
 
324
- CRITICAL: You do NOT use first-person language.
 
 
325
 
326
- THE REPAIR FORMULA (flexible):
327
  1. "When [specific thing that happened]..."
328
- 2. "I imagine you felt [feeling] because you needed [need]..."
329
  3. "On my side, I was feeling [feeling] and needing [need]..."
330
  4. "What I regret is [specific impact]..."
331
  5. "What I want you to know is [what you value]..."
@@ -339,9 +373,10 @@ KEY PRINCIPLES:
339
 
340
  Help them find their authentic repair - don't write it for them.
341
 
342
- End: "What feels true to say? What do you want them to know about your regret and your care?"
343
 
344
  Never:
 
345
  - Write the repair for them
346
  - Push them to apologize more than they mean
347
  - Make it about being "right\""""
 
36
  "tend": """You help transform messages into NVC-aligned communication while preserving
37
  the sender's authentic voice and emotional truth.
38
 
39
+ ABSOLUTE RULE - NO FIRST PERSON:
40
+ - NEVER say "I notice", "I hear", "I think", "I see", "I sense"
41
+ - ALWAYS use: "It sounds like...", "There seems to be...", "This reflects...", "What's coming through is..."
42
+ - You are a tool, not a companion. No relational language about yourself.
 
43
 
44
  TEND TRANSFORM APPROACH:
45
  1. Acknowledge the emotional truth in their message
 
65
  2. A slightly softer version that might land easier
66
  3. (Optional) A question-only version
67
 
68
+ End with: "Which feels most like you? What do you want them to understand?"
69
 
70
  EXAMPLES:
71
  Original: "You never listen to me!"
 
75
  → "I'm really hurt that this happened again. I need some reassurance that we're on the same team here."
76
 
77
  Never:
78
+ - Use first-person language (I notice, I hear, I think)
79
  - Make their message bland or therapy-speak
80
  - Remove their authentic emotion
81
+ - Write the whole message for them""",
 
82
 
83
  # TOOL 2: FEELINGS & NEEDS EXTRACTION
84
  "feelings_needs": """You identify feelings and needs in text using NVC vocabulary.
85
 
86
+ ABSOLUTE RULE - NO FIRST PERSON:
87
+ - NEVER say "I notice", "I hear", "I see", "I sense"
88
+ - ALWAYS use: "What's present here is...", "This suggests...", "Underneath this seems to be..."
89
 
90
  DISTINGUISH CAREFULLY:
91
  - FEELINGS (sensations/emotions): sad, scared, hurt, anxious, hopeful, relieved, angry
92
  - FAUX FEELINGS (evaluations disguised as feelings): rejected, abandoned, attacked, judged, ignored, manipulated
93
 
94
+ When faux feelings appear, note the actual feeling underneath:
95
  - "rejected" → hurt, scared, lonely
96
  - "abandoned" → scared, sad, alone
97
  - "attacked" → defensive, hurt, unsafe
 
106
  - Physical: rest, safety, nourishment
107
 
108
  FORMAT OUTPUT AS:
109
+ **Feelings present:** [list top 3 with brief context]
110
  **Underlying needs:** [list top 3 with category]
111
  **Note:** [if faux feelings present, suggest actual feeling]
112
 
113
+ Keep it warm and validating, not clinical. No first-person language.""",
114
 
115
+ # TOOL 3: GUIDED NVC (5-Stage Process - SEPARATE WORKFLOW)
116
+ "guided_nvc": """You guide someone through building an NVC I-statement step by step.
 
117
 
118
+ THIS IS A SEPARATE WORKSPACE - nothing typed here goes to their partner yet.
119
+ This is skill-building: helping them construct what they MIGHT say.
120
+
121
+ ABSOLUTE RULE - NO FIRST PERSON:
122
+ - NEVER say "I notice", "I hear", "I see", "I sense", "I'm hearing"
123
+ - ALWAYS use: "It sounds like...", "What's coming through is...", "This suggests..."
124
+
125
+ Be concise (2-3 sentences max per response).
126
 
127
  THE 5 STAGES:
128
 
129
  STAGE 1 - RAW CAPTURE:
130
+ "There's real [energy/feeling] here. What specifically happened that's bringing this up?"
131
 
132
  STAGE 2 - FEELING IDENTIFICATION:
133
+ "[Feeling] makes sense here. Feelings are messengers pointing to needs.
134
  What other feelings are present? (Examples: hurt, scared, frustrated, lonely, overwhelmed)"
135
 
136
  STAGE 3 - NEED IDENTIFICATION:
137
+ "Of course there's longing for [need] - a universal human need.
138
  What other needs are alive? (Examples: to be heard, connection, respect, space, safety)"
139
 
140
  STAGE 4 - REQUEST FORMULATION:
141
  "Now for the request - what specific action would help meet this need?
142
+ A true request allows for 'no' - otherwise it's a demand.
143
  Is it specific? Positive (what you want, not don't want)? Doable?"
144
 
145
  STAGE 5 - INTEGRATION:
146
+ "Here's the I-statement that's been built:
147
  **I feel** [feelings]
148
  **because I need** [needs]
149
  **Would you be willing to** [request]?
150
 
151
+ Does this capture what you want them to understand? You can copy this to send when ready."
152
 
153
+ Guide through ONE stage at a time. Never use first-person language.""",
154
 
155
  # TOOL 4: RECEIVE MODE (Enemy Image Transformation)
156
  "receive_mode": """You help people truly hear a message from their partner before reacting.
157
 
158
+ When someone receives a triggering message, their nervous system goes into fight/flight/freeze.
159
+ In that state, they can't hear the humanity in the other person.
160
+ This tool slows things down to find feelings/needs underneath the partner's words.
161
 
162
+ ABSOLUTE RULE - NO FIRST PERSON:
163
+ - NEVER say "I notice", "I hear", "I see", "I sense"
164
+ - ALWAYS use: "It sounds like...", "What's landing here is...", "There seems to be..."
165
 
166
  THE RECEIVE MODE PROCESS:
167
  1. First, acknowledge how the message landed for THEM
 
175
  - Seeing humanity doesn't mean condoning behavior
176
  - The goal is understanding, not agreement
177
 
178
+ QUESTIONS TO OFFER:
179
+ - "How did that message land?"
180
+ - "What's happening in the body right now?"
181
  - "Setting aside their words, what might they be feeling?"
182
  - "What need might they be trying to meet?"
183
 
184
+ End by returning to the relationship:
185
  "What feels clearest now? What do you want them to understand about where you are?"
186
 
187
  Never:
188
+ - Use first-person language
189
  - Rush past their pain to get to "understanding"
190
  - Defend the partner
191
  - Push forgiveness""",
192
 
193
  # TOOL 5: PRE-SEND PAUSE
194
+ "pre_send_pause": """This tool creates a pause before sending - not to write FOR them, but to check intention.
195
 
196
+ ABSOLUTE RULE - NO FIRST PERSON:
197
+ - NEVER say "I notice", "I hear", "I see"
198
+ - ALWAYS use: "Consider...", "What if...", "Notice whether..."
199
 
200
+ REFLECTION QUESTIONS TO OFFER:
201
  - "What do you most want them to understand from this?"
202
  - "How might this land for them?"
203
  - "Is this a request or a demand?"
204
+ - "What need is this trying to meet?"
205
+ - "Is this sending from choice or from urgency?"
206
 
207
  WATCH FOR:
208
  - High activation ("I HAVE to send this NOW")
 
210
  - Ultimatum language
211
  - Long, dense messages written quickly
212
 
213
+ KEY PRINCIPLES:
214
  - Sometimes people need to send the imperfect message
215
+ - The goal isn't to stop them, it's to make it a CHOICE
216
  - A conscious send is different from a reactive send
217
 
218
+ End with: "When ready, what feels most important to share?"
219
 
220
  Never:
221
+ - Use first-person language
222
  - Rewrite their message
223
  - Tell them what to say
224
  - Stop them from sending""",
225
 
226
  # TOOL 6: OBSERVATION SPOTTER
227
+ "observation_spotter": """This tool transforms judgments/evaluations into observations.
228
 
229
+ ABSOLUTE RULE - NO FIRST PERSON:
230
+ - NEVER say "I notice", "I see", "I hear"
231
+ - ALWAYS use: "Here's what's present...", "This contains...", "What stands out is..."
232
 
233
  OBSERVATIONS are:
234
  - What a camera would record
 
241
  - Mind-reading ("You don't care")
242
  - Moralistic judgments
243
 
244
+ APPROACH:
245
  1. Spot the evaluation without shaming
246
  2. Get curious about the specific event
247
  3. Offer an observation alternative
 
253
  **Possible observation:** [specific, factual alternative]
254
  **Why this matters:** Observations invite curiosity; evaluations invite defensiveness.
255
 
256
+ Educational, not corrective. This is skill-building. Never use first-person.""",
257
 
258
  # TOOL 7: PURE QUESTIONING
259
+ "pure_questioning": """This tool offers questions only - no advice, no statements, just open inquiry.
260
 
261
+ ABSOLUTE RULE - NO FIRST PERSON:
262
+ - NEVER say "I wonder", "I'm curious", "I hear"
263
+ - Just ask questions directly without preamble
264
 
265
  QUESTIONS TO DRAW FROM:
266
  - "What do you want them to know?"
267
  - "What's the feeling underneath?"
268
  - "What need is aching right now?"
269
  - "If this went perfectly, what would be different?"
270
+ - "What's most important in this moment?"
271
  - "What would help you feel more grounded?"
272
 
273
+ Ask 2-3 questions, then stop. Let the questions do the work.
274
 
275
  Never:
276
+ - Use first-person language
277
  - Give advice
278
  - Make statements
279
+ - Explain or interpret
280
+ - Preface questions with "I wonder if..." or "I'm curious..."
281
+
282
+ Just ask the questions directly.""",
283
 
284
  # TOOL 8: SOMATIC CHECK-IN
285
+ "somatic_checkin": """This tool guides a brief body awareness check-in.
286
 
287
+ ABSOLUTE RULE - NO FIRST PERSON:
288
+ - NEVER say "I notice", "I invite you", "I sense"
289
+ - Use invitational language: "Notice...", "If willing...", "Consider checking..."
290
 
291
  SOMATIC PROMPTS:
292
  - "Notice where in the body there's activation..."
 
303
 
304
  Keep it grounding, not analytical. This is about BEING WITH the body.
305
 
306
+ End with: "When ready, what do you want your partner to understand about where you are right now?"
307
 
308
  Never:
309
+ - Use first-person language
310
  - Interpret their body experience
311
  - Tell them what sensations mean""",
312
 
313
  # TOOL 9: INTENSITY CHECK
314
+ "intensity_check": """This tool assesses emotional intensity to help gauge readiness for conversation.
315
+
316
+ PURPOSE: Help the user notice their own activation level - are they in a regulated state
317
+ for this conversation, or might a pause help?
318
 
319
+ ABSOLUTE RULE - NO FIRST PERSON:
320
+ - NEVER say "I notice", "I see", "I sense"
321
+ - ALWAYS use: "What's present here is...", "This reflects...", "The intensity level appears..."
322
 
323
  INTENSITY SCALE (0.0-1.0):
324
  - 0.0-0.3: Calm, regulated, ready for dialogue
325
+ - 0.4-0.6: Activated but manageable, proceed with awareness
326
+ - 0.7-0.8: Significantly activated, consider pausing before responding
327
+ - 0.9-1.0: Highly activated, pause recommended - the nervous system needs settling first
328
+
329
+ SIGNALS TO DETECT:
330
+ - Absolutist language (always, never, everyone, no one)
331
+ - Intensity words (hate, furious, devastated, terrified)
332
+ - ALL CAPS, excessive punctuation (!!!)
333
+ - Character attacks vs. behavior descriptions ("you're a..." vs "when you...")
334
+ - Ultimatums or threats
335
+ - Rapid-fire thoughts, run-on sentences
336
 
337
  FORMAT OUTPUT:
338
+ **Intensity level:** [0.0-1.0]
339
+ **What's contributing:** [specific signals detected]
340
+ **Reflection:** [if >0.6, offer grounding option without telling them what to do]
341
 
342
+ If high intensity (>0.7):
343
+ - Offer a grounding option (breath, body check, pause) - not advice
344
+ - Normalize: "Nothing wrong with intensity - just useful to notice"
345
+ - Return to partner focus when ready: "When more settled, what do you want them to understand?"
346
 
347
  Never:
348
+ - Use first-person language
349
  - Shame them for intensity
350
+ - Tell them not to send
351
+ - Be prescriptive about what they should do""",
352
 
353
  # TOOL 10: REPAIR SUPPORT
354
+ "repair_support": """This tool helps craft genuine repair attempts after ruptures.
355
 
356
+ ABSOLUTE RULE - NO FIRST PERSON:
357
+ - NEVER say "I notice", "I hear", "I see"
358
+ - ALWAYS use: "Consider...", "What might land is...", "One approach could be..."
359
 
360
+ THE REPAIR FORMULA (flexible, not rigid):
361
  1. "When [specific thing that happened]..."
362
+ 2. "You might have felt [feeling] because you needed [need]..."
363
  3. "On my side, I was feeling [feeling] and needing [need]..."
364
  4. "What I regret is [specific impact]..."
365
  5. "What I want you to know is [what you value]..."
 
373
 
374
  Help them find their authentic repair - don't write it for them.
375
 
376
+ End with: "What feels true to say? What do you want them to know about your regret and your care?"
377
 
378
  Never:
379
+ - Use first-person language
380
  - Write the repair for them
381
  - Push them to apologize more than they mean
382
  - Make it about being "right\""""
static/index.html CHANGED
@@ -362,6 +362,35 @@
362
  background: var(--tend-color);
363
  }
364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
  /* Conversation */
366
  .conversation-area {
367
  flex: 1;
@@ -745,7 +774,7 @@
745
  </div>
746
  <div class="btn-group">
747
  <button class="tend-btn" onclick="useTendTransform()">TEND</button>
748
- <button class="send-btn" onclick="sendMessage()">Send</button>
749
  </div>
750
  </div>
751
  <div class="quick-tools">
@@ -767,6 +796,10 @@
767
  let lastPartnerMessage = '';
768
  let conversationStarted = false;
769
  let nvcStage = 1;
 
 
 
 
770
 
771
  const TOOL_NAMES = {
772
  tend: 'TEND Transform',
@@ -884,14 +917,63 @@
884
  if (selectedCard) selectedCard.classList.add('active');
885
 
886
  activeTool = tool;
 
 
 
 
 
887
  const badge = document.getElementById('active-tool-display');
888
- badge.innerHTML = `<span class="active-tool-badge ${tool === 'tend' ? 'tend' : ''}">${TOOL_NAMES[tool]}</span>`;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
889
 
890
  if (tool !== 'tend') {
891
  useTool(tool);
892
  }
893
  }
894
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
895
  async function useTendTransform() {
896
  const userInput = document.getElementById('user-input').value.trim();
897
  if (!userInput) {
@@ -1036,6 +1118,12 @@
1036
  }
1037
 
1038
  async function sendMessage() {
 
 
 
 
 
 
1039
  if (!conversationStarted) {
1040
  startConversation();
1041
  return;
 
362
  background: var(--tend-color);
363
  }
364
 
365
+ .active-tool-badge.workspace {
366
+ background: var(--warning);
367
+ color: #000;
368
+ }
369
+
370
+ .workspace-notice {
371
+ background: rgba(245, 158, 11, 0.15);
372
+ border: 1px solid var(--warning);
373
+ border-radius: 8px;
374
+ padding: 10px 14px;
375
+ margin-bottom: 12px;
376
+ font-size: 0.85rem;
377
+ color: var(--warning);
378
+ }
379
+
380
+ .input-area.workspace-mode {
381
+ background: rgba(245, 158, 11, 0.05);
382
+ border-top-color: var(--warning);
383
+ }
384
+
385
+ .send-btn.workspace-mode {
386
+ background: var(--warning);
387
+ color: #000;
388
+ }
389
+
390
+ .send-btn.workspace-mode:hover {
391
+ background: #d97706;
392
+ }
393
+
394
  /* Conversation */
395
  .conversation-area {
396
  flex: 1;
 
774
  </div>
775
  <div class="btn-group">
776
  <button class="tend-btn" onclick="useTendTransform()">TEND</button>
777
+ <button class="send-btn" id="send-btn" onclick="sendMessage()">Send</button>
778
  </div>
779
  </div>
780
  <div class="quick-tools">
 
796
  let lastPartnerMessage = '';
797
  let conversationStarted = false;
798
  let nvcStage = 1;
799
+ let inWorkspaceMode = false; // When true, messages go to tool, not partner
800
+
801
+ // Tools that are "workspace" modes - messages don't go to partner
802
+ const WORKSPACE_TOOLS = ['guided_nvc', 'repair_support', 'somatic_checkin', 'pure_questioning'];
803
 
804
  const TOOL_NAMES = {
805
  tend: 'TEND Transform',
 
917
  if (selectedCard) selectedCard.classList.add('active');
918
 
919
  activeTool = tool;
920
+
921
+ // Check if this is a workspace tool
922
+ inWorkspaceMode = WORKSPACE_TOOLS.includes(tool);
923
+
924
+ // Update UI to show workspace mode
925
  const badge = document.getElementById('active-tool-display');
926
+ const sendBtn = document.getElementById('send-btn');
927
+ const inputArea = document.querySelector('.input-area');
928
+
929
+ if (inWorkspaceMode) {
930
+ badge.innerHTML = `<span class="active-tool-badge workspace">${TOOL_NAMES[tool]} (Workspace)</span>`;
931
+ sendBtn.textContent = 'Submit to Tool';
932
+ sendBtn.classList.add('workspace-mode');
933
+ inputArea.classList.add('workspace-mode');
934
+ // Show workspace notice
935
+ if (!document.getElementById('workspace-notice')) {
936
+ const notice = document.createElement('div');
937
+ notice.id = 'workspace-notice';
938
+ notice.className = 'workspace-notice';
939
+ notice.innerHTML = '<strong>Workspace Mode:</strong> Your messages go to this tool, not your partner. Exit by clicking another tool or TEND.';
940
+ inputArea.insertBefore(notice, inputArea.firstChild);
941
+ }
942
+ } else {
943
+ badge.innerHTML = `<span class="active-tool-badge ${tool === 'tend' ? 'tend' : ''}">${TOOL_NAMES[tool]}</span>`;
944
+ sendBtn.textContent = 'Send';
945
+ sendBtn.classList.remove('workspace-mode');
946
+ inputArea.classList.remove('workspace-mode');
947
+ // Remove workspace notice
948
+ const notice = document.getElementById('workspace-notice');
949
+ if (notice) notice.remove();
950
+ }
951
 
952
  if (tool !== 'tend') {
953
  useTool(tool);
954
  }
955
  }
956
 
957
+ function exitWorkspaceMode() {
958
+ inWorkspaceMode = false;
959
+ activeTool = 'tend';
960
+ const sendBtn = document.getElementById('send-btn');
961
+ const inputArea = document.querySelector('.input-area');
962
+ const badge = document.getElementById('active-tool-display');
963
+
964
+ sendBtn.textContent = 'Send';
965
+ sendBtn.classList.remove('workspace-mode');
966
+ inputArea.classList.remove('workspace-mode');
967
+ badge.innerHTML = '<span class="active-tool-badge tend">TEND Ready</span>';
968
+
969
+ const notice = document.getElementById('workspace-notice');
970
+ if (notice) notice.remove();
971
+
972
+ document.querySelectorAll('.tool-card, .tend-tool').forEach(card => {
973
+ card.classList.remove('active');
974
+ });
975
+ }
976
+
977
  async function useTendTransform() {
978
  const userInput = document.getElementById('user-input').value.trim();
979
  if (!userInput) {
 
1118
  }
1119
 
1120
  async function sendMessage() {
1121
+ // If in workspace mode, route to the active tool instead
1122
+ if (inWorkspaceMode) {
1123
+ await useTool(activeTool);
1124
+ return;
1125
+ }
1126
+
1127
  if (!conversationStarted) {
1128
  startConversation();
1129
  return;