forge-openclaw-plugin 0.2.99 → 0.2.101

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 (149) hide show
  1. package/dist/assets/activity-copy-Bj4h9OcF.js +1 -0
  2. package/dist/assets/activity-page-CpjuNSHw.js +1 -0
  3. package/dist/assets/ai-surface-workspace-DEAFZruS.js +1 -0
  4. package/dist/assets/atlas-panel-CdVNPotj.js +1 -0
  5. package/dist/assets/{board-Ju0h0SeG.js → board-BkDRaMp6.js} +1 -1
  6. package/dist/assets/calendar-display-preferences-Cid-2RnL.js +1 -0
  7. package/dist/assets/calendar-page-DNNt6lfz.js +1 -0
  8. package/dist/assets/calendar-rules-DNJFNsxi.js +1 -0
  9. package/dist/assets/calendar-ui-Cy1XRwzV.js +1 -0
  10. package/dist/assets/calendar-week-toolbar-BbPwYeN0.js +1 -0
  11. package/dist/assets/charts-P7EVhIog.js +36 -0
  12. package/dist/assets/companion-sync-lab-page-KxEDigM6.js +1 -0
  13. package/dist/assets/daily-metrics-dashboard-B3cqJgDt.js +1 -0
  14. package/dist/assets/date-keys-Cj1G3TOn.js +1 -0
  15. package/dist/assets/entity-links-DwpxhW2H.js +1 -0
  16. package/dist/assets/entity-note-count-link-DrhjJZ4i.js +1 -0
  17. package/dist/assets/entity-notes-surface-CkcRsKJQ.js +1 -0
  18. package/dist/assets/execution-board-D07gOocB.js +1 -0
  19. package/dist/assets/faceted-token-search-BxRRcM3q.js +1 -0
  20. package/dist/assets/flagship-signal-deck-cmy82b8_.js +1 -0
  21. package/dist/assets/floating-action-menu-Fs_ZiUMo.js +1 -0
  22. package/dist/assets/forms-BFlTgZ3W.js +1 -0
  23. package/dist/assets/goal-detail-page-CqLiNz4f.js +1 -0
  24. package/dist/assets/goals-page-BTk7mg_T.js +1 -0
  25. package/dist/assets/graph-BZV40eAE.css +1 -0
  26. package/dist/assets/graph-D6JLqDbD.js +318 -0
  27. package/dist/assets/habits-page-BJxagdzx.js +1 -0
  28. package/dist/assets/health-link-options-Cpx8w7uM.js +1 -0
  29. package/dist/assets/index-CF4J4R9L.js +19 -0
  30. package/dist/assets/index-CZbuZQjw.css +1 -0
  31. package/dist/assets/insight-flow-dialog-8f3D0GuC.js +1 -0
  32. package/dist/assets/insights-page-D6rOa7uk.js +8 -0
  33. package/dist/assets/kanban-page-XQ7Se6dH.js +1 -0
  34. package/dist/assets/knowledge-graph-page-BtAg8iv3.js +1 -0
  35. package/dist/assets/life-force-page-Dy0JTS2G.js +1 -0
  36. package/dist/assets/life-force-workspace-OfyB9HJM.js +1 -0
  37. package/dist/assets/maps-B-YMMjus.css +1 -0
  38. package/dist/assets/maps-ClgJoCjz.js +803 -0
  39. package/dist/assets/metric-tile-DKpo-8xw.js +1 -0
  40. package/dist/assets/{motion-DRPJkN3a.js → motion-BeD44FeG.js} +1 -1
  41. package/dist/assets/movement-page-Bg_T_Stx.js +1 -0
  42. package/dist/assets/note-markdown-N-uxD3Xt.js +3 -0
  43. package/dist/assets/note-tags-input-Cdu7wiw6.js +1 -0
  44. package/dist/assets/notes-page-CKXnF_KU.js +1 -0
  45. package/dist/assets/open-in-graph-button-IXe9SGth.js +1 -0
  46. package/dist/assets/orbit-map-Dzi6KliQ.js +1 -0
  47. package/dist/assets/overview-page-1miYqaVS.js +1 -0
  48. package/dist/assets/page-hero-DRy5b2MU.js +1 -0
  49. package/dist/assets/pill-cluster-C9QczVJ2.js +1 -0
  50. package/dist/assets/preference-entity-handoff-button-5PzUn42S.js +1 -0
  51. package/dist/assets/preferences-page-DtNaF5Q3.js +1 -0
  52. package/dist/assets/project-collections-xPz2mlRr.js +1 -0
  53. package/dist/assets/project-detail-page-BXK5-4xW.js +1 -0
  54. package/dist/assets/project-management-hierarchy-page-DtRpMABw.js +1 -0
  55. package/dist/assets/project-management-section-nav-P3ixzPa-.js +1 -0
  56. package/dist/assets/projects-page-C5ViRuf4.js +1 -0
  57. package/dist/assets/psyche-behaviors-page-Dco46sC4.js +5 -0
  58. package/dist/assets/psyche-flashcards-page-ZcoEB8gV.js +1 -0
  59. package/dist/assets/psyche-goal-map-page-CLBAQOI0.js +1 -0
  60. package/dist/assets/psyche-graph-k4tX2tdp.js +1 -0
  61. package/dist/assets/psyche-metrics-page-CuR9oqEy.js +1 -0
  62. package/dist/assets/psyche-mode-guide-page-hIVXcCnE.js +1 -0
  63. package/dist/assets/psyche-modes-page-0lYtBlhO.js +1 -0
  64. package/dist/assets/psyche-page-VZ9k9ISp.js +1 -0
  65. package/dist/assets/psyche-patterns-page-gx5nmdGq.js +5 -0
  66. package/dist/assets/psyche-questionnaire-builder-page-Bn0TOISd.js +1 -0
  67. package/dist/assets/psyche-questionnaire-detail-page-CmVzSd_s.js +1 -0
  68. package/dist/assets/psyche-questionnaire-run-detail-page-BsMbmXCG.js +1 -0
  69. package/dist/assets/psyche-questionnaire-run-page-CgkRL2vi.js +1 -0
  70. package/dist/assets/psyche-questionnaires-page-D7V8uLXM.js +1 -0
  71. package/dist/assets/psyche-report-detail-page-OlFq57eL.js +3 -0
  72. package/dist/assets/psyche-reports-page-dVUZjna1.js +1 -0
  73. package/dist/assets/psyche-schemas-HFmg37Wj.js +1 -0
  74. package/dist/assets/psyche-schemas-beliefs-page-BCgc8FUd.js +9 -0
  75. package/dist/assets/psyche-screen-time-page-B_6BT_WN.js +1 -0
  76. package/dist/assets/psyche-self-observation-page-CEG5mluK.js +1 -0
  77. package/dist/assets/psyche-values-page-DRbRfEd6.js +5 -0
  78. package/dist/assets/query-cache-IQ8W-LNC.js +1 -0
  79. package/dist/assets/report-chain-fields-CALCV3V5.js +1 -0
  80. package/dist/assets/rewards-page-DmC4R_Ps.js +1 -0
  81. package/dist/assets/scheduling-rules-editor-D02s70hr.js +1 -0
  82. package/dist/assets/schema-badge-BZO-qNhO.js +1 -0
  83. package/dist/assets/schema-visuals-D6nxjbYC.js +1 -0
  84. package/dist/assets/select-menu-fYyreSdQ.js +1 -0
  85. package/dist/assets/settings-agents-page-C_v_hMJF.js +6 -0
  86. package/dist/assets/settings-bin-page-DY5bg81n.js +1 -0
  87. package/dist/assets/settings-calendar-page-D1CzE6cg.js +5 -0
  88. package/dist/assets/settings-data-page-CHRQFU9H.js +1 -0
  89. package/dist/assets/settings-logs-page-B04pUwEv.js +1 -0
  90. package/dist/assets/settings-mobile-page-D9kTlYDS.js +1 -0
  91. package/dist/assets/settings-models-page-D26270R2.js +1 -0
  92. package/dist/assets/settings-page-DYDTFlnv.js +1 -0
  93. package/dist/assets/settings-rewards-page-cl4vqqO_.js +1 -0
  94. package/dist/assets/settings-section-nav-DSOuht_F.js +1 -0
  95. package/dist/assets/settings-users-page-BU79JB_T.js +1 -0
  96. package/dist/assets/settings-wiki-page-DwAUlyA3.js +1 -0
  97. package/dist/assets/sleep-page-D8NbdhyS.js +1 -0
  98. package/dist/assets/sports-page-CV4Cnzwn.js +1 -0
  99. package/dist/assets/state-B-4sS1xO.js +1 -0
  100. package/dist/assets/strategies-page-C4qvXnql.js +1 -0
  101. package/dist/assets/strategy-detail-page-DJLo5rfy.js +1 -0
  102. package/dist/assets/strategy-dialog-D3AuUlVz.js +1 -0
  103. package/dist/assets/{table-DewbFlTh.js → table-WfAPUppN.js} +1 -1
  104. package/dist/assets/task-detail-page-z-9u9rF0.js +1 -0
  105. package/dist/assets/timebox-planning-dialog-DB6FLqmI.js +1 -0
  106. package/dist/assets/today-page-BKlu6gx5.js +1 -0
  107. package/dist/assets/training-load-page-CyJQqo_3.js +1 -0
  108. package/dist/assets/{ui-C2IvSrAz.js → ui-C13Nbgas.js} +4 -4
  109. package/dist/assets/use-psyche-focus-target-C1C_XjYG.js +1 -0
  110. package/dist/assets/vendor-CRS-psbw.css +1 -0
  111. package/dist/assets/vendor-DHkYh85p.js +1052 -0
  112. package/dist/assets/vitals-page-qre17Nw8.js +1 -0
  113. package/dist/assets/weekly-review-page-Cz4vkRcx.js +1 -0
  114. package/dist/assets/weight-loss-page-BQrnOI0y.js +1 -0
  115. package/dist/assets/wiki-article-markdown-DdiR2TJE.js +4 -0
  116. package/dist/assets/wiki-editor-page-DqwoqVFb.js +26 -0
  117. package/dist/assets/wiki-ingest-history-page--evBLbOw.js +1 -0
  118. package/dist/assets/wiki-ingest-modal--ohzFnj2.js +1 -0
  119. package/dist/assets/wiki-page-B_VJFBPA.js +1 -0
  120. package/dist/assets/workbench-flow-page-Du62mtJU.js +5 -0
  121. package/dist/assets/workbench-page-4MKr3iRm.js +1 -0
  122. package/dist/assets/workout-detail-page-DfUbYYw1.js +2 -0
  123. package/dist/index.html +148 -9
  124. package/dist/openclaw/tools.js +340 -0
  125. package/dist/server/server/migrations/065_weight_loss_nutrition_insights.sql +236 -0
  126. package/dist/server/server/migrations/066_watch_action_receipts.sql +20 -0
  127. package/dist/server/server/src/app.js +266 -13
  128. package/dist/server/server/src/health-weight-loss.js +1378 -0
  129. package/dist/server/server/src/health.js +188 -35
  130. package/dist/server/server/src/openapi.js +449 -0
  131. package/dist/server/server/src/services/context.js +6 -7
  132. package/dist/server/server/src/services/doctor.js +39 -4
  133. package/dist/server/server/src/services/gamification.js +146 -34
  134. package/dist/server/server/src/watch-mobile.js +576 -4
  135. package/dist/server/server/src/web.js +18 -5
  136. package/dist/server/src/components/ui/info-tooltip.js +48 -3
  137. package/dist/server/src/lib/api.js +131 -0
  138. package/dist/server/src/lib/weight-loss-types.js +1 -0
  139. package/openclaw.plugin.json +14 -1
  140. package/package.json +1 -1
  141. package/server/migrations/065_weight_loss_nutrition_insights.sql +236 -0
  142. package/server/migrations/066_watch_action_receipts.sql +20 -0
  143. package/skills/forge-openclaw/SKILL.md +26 -5
  144. package/skills/forge-openclaw/entity_conversation_playbooks.md +134 -5
  145. package/skills/forge-openclaw/psyche_entity_playbooks.md +45 -0
  146. package/dist/assets/index-Cn5Wpwau.css +0 -1
  147. package/dist/assets/index-CwvGs8n4.js +0 -91
  148. package/dist/assets/vendor-B-Lq_OG3.css +0 -1
  149. package/dist/assets/vendor-DL2K5ayT.js +0 -2186
@@ -83,6 +83,9 @@ Forge correctly, and gather only the structure that still matters.
83
83
  - Do not read schema fields out loud unless the user explicitly wants a checklist.
84
84
  - One focused question is the default. Ask two only when both questions serve the same
85
85
  job and the user is steady enough for it.
86
+ - For operational create flows, do not bundle name, scope, and timing into one opener
87
+ when the user has already supplied part of it. Ask the route-changing missing detail
88
+ first, then move to the next detail only if it is still unknown.
86
89
  - Do not ask the user to do naming work alone when the meaning is already clear. Offer
87
90
  a tentative title or formulation and invite correction.
88
91
  - When the meaning is clearer than the wording, offer a tentative title or summary
@@ -132,6 +135,32 @@ choice is an internal classification step, not a user-facing menu.
132
135
  - Once the lane is selected, use the exact route key internally and do not invent a
133
136
  friendlier path.
134
137
 
138
+ ## Mixed-intent sequencing
139
+
140
+ Use this when one user message combines several Forge jobs, such as "review this and
141
+ fix it", "save the pattern and make me a card", or "inspect the run and publish the
142
+ output".
143
+
144
+ - Name the primary job first in plain language, then do the smallest first action that
145
+ reduces uncertainty. Do not answer a mixed request by asking a broad "what do you
146
+ want to do?" question when the verbs already show the sequence.
147
+ - If a read changes the truth of a later write, read first. Movement timeline or box
148
+ detail comes before correction; Workbench run or node detail comes before editing a
149
+ flow or published output; Life Force overview comes before changing planning
150
+ assumptions when the current energy picture is uncertain.
151
+ - If a Psyche formulation and a utility record are both requested, formulate the
152
+ Psyche record first, then create the support record from that accepted wording. A
153
+ behavior pattern can lead to a flashcard, note, value link, task, or habit, but the
154
+ agent should not ask for every adjacent record at once.
155
+ - If the user asks to save and act, finish the write shape before asking for follow-up
156
+ action details unless the action changes which record should be saved.
157
+ - If two routes are needed, keep them in order internally and tell the user the
158
+ product sequence briefly: "I will check the timeline first, then correct the missing
159
+ block if the span matches." Avoid route-key language unless the user asks.
160
+ - After the first action, ask only the next decision-relevant question. Do not restart
161
+ intake for the second action when the first answer already supplied the wording,
162
+ span, flow, run, node, weekday, or link.
163
+
135
164
  ## Psyche and memory routing
136
165
 
137
166
  Self-observation is not the default container for psychological material. Use it only
@@ -379,6 +408,14 @@ still knowing the exact write/read family before it acts.
379
408
  user wants training-load trends, acute/chronic ratio, HR zone distribution,
380
409
  threshold exposure, VO2max/resting-HR context, or optimization targets before
381
410
  deciding whether a specific `workout_session` needs notes or links.
411
+ - `weight_loss`: nutrition and body-composition health surface. Use
412
+ `forge_get_weight_loss_overview` or `/api/v1/health/weight-loss` when the user
413
+ wants calorie balance, food quality, protein/fiber targets, training fuel,
414
+ body trend, aesthetic look, subjective energy, cravings, gut comfort,
415
+ hypotheses, or nutrition experiments. Use `forge_parse_food_log_with_chatgpt`
416
+ for rough meal text/photo descriptions through the configured `openai-codex`
417
+ ChatGPT subscription connection, then use `forge_log_food` and the body,
418
+ appearance, subjective, gut, and experiment tools for durable evidence.
382
419
  - `movement`: specialized domain surface. Use the dedicated movement routes for day,
383
420
  month, all-time, timeline, places, trip detail, selection aggregates, manual
384
421
  overlays, and repair actions.
@@ -689,6 +726,57 @@ Connect:
689
726
  - If the user is emotionally loaded but the record is still non-Psyche, reflect the
690
727
  lived stake once and then return to the one operational question that still matters.
691
728
 
729
+ ## Search-before-write and existing-record disambiguation
730
+
731
+ Use this before a create or update when a near-duplicate, existing target, or owner
732
+ scope could change the write.
733
+
734
+ - For normal stored entities, search the shared batch route by entity type, useful
735
+ title or wording, linked owner, and distinctive content before creating when
736
+ duplicate risk is plausible. Do not ask the user to re-supply fields that a quick
737
+ search can answer.
738
+ - If a likely existing record appears, ask the narrow product question: should this
739
+ update that record, link to it, or become a separate new record? Do not reopen the
740
+ whole create flow.
741
+ - For update requests, look up the current record before asking for replacement
742
+ wording when the user has not provided the current id, title, or owner scope.
743
+ - For Psyche, a similar existing belief, pattern, mode, trigger report, value, or
744
+ flashcard is not a blocker. Treat it as a choice between updating, linking, or
745
+ saving a distinct version of the experience.
746
+ - For `wiki_page` and `calendar_connection`, use the dedicated search/list/read routes
747
+ before creating another page or connection. Do not use batch entity search as the
748
+ source of truth for these specialized CRUD surfaces.
749
+ - For Movement, Life Force, and Workbench, do not use batch duplicate search. Use the
750
+ dedicated read lane: known places or timeline for Movement, overview/profile or
751
+ weekday template for Life Force, and saved flows, run history, node result, latest
752
+ output, or published output for Workbench.
753
+ - If the user already chose "new record" after seeing a near match, keep going with
754
+ create. Do not challenge the choice repeatedly.
755
+
756
+ ## Destructive and replacement actions
757
+
758
+ Use this when the next action would delete, archive, invalidate, overwrite, replace,
759
+ disconnect, or substantially narrow a record.
760
+
761
+ - Confirm the exact target and the preservation need before destructive work. Ask one
762
+ narrow question such as what should be deleted versus kept, whether history should
763
+ remain visible, or what future behavior should change.
764
+ - For normal stored entities, prefer the normal soft-delete path unless the user
765
+ explicitly asks for hard deletion or permanent removal. Do not make the user choose
766
+ a delete mode unless it changes the actual action.
767
+ - For Psyche records, do not delete an old belief, pattern, mode, trigger report,
768
+ value, or flashcard just because a newer formulation exists. Ask whether the old
769
+ record should be updated, linked as history, archived, or kept distinct.
770
+ - For Movement repair, distinguish deleting a user-defined overlay from invalidating
771
+ an automatic box or deleting an already-recorded stay, trip, or point. Read the
772
+ specific span first when the target is uncertain.
773
+ - For calendar connections, Workbench flows, wiki pages, and questionnaire
774
+ instruments, ask what downstream sync, published output, backlinks, run history,
775
+ or completed runs should remain understandable before deleting or replacing the
776
+ saved object.
777
+ - If the user has already explicitly confirmed the target and preservation choice,
778
+ act. Do not add a ceremonial second confirmation.
779
+
692
780
  ## Ready-to-save check
693
781
 
694
782
  Before saving, make sure you can answer all of these in plain language:
@@ -1053,7 +1141,7 @@ Ready to save when:
1053
1141
 
1054
1142
  Preferred opening question:
1055
1143
 
1056
- - "What is the event, and when should it happen in your local time?"
1144
+ - "What time should Forge hold for this event in your local timezone?"
1057
1145
 
1058
1146
  ## Work Block Template
1059
1147
 
@@ -1081,7 +1169,7 @@ Ready to save when:
1081
1169
 
1082
1170
  Preferred opening question:
1083
1171
 
1084
- - "What recurring block do you want to set up, and when should it repeat?"
1172
+ - "When should this recurring block repeat?"
1085
1173
 
1086
1174
  ## Task Timebox
1087
1175
 
@@ -1109,7 +1197,7 @@ Ready to save when:
1109
1197
 
1110
1198
  Preferred opening question:
1111
1199
 
1112
- - "Which task are you trying to make time for, and when should the slot be?"
1200
+ - "When should Forge reserve focused time for this task?"
1113
1201
 
1114
1202
  ## Task Run
1115
1203
 
@@ -1491,6 +1579,47 @@ Preferred opening question:
1491
1579
 
1492
1580
  - "What training-load decision are you trying to support right now?"
1493
1581
 
1582
+ ## Weight Loss
1583
+
1584
+ Aim: review and capture nutrition, body-composition, sport-fueling, aesthetic,
1585
+ subjective-energy, craving, and gut-comfort evidence before turning observations
1586
+ into a testable food or training hypothesis.
1587
+
1588
+ Arc:
1589
+
1590
+ 1. Ask what link the user is trying to understand: fat loss pace, food intake,
1591
+ training fuel, look/puffiness, energy, cravings, gut comfort, or a specific
1592
+ meal reaction.
1593
+ 2. Read `forge_get_weight_loss_overview` before asking the user to reconstruct
1594
+ recent food, weight, workouts, or subjective state from memory.
1595
+ 3. Use `forge_parse_food_log_with_chatgpt` for rough meal text or photo
1596
+ descriptions. This must go through Forge's configured `openai-codex` ChatGPT
1597
+ subscription connection, not a metered OpenAI API path.
1598
+ 4. Use `forge_log_food`, `forge_log_body_checkin`,
1599
+ `forge_log_appearance_checkin`, `forge_log_subjective_food_effect`, and
1600
+ `forge_log_gut_checkin` to preserve the user's actual evidence.
1601
+ 5. Use `forge_get_nutrition_patterns`, `forge_start_nutrition_experiment`, and
1602
+ `forge_update_nutrition_experiment` when repeated observations should become
1603
+ an N-of-1 test instead of vague advice.
1604
+
1605
+ Helpful follow-up lanes:
1606
+
1607
+ - whether the decision is weight trend, protein/fiber sufficiency, sport fuel,
1608
+ visual look, water retention, gut comfort, cravings, or energy
1609
+ - whether a meal should be confirmed precisely or logged as a candidate estimate
1610
+ - which outcome metric should define a nutrition experiment before interpreting it
1611
+
1612
+ Route note:
1613
+
1614
+ - `weight_loss` is a health read model plus dedicated nutrition write workflow.
1615
+ Use `/api/v1/health/weight-loss` or `forge_get_weight_loss_overview` for the
1616
+ overview. Do not invent generic batch entities for food logs or body check-ins
1617
+ when the dedicated tools exist.
1618
+
1619
+ Preferred opening question:
1620
+
1621
+ - "What food-body link are you trying to test or understand right now?"
1622
+
1494
1623
  ## Calendar Overview
1495
1624
 
1496
1625
  Aim: review commitments, work blocks, provider state, and existing timeboxes before
@@ -1578,7 +1707,7 @@ Ready to act when:
1578
1707
 
1579
1708
  Preferred opening question:
1580
1709
 
1581
- - "Which calendar provider are you trying to connect, and what do you want Forge to do with it?"
1710
+ - "What workflow do you want this calendar connection to unlock?"
1582
1711
 
1583
1712
  ## Preference Judgment
1584
1713
 
@@ -2183,7 +2312,7 @@ Ready to act when:
2183
2312
 
2184
2313
  Preferred opening question:
2185
2314
 
2186
- - "What do you want from this questionnaire run right now: start, continue, review, or finish it?"
2315
+ - "Are you trying to start, continue, review, or finish this run right now?"
2187
2316
 
2188
2317
  ## Event Type
2189
2318
 
@@ -197,6 +197,25 @@ material without a usable formulation.
197
197
  - Do not make the user supply every interpretation alone. If the sequence is clear
198
198
  enough, do the formulation work in plain language and invite correction.
199
199
 
200
+ ## Hypothesis Wording Shape
201
+
202
+ Use this when reflection alone would leave the user with warmth but no clearer
203
+ formulation.
204
+
205
+ 1. Start with the evidence in the user's own example:
206
+ "When X happened, Y seemed to happen inside you."
207
+ 2. Offer one testable interpretation:
208
+ "One hypothesis is that this response is trying to protect you from Z."
209
+ 3. Name the function without blame:
210
+ what it predicts, what it prevents, what relief it creates, or what it costs.
211
+ 4. Ask for correction:
212
+ "Does that fit, or is the danger/need somewhere else?"
213
+
214
+ Do not say "this is your schema" or "this is your mode" as a verdict. Say what in the
215
+ example makes the hypothesis plausible, then let the user correct the danger,
216
+ protection, payoff, cost, or wording. If the correction is usable, revise once and move
217
+ toward the record shape instead of asking for another broad story.
218
+
200
219
  ## Hypothesis To Record Bridge
201
220
 
202
221
  Once a hypothesis lands or is corrected, turn it into a saveable Forge shape instead
@@ -452,6 +471,22 @@ Use `forge_search_entities` before creating when a duplicate is plausible. Use
452
471
  and useful links are clear enough. Preserve nuance in a linked `note` when the
453
472
  experience is richer than the normalized fields.
454
473
 
474
+ When search finds a similar Psyche record, do not treat similarity as a cold duplicate
475
+ failure. Briefly name the difference that may matter and ask one narrow question:
476
+ should this update the existing record, link to it, or stand as a distinct new version
477
+ of the experience? For beliefs, compare the sentence; for patterns, compare the cue,
478
+ payoff, and cost; for modes, compare the protective job; for trigger reports, compare
479
+ the episode; for flashcards, compare the urge sentence and message. If the user wants
480
+ a new record after seeing the near match, respect that and save the distinct version.
481
+
482
+ For destructive or replacement requests, preserve therapeutic history unless the user
483
+ clearly wants removal. If a new belief, pattern, mode, trigger interpretation, value
484
+ wording, or flashcard message supersedes an old one, ask whether the old record should
485
+ be updated, linked as history, archived, or kept as a distinct version. Do not delete a
486
+ Psyche record merely because a cleaner formulation now exists. If the user already
487
+ confirmed deletion and the exact target is clear, honor the request without reopening
488
+ the whole exploration.
489
+
455
490
  Do not divert Psyche material into `self_observation` just because it started as an
456
491
  episode. Use `trigger_report` for one emotionally meaningful incident, use
457
492
  `behavior_pattern` for a recurring functional loop, use `belief_entry` for one
@@ -459,6 +494,16 @@ explicit sentence, and use `mode_guide_session` or `mode_profile` when a part-st
459
494
  central. Use `flashcard` when the user needs a small rehearsable message to retrieve
460
495
  during an urge, trigger, mode activation, belief activation, or values-based pivot.
461
496
 
497
+ When the user asks for understanding plus an immediate support action, keep the order
498
+ therapeutic and practical. Clarify or formulate the primary Psyche record first, then
499
+ derive the support action from the accepted wording: a `behavior_pattern` can produce a
500
+ `flashcard`, a `belief_entry` can produce a counter-message or note, a `trigger_report`
501
+ can link to an `event_type` or `emotion_definition`, and a `mode_guide_session` can
502
+ later become a durable `mode_profile`. Do not ask for every adjacent entity at once.
503
+ If the user already supplied a clear action, say the sequence briefly in product
504
+ language and ask only for the missing wording, cue, or link that changes the first
505
+ save.
506
+
462
507
  When a user says they feel an urge or asks for help not doing something, search
463
508
  existing `flashcard` records before creating a new one. Use `forge_search_entities`
464
509
  with `entityTypes: ["flashcard"]` and query text from the urge, tags, trigger