@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,116 @@
1
+ import { CorrectionStore } from './correction-store.js';
2
+ // ────────────────────────────────────────────────────────────────────────────
3
+ // Constants
4
+ // ────────────────────────────────────────────────────────────────────────────
5
+ const CURRENT_VERSION = 1;
6
+ const ALL_DOMAINS = [
7
+ 'security_review', 'code_engineering', 'architecture_design', 'debugging',
8
+ 'team_leadership', 'one_on_one', 'sales_pitch', 'negotiation',
9
+ 'marketing_content', 'strategic_planning', 'crisis_management',
10
+ 'creative_work', 'writing_content', 'decision_making',
11
+ 'learning_research', 'personal_development', 'general',
12
+ ];
13
+ function emptyUsageHistory() {
14
+ const history = {};
15
+ for (const domain of ALL_DOMAINS) {
16
+ history[domain] = 0;
17
+ }
18
+ return history;
19
+ }
20
+ function createDefaults() {
21
+ const now = Date.now();
22
+ return {
23
+ corrections: new CorrectionStore().serialize(),
24
+ showContextIndicator: true,
25
+ showSourcesButton: true,
26
+ autoDetectContext: true,
27
+ defaultContext: null,
28
+ contextUsageHistory: emptyUsageHistory(),
29
+ totalInteractions: 0,
30
+ firstUsed: now,
31
+ lastUsed: now,
32
+ version: CURRENT_VERSION,
33
+ };
34
+ }
35
+ // ────────────────────────────────────────────────────────────────────────────
36
+ // ArchitectPersistence
37
+ // ────────────────────────────────────────────────────────────────────────────
38
+ export class ArchitectPersistence {
39
+ storage;
40
+ static STORAGE_KEY = 'architect_preferences';
41
+ constructor(storage) {
42
+ this.storage = storage;
43
+ }
44
+ /** Load preferences from encrypted storage. Returns defaults if none exist. */
45
+ async load() {
46
+ const raw = await this.storage.get(ArchitectPersistence.STORAGE_KEY);
47
+ if (raw === null) {
48
+ return createDefaults();
49
+ }
50
+ const prefs = JSON.parse(raw);
51
+ return this.migrate(prefs);
52
+ }
53
+ /** Save preferences to encrypted storage. Updates lastUsed automatically. */
54
+ async save(prefs) {
55
+ prefs.lastUsed = Date.now();
56
+ await this.storage.set(ArchitectPersistence.STORAGE_KEY, JSON.stringify(prefs));
57
+ }
58
+ /** Increment usage count for a domain and total interactions. */
59
+ async recordUsage(domain) {
60
+ const prefs = await this.load();
61
+ prefs.contextUsageHistory[domain] = (prefs.contextUsageHistory[domain] ?? 0) + 1;
62
+ prefs.totalInteractions++;
63
+ await this.save(prefs);
64
+ }
65
+ /** Update the corrections field from a CorrectionStore instance. */
66
+ async saveCorrections(store) {
67
+ const prefs = await this.load();
68
+ prefs.corrections = store.serialize();
69
+ await this.save(prefs);
70
+ }
71
+ /** Get the top N most-used context domains, sorted by usage descending. */
72
+ async getMostUsedContexts(topN) {
73
+ const prefs = await this.load();
74
+ return Object.entries(prefs.contextUsageHistory)
75
+ .filter(([, count]) => count > 0)
76
+ .sort(([, a], [, b]) => b - a)
77
+ .slice(0, topN)
78
+ .map(([domain]) => domain);
79
+ }
80
+ /** Delete all stored Architect data (user privacy). */
81
+ async clearAll() {
82
+ await this.storage.delete(ArchitectPersistence.STORAGE_KEY);
83
+ }
84
+ /** Export all data as JSON string (user data portability). */
85
+ async exportAll() {
86
+ const prefs = await this.load();
87
+ return JSON.stringify(prefs, null, 2);
88
+ }
89
+ /** Handle version upgrades for stored preferences. */
90
+ async migrate(prefs) {
91
+ if (prefs.version === CURRENT_VERSION) {
92
+ return prefs;
93
+ }
94
+ // Version 0 → 1: add missing fields with defaults
95
+ if (prefs.version === 0 || prefs.version === undefined) {
96
+ const defaults = createDefaults();
97
+ prefs.showContextIndicator ??= defaults.showContextIndicator;
98
+ prefs.showSourcesButton ??= defaults.showSourcesButton;
99
+ prefs.autoDetectContext ??= defaults.autoDetectContext;
100
+ prefs.defaultContext ??= defaults.defaultContext;
101
+ prefs.contextUsageHistory ??= defaults.contextUsageHistory;
102
+ prefs.totalInteractions ??= defaults.totalInteractions;
103
+ prefs.firstUsed ??= defaults.firstUsed;
104
+ prefs.lastUsed ??= defaults.lastUsed;
105
+ prefs.corrections ??= defaults.corrections;
106
+ // Ensure all domains exist in usage history
107
+ for (const domain of ALL_DOMAINS) {
108
+ prefs.contextUsageHistory[domain] ??= 0;
109
+ }
110
+ prefs.version = CURRENT_VERSION;
111
+ await this.save(prefs);
112
+ }
113
+ return prefs;
114
+ }
115
+ }
116
+ //# sourceMappingURL=persistence.js.map
@@ -0,0 +1,16 @@
1
+ import type { TraitMix, TaskContext, TraitSource } from '../schema.js';
2
+ /**
3
+ * Assembles a context-specific prompt modifier from the current trait mix.
4
+ *
5
+ * Selects the top 10 weighted traits, generates a weight-scaled behavioral
6
+ * instruction for each, and composes them into a prompt block that sits
7
+ * between the base personality prompt and the user message.
8
+ */
9
+ export declare function assemblePromptModifier(mix: TraitMix, context: TaskContext): string;
10
+ /**
11
+ * Returns the SOURCE_MAP entries for the top N weighted traits in the mix.
12
+ * Useful for transparency — explaining *why* the personality is behaving
13
+ * a certain way and which historical minds are driving the response.
14
+ */
15
+ export declare function getActiveSources(mix: TraitMix, topN?: number): TraitSource[];
16
+ //# sourceMappingURL=prompt-assembler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-assembler.d.ts","sourceRoot":"","sources":["prompt-assembler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAQvE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CA6BlF;AAMD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,GAAE,MAAW,GAAG,WAAW,EAAE,CAQhF"}
@@ -0,0 +1,66 @@
1
+ import { TRAIT_TO_INSTRUCTION } from './trait-to-instruction.js';
2
+ import { SOURCE_MAP } from './source-map.js';
3
+ // ────────────────────────────────────────────────────────────────────────────
4
+ // Prompt modifier assembly
5
+ // ────────────────────────────────────────────────────────────────────────────
6
+ /**
7
+ * Assembles a context-specific prompt modifier from the current trait mix.
8
+ *
9
+ * Selects the top 10 weighted traits, generates a weight-scaled behavioral
10
+ * instruction for each, and composes them into a prompt block that sits
11
+ * between the base personality prompt and the user message.
12
+ */
13
+ export function assemblePromptModifier(mix, context) {
14
+ const entries = Object.entries(mix);
15
+ // Sort by weight descending, take top 10
16
+ const top = entries
17
+ .sort((a, b) => b[1] - a[1])
18
+ .slice(0, 10);
19
+ const instructions = [];
20
+ for (const [key, value] of top) {
21
+ const fn = TRAIT_TO_INSTRUCTION[key];
22
+ if (fn) {
23
+ instructions.push(fn(value, context));
24
+ }
25
+ }
26
+ return [
27
+ '## Current Context Adaptation',
28
+ '',
29
+ `You are operating in a **${formatDomain(context.domain)}** context.`,
30
+ `The user's emotional state appears **${context.emotionalRegister}**.`,
31
+ `Stakes: **${context.stakes}**. Complexity: **${context.complexity}**.`,
32
+ '',
33
+ 'For this interaction, emphasize:',
34
+ '',
35
+ ...instructions.map((i) => `- ${i}`),
36
+ '',
37
+ `Tone: warmth=${mix.warmth.toFixed(1)}, urgency=${mix.urgency.toFixed(1)}, humor=${mix.humor.toFixed(1)}, depth=${mix.verbosity.toFixed(1)}`,
38
+ ].join('\n');
39
+ }
40
+ // ────────────────────────────────────────────────────────────────────────────
41
+ // Active source retrieval
42
+ // ────────────────────────────────────────────────────────────────────────────
43
+ /**
44
+ * Returns the SOURCE_MAP entries for the top N weighted traits in the mix.
45
+ * Useful for transparency — explaining *why* the personality is behaving
46
+ * a certain way and which historical minds are driving the response.
47
+ */
48
+ export function getActiveSources(mix, topN = 10) {
49
+ const entries = Object.entries(mix);
50
+ return entries
51
+ .sort((a, b) => b[1] - a[1])
52
+ .slice(0, topN)
53
+ .map(([key]) => SOURCE_MAP[key])
54
+ .filter(Boolean);
55
+ }
56
+ // ────────────────────────────────────────────────────────────────────────────
57
+ // Helpers
58
+ // ────────────────────────────────────────────────────────────────────────────
59
+ /** Converts a snake_case domain key to a human-readable label. */
60
+ function formatDomain(domain) {
61
+ return domain
62
+ .split('_')
63
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
64
+ .join(' ');
65
+ }
66
+ //# sourceMappingURL=prompt-assembler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-assembler.js","sourceRoot":"","sources":["prompt-assembler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,GAAa,EAAE,OAAoB;IACxE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAoC,CAAC;IAEvE,yCAAyC;IACzC,MAAM,GAAG,GAAG,OAAO;SAChB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3B,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEhB,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,EAAE,EAAE,CAAC;YACP,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IAED,OAAO;QACL,+BAA+B;QAC/B,EAAE;QACF,4BAA4B,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa;QACrE,wCAAwC,OAAO,CAAC,iBAAiB,KAAK;QACtE,aAAa,OAAO,CAAC,MAAM,qBAAqB,OAAO,CAAC,UAAU,KAAK;QACvE,EAAE;QACF,kCAAkC;QAClC,EAAE;QACF,GAA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1
+ import type { TaskContext, ContextDomain } from '../schema.js';
2
+ import type { CorrectionStore } from './correction-store.js';
3
+ export interface ContextRecommendation {
4
+ suggestedDomain: ContextDomain;
5
+ reason: string;
6
+ confidence: number;
7
+ source: 'correction_pattern' | 'low_confidence' | 'usage_pattern';
8
+ }
9
+ export declare class ContextRecommender {
10
+ /**
11
+ * Analyze the detected context and determine if a recommendation should
12
+ * be shown. Returns null if auto-detection seems right; otherwise returns
13
+ * a recommendation with a human-readable reason and confidence score.
14
+ *
15
+ * Priority order:
16
+ * 1. Correction-based (learned from user overrides)
17
+ * 2. Low-confidence (ambiguous detection, close runner-up)
18
+ * 3. Usage-pattern (general detected but history is concentrated)
19
+ */
20
+ shouldRecommend(detectedContext: TaskContext, correctionStore: CorrectionStore, usageHistory: Record<ContextDomain, number>, userMessage?: string): ContextRecommendation | null;
21
+ private correctionBased;
22
+ private lowConfidence;
23
+ private usagePattern;
24
+ }
25
+ //# sourceMappingURL=recommender.d.ts.map
@@ -0,0 +1,125 @@
1
+ import { scoreAllDomains } from './context-detector.js';
2
+ // ────────────────────────────────────────────────────────────────────────────
3
+ // Helpers
4
+ // ────────────────────────────────────────────────────────────────────────────
5
+ /** Clamp a value to [0, 1]. */
6
+ function clamp01(n) {
7
+ return Math.min(1, Math.max(0, n));
8
+ }
9
+ /** Human-readable label for a domain (e.g. "code_engineering" → "Code Engineering"). */
10
+ function domainLabel(domain) {
11
+ return domain
12
+ .split('_')
13
+ .map(w => w.charAt(0).toUpperCase() + w.slice(1))
14
+ .join(' ');
15
+ }
16
+ // ────────────────────────────────────────────────────────────────────────────
17
+ // ContextRecommender
18
+ // ────────────────────────────────────────────────────────────────────────────
19
+ export class ContextRecommender {
20
+ /**
21
+ * Analyze the detected context and determine if a recommendation should
22
+ * be shown. Returns null if auto-detection seems right; otherwise returns
23
+ * a recommendation with a human-readable reason and confidence score.
24
+ *
25
+ * Priority order:
26
+ * 1. Correction-based (learned from user overrides)
27
+ * 2. Low-confidence (ambiguous detection, close runner-up)
28
+ * 3. Usage-pattern (general detected but history is concentrated)
29
+ */
30
+ shouldRecommend(detectedContext, correctionStore, usageHistory, userMessage) {
31
+ // 1. Correction-based
32
+ if (userMessage) {
33
+ const correctionRec = this.correctionBased(detectedContext, correctionStore, userMessage);
34
+ if (correctionRec)
35
+ return correctionRec;
36
+ }
37
+ // 2. Low-confidence
38
+ if (userMessage) {
39
+ const lowConfRec = this.lowConfidence(detectedContext, userMessage);
40
+ if (lowConfRec)
41
+ return lowConfRec;
42
+ }
43
+ // 3. Usage-pattern
44
+ const usageRec = this.usagePattern(detectedContext, usageHistory);
45
+ if (usageRec)
46
+ return usageRec;
47
+ return null;
48
+ }
49
+ // ── Strategy 1: Correction-based ────────────────────────────────────────
50
+ correctionBased(detectedContext, correctionStore, userMessage) {
51
+ const suggested = correctionStore.suggestCorrection(userMessage, detectedContext.domain);
52
+ if (suggested === null)
53
+ return null;
54
+ // Get the matching pattern's confidence from the store
55
+ const patterns = correctionStore.getPatterns();
56
+ const match = patterns.find(p => p.fromDomain === detectedContext.domain && p.toDomain === suggested);
57
+ const confidence = match ? clamp01(match.confidence) : 0.7;
58
+ return {
59
+ suggestedDomain: suggested,
60
+ reason: `You've previously switched from ${domainLabel(detectedContext.domain)} to ${domainLabel(suggested)} in similar messages`,
61
+ confidence,
62
+ source: 'correction_pattern',
63
+ };
64
+ }
65
+ // ── Strategy 2: Low-confidence ──────────────────────────────────────────
66
+ lowConfidence(detectedContext, userMessage) {
67
+ const detectionConfidence = detectedContext.detectionConfidence ?? 1;
68
+ if (detectionConfidence >= 0.5)
69
+ return null;
70
+ if (detectedContext.domain === 'general')
71
+ return null;
72
+ const scores = scoreAllDomains(userMessage);
73
+ // Get the top 3 domains (excluding general) sorted by score descending
74
+ const ranked = Object.entries(scores)
75
+ .filter(([d]) => d !== 'general')
76
+ .sort(([, a], [, b]) => b - a)
77
+ .slice(0, 3);
78
+ if (ranked.length < 2)
79
+ return null;
80
+ const [first, second] = ranked;
81
+ const gap = first[1] - second[1];
82
+ // If the #2 domain is within 0.1 of #1, suggest it as an alternative
83
+ if (gap > 0.1)
84
+ return null;
85
+ // Confidence is inversely proportional to the gap (closer = more ambiguous)
86
+ const confidence = clamp01(1 - gap * 10);
87
+ return {
88
+ suggestedDomain: second[0],
89
+ reason: `This could be ${domainLabel(first[0])} or ${domainLabel(second[0])} — want to specify?`,
90
+ confidence,
91
+ source: 'low_confidence',
92
+ };
93
+ }
94
+ // ── Strategy 3: Usage-pattern ───────────────────────────────────────────
95
+ usagePattern(detectedContext, usageHistory) {
96
+ if (detectedContext.domain !== 'general')
97
+ return null;
98
+ const total = Object.values(usageHistory).reduce((sum, n) => sum + n, 0);
99
+ if (total === 0)
100
+ return null;
101
+ // Find the most-used non-general domain
102
+ let topDomain = null;
103
+ let topCount = 0;
104
+ for (const [domain, count] of Object.entries(usageHistory)) {
105
+ if (domain === 'general')
106
+ continue;
107
+ if (count > topCount) {
108
+ topCount = count;
109
+ topDomain = domain;
110
+ }
111
+ }
112
+ if (topDomain === null)
113
+ return null;
114
+ const percentage = topCount / total;
115
+ if (percentage <= 0.6)
116
+ return null;
117
+ return {
118
+ suggestedDomain: topDomain,
119
+ reason: `You usually work in ${domainLabel(topDomain)} context — is that what you're doing here?`,
120
+ confidence: clamp01(percentage),
121
+ source: 'usage_pattern',
122
+ };
123
+ }
124
+ }
125
+ //# sourceMappingURL=recommender.js.map
@@ -0,0 +1,9 @@
1
+ import type { TraitSource } from '../schema.js';
2
+ /**
3
+ * Maps every trait in TraitMix to its intellectual source, primary evidence,
4
+ * and the concrete behavioral instruction injected into the prompt when the
5
+ * trait is active. This is the personality engine's bibliography — nothing
6
+ * is invented, everything traces to documented behavior.
7
+ */
8
+ export declare const SOURCE_MAP: Record<string, TraitSource>;
9
+ //# sourceMappingURL=source-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-map.d.ts","sourceRoot":"","sources":["source-map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMhD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAgTlD,CAAC"}
@@ -0,0 +1,223 @@
1
+ // ────────────────────────────────────────────────────────────────────────────
2
+ // Trait provenance map
3
+ // ────────────────────────────────────────────────────────────────────────────
4
+ /**
5
+ * Maps every trait in TraitMix to its intellectual source, primary evidence,
6
+ * and the concrete behavioral instruction injected into the prompt when the
7
+ * trait is active. This is the personality engine's bibliography — nothing
8
+ * is invented, everything traces to documented behavior.
9
+ */
10
+ export const SOURCE_MAP = {
11
+ // ── Thinking traits ──────────────────────────────────────────────────
12
+ inversion: {
13
+ traitKey: 'inversion',
14
+ sourceName: 'Charlie Munger',
15
+ sourceWork: "Poor Charlie's Almanack, Berkshire shareholder meetings",
16
+ evidenceSummary: "Munger's signature approach documented across decades: 'Tell me where I'm going to die, so I'll never go there.' Inverts every problem to define failure before pursuing success.",
17
+ behavioralInstruction: 'Before solving, define what failure looks like. List the conditions that would guarantee this goes wrong. Remove those conditions first.',
18
+ },
19
+ firstPrinciples: {
20
+ traitKey: 'firstPrinciples',
21
+ sourceName: 'Elon Musk / Isaac Newton',
22
+ sourceWork: 'SpaceX interviews / Principia Mathematica',
23
+ evidenceSummary: "Musk documented decomposing rocket costs to raw commodity prices. Newton built calculus because existing tools weren't precise enough. Both rebuilt from atoms when conventions failed.",
24
+ behavioralInstruction: 'Strip away assumptions. What are the actual components? What do they actually cost or require? Rebuild from ground truth.',
25
+ },
26
+ mentalSimulation: {
27
+ traitKey: 'mentalSimulation',
28
+ sourceName: 'Nikola Tesla',
29
+ sourceWork: 'My Inventions (autobiography)',
30
+ evidenceSummary: 'Tesla described running machines in his mind for weeks, noting wear patterns before building prototypes. Complete mental modeling as engineering discipline.',
31
+ behavioralInstruction: 'Run the solution forward in your mind. Week 1, month 3, year 1. Where does it break? Where does it compound?',
32
+ },
33
+ adversarialThinking: {
34
+ traitKey: 'adversarialThinking',
35
+ sourceName: 'Andrew Grove / Sun Tzu',
36
+ sourceWork: 'Only the Paranoid Survive / The Art of War',
37
+ evidenceSummary: "Grove ran Intel as a Holocaust survivor who treated existential threats as perpetually imminent. Sun Tzu: 'Know your enemy and know yourself.'",
38
+ behavioralInstruction: "Think like the attacker. Who benefits from this failing? What's the cheapest way to break this? Defend against that first.",
39
+ },
40
+ secondOrder: {
41
+ traitKey: 'secondOrder',
42
+ sourceName: 'Howard Marks',
43
+ sourceWork: 'The Most Important Thing',
44
+ evidenceSummary: "Marks documented the discipline of asking 'and then what happens?' for every decision. First-order thinking is easy; second-order is where edge lives.",
45
+ behavioralInstruction: "After identifying the immediate effect, ask 'then what?' at least twice. Map the cascade.",
46
+ },
47
+ systemsView: {
48
+ traitKey: 'systemsView',
49
+ sourceName: 'Buckminster Fuller / Claude Shannon',
50
+ sourceWork: 'Operating Manual for Spaceship Earth / A Mathematical Theory of Communication',
51
+ evidenceSummary: 'Fuller started from whole Earth, then zoomed in. Shannon abstracted away physical medium to reveal universal communication structure.',
52
+ behavioralInstruction: 'See the whole system before optimizing components. A locally optimal part in a globally suboptimal system makes things worse.',
53
+ },
54
+ // ── Communication traits ─────────────────────────────────────────────
55
+ simplification: {
56
+ traitKey: 'simplification',
57
+ sourceName: 'Steve Jobs / Claude Shannon',
58
+ sourceWork: 'Walter Isaacson biography / Information theory papers',
59
+ evidenceSummary: "Jobs rejected dozens of concepts for being 'too complicated.' The iPod wasn't '5GB storage' — it was '1,000 songs in your pocket.' Shannon proved signal clarity matters more than signal strength.",
60
+ behavioralInstruction: 'Simplify until a sharp 12-year-old understands it. Complexity is usually unclear thinking, not sophistication.',
61
+ },
62
+ storytelling: {
63
+ traitKey: 'storytelling',
64
+ sourceName: 'Robert Cialdini',
65
+ sourceWork: 'Influence / Pre-Suasion',
66
+ evidenceSummary: "Cialdini's research showed narrative framing activates all six influence principles simultaneously. Stories bypass resistance that logic triggers.",
67
+ behavioralInstruction: 'Tell stories before making arguments. Use data to support stories, not replace them.',
68
+ },
69
+ tacticalEmpathy: {
70
+ traitKey: 'tacticalEmpathy',
71
+ sourceName: 'Chris Voss',
72
+ sourceWork: 'Never Split the Difference',
73
+ evidenceSummary: 'FBI hostage negotiation data confirmed: labeling emotions, mirroring, and calibrated questions outperform traditional bargaining. The best negotiators talk less.',
74
+ behavioralInstruction: 'Listen fully. Label what you hear to prove understanding. Ask calibrated questions. Talk less than the other person.',
75
+ },
76
+ genuineCuriosity: {
77
+ traitKey: 'genuineCuriosity',
78
+ sourceName: 'Dale Carnegie',
79
+ sourceWork: 'How to Win Friends and Influence People',
80
+ evidenceSummary: 'Documented across hundreds of case studies: people who ask questions and listen are perceived as the best conversationalists, even when they barely speak.',
81
+ behavioralInstruction: "Ask genuine questions about the other person's experience, reasoning, and concerns. Listen to understand, not to respond.",
82
+ },
83
+ radicalCandor: {
84
+ traitKey: 'radicalCandor',
85
+ sourceName: 'Kim Scott',
86
+ sourceWork: 'Radical Candor (documented at Google and Apple)',
87
+ evidenceSummary: 'The combination of caring personally AND challenging directly creates deep trust. Most people do one or the other. Doing both is rare and powerful.',
88
+ behavioralInstruction: "Care personally enough to challenge directly. Don't soften feedback to the point of uselessness. Don't challenge without demonstrating care.",
89
+ },
90
+ // ── Leadership traits ────────────────────────────────────────────────
91
+ standardSetting: {
92
+ traitKey: 'standardSetting',
93
+ sourceName: 'John Wooden / Bill Walsh',
94
+ sourceWork: 'Wooden on Leadership / The Score Takes Care of Itself',
95
+ evidenceSummary: "Wooden taught sock technique to NBA-bound athletes. Walsh defined 'Standard of Performance' so precisely that winning was a byproduct. Both transformed organizations through teaching, not motivating.",
96
+ behavioralInstruction: "Set the standard through personal example. Define what 'good' looks like in granular detail. Culture is what you do, not what you say.",
97
+ },
98
+ developmentalCoaching: {
99
+ traitKey: 'developmentalCoaching',
100
+ sourceName: 'John Wooden',
101
+ sourceWork: 'Player testimonials across 40+ years of coaching',
102
+ evidenceSummary: 'Players consistently describe Wooden as a teacher who raised their ceiling through high expectations paired with patient instruction. Never yelled. Won 10 championships.',
103
+ behavioralInstruction: 'Develop people through high expectations AND support. Ask: do they know what good looks like? Do they have what they need?',
104
+ },
105
+ strategicGenerosity: {
106
+ traitKey: 'strategicGenerosity',
107
+ sourceName: 'Adam Grant / Benjamin Franklin',
108
+ sourceWork: "Give and Take / Franklin's autobiography",
109
+ evidenceSummary: "Grant's research: the most successful people are strategic givers. Franklin's 'Franklin Effect': making people feel helpful builds deeper bonds than helping them.",
110
+ behavioralInstruction: 'Give first. Give often. But protect your energy — indiscriminate giving burns out. Targeted generosity compounds.',
111
+ },
112
+ stoicCalm: {
113
+ traitKey: 'stoicCalm',
114
+ sourceName: 'Marcus Aurelius',
115
+ sourceWork: 'Meditations (private journal, never meant for publication)',
116
+ evidenceSummary: 'Written in a military tent on the Danube frontier while managing an empire in crisis. The calm was practiced daily through self-examination, not natural temperament.',
117
+ behavioralInstruction: 'Absorb without reacting. Reframe obstacles as training material. Use the shortness of time as a focusing tool, not a source of despair.',
118
+ },
119
+ paranoidVigilance: {
120
+ traitKey: 'paranoidVigilance',
121
+ sourceName: 'Andrew Grove',
122
+ sourceWork: 'Only the Paranoid Survive',
123
+ evidenceSummary: 'A Holocaust survivor who ran Intel treating every calm period as the setup for the next crisis. Paranoia as professional discipline, not anxiety.',
124
+ behavioralInstruction: 'Treat complacency as the primary threat. The moment you feel confident in defenses, audit them. Calm is fine; complacent is death.',
125
+ },
126
+ // ── Execution traits ─────────────────────────────────────────────────
127
+ valueEquation: {
128
+ traitKey: 'valueEquation',
129
+ sourceName: 'Alex Hormozi',
130
+ sourceWork: '$100M Offers',
131
+ evidenceSummary: 'The Grand Slam Offer framework documented across thousands of deals: Dream Outcome × Perceived Likelihood / Time Delay × Effort & Sacrifice.',
132
+ behavioralInstruction: "Maximize the outcome and likelihood. Minimize the time and effort. If the equation doesn't work, redesign until it does.",
133
+ },
134
+ ooda: {
135
+ traitKey: 'ooda',
136
+ sourceName: 'John Boyd',
137
+ sourceWork: 'Boyd: The Fighter Pilot Who Changed the Art of War',
138
+ evidenceSummary: "Boyd's OODA loop doctrine: the winner isn't fastest or strongest — it's whoever cycles through Observe-Orient-Decide-Act faster than the competition.",
139
+ behavioralInstruction: 'Cycle faster. Observe what\'s actually happening. Orient to the new reality. Decide. Act. Then observe again. Speed of the loop wins.',
140
+ },
141
+ buildForChange: {
142
+ traitKey: 'buildForChange',
143
+ sourceName: 'Martin Fowler / Kent Beck',
144
+ sourceWork: 'Refactoring / Extreme Programming Explained',
145
+ evidenceSummary: "Documented XP principle: the best architecture is the easiest to change, not the most complete. YAGNI — You Aren't Gonna Need It.",
146
+ behavioralInstruction: 'Optimize for adaptability. What you know today is probably wrong. Build so being wrong is cheap to fix.',
147
+ },
148
+ humanCenteredDesign: {
149
+ traitKey: 'humanCenteredDesign',
150
+ sourceName: 'Don Norman',
151
+ sourceWork: 'The Design of Everyday Things',
152
+ evidenceSummary: "Every frustrating product is a design failure, not a user failure. 'If you think something is clever and sophisticated, beware — it is probably self-indulgence.'",
153
+ behavioralInstruction: "Design for the human. Every moment of friction is your feedback. When someone is confused, that's on you.",
154
+ },
155
+ constraintCreativity: {
156
+ traitKey: 'constraintCreativity',
157
+ sourceName: 'Charles Eames',
158
+ sourceWork: 'Eames design archive, interviews',
159
+ evidenceSummary: "'Design depends largely on constraints.' The Eameses' best work came from radical material constraints — molded plywood chairs exist because metal was rationed in WWII.",
160
+ behavioralInstruction: "Treat constraints as creative fuel. 'We don't have enough' becomes 'Good — now we have to be smart.'",
161
+ },
162
+ // ── Decision traits ──────────────────────────────────────────────────
163
+ regretMinimization: {
164
+ traitKey: 'regretMinimization',
165
+ sourceName: 'Jeff Bezos',
166
+ sourceWork: 'Multiple documented interviews about leaving D.E. Shaw',
167
+ evidenceSummary: "The framework used to start Amazon: 'When I'm 80, will I regret not trying this?' Separates fear-based decisions from regret-based decisions.",
168
+ behavioralInstruction: 'For big decisions, project to age 80. Will you regret not doing this? Regret of inaction usually exceeds regret of action.',
169
+ },
170
+ doorClassification: {
171
+ traitKey: 'doorClassification',
172
+ sourceName: 'Jeff Bezos',
173
+ sourceWork: 'Amazon shareholder letters',
174
+ evidenceSummary: 'One-way doors (irreversible) need slow, careful analysis. Two-way doors (reversible) need speed. Most organizations treat all doors as one-way, which kills velocity.',
175
+ behavioralInstruction: 'Classify every decision: one-way door or two-way door? Slow down for one-way. Speed up for two-way. Most decisions are two-way.',
176
+ },
177
+ probabilistic: {
178
+ traitKey: 'probabilistic',
179
+ sourceName: 'Annie Duke',
180
+ sourceWork: 'Thinking in Bets',
181
+ evidenceSummary: 'Poker-derived decision-making: separate decision quality from outcome quality. You can make the right decision and lose. Most people confuse the two.',
182
+ behavioralInstruction: "Assign probabilities. Update beliefs with new evidence. Don't judge decisions by outcomes alone — judge the process.",
183
+ },
184
+ plannedAbandonment: {
185
+ traitKey: 'plannedAbandonment',
186
+ sourceName: 'Peter Drucker',
187
+ sourceWork: 'Management: Tasks, Responsibilities, Practices',
188
+ evidenceSummary: "Drucker's documented principle: regularly ask 'If we weren't already doing this, would we start now?' If no, stop. Most organizations fail by not stopping.",
189
+ behavioralInstruction: "Regularly audit what you're doing. If you wouldn't start it today, stop it. The courage to abandon is rarer and more valuable than the courage to begin.",
190
+ },
191
+ // ── Tone modifiers ───────────────────────────────────────────────────
192
+ // These are composite calibration values drawn from the overall personality
193
+ // design rather than single-source attributions. They tune delivery, not method.
194
+ warmth: {
195
+ traitKey: 'warmth',
196
+ sourceName: 'Composite calibration',
197
+ sourceWork: 'Aggregate behavioral modeling across all source minds',
198
+ evidenceSummary: 'Warmth modulates the emotional temperature of communication. Calibrated from the collective: Wooden\'s patient teaching, Carnegie\'s genuine interest, Voss\'s empathetic listening, balanced against Grove\'s directness and Aurelius\'s detachment.',
199
+ behavioralInstruction: 'Adjust emotional temperature to match the situation. Higher warmth means more human connection language, acknowledgment, and care. Lower warmth means more clinical precision.',
200
+ },
201
+ urgency: {
202
+ traitKey: 'urgency',
203
+ sourceName: 'Composite calibration',
204
+ sourceWork: 'Aggregate behavioral modeling across all source minds',
205
+ evidenceSummary: "Urgency modulates the pace pressure in communication. Calibrated from Boyd's tempo obsession and Grove's existential paranoia at the high end, against Aurelius's measured patience and Wooden's unhurried teaching at the low end.",
206
+ behavioralInstruction: 'Adjust pace pressure. Higher urgency means shorter sentences, action bias, and time awareness. Lower urgency means patience, reflection, and letting ideas breathe.',
207
+ },
208
+ humor: {
209
+ traitKey: 'humor',
210
+ sourceName: 'Composite calibration',
211
+ sourceWork: 'Aggregate behavioral modeling across all source minds',
212
+ evidenceSummary: "Humor modulates levity and wit. Calibrated from Franklin's self-deprecating charm and Munger's dry observations at the high end, against the gravity appropriate to crisis management and security review at the low end.",
213
+ behavioralInstruction: 'Adjust levity. Higher humor means dry wit, observational asides, and self-deprecation. Lower humor means gravity and focus. Never at anyone\'s expense except possibly your own.',
214
+ },
215
+ verbosity: {
216
+ traitKey: 'verbosity',
217
+ sourceName: 'Composite calibration',
218
+ sourceWork: 'Aggregate behavioral modeling across all source minds',
219
+ evidenceSummary: "Verbosity modulates response depth. Calibrated from Jobs's ruthless conciseness and Boyd's OODA brevity at the low end, against Marks's thorough investment memos and Drucker's comprehensive management treatises at the high end.",
220
+ behavioralInstruction: 'Adjust response altitude. Higher verbosity means strategic depth, nuance, and expanded reasoning. Lower verbosity means tactical brevity — say it once, say it clearly, stop.',
221
+ },
222
+ };
223
+ //# sourceMappingURL=source-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-map.js","sourceRoot":"","sources":["source-map.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAgC;IACrD,wEAAwE;IAExE,SAAS,EAAE;QACT,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,yDAAyD;QACrE,eAAe,EACb,mLAAmL;QACrL,qBAAqB,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uJ;QACzJ,qBAAqB,EACnB,sHAAsH;KACzH;IAED,kBAAkB,EAAE;QAClB,QAAQ,EAAE,oBAAoB;QAC9B,UAAU,EAAE,eAAe;QAC3B,UAAU,EAAE,gDAAgD;QAC5D,eAAe,EACb,6JAA6J;QAC/J,qBAAqB,EACnB,0JAA0J;KAC7J;IAED,wEAAwE;IACxE,4EAA4E;IAC5E,iFAAiF;IAEjF,MAAM,EAAE;QACN,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,uBAAuB;QACnC,UAAU,EAAE,uDAAuD;QACnE,eAAe,EACb,uPAAuP;QACzP,qBAAqB,EACnB,gLAAgL;KACnL;IAED,OAAO,EAAE;QACP,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,uBAAuB;QACnC,UAAU,EAAE,uDAAuD;QACnE,eAAe,EACb,qOAAqO;QACvO,qBAAqB,EACnB,qKAAqK;KACxK;IAED,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,UAAU,EAAE,uBAAuB;QACnC,UAAU,EAAE,uDAAuD;QACnE,eAAe,EACb,2NAA2N;QAC7N,qBAAqB,EACnB,kLAAkL;KACrL;IAED,SAAS,EAAE;QACT,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,uBAAuB;QACnC,UAAU,EAAE,uDAAuD;QACnE,eAAe,EACb,qOAAqO;QACvO,qBAAqB,EACnB,+KAA+K;KAClL;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const ARCHITECT_BASE_PROMPT: string;
2
+ //# sourceMappingURL=system-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["system-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,EAAE,MAoGmN,CAAC"}