deepadata-edm-sdk 0.8.9 → 0.8.11
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.
- package/README.md +281 -278
- package/dist/assembler.d.ts +24 -14
- package/dist/assembler.d.ts.map +1 -1
- package/dist/assembler.js +37 -15
- package/dist/assembler.js.map +1 -1
- package/dist/extractors/generate-field-block.d.ts +44 -0
- package/dist/extractors/generate-field-block.d.ts.map +1 -0
- package/dist/extractors/generate-field-block.js +256 -0
- package/dist/extractors/generate-field-block.js.map +1 -0
- package/dist/extractors/llm-extractor.d.ts +1 -1
- package/dist/extractors/llm-extractor.d.ts.map +1 -1
- package/dist/extractors/llm-extractor.js +50 -52
- package/dist/extractors/llm-extractor.js.map +1 -1
- package/dist/extractors/output-sanitizer.js +1 -1
- package/dist/extractors/output-sanitizer.js.map +1 -1
- package/dist/extractors/profile-prompts.d.ts +10 -7
- package/dist/extractors/profile-prompts.d.ts.map +1 -1
- package/dist/extractors/profile-prompts.js +166 -163
- package/dist/extractors/profile-prompts.js.map +1 -1
- package/dist/schema/edm-schema.d.ts +46 -36
- package/dist/schema/edm-schema.d.ts.map +1 -1
- package/dist/schema/edm-schema.js +23 -6
- package/dist/schema/edm-schema.js.map +1 -1
- package/dist/schema/spec-truth.d.ts +50 -0
- package/dist/schema/spec-truth.d.ts.map +1 -0
- package/dist/schema/spec-truth.js +164 -0
- package/dist/schema/spec-truth.js.map +1 -0
- package/dist/schema/types.d.ts +14 -12
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +31 -1
- package/dist/schema/types.js.map +1 -1
- package/dist/validator.d.ts +20 -7
- package/dist/validator.d.ts.map +1 -1
- package/dist/validator.js +78 -68
- package/dist/validator.js.map +1 -1
- package/dist/version.d.ts +13 -9
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +31 -4
- package/dist/version.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,180 +1,183 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Profile-specific extraction prompts
|
|
3
3
|
*
|
|
4
|
-
* Essential Profile:
|
|
5
|
-
* Extended Profile:
|
|
6
|
-
* Full Profile:
|
|
4
|
+
* Essential Profile: minimal field set for memory platforms
|
|
5
|
+
* Extended Profile: mid-tier field set for journaling apps
|
|
6
|
+
* Full Profile: the complete field set for therapy/clinical tools
|
|
7
|
+
*
|
|
8
|
+
* Field membership per profile is defined by the edm-spec composites
|
|
9
|
+
* (installed `edm-spec` package); counts are not restated here.
|
|
7
10
|
*/
|
|
8
11
|
/**
|
|
9
|
-
* Essential Profile System Prompt
|
|
12
|
+
* Essential Profile System Prompt
|
|
10
13
|
* Target: memory platforms, agent frameworks, AI assistants
|
|
11
14
|
* Core (6 fields) + Constellation (3 fields) = 9 LLM fields
|
|
12
15
|
*/
|
|
13
|
-
export const ESSENTIAL_PROFILE_PROMPT = `
|
|
14
|
-
You classify emotionally rich memories into a JSON object. Input may include text and an image.
|
|
15
|
-
|
|
16
|
-
PROFILE: ESSENTIAL
|
|
17
|
-
This is a minimal extraction for memory platforms. Focus ONLY on the required fields.
|
|
18
|
-
Domains not listed below are not included in this profile.
|
|
19
|
-
|
|
20
|
-
Rules
|
|
21
|
-
- Fuse text + image. Treat text as primary; use image only to add grounded specifics.
|
|
22
|
-
- Keep fields to single words or short phrases (1–3 words).
|
|
23
|
-
- No invention. If not supported by input, use null.
|
|
24
|
-
- Output JSON only — no commentary, markdown, or extra text.
|
|
25
|
-
- Emit lowercase for all string fields except proper names.
|
|
26
|
-
- Use canonical values where they fit. If no canonical value accurately represents the content, use the most accurate free-text term. Accuracy takes precedence over canonical conformance.
|
|
27
|
-
|
|
28
|
-
SUBJECT ANCHORING (critical)
|
|
29
|
-
- The SUBJECT is the person this artifact will belong to. In a chat transcript the SUBJECT is the USER speaker; ASSISTANT text is context only.
|
|
30
|
-
- Extract relative to the SUBJECT, not the passage. Do not invent emotional detail the subject never expressed.
|
|
31
|
-
|
|
32
|
-
EXPERIENTIAL STANCE (critical)
|
|
33
|
-
Classify whose experience the emotionally salient material is, in the top-level "experiential_stance" key: lived (subject's own experience) | witnessed (subject directly affected) | quoted_third_party (someone else's story quoted/pasted/retold) | assistant_generated (assistant-invented fiction or examples) | hypothetical (imagined scenarios, role-play). Pick ONE or null.
|
|
34
|
-
If the stance is quoted_third_party, assistant_generated, or hypothetical: do NOT encode that material into wound — it describes the SUBJECT. Return null instead.
|
|
35
|
-
|
|
36
|
-
ESSENTIAL PROFILE SCHEMA (extract these fields ONLY):
|
|
37
|
-
{
|
|
38
|
-
"experiential_stance": "",
|
|
39
|
-
"core": {
|
|
40
|
-
"anchor": "",
|
|
41
|
-
"spark": "",
|
|
42
|
-
"wound": "",
|
|
43
|
-
"fuel": "",
|
|
44
|
-
"bridge": "",
|
|
45
|
-
"echo": ""
|
|
46
|
-
},
|
|
47
|
-
"constellation": {
|
|
48
|
-
"emotion_primary": "",
|
|
49
|
-
"emotion_subtone": [],
|
|
50
|
-
"narrative_arc": ""
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// EXTRACTION NOTES
|
|
55
|
-
// wound: Do NOT use generic labels like "loss" or "grief".
|
|
56
|
-
// Extract what specifically was lost or why it hurts.
|
|
57
|
-
// If no wound is present in the content, use null.
|
|
58
|
-
//
|
|
59
|
-
// emotion_primary: Prefer canonical values (17 listed). disappointment, relief, frustration are now canonical.
|
|
60
|
-
// If no canonical value fits accurately, use free text.
|
|
61
|
-
//
|
|
62
|
-
// narrative_arc: Describes the STORY TRAJECTORY. loss, confrontation are now canonical.
|
|
63
|
-
// Use free text if no canonical value fits accurately.
|
|
16
|
+
export const ESSENTIAL_PROFILE_PROMPT = `
|
|
17
|
+
You classify emotionally rich memories into a JSON object. Input may include text and an image.
|
|
18
|
+
|
|
19
|
+
PROFILE: ESSENTIAL
|
|
20
|
+
This is a minimal extraction for memory platforms. Focus ONLY on the required fields.
|
|
21
|
+
Domains not listed below are not included in this profile.
|
|
22
|
+
|
|
23
|
+
Rules
|
|
24
|
+
- Fuse text + image. Treat text as primary; use image only to add grounded specifics.
|
|
25
|
+
- Keep fields to single words or short phrases (1–3 words).
|
|
26
|
+
- No invention. If not supported by input, use null.
|
|
27
|
+
- Output JSON only — no commentary, markdown, or extra text.
|
|
28
|
+
- Emit lowercase for all string fields except proper names.
|
|
29
|
+
- Use canonical values where they fit. If no canonical value accurately represents the content, use the most accurate free-text term. Accuracy takes precedence over canonical conformance.
|
|
30
|
+
|
|
31
|
+
SUBJECT ANCHORING (critical)
|
|
32
|
+
- The SUBJECT is the person this artifact will belong to. In a chat transcript the SUBJECT is the USER speaker; ASSISTANT text is context only.
|
|
33
|
+
- Extract relative to the SUBJECT, not the passage. Do not invent emotional detail the subject never expressed.
|
|
34
|
+
|
|
35
|
+
EXPERIENTIAL STANCE (critical)
|
|
36
|
+
Classify whose experience the emotionally salient material is, in the top-level "experiential_stance" key: lived (subject's own experience) | witnessed (subject directly affected) | quoted_third_party (someone else's story quoted/pasted/retold) | assistant_generated (assistant-invented fiction or examples) | hypothetical (imagined scenarios, role-play). Pick ONE or null.
|
|
37
|
+
If the stance is quoted_third_party, assistant_generated, or hypothetical: do NOT encode that material into wound — it describes the SUBJECT. Return null instead.
|
|
38
|
+
|
|
39
|
+
ESSENTIAL PROFILE SCHEMA (extract these fields ONLY):
|
|
40
|
+
{
|
|
41
|
+
"experiential_stance": "", // STRICT ENUM: lived | witnessed | quoted_third_party | assistant_generated | hypothetical (pick ONE or null)
|
|
42
|
+
"core": {
|
|
43
|
+
"anchor": "", // central theme (e.g., "dad's toolbox", "nana's traditions")
|
|
44
|
+
"spark": "", // what triggered the memory (e.g., "finding the cassette", "first snow")
|
|
45
|
+
"wound": "", // The specific vulnerability, loss, or pain present — NOT generic labels like 'loss' or 'grief' but what exactly was lost or why it hurts. Examples: 'unlived travel dream', 'war silence never spoken', 'father died before I knew him', 'shame of not fitting in'. If no wound is present, use null.
|
|
46
|
+
"fuel": "", // what energized the experience (e.g., "shared laughter", "curiosity")
|
|
47
|
+
"bridge": "", // connection between past and present (e.g., "replaying old tape", "returning to the porch")
|
|
48
|
+
"echo": "" // what still resonates (e.g., "her laugh", "smell of oil", "city lights on water")
|
|
49
|
+
},
|
|
50
|
+
"constellation": {
|
|
51
|
+
"emotion_primary": "", // CANONICAL: joy | sadness | fear | anger | wonder | peace | tenderness | reverence | pride | anxiety | gratitude | longing | hope | shame | disappointment | relief | frustration (free text accepted if none fits)
|
|
52
|
+
"emotion_subtone": [], // 2–4 short words (e.g., bittersweet, grateful) — free text array
|
|
53
|
+
"narrative_arc": "" // CANONICAL: overcoming | transformation | connection | reflection | closure | loss | confrontation (free text accepted if none fits)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// EXTRACTION NOTES
|
|
58
|
+
// wound: Do NOT use generic labels like "loss" or "grief".
|
|
59
|
+
// Extract what specifically was lost or why it hurts.
|
|
60
|
+
// If no wound is present in the content, use null.
|
|
61
|
+
//
|
|
62
|
+
// emotion_primary: Prefer canonical values (17 listed). disappointment, relief, frustration are now canonical.
|
|
63
|
+
// If no canonical value fits accurately, use free text.
|
|
64
|
+
//
|
|
65
|
+
// narrative_arc: Describes the STORY TRAJECTORY. loss, confrontation are now canonical.
|
|
66
|
+
// Use free text if no canonical value fits accurately.
|
|
64
67
|
`;
|
|
65
68
|
/**
|
|
66
|
-
* Extended Profile System Prompt
|
|
69
|
+
* Extended Profile System Prompt
|
|
67
70
|
* Target: journaling apps, companion AI, workplace wellness
|
|
68
71
|
* Core (7) + Constellation (18) + Milky_Way (5) + Gravity (5) = 35 LLM fields + metadata domains
|
|
69
72
|
* Impulse, System, Crosswalks — Not included in this profile
|
|
70
73
|
*/
|
|
71
|
-
export const EXTENDED_PROFILE_PROMPT = `
|
|
72
|
-
You classify emotionally rich memories into a JSON object. Input may include text and an image.
|
|
73
|
-
|
|
74
|
-
PROFILE: EXTENDED
|
|
75
|
-
This extraction adds full Constellation, Milky_Way, and key Gravity fields.
|
|
76
|
-
Impulse domain is NOT included in this profile.
|
|
77
|
-
|
|
78
|
-
Rules
|
|
79
|
-
- Fuse text + image. Treat text as primary; use image only to add grounded specifics.
|
|
80
|
-
- Keep fields to single words or short phrases (1–3 words). Only "narrative" is multi-sentence (3–5).
|
|
81
|
-
- No invention. If not supported by input, use null.
|
|
82
|
-
- Output JSON only — no commentary, markdown, or extra text.
|
|
83
|
-
- Emit lowercase for all string fields except proper names.
|
|
84
|
-
- For array fields, use short tokens without punctuation; avoid duplicates.
|
|
85
|
-
- Use canonical values where they fit. If no canonical value accurately represents the content, use the most accurate free-text term. Accuracy takes precedence over canonical conformance.
|
|
86
|
-
|
|
87
|
-
SUBJECT ANCHORING (critical)
|
|
88
|
-
- The SUBJECT is the person this artifact will belong to. In a chat transcript the SUBJECT is the USER speaker; ASSISTANT text is context only, never a source of the subject's experience.
|
|
89
|
-
- Score every field relative to the SUBJECT, not the passage. emotional_weight measures what this content meant TO THE SUBJECT — not how vivid, dramatic, or emotionally rich the text itself is.
|
|
90
|
-
- Routine work content (debugging, drafting, planning, logistics) is 0.1–0.4 even when the subject expresses momentary relief or frustration. Reserve 0.7+ for events with personal stakes the subject states or plainly carries. Do not invent somatic or emotional detail the subject never expressed.
|
|
91
|
-
- transformational_pivot is true ONLY if the subject explicitly marks the experience as life-changing. Finishing a task, fixing a bug, or shipping a feature is not a transformational pivot.
|
|
92
|
-
|
|
93
|
-
EXPERIENTIAL STANCE (critical)
|
|
94
|
-
Classify whose experience the emotionally salient material is, in the top-level "experiential_stance" key:
|
|
95
|
-
- "lived" — the subject's own first-hand experience
|
|
96
|
-
- "witnessed" — events the subject personally witnessed or is directly affected by (a loved one's death, a family crisis)
|
|
97
|
-
- "quoted_third_party" — someone else's story the subject quoted, pasted, or retold without being a participant (an article, test data, a stranger's anecdote)
|
|
98
|
-
- "assistant_generated" — fiction, examples, or anecdotes produced by the assistant, not reported by the subject
|
|
99
|
-
- "hypothetical" — imagined scenarios, drafts about invented people, role-play
|
|
100
|
-
If the stance is quoted_third_party, assistant_generated, or hypothetical: do NOT encode that material into wound, identity_thread, expressed_insight, somatic_signature, transformational_pivot, or high emotional_weight — those fields describe the SUBJECT. Extract only what the content reveals about the subject themselves (e.g. why they engaged with it), or return null fields with low weight.
|
|
101
|
-
|
|
102
|
-
EXTENDED PROFILE SCHEMA:
|
|
103
|
-
{
|
|
104
|
-
"experiential_stance": "",
|
|
105
|
-
"core": {
|
|
106
|
-
"anchor": "",
|
|
107
|
-
"spark": "",
|
|
108
|
-
"wound": "",
|
|
109
|
-
"fuel": "",
|
|
110
|
-
"bridge": "",
|
|
111
|
-
"echo": "",
|
|
112
|
-
"narrative": ""
|
|
113
|
-
},
|
|
114
|
-
"constellation": {
|
|
115
|
-
"emotion_primary": "", // CANONICAL: joy | sadness | fear | anger | wonder | peace | tenderness | reverence | pride | anxiety | gratitude | longing | hope | shame | disappointment | relief | frustration (free text accepted if none fits)
|
|
116
|
-
"emotion_subtone": [],
|
|
117
|
-
"higher_order_emotion": "",
|
|
118
|
-
"meta_emotional_state": "",
|
|
119
|
-
"interpersonal_affect": "",
|
|
120
|
-
"narrative_arc": "", // CANONICAL: overcoming | transformation | connection | reflection | closure | loss | confrontation (free text accepted if none fits)
|
|
121
|
-
"relational_dynamics": "", // CANONICAL: parent_child | grandparent_grandchild | romantic_partnership | couple | sibling_bond | family | friendship | friend | companionship | colleague | mentorship | reunion | community_ritual | grief | self_reflection | professional | therapeutic | service | adversarial (free text accepted if none fits)
|
|
122
|
-
"temporal_context": "", // STRICT ENUM: childhood | early_adulthood | midlife | late_life | recent | future | timeless
|
|
123
|
-
"memory_type": "", // STRICT ENUM: legacy_artifact | fleeting_moment | milestone | reflection | formative_experience
|
|
124
|
-
"media_format": "", // STRICT ENUM: photo | video | audio | text | photo_with_story
|
|
125
|
-
"narrative_archetype": "", // STRICT ENUM: hero | caregiver | seeker | sage | lover | outlaw | innocent |
|
|
126
|
-
"symbolic_anchor": "",
|
|
127
|
-
"relational_perspective": "", // STRICT ENUM: self | partner | family | friends | community | humanity
|
|
128
|
-
"temporal_rhythm": "", // STRICT ENUM: still | sudden | rising | fading | recurring | spiraling | dragging | suspended | looping | cyclic
|
|
129
|
-
"identity_thread": "",
|
|
130
|
-
"expressed_insight": "",
|
|
131
|
-
"transformational_pivot": false,
|
|
132
|
-
"somatic_signature": "",
|
|
133
|
-
"arc_type": "" // CANONICAL: betrayal | liberation | grief | discovery | resistance | bond | moral_awakening | transformation | reconciliation | reckoning | threshold | exile | gratitude | authenticity (free text accepted if none fits). gratitude = moments of thankfulness, appreciation, acknowledging blessing; authenticity = feeling fully oneself, self-alignment, identity congruence
|
|
134
|
-
},
|
|
135
|
-
"milky_way": {
|
|
136
|
-
"event_type": "",
|
|
137
|
-
"location_context": "",
|
|
138
|
-
"associated_people": [],
|
|
139
|
-
"visibility_context": "",
|
|
140
|
-
"tone_shift": ""
|
|
141
|
-
},
|
|
142
|
-
"gravity": {
|
|
143
|
-
"emotional_weight": 0.0,
|
|
144
|
-
"valence": "",
|
|
145
|
-
"tether_type": "",
|
|
146
|
-
"recurrence_pattern": "",
|
|
147
|
-
"strength_score": 0.0
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// CROSS-CONTAMINATION DISAMBIGUATION
|
|
152
|
-
//
|
|
153
|
-
// temporal_rhythm vs urgency:
|
|
154
|
-
// temporal_rhythm = CADENCE of time in the memory experience
|
|
155
|
-
// urgency = INTENSITY of motivational pressure right now
|
|
156
|
-
// "pressing" belongs ONLY in urgency, NEVER in temporal_rhythm
|
|
157
|
-
//
|
|
158
|
-
// relational_dynamics vs relational_perspective:
|
|
159
|
-
// relational_dynamics = TYPE of relationship
|
|
160
|
-
// relational_perspective = WHOSE viewpoint the narrative is told from
|
|
161
|
-
//
|
|
162
|
-
// emotional_weight vs strength_score:
|
|
163
|
-
// emotional_weight = felt intensity IN THE MOMENT (how heavy does it feel?)
|
|
164
|
-
// strength_score = how BOUND/STUCK this memory is over time
|
|
165
|
-
// These should NOT always correlate.
|
|
166
|
-
//
|
|
167
|
-
// emotion_primary: Prefer canonical values (17 listed). disappointment, relief, frustration are now canonical.
|
|
168
|
-
// Use higher_order_emotion for complex emotions not in the list.
|
|
169
|
-
// If no canonical value fits accurately, use free text.
|
|
170
|
-
//
|
|
171
|
-
// narrative_arc: Describes the STORY TRAJECTORY. loss, confrontation are now canonical.
|
|
172
|
-
// Use free text if no canonical value fits accurately.
|
|
173
|
-
//
|
|
174
|
-
// arc_type: Identify the structural arc pattern. Prefer canonical values: betrayal, liberation, grief, discovery, resistance, bond, moral_awakening, transformation, reconciliation, reckoning, threshold, exile. If none fits accurately, use the most accurate descriptive term. Use exact canonical spelling with underscores: moral_awakening not moral awakening. Canonical values must match exactly.
|
|
175
|
-
//
|
|
176
|
-
// wound: Do NOT use generic labels like "loss" or "grief".
|
|
177
|
-
// Extract what specifically was lost or why it hurts.
|
|
74
|
+
export const EXTENDED_PROFILE_PROMPT = `
|
|
75
|
+
You classify emotionally rich memories into a JSON object. Input may include text and an image.
|
|
76
|
+
|
|
77
|
+
PROFILE: EXTENDED
|
|
78
|
+
This extraction adds full Constellation, Milky_Way, and key Gravity fields.
|
|
79
|
+
Impulse domain is NOT included in this profile.
|
|
80
|
+
|
|
81
|
+
Rules
|
|
82
|
+
- Fuse text + image. Treat text as primary; use image only to add grounded specifics.
|
|
83
|
+
- Keep fields to single words or short phrases (1–3 words). Only "narrative" is multi-sentence (3–5).
|
|
84
|
+
- No invention. If not supported by input, use null.
|
|
85
|
+
- Output JSON only — no commentary, markdown, or extra text.
|
|
86
|
+
- Emit lowercase for all string fields except proper names.
|
|
87
|
+
- For array fields, use short tokens without punctuation; avoid duplicates.
|
|
88
|
+
- Use canonical values where they fit. If no canonical value accurately represents the content, use the most accurate free-text term. Accuracy takes precedence over canonical conformance.
|
|
89
|
+
|
|
90
|
+
SUBJECT ANCHORING (critical)
|
|
91
|
+
- The SUBJECT is the person this artifact will belong to. In a chat transcript the SUBJECT is the USER speaker; ASSISTANT text is context only, never a source of the subject's experience.
|
|
92
|
+
- Score every field relative to the SUBJECT, not the passage. emotional_weight measures what this content meant TO THE SUBJECT — not how vivid, dramatic, or emotionally rich the text itself is.
|
|
93
|
+
- Routine work content (debugging, drafting, planning, logistics) is 0.1–0.4 even when the subject expresses momentary relief or frustration. Reserve 0.7+ for events with personal stakes the subject states or plainly carries. Do not invent somatic or emotional detail the subject never expressed.
|
|
94
|
+
- transformational_pivot is true ONLY if the subject explicitly marks the experience as life-changing. Finishing a task, fixing a bug, or shipping a feature is not a transformational pivot.
|
|
95
|
+
|
|
96
|
+
EXPERIENTIAL STANCE (critical)
|
|
97
|
+
Classify whose experience the emotionally salient material is, in the top-level "experiential_stance" key:
|
|
98
|
+
- "lived" — the subject's own first-hand experience
|
|
99
|
+
- "witnessed" — events the subject personally witnessed or is directly affected by (a loved one's death, a family crisis)
|
|
100
|
+
- "quoted_third_party" — someone else's story the subject quoted, pasted, or retold without being a participant (an article, test data, a stranger's anecdote)
|
|
101
|
+
- "assistant_generated" — fiction, examples, or anecdotes produced by the assistant, not reported by the subject
|
|
102
|
+
- "hypothetical" — imagined scenarios, drafts about invented people, role-play
|
|
103
|
+
If the stance is quoted_third_party, assistant_generated, or hypothetical: do NOT encode that material into wound, identity_thread, expressed_insight, somatic_signature, transformational_pivot, or high emotional_weight — those fields describe the SUBJECT. Extract only what the content reveals about the subject themselves (e.g. why they engaged with it), or return null fields with low weight.
|
|
104
|
+
|
|
105
|
+
EXTENDED PROFILE SCHEMA:
|
|
106
|
+
{
|
|
107
|
+
"experiential_stance": "", // STRICT ENUM: lived | witnessed | quoted_third_party | assistant_generated | hypothetical (pick ONE or null)
|
|
108
|
+
"core": {
|
|
109
|
+
"anchor": "", // central theme (e.g., "dad's toolbox", "nana's traditions")
|
|
110
|
+
"spark": "", // what triggered the memory (e.g., "finding the cassette", "first snow")
|
|
111
|
+
"wound": "", // The specific vulnerability, loss, or pain present — NOT generic labels like 'loss' or 'grief' but what exactly was lost or why it hurts. Examples: 'unlived travel dream', 'war silence never spoken', 'father died before I knew him', 'shame of not fitting in'. If no wound is present, use null.
|
|
112
|
+
"fuel": "", // what energized the experience (e.g., "shared laughter", "curiosity")
|
|
113
|
+
"bridge": "", // connection between past and present (e.g., "replaying old tape", "returning to the porch")
|
|
114
|
+
"echo": "", // what still resonates (e.g., "her laugh", "smell of oil", "city lights on water")
|
|
115
|
+
"narrative": "" // 3–5 sentences. REQUIRED: include ALL of the following — ≥1 concrete sensory detail (sight, sound, smell, texture), ≥1 temporal cue that anchors the memory in time, ≥1 symbolic callback that connects past to present. Write from the subject's perspective. Do not compress or summarise — give the memory space to breathe. Faithful and specific. Never generic.
|
|
116
|
+
},
|
|
117
|
+
"constellation": {
|
|
118
|
+
"emotion_primary": "", // CANONICAL: joy | sadness | fear | anger | wonder | peace | tenderness | reverence | pride | anxiety | gratitude | longing | hope | shame | disappointment | relief | frustration (free text accepted if none fits)
|
|
119
|
+
"emotion_subtone": [], // 2–4 short words (e.g., bittersweet, grateful) — free text array
|
|
120
|
+
"higher_order_emotion": "", // free text: e.g., awe, forgiveness, pride, moral_elevation (or null)
|
|
121
|
+
"meta_emotional_state": "", // free text: e.g., acceptance, confusion, curiosity (or null)
|
|
122
|
+
"interpersonal_affect": "", // free text: e.g., warmth, openness, defensiveness (or null)
|
|
123
|
+
"narrative_arc": "", // CANONICAL: overcoming | transformation | connection | reflection | closure | loss | confrontation (free text accepted if none fits)
|
|
124
|
+
"relational_dynamics": "", // CANONICAL: parent_child | grandparent_grandchild | romantic_partnership | couple | sibling_bond | family | friendship | friend | companionship | colleague | mentorship | reunion | community_ritual | grief | self_reflection | professional | therapeutic | service | adversarial (free text accepted if none fits)
|
|
125
|
+
"temporal_context": "", // STRICT ENUM: childhood | early_adulthood | midlife | late_life | recent | future | timeless (pick ONE or null)
|
|
126
|
+
"memory_type": "", // STRICT ENUM: legacy_artifact | fleeting_moment | milestone | reflection | formative_experience (pick ONE or null)
|
|
127
|
+
"media_format": "", // STRICT ENUM: photo | video | audio | text | photo_with_story (pick ONE or null)
|
|
128
|
+
"narrative_archetype": "", // STRICT ENUM: hero | caregiver | seeker | sage | lover | outlaw | innocent | magician | creator | everyman | jester | ruler (pick ONE or null; lowercase)
|
|
129
|
+
"symbolic_anchor": "", // concrete object/place/ritual (or null)
|
|
130
|
+
"relational_perspective": "", // STRICT ENUM: self | partner | family | friends | community | humanity (pick ONE or null)
|
|
131
|
+
"temporal_rhythm": "", // STRICT ENUM: still | sudden | rising | fading | recurring | spiraling | dragging | suspended | looping | cyclic (pick ONE or null)
|
|
132
|
+
"identity_thread": "", // short sentence
|
|
133
|
+
"expressed_insight": "", // brief insight explicitly stated by subject (extracted, not inferred)
|
|
134
|
+
"transformational_pivot": false, // true if subject explicitly identifies this as life-changing
|
|
135
|
+
"somatic_signature": "", // bodily sensations explicitly described (e.g., "chest tightness", "warmth spreading") or null
|
|
136
|
+
"arc_type": "" // CANONICAL: betrayal | liberation | grief | discovery | resistance | bond | moral_awakening | transformation | reconciliation | reckoning | threshold | exile | gratitude | authenticity (free text accepted if none fits). gratitude = moments of thankfulness, appreciation, acknowledging blessing; authenticity = feeling fully oneself, self-alignment, identity congruence
|
|
137
|
+
},
|
|
138
|
+
"milky_way": {
|
|
139
|
+
"event_type": "", // e.g., family gathering, farewell, birthday (or null)
|
|
140
|
+
"location_context": "", // place from text or image (or null)
|
|
141
|
+
"associated_people": [], // names or roles (proper case allowed)
|
|
142
|
+
"visibility_context": "", // STRICT ENUM: private | family_only | shared_publicly (pick ONE or null)
|
|
143
|
+
"tone_shift": "" // e.g., loss to gratitude (or null)
|
|
144
|
+
},
|
|
145
|
+
"gravity": {
|
|
146
|
+
"emotional_weight": 0.0, // 0.0–1.0 (felt intensity IN THE MOMENT). Calibration: 0.9+ life-altering irreversible moments; 0.7-0.9 significant personal events with strong emotional response; 0.4-0.7 meaningful but routine emotional experiences; 0.1-0.4 mild passing emotional content
|
|
147
|
+
"valence": "", // STRICT ENUM: positive | negative | mixed (pick ONE or null)
|
|
148
|
+
"tether_type": "", // CANONICAL: person | symbol | event | place | ritual | object | tradition | identity | self (free text accepted if none fits)
|
|
149
|
+
"recurrence_pattern": "", // CANONICAL: cyclical | isolated | chronic | emerging (free text accepted if none fits)
|
|
150
|
+
"strength_score": 0.0 // 0.0–1.0 (how BOUND/STUCK this memory is)
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// CROSS-CONTAMINATION DISAMBIGUATION
|
|
155
|
+
//
|
|
156
|
+
// temporal_rhythm vs urgency:
|
|
157
|
+
// temporal_rhythm = CADENCE of time in the memory experience
|
|
158
|
+
// urgency = INTENSITY of motivational pressure right now
|
|
159
|
+
// "pressing" belongs ONLY in urgency, NEVER in temporal_rhythm
|
|
160
|
+
//
|
|
161
|
+
// relational_dynamics vs relational_perspective:
|
|
162
|
+
// relational_dynamics = TYPE of relationship
|
|
163
|
+
// relational_perspective = WHOSE viewpoint the narrative is told from
|
|
164
|
+
//
|
|
165
|
+
// emotional_weight vs strength_score:
|
|
166
|
+
// emotional_weight = felt intensity IN THE MOMENT (how heavy does it feel?)
|
|
167
|
+
// strength_score = how BOUND/STUCK this memory is over time
|
|
168
|
+
// These should NOT always correlate.
|
|
169
|
+
//
|
|
170
|
+
// emotion_primary: Prefer canonical values (17 listed). disappointment, relief, frustration are now canonical.
|
|
171
|
+
// Use higher_order_emotion for complex emotions not in the list.
|
|
172
|
+
// If no canonical value fits accurately, use free text.
|
|
173
|
+
//
|
|
174
|
+
// narrative_arc: Describes the STORY TRAJECTORY. loss, confrontation are now canonical.
|
|
175
|
+
// Use free text if no canonical value fits accurately.
|
|
176
|
+
//
|
|
177
|
+
// arc_type: Identify the structural arc pattern. Prefer canonical values: betrayal, liberation, grief, discovery, resistance, bond, moral_awakening, transformation, reconciliation, reckoning, threshold, exile. If none fits accurately, use the most accurate descriptive term. Use exact canonical spelling with underscores: moral_awakening not moral awakening. Canonical values must match exactly.
|
|
178
|
+
//
|
|
179
|
+
// wound: Do NOT use generic labels like "loss" or "grief".
|
|
180
|
+
// Extract what specifically was lost or why it hurts.
|
|
178
181
|
`;
|
|
179
182
|
/**
|
|
180
183
|
* Get the appropriate system prompt for a profile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-prompts.js","sourceRoot":"","sources":["../../src/extractors/profile-prompts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"profile-prompts.js","sourceRoot":"","sources":["../../src/extractors/profile-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDvC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GtC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAmB;IAClD,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,WAAW;YACd,OAAO,wBAAwB,CAAC;QAClC,KAAK,UAAU;YACb,OAAO,uBAAuB,CAAC;QACjC,KAAK,MAAM,CAAC;QACZ;YACE,sDAAsD;YACtD,OAAO,IAAyB,CAAC,CAAC,wBAAwB;IAC9D,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAiC;IACnE,SAAS,EAAE;QACT,aAAa;QACb,YAAY;QACZ,+BAA+B;QAC/B,+BAA+B;QAC/B,6BAA6B;KAC9B;IACD,QAAQ,EAAE;QACR,aAAa;QACb,YAAY;QACZ,gBAAgB;QAChB,+BAA+B;QAC/B,+BAA+B;QAC/B,6BAA6B;QAC7B,mCAAmC;QACnC,gCAAgC;QAChC,2BAA2B;QAC3B,sBAAsB;QACtB,0BAA0B;QAC1B,iBAAiB;QACjB,qBAAqB;QACrB,4BAA4B;QAC5B,wBAAwB;KACzB;IACD,IAAI,EAAE;QACJ,aAAa;QACb,YAAY;QACZ,gBAAgB;QAChB,+BAA+B;QAC/B,+BAA+B;QAC/B,6BAA6B;QAC7B,mCAAmC;QACnC,gCAAgC;QAChC,2BAA2B;QAC3B,mCAAmC;QACnC,sBAAsB;QACtB,6BAA6B;QAC7B,0BAA0B;QAC1B,iBAAiB;QACjB,qBAAqB;QACrB,yBAAyB;QACzB,wBAAwB;QACxB,4BAA4B;QAC5B,wBAAwB;QACxB,qBAAqB;QACrB,kCAAkC;KACnC;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAkD,EAClD,OAAmB;IAEnB,MAAM,cAAc,GAAG,uBAAuB,CAAC,OAA+C,CAAC;WAC1F,uBAAuB,CAAC,QAAQ,CAAC;IACtC,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAK,MAAM,SAAS,IAAI,cAAc,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK;YAAE,SAAS;QAChC,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QAEzC,8BAA8B;QAC9B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YAC1D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;oBAAE,SAAS,EAAE,CAAC;YACpC,CAAC;iBAAM,CAAC;gBACN,SAAS,EAAE,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACrE,CAAC"}
|