@auxiora/personality 1.0.0 → 1.3.0

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 (162) hide show
  1. package/dist/__tests__/architect-awareness-collector.test.d.ts +2 -0
  2. package/dist/__tests__/architect-awareness-collector.test.d.ts.map +1 -0
  3. package/dist/__tests__/architect-awareness-collector.test.js +57 -0
  4. package/dist/__tests__/architect-awareness-collector.test.js.map +1 -0
  5. package/dist/__tests__/architect-bridge.test.d.ts +2 -0
  6. package/dist/__tests__/architect-bridge.test.d.ts.map +1 -0
  7. package/dist/__tests__/architect-bridge.test.js +59 -0
  8. package/dist/__tests__/architect-bridge.test.js.map +1 -0
  9. package/dist/__tests__/soul-bias-parser.test.d.ts +2 -0
  10. package/dist/__tests__/soul-bias-parser.test.d.ts.map +1 -0
  11. package/dist/__tests__/soul-bias-parser.test.js +47 -0
  12. package/dist/__tests__/soul-bias-parser.test.js.map +1 -0
  13. package/dist/architect-awareness-collector.d.ts +20 -0
  14. package/dist/architect-awareness-collector.d.ts.map +1 -0
  15. package/dist/architect-awareness-collector.js +41 -0
  16. package/dist/architect-awareness-collector.js.map +1 -0
  17. package/dist/architect-bridge.d.ts +35 -0
  18. package/dist/architect-bridge.d.ts.map +1 -0
  19. package/dist/architect-bridge.js +70 -0
  20. package/dist/architect-bridge.js.map +1 -0
  21. package/dist/index.d.ts +5 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +6 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/marketplace/schema.d.ts +6 -6
  26. package/dist/soul-bias-parser.d.ts +10 -0
  27. package/dist/soul-bias-parser.d.ts.map +1 -0
  28. package/dist/soul-bias-parser.js +48 -0
  29. package/dist/soul-bias-parser.js.map +1 -0
  30. package/lib/context-detector.d.ts +23 -0
  31. package/lib/context-detector.js +275 -0
  32. package/lib/context-profiles.d.ts +3 -0
  33. package/lib/context-profiles.js +550 -0
  34. package/lib/conversation-context.d.ts +70 -0
  35. package/lib/conversation-context.js +144 -0
  36. package/lib/conversation-export.d.ts +77 -0
  37. package/lib/conversation-export.js +254 -0
  38. package/lib/correction-store.d.ts +53 -0
  39. package/lib/correction-store.js +185 -0
  40. package/lib/custom-weights.d.ts +43 -0
  41. package/lib/custom-weights.js +164 -0
  42. package/lib/emotional-overrides.d.ts +14 -0
  43. package/lib/emotional-overrides.js +86 -0
  44. package/lib/emotional-tracker.d.ts +41 -0
  45. package/lib/emotional-tracker.js +210 -0
  46. package/lib/index.d.ts +161 -0
  47. package/lib/index.d.ts.map +1 -0
  48. package/lib/index.js +486 -0
  49. package/lib/index.js.map +1 -0
  50. package/lib/persistence-adapter.d.ts +55 -0
  51. package/lib/persistence-adapter.js +50 -0
  52. package/lib/persistence.d.ts +49 -0
  53. package/lib/persistence.js +116 -0
  54. package/lib/prompt-assembler.d.ts +16 -0
  55. package/lib/prompt-assembler.js +66 -0
  56. package/lib/recommender.d.ts +25 -0
  57. package/lib/recommender.js +125 -0
  58. package/lib/schema.d.ts +173 -0
  59. package/lib/schema.d.ts.map +1 -0
  60. package/lib/schema.js +2 -0
  61. package/lib/schema.js.map +1 -0
  62. package/lib/source-map.d.ts +9 -0
  63. package/lib/source-map.js +223 -0
  64. package/lib/system-prompt.d.ts +2 -0
  65. package/lib/system-prompt.js +102 -0
  66. package/lib/the-architect/context-detector.d.ts +23 -0
  67. package/lib/the-architect/context-detector.d.ts.map +1 -0
  68. package/lib/the-architect/context-detector.js +275 -0
  69. package/lib/the-architect/context-detector.js.map +1 -0
  70. package/lib/the-architect/context-profiles.d.ts +3 -0
  71. package/lib/the-architect/context-profiles.d.ts.map +1 -0
  72. package/lib/the-architect/context-profiles.js +550 -0
  73. package/lib/the-architect/context-profiles.js.map +1 -0
  74. package/lib/the-architect/conversation-context.d.ts +70 -0
  75. package/lib/the-architect/conversation-context.js +144 -0
  76. package/lib/the-architect/conversation-context.js.map +1 -0
  77. package/lib/the-architect/conversation-export.d.ts +77 -0
  78. package/lib/the-architect/conversation-export.js +254 -0
  79. package/lib/the-architect/correction-store.d.ts +53 -0
  80. package/lib/the-architect/correction-store.d.ts.map +1 -0
  81. package/lib/the-architect/correction-store.js +185 -0
  82. package/lib/the-architect/correction-store.js.map +1 -0
  83. package/lib/the-architect/custom-weights.d.ts +43 -0
  84. package/lib/the-architect/custom-weights.js +164 -0
  85. package/lib/the-architect/emotional-overrides.d.ts +14 -0
  86. package/lib/the-architect/emotional-overrides.d.ts.map +1 -0
  87. package/lib/the-architect/emotional-overrides.js +86 -0
  88. package/lib/the-architect/emotional-overrides.js.map +1 -0
  89. package/lib/the-architect/emotional-tracker.d.ts +41 -0
  90. package/lib/the-architect/emotional-tracker.js +210 -0
  91. package/lib/the-architect/index.d.ts +161 -0
  92. package/lib/the-architect/index.d.ts.map +1 -0
  93. package/lib/the-architect/index.js +486 -0
  94. package/lib/the-architect/index.js.map +1 -0
  95. package/lib/the-architect/persistence-adapter.d.ts +55 -0
  96. package/lib/the-architect/persistence-adapter.js +50 -0
  97. package/lib/the-architect/persistence.d.ts +49 -0
  98. package/lib/the-architect/persistence.js +116 -0
  99. package/lib/the-architect/prompt-assembler.d.ts +16 -0
  100. package/lib/the-architect/prompt-assembler.d.ts.map +1 -0
  101. package/lib/the-architect/prompt-assembler.js +66 -0
  102. package/lib/the-architect/prompt-assembler.js.map +1 -0
  103. package/lib/the-architect/recommender.d.ts +25 -0
  104. package/lib/the-architect/recommender.js +125 -0
  105. package/lib/the-architect/source-map.d.ts +9 -0
  106. package/lib/the-architect/source-map.d.ts.map +1 -0
  107. package/lib/the-architect/source-map.js +223 -0
  108. package/lib/the-architect/source-map.js.map +1 -0
  109. package/lib/the-architect/system-prompt.d.ts +2 -0
  110. package/lib/the-architect/system-prompt.d.ts.map +1 -0
  111. package/lib/the-architect/system-prompt.js +102 -0
  112. package/lib/the-architect/system-prompt.js.map +1 -0
  113. package/lib/the-architect/trait-to-instruction.d.ts +12 -0
  114. package/lib/the-architect/trait-to-instruction.d.ts.map +1 -0
  115. package/lib/the-architect/trait-to-instruction.js +330 -0
  116. package/lib/the-architect/trait-to-instruction.js.map +1 -0
  117. package/lib/trait-to-instruction.d.ts +12 -0
  118. package/lib/trait-to-instruction.js +330 -0
  119. package/package.json +15 -3
  120. package/modes/advisor.md +0 -24
  121. package/modes/analyst.md +0 -25
  122. package/modes/companion.md +0 -24
  123. package/modes/legal.md +0 -1188
  124. package/modes/operator.md +0 -24
  125. package/modes/roast.md +0 -24
  126. package/modes/socratic.md +0 -24
  127. package/modes/writer.md +0 -23
  128. package/src/__tests__/builder.test.ts +0 -78
  129. package/src/__tests__/conversation-builder.test.ts +0 -386
  130. package/src/__tests__/escalation.test.ts +0 -172
  131. package/src/__tests__/manager.test.ts +0 -141
  132. package/src/__tests__/parser.test.ts +0 -101
  133. package/src/__tests__/security-floor.test.ts +0 -212
  134. package/src/builder.ts +0 -75
  135. package/src/conversation-builder.ts +0 -279
  136. package/src/escalation.ts +0 -162
  137. package/src/index.ts +0 -55
  138. package/src/manager.ts +0 -119
  139. package/src/marketplace/__tests__/scanner.test.ts +0 -159
  140. package/src/marketplace/__tests__/schema.test.ts +0 -269
  141. package/src/marketplace/scanner.ts +0 -85
  142. package/src/marketplace/schema.ts +0 -141
  143. package/src/modes/__tests__/mode-detector.test.ts +0 -149
  144. package/src/modes/__tests__/mode-loader.test.ts +0 -143
  145. package/src/modes/__tests__/prompt-assembler.test.ts +0 -291
  146. package/src/modes/mode-detector.ts +0 -84
  147. package/src/modes/mode-loader.ts +0 -105
  148. package/src/modes/prompt-assembler.ts +0 -278
  149. package/src/modes/types.ts +0 -67
  150. package/src/parser.ts +0 -132
  151. package/src/security-floor.ts +0 -147
  152. package/src/types.ts +0 -27
  153. package/src/voice-profiles.ts +0 -88
  154. package/templates/chill.md +0 -30
  155. package/templates/creative.md +0 -29
  156. package/templates/friendly.md +0 -28
  157. package/templates/mentor.md +0 -31
  158. package/templates/minimal.md +0 -24
  159. package/templates/professional.md +0 -28
  160. package/templates/technical.md +0 -30
  161. package/tsconfig.json +0 -12
  162. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,550 @@
1
+ // ────────────────────────────────────────────────────────────────────────────
2
+ // Context profiles
3
+ // ────────────────────────────────────────────────────────────────────────────
4
+ export const CONTEXT_PROFILES = {
5
+ /** Maximum adversarial thinking and paranoia — assume compromise, verify everything, strip warmth to stay clinical. */
6
+ security_review: {
7
+ inversion: 0.9,
8
+ firstPrinciples: 0.8,
9
+ mentalSimulation: 0.8,
10
+ adversarialThinking: 1.0,
11
+ secondOrder: 0.8,
12
+ systemsView: 0.9,
13
+ simplification: 0.7,
14
+ storytelling: 0.2,
15
+ tacticalEmpathy: 0.3,
16
+ genuineCuriosity: 0.5,
17
+ radicalCandor: 0.8,
18
+ standardSetting: 0.7,
19
+ developmentalCoaching: 0.3,
20
+ strategicGenerosity: 0.3,
21
+ stoicCalm: 0.7,
22
+ paranoidVigilance: 1.0,
23
+ valueEquation: 0.4,
24
+ ooda: 0.6,
25
+ buildForChange: 0.6,
26
+ humanCenteredDesign: 0.3,
27
+ constraintCreativity: 0.4,
28
+ regretMinimization: 0.6,
29
+ doorClassification: 0.7,
30
+ probabilistic: 0.7,
31
+ plannedAbandonment: 0.5,
32
+ warmth: 0.3,
33
+ urgency: 0.6,
34
+ humor: 0.1,
35
+ verbosity: 0.5,
36
+ },
37
+ /** Deep first-principles decomposition with ruthless simplification — build for change, keep explanations tight. */
38
+ code_engineering: {
39
+ inversion: 0.6,
40
+ firstPrinciples: 0.9,
41
+ mentalSimulation: 0.7,
42
+ adversarialThinking: 0.5,
43
+ secondOrder: 0.6,
44
+ systemsView: 0.7,
45
+ simplification: 0.9,
46
+ storytelling: 0.3,
47
+ tacticalEmpathy: 0.3,
48
+ genuineCuriosity: 0.6,
49
+ radicalCandor: 0.7,
50
+ standardSetting: 0.7,
51
+ developmentalCoaching: 0.4,
52
+ strategicGenerosity: 0.4,
53
+ stoicCalm: 0.5,
54
+ paranoidVigilance: 0.5,
55
+ valueEquation: 0.5,
56
+ ooda: 0.6,
57
+ buildForChange: 0.9,
58
+ humanCenteredDesign: 0.6,
59
+ constraintCreativity: 0.6,
60
+ regretMinimization: 0.5,
61
+ doorClassification: 0.7,
62
+ probabilistic: 0.5,
63
+ plannedAbandonment: 0.5,
64
+ warmth: 0.4,
65
+ urgency: 0.4,
66
+ humor: 0.3,
67
+ verbosity: 0.3,
68
+ },
69
+ /** Full systems view with first-principles reasoning — every design decision classified by reversibility. */
70
+ architecture_design: {
71
+ inversion: 0.8,
72
+ firstPrinciples: 1.0,
73
+ mentalSimulation: 0.8,
74
+ adversarialThinking: 0.6,
75
+ secondOrder: 0.8,
76
+ systemsView: 1.0,
77
+ simplification: 0.8,
78
+ storytelling: 0.5,
79
+ tacticalEmpathy: 0.3,
80
+ genuineCuriosity: 0.6,
81
+ radicalCandor: 0.7,
82
+ standardSetting: 0.7,
83
+ developmentalCoaching: 0.3,
84
+ strategicGenerosity: 0.4,
85
+ stoicCalm: 0.6,
86
+ paranoidVigilance: 0.5,
87
+ valueEquation: 0.6,
88
+ ooda: 0.5,
89
+ buildForChange: 1.0,
90
+ humanCenteredDesign: 0.6,
91
+ constraintCreativity: 0.7,
92
+ regretMinimization: 0.7,
93
+ doorClassification: 0.9,
94
+ probabilistic: 0.7,
95
+ plannedAbandonment: 0.6,
96
+ warmth: 0.4,
97
+ urgency: 0.3,
98
+ humor: 0.2,
99
+ verbosity: 0.6,
100
+ },
101
+ /** Mental simulation cranked to max with tight OODA loops — stay terse, add dry humor to ease frustration. */
102
+ debugging: {
103
+ inversion: 0.7,
104
+ firstPrinciples: 0.8,
105
+ mentalSimulation: 1.0,
106
+ adversarialThinking: 0.6,
107
+ secondOrder: 0.6,
108
+ systemsView: 0.7,
109
+ simplification: 0.8,
110
+ storytelling: 0.2,
111
+ tacticalEmpathy: 0.5,
112
+ genuineCuriosity: 0.7,
113
+ radicalCandor: 0.6,
114
+ standardSetting: 0.4,
115
+ developmentalCoaching: 0.3,
116
+ strategicGenerosity: 0.3,
117
+ stoicCalm: 0.6,
118
+ paranoidVigilance: 0.5,
119
+ valueEquation: 0.4,
120
+ ooda: 0.7,
121
+ buildForChange: 0.5,
122
+ humanCenteredDesign: 0.4,
123
+ constraintCreativity: 0.5,
124
+ regretMinimization: 0.4,
125
+ doorClassification: 0.5,
126
+ probabilistic: 0.6,
127
+ plannedAbandonment: 0.4,
128
+ warmth: 0.5,
129
+ urgency: 0.5,
130
+ humor: 0.3,
131
+ verbosity: 0.3,
132
+ },
133
+ /** High standards with high warmth — challenge directly, care personally, develop through coaching. */
134
+ team_leadership: {
135
+ inversion: 0.5,
136
+ firstPrinciples: 0.5,
137
+ mentalSimulation: 0.6,
138
+ adversarialThinking: 0.3,
139
+ secondOrder: 0.7,
140
+ systemsView: 0.7,
141
+ simplification: 0.7,
142
+ storytelling: 0.7,
143
+ tacticalEmpathy: 0.8,
144
+ genuineCuriosity: 0.9,
145
+ radicalCandor: 0.9,
146
+ standardSetting: 1.0,
147
+ developmentalCoaching: 0.9,
148
+ strategicGenerosity: 0.7,
149
+ stoicCalm: 0.7,
150
+ paranoidVigilance: 0.3,
151
+ valueEquation: 0.5,
152
+ ooda: 0.4,
153
+ buildForChange: 0.5,
154
+ humanCenteredDesign: 0.7,
155
+ constraintCreativity: 0.5,
156
+ regretMinimization: 0.6,
157
+ doorClassification: 0.6,
158
+ probabilistic: 0.5,
159
+ plannedAbandonment: 0.5,
160
+ warmth: 0.8,
161
+ urgency: 0.3,
162
+ humor: 0.4,
163
+ verbosity: 0.6,
164
+ },
165
+ /** Maximum empathy, curiosity, and warmth — suppress vigilance and urgency to create psychological safety. */
166
+ one_on_one: {
167
+ inversion: 0.3,
168
+ firstPrinciples: 0.4,
169
+ mentalSimulation: 0.5,
170
+ adversarialThinking: 0.1,
171
+ secondOrder: 0.5,
172
+ systemsView: 0.4,
173
+ simplification: 0.6,
174
+ storytelling: 0.7,
175
+ tacticalEmpathy: 1.0,
176
+ genuineCuriosity: 1.0,
177
+ radicalCandor: 0.7,
178
+ standardSetting: 0.5,
179
+ developmentalCoaching: 1.0,
180
+ strategicGenerosity: 0.8,
181
+ stoicCalm: 0.7,
182
+ paranoidVigilance: 0.1,
183
+ valueEquation: 0.3,
184
+ ooda: 0.2,
185
+ buildForChange: 0.3,
186
+ humanCenteredDesign: 0.7,
187
+ constraintCreativity: 0.4,
188
+ regretMinimization: 0.6,
189
+ doorClassification: 0.4,
190
+ probabilistic: 0.4,
191
+ plannedAbandonment: 0.4,
192
+ warmth: 1.0,
193
+ urgency: 0.1,
194
+ humor: 0.4,
195
+ verbosity: 0.6,
196
+ },
197
+ /** Lead with transformation stories and value — simplify ruthlessly, keep it warm but not soft. */
198
+ sales_pitch: {
199
+ inversion: 0.5,
200
+ firstPrinciples: 0.6,
201
+ mentalSimulation: 0.7,
202
+ adversarialThinking: 0.4,
203
+ secondOrder: 0.6,
204
+ systemsView: 0.5,
205
+ simplification: 1.0,
206
+ storytelling: 1.0,
207
+ tacticalEmpathy: 0.7,
208
+ genuineCuriosity: 0.7,
209
+ radicalCandor: 0.5,
210
+ standardSetting: 0.4,
211
+ developmentalCoaching: 0.3,
212
+ strategicGenerosity: 0.7,
213
+ stoicCalm: 0.6,
214
+ paranoidVigilance: 0.2,
215
+ valueEquation: 1.0,
216
+ ooda: 0.5,
217
+ buildForChange: 0.3,
218
+ humanCenteredDesign: 0.8,
219
+ constraintCreativity: 0.6,
220
+ regretMinimization: 0.5,
221
+ doorClassification: 0.5,
222
+ probabilistic: 0.5,
223
+ plannedAbandonment: 0.3,
224
+ warmth: 0.7,
225
+ urgency: 0.5,
226
+ humor: 0.4,
227
+ verbosity: 0.5,
228
+ },
229
+ /** Mirror and label with tactical empathy, stay stoic under pressure — never rush, never over-share. */
230
+ negotiation: {
231
+ inversion: 0.7,
232
+ firstPrinciples: 0.6,
233
+ mentalSimulation: 0.9,
234
+ adversarialThinking: 0.7,
235
+ secondOrder: 0.8,
236
+ systemsView: 0.6,
237
+ simplification: 0.7,
238
+ storytelling: 0.5,
239
+ tacticalEmpathy: 1.0,
240
+ genuineCuriosity: 0.7,
241
+ radicalCandor: 0.5,
242
+ standardSetting: 0.5,
243
+ developmentalCoaching: 0.2,
244
+ strategicGenerosity: 0.5,
245
+ stoicCalm: 0.9,
246
+ paranoidVigilance: 0.6,
247
+ valueEquation: 0.7,
248
+ ooda: 0.5,
249
+ buildForChange: 0.3,
250
+ humanCenteredDesign: 0.5,
251
+ constraintCreativity: 0.6,
252
+ regretMinimization: 0.7,
253
+ doorClassification: 0.7,
254
+ probabilistic: 0.7,
255
+ plannedAbandonment: 0.5,
256
+ warmth: 0.5,
257
+ urgency: 0.3,
258
+ humor: 0.2,
259
+ verbosity: 0.4,
260
+ },
261
+ /** Maximum storytelling and simplification with creative flair — humor is a tool, design for the human. */
262
+ marketing_content: {
263
+ inversion: 0.4,
264
+ firstPrinciples: 0.5,
265
+ mentalSimulation: 0.6,
266
+ adversarialThinking: 0.3,
267
+ secondOrder: 0.5,
268
+ systemsView: 0.5,
269
+ simplification: 1.0,
270
+ storytelling: 1.0,
271
+ tacticalEmpathy: 0.6,
272
+ genuineCuriosity: 0.7,
273
+ radicalCandor: 0.4,
274
+ standardSetting: 0.4,
275
+ developmentalCoaching: 0.2,
276
+ strategicGenerosity: 0.6,
277
+ stoicCalm: 0.4,
278
+ paranoidVigilance: 0.2,
279
+ valueEquation: 0.8,
280
+ ooda: 0.4,
281
+ buildForChange: 0.3,
282
+ humanCenteredDesign: 0.9,
283
+ constraintCreativity: 0.9,
284
+ regretMinimization: 0.4,
285
+ doorClassification: 0.4,
286
+ probabilistic: 0.4,
287
+ plannedAbandonment: 0.3,
288
+ warmth: 0.6,
289
+ urgency: 0.4,
290
+ humor: 0.7,
291
+ verbosity: 0.6,
292
+ },
293
+ /** Full analytical battery — inversion, second-order effects, probabilistic thinking, and planned abandonment. */
294
+ strategic_planning: {
295
+ inversion: 1.0,
296
+ firstPrinciples: 0.8,
297
+ mentalSimulation: 0.8,
298
+ adversarialThinking: 0.6,
299
+ secondOrder: 1.0,
300
+ systemsView: 0.9,
301
+ simplification: 0.7,
302
+ storytelling: 0.5,
303
+ tacticalEmpathy: 0.4,
304
+ genuineCuriosity: 0.6,
305
+ radicalCandor: 0.7,
306
+ standardSetting: 0.6,
307
+ developmentalCoaching: 0.3,
308
+ strategicGenerosity: 0.5,
309
+ stoicCalm: 0.7,
310
+ paranoidVigilance: 0.6,
311
+ valueEquation: 0.7,
312
+ ooda: 0.5,
313
+ buildForChange: 0.7,
314
+ humanCenteredDesign: 0.5,
315
+ constraintCreativity: 0.6,
316
+ regretMinimization: 0.8,
317
+ doorClassification: 1.0,
318
+ probabilistic: 0.9,
319
+ plannedAbandonment: 0.9,
320
+ warmth: 0.4,
321
+ urgency: 0.5,
322
+ humor: 0.2,
323
+ verbosity: 0.8,
324
+ },
325
+ /** Maximum calm, speed, and directness — no humor, minimal words, pure execute-now energy. */
326
+ crisis_management: {
327
+ inversion: 0.7,
328
+ firstPrinciples: 0.6,
329
+ mentalSimulation: 0.8,
330
+ adversarialThinking: 0.8,
331
+ secondOrder: 0.6,
332
+ systemsView: 0.8,
333
+ simplification: 0.9,
334
+ storytelling: 0.1,
335
+ tacticalEmpathy: 0.5,
336
+ genuineCuriosity: 0.3,
337
+ radicalCandor: 0.9,
338
+ standardSetting: 0.7,
339
+ developmentalCoaching: 0.1,
340
+ strategicGenerosity: 0.2,
341
+ stoicCalm: 1.0,
342
+ paranoidVigilance: 0.8,
343
+ valueEquation: 0.4,
344
+ ooda: 1.0,
345
+ buildForChange: 0.3,
346
+ humanCenteredDesign: 0.3,
347
+ constraintCreativity: 0.5,
348
+ regretMinimization: 0.6,
349
+ doorClassification: 0.7,
350
+ probabilistic: 0.6,
351
+ plannedAbandonment: 0.4,
352
+ warmth: 0.3,
353
+ urgency: 1.0,
354
+ humor: 0.0,
355
+ verbosity: 0.2,
356
+ },
357
+ /** Maximum creative constraint thinking with curiosity — suppress paranoia to keep ideation open. */
358
+ creative_work: {
359
+ inversion: 0.4,
360
+ firstPrinciples: 0.7,
361
+ mentalSimulation: 0.7,
362
+ adversarialThinking: 0.2,
363
+ secondOrder: 0.5,
364
+ systemsView: 0.6,
365
+ simplification: 0.6,
366
+ storytelling: 0.8,
367
+ tacticalEmpathy: 0.5,
368
+ genuineCuriosity: 0.9,
369
+ radicalCandor: 0.4,
370
+ standardSetting: 0.3,
371
+ developmentalCoaching: 0.4,
372
+ strategicGenerosity: 0.6,
373
+ stoicCalm: 0.5,
374
+ paranoidVigilance: 0.1,
375
+ valueEquation: 0.5,
376
+ ooda: 0.4,
377
+ buildForChange: 0.6,
378
+ humanCenteredDesign: 0.8,
379
+ constraintCreativity: 1.0,
380
+ regretMinimization: 0.4,
381
+ doorClassification: 0.3,
382
+ probabilistic: 0.4,
383
+ plannedAbandonment: 0.4,
384
+ warmth: 0.7,
385
+ urgency: 0.2,
386
+ humor: 0.6,
387
+ verbosity: 0.6,
388
+ },
389
+ /** Simplify, then tell the story — design for the reader, give generously with insight. */
390
+ writing_content: {
391
+ inversion: 0.4,
392
+ firstPrinciples: 0.5,
393
+ mentalSimulation: 0.5,
394
+ adversarialThinking: 0.2,
395
+ secondOrder: 0.4,
396
+ systemsView: 0.5,
397
+ simplification: 1.0,
398
+ storytelling: 0.9,
399
+ tacticalEmpathy: 0.6,
400
+ genuineCuriosity: 0.6,
401
+ radicalCandor: 0.5,
402
+ standardSetting: 0.4,
403
+ developmentalCoaching: 0.3,
404
+ strategicGenerosity: 0.7,
405
+ stoicCalm: 0.5,
406
+ paranoidVigilance: 0.1,
407
+ valueEquation: 0.5,
408
+ ooda: 0.3,
409
+ buildForChange: 0.3,
410
+ humanCenteredDesign: 0.8,
411
+ constraintCreativity: 0.7,
412
+ regretMinimization: 0.3,
413
+ doorClassification: 0.3,
414
+ probabilistic: 0.3,
415
+ plannedAbandonment: 0.3,
416
+ warmth: 0.6,
417
+ urgency: 0.2,
418
+ humor: 0.4,
419
+ verbosity: 0.6,
420
+ },
421
+ /** Every analytical tool at maximum — inversion, second-order, regret minimization, door classification, and probabilistic thinking. */
422
+ decision_making: {
423
+ inversion: 1.0,
424
+ firstPrinciples: 0.8,
425
+ mentalSimulation: 0.8,
426
+ adversarialThinking: 0.6,
427
+ secondOrder: 1.0,
428
+ systemsView: 0.8,
429
+ simplification: 0.7,
430
+ storytelling: 0.4,
431
+ tacticalEmpathy: 0.4,
432
+ genuineCuriosity: 0.6,
433
+ radicalCandor: 0.7,
434
+ standardSetting: 0.5,
435
+ developmentalCoaching: 0.3,
436
+ strategicGenerosity: 0.4,
437
+ stoicCalm: 0.7,
438
+ paranoidVigilance: 0.5,
439
+ valueEquation: 0.6,
440
+ ooda: 0.5,
441
+ buildForChange: 0.5,
442
+ humanCenteredDesign: 0.4,
443
+ constraintCreativity: 0.5,
444
+ regretMinimization: 1.0,
445
+ doorClassification: 1.0,
446
+ probabilistic: 1.0,
447
+ plannedAbandonment: 0.7,
448
+ warmth: 0.4,
449
+ urgency: 0.3,
450
+ humor: 0.2,
451
+ verbosity: 0.6,
452
+ },
453
+ /** Coaching-first with radical candor and warmth — help them see the path, not just the destination. */
454
+ personal_development: {
455
+ inversion: 0.5,
456
+ firstPrinciples: 0.6,
457
+ mentalSimulation: 0.6,
458
+ adversarialThinking: 0.2,
459
+ secondOrder: 0.6,
460
+ systemsView: 0.5,
461
+ simplification: 0.7,
462
+ storytelling: 0.7,
463
+ tacticalEmpathy: 0.8,
464
+ genuineCuriosity: 0.8,
465
+ radicalCandor: 0.9,
466
+ standardSetting: 0.6,
467
+ developmentalCoaching: 1.0,
468
+ strategicGenerosity: 0.7,
469
+ stoicCalm: 0.6,
470
+ paranoidVigilance: 0.2,
471
+ valueEquation: 0.5,
472
+ ooda: 0.3,
473
+ buildForChange: 0.5,
474
+ humanCenteredDesign: 0.6,
475
+ constraintCreativity: 0.5,
476
+ regretMinimization: 0.8,
477
+ doorClassification: 0.6,
478
+ probabilistic: 0.5,
479
+ plannedAbandonment: 0.5,
480
+ warmth: 0.8,
481
+ urgency: 0.2,
482
+ humor: 0.4,
483
+ verbosity: 0.6,
484
+ },
485
+ /** First-principles teaching with simplification and story — expand verbosity to make space for understanding. */
486
+ learning_research: {
487
+ inversion: 0.5,
488
+ firstPrinciples: 0.9,
489
+ mentalSimulation: 0.6,
490
+ adversarialThinking: 0.3,
491
+ secondOrder: 0.6,
492
+ systemsView: 0.7,
493
+ simplification: 0.9,
494
+ storytelling: 0.6,
495
+ tacticalEmpathy: 0.5,
496
+ genuineCuriosity: 0.8,
497
+ radicalCandor: 0.5,
498
+ standardSetting: 0.3,
499
+ developmentalCoaching: 0.6,
500
+ strategicGenerosity: 0.7,
501
+ stoicCalm: 0.5,
502
+ paranoidVigilance: 0.2,
503
+ valueEquation: 0.4,
504
+ ooda: 0.3,
505
+ buildForChange: 0.4,
506
+ humanCenteredDesign: 0.6,
507
+ constraintCreativity: 0.5,
508
+ regretMinimization: 0.3,
509
+ doorClassification: 0.4,
510
+ probabilistic: 0.5,
511
+ plannedAbandonment: 0.3,
512
+ warmth: 0.6,
513
+ urgency: 0.2,
514
+ humor: 0.3,
515
+ verbosity: 0.7,
516
+ },
517
+ /** Balanced baseline with gentle emphasis on clarity and curiosity — the resting state before context shifts. */
518
+ general: {
519
+ inversion: 0.5,
520
+ firstPrinciples: 0.5,
521
+ mentalSimulation: 0.5,
522
+ adversarialThinking: 0.5,
523
+ secondOrder: 0.5,
524
+ systemsView: 0.5,
525
+ simplification: 0.7,
526
+ storytelling: 0.5,
527
+ tacticalEmpathy: 0.5,
528
+ genuineCuriosity: 0.7,
529
+ radicalCandor: 0.5,
530
+ standardSetting: 0.5,
531
+ developmentalCoaching: 0.5,
532
+ strategicGenerosity: 0.5,
533
+ stoicCalm: 0.5,
534
+ paranoidVigilance: 0.5,
535
+ valueEquation: 0.5,
536
+ ooda: 0.5,
537
+ buildForChange: 0.5,
538
+ humanCenteredDesign: 0.5,
539
+ constraintCreativity: 0.5,
540
+ regretMinimization: 0.5,
541
+ doorClassification: 0.5,
542
+ probabilistic: 0.5,
543
+ plannedAbandonment: 0.5,
544
+ warmth: 0.6,
545
+ urgency: 0.4,
546
+ humor: 0.4,
547
+ verbosity: 0.5,
548
+ },
549
+ };
550
+ //# sourceMappingURL=context-profiles.js.map
@@ -0,0 +1,70 @@
1
+ import type { ContextDomain } from '../schema.js';
2
+ export interface DetectionRecord {
3
+ message: string;
4
+ domain: ContextDomain;
5
+ confidence: number;
6
+ timestamp: number;
7
+ }
8
+ export interface ConversationState {
9
+ theme: ContextDomain | null;
10
+ dominantDomain: ContextDomain;
11
+ domainStreak: number;
12
+ history: DetectionRecord[];
13
+ }
14
+ export interface ConversationSummary {
15
+ theme: ContextDomain | null;
16
+ messageCount: number;
17
+ domainDistribution: Record<ContextDomain, number>;
18
+ currentStreak: {
19
+ domain: ContextDomain;
20
+ count: number;
21
+ };
22
+ }
23
+ /**
24
+ * Maintains context awareness across a full conversation, not just per-message.
25
+ *
26
+ * If the conversation is about security architecture, a brief tangent about
27
+ * lunch shouldn't reset the context to "general." The class tracks a
28
+ * conversation *theme* that locks after 3+ consistent detections and only
29
+ * shifts when a new domain arrives with high confidence.
30
+ *
31
+ * CRITICAL: Crisis context (`crisis_management`) ALWAYS overrides the
32
+ * conversation theme. If the user suddenly says "we just got breached,"
33
+ * crisis takes over immediately regardless of theme.
34
+ */
35
+ export declare class ConversationContext {
36
+ private history;
37
+ private dominantDomain;
38
+ private domainStreak;
39
+ private conversationTheme;
40
+ /**
41
+ * Record a new context detection. Updates streak tracking and may
42
+ * auto-establish a conversation theme after enough consistent detections.
43
+ */
44
+ recordDetection(message: string, domain: ContextDomain, confidence: number): void;
45
+ /**
46
+ * Get the effective domain considering conversation history.
47
+ *
48
+ * Rules:
49
+ * 1. Crisis ALWAYS wins — bypasses any theme.
50
+ * 2. If a theme is set and the new detection is 'general' or low confidence,
51
+ * return the theme (the tangent doesn't break it).
52
+ * 3. If a theme is set and the new detection is a DIFFERENT specific domain
53
+ * with high confidence (> 0.7), update the theme to the new domain.
54
+ * 4. If no theme is set, return the raw detection unchanged.
55
+ */
56
+ getEffectiveDomain(currentDetection: ContextDomain, currentConfidence: number): ContextDomain;
57
+ /** Explicitly set conversation theme (user override). */
58
+ setTheme(domain: ContextDomain): void;
59
+ /** Clear theme — returns to pure auto-detection. */
60
+ clearTheme(): void;
61
+ /** Get conversation summary with theme, distribution, and streak info. */
62
+ getSummary(): ConversationSummary;
63
+ /** Reset for a new conversation — clears all state. */
64
+ reset(): void;
65
+ /** Serialize state for vault persistence. Caps history at 50 records. */
66
+ serialize(): ConversationState;
67
+ /** Restore a ConversationContext from previously serialized state. */
68
+ static restore(state: ConversationState): ConversationContext;
69
+ }
70
+ //# sourceMappingURL=conversation-context.d.ts.map