cbrowser 18.78.0 → 18.80.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.
- package/dist/analysis/accessibility-empathy.d.ts.map +1 -1
- package/dist/analysis/accessibility-empathy.js +395 -66
- package/dist/analysis/accessibility-empathy.js.map +1 -1
- package/dist/analysis/agent-ready-audit.d.ts.map +1 -1
- package/dist/analysis/agent-ready-audit.js +78 -0
- package/dist/analysis/agent-ready-audit.js.map +1 -1
- package/dist/analysis/page-understanding.d.ts +139 -1
- package/dist/analysis/page-understanding.d.ts.map +1 -1
- package/dist/analysis/page-understanding.js +179 -12
- package/dist/analysis/page-understanding.js.map +1 -1
- package/dist/artifact-store.d.ts +19 -5
- package/dist/artifact-store.d.ts.map +1 -1
- package/dist/artifact-store.js +41 -11
- package/dist/artifact-store.js.map +1 -1
- package/dist/browser.d.ts +9 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +81 -5
- package/dist/browser.js.map +1 -1
- package/dist/cli.js +55 -10
- package/dist/cli.js.map +1 -1
- package/dist/cognitive/index.d.ts.map +1 -1
- package/dist/cognitive/index.js +3 -2
- package/dist/cognitive/index.js.map +1 -1
- package/dist/config.d.ts +57 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +234 -7
- package/dist/config.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server-remote.d.ts.map +1 -1
- package/dist/mcp-server-remote.js +108 -4
- package/dist/mcp-server-remote.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +62 -938
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-tools/account-personas.d.ts +41 -0
- package/dist/mcp-tools/account-personas.d.ts.map +1 -0
- package/dist/mcp-tools/account-personas.js +98 -0
- package/dist/mcp-tools/account-personas.js.map +1 -0
- package/dist/mcp-tools/base/analysis-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/analysis-tools.js +12 -2
- package/dist/mcp-tools/base/analysis-tools.js.map +1 -1
- package/dist/mcp-tools/base/artifact-tools.d.ts +3 -0
- package/dist/mcp-tools/base/artifact-tools.d.ts.map +1 -0
- package/dist/mcp-tools/base/artifact-tools.js +78 -0
- package/dist/mcp-tools/base/artifact-tools.js.map +1 -0
- package/dist/mcp-tools/base/audit-tools.d.ts +11 -0
- package/dist/mcp-tools/base/audit-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/audit-tools.js +595 -340
- package/dist/mcp-tools/base/audit-tools.js.map +1 -1
- package/dist/mcp-tools/base/browser-management-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/browser-management-tools.js +18 -0
- package/dist/mcp-tools/base/browser-management-tools.js.map +1 -1
- package/dist/mcp-tools/base/bug-analysis-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/bug-analysis-tools.js +59 -3
- package/dist/mcp-tools/base/bug-analysis-tools.js.map +1 -1
- package/dist/mcp-tools/base/capture-tools.d.ts +37 -0
- package/dist/mcp-tools/base/capture-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/capture-tools.js +267 -6
- package/dist/mcp-tools/base/capture-tools.js.map +1 -1
- package/dist/mcp-tools/base/cognitive-tools.d.ts +12 -0
- package/dist/mcp-tools/base/cognitive-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/cognitive-tools.js +63 -15
- package/dist/mcp-tools/base/cognitive-tools.js.map +1 -1
- package/dist/mcp-tools/base/extraction-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/extraction-tools.js +33 -2
- package/dist/mcp-tools/base/extraction-tools.js.map +1 -1
- package/dist/mcp-tools/base/index.d.ts +2 -0
- package/dist/mcp-tools/base/index.d.ts.map +1 -1
- package/dist/mcp-tools/base/index.js +9 -0
- package/dist/mcp-tools/base/index.js.map +1 -1
- package/dist/mcp-tools/base/marketing-tools.js +3 -3
- package/dist/mcp-tools/base/marketing-tools.js.map +1 -1
- package/dist/mcp-tools/base/persona-comparison-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/persona-comparison-tools.js +529 -40
- package/dist/mcp-tools/base/persona-comparison-tools.js.map +1 -1
- package/dist/mcp-tools/base/site-knowledge-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/site-knowledge-tools.js +36 -3
- package/dist/mcp-tools/base/site-knowledge-tools.js.map +1 -1
- package/dist/mcp-tools/base/values-tools.d.ts +113 -0
- package/dist/mcp-tools/base/values-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/values-tools.js +868 -78
- package/dist/mcp-tools/base/values-tools.js.map +1 -1
- package/dist/mcp-tools/base/visual-testing-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/visual-testing-tools.js +130 -10
- package/dist/mcp-tools/base/visual-testing-tools.js.map +1 -1
- package/dist/mcp-tools/index.d.ts +3 -1
- package/dist/mcp-tools/index.d.ts.map +1 -1
- package/dist/mcp-tools/index.js +3 -28
- package/dist/mcp-tools/index.js.map +1 -1
- package/dist/mcp-tools/persona-creation-tools.d.ts.map +1 -1
- package/dist/mcp-tools/persona-creation-tools.js +363 -20
- package/dist/mcp-tools/persona-creation-tools.js.map +1 -1
- package/dist/mcp-tools/persona-lifecycle-tools.d.ts +3 -0
- package/dist/mcp-tools/persona-lifecycle-tools.d.ts.map +1 -0
- package/dist/mcp-tools/persona-lifecycle-tools.js +406 -0
- package/dist/mcp-tools/persona-lifecycle-tools.js.map +1 -0
- package/dist/mcp-tools/screenshot-utils.d.ts.map +1 -1
- package/dist/mcp-tools/screenshot-utils.js +56 -10
- package/dist/mcp-tools/screenshot-utils.js.map +1 -1
- package/dist/mcp-tools/tier-gate.js +2 -2
- package/dist/mcp-tools/tier-gate.js.map +1 -1
- package/dist/mcp-tools/tool-categories.d.ts.map +1 -1
- package/dist/mcp-tools/tool-categories.js +4 -1
- package/dist/mcp-tools/tool-categories.js.map +1 -1
- package/dist/mcp-tools/ui-resources.d.ts +167 -0
- package/dist/mcp-tools/ui-resources.d.ts.map +1 -0
- package/dist/mcp-tools/ui-resources.js +707 -0
- package/dist/mcp-tools/ui-resources.js.map +1 -0
- package/dist/mcp-tools/widget-kit.d.ts +299 -0
- package/dist/mcp-tools/widget-kit.d.ts.map +1 -0
- package/dist/mcp-tools/widget-kit.js +2034 -0
- package/dist/mcp-tools/widget-kit.js.map +1 -0
- package/dist/mcp-ui-resources.d.ts.map +1 -1
- package/dist/mcp-ui-resources.js +14 -4
- package/dist/mcp-ui-resources.js.map +1 -1
- package/dist/persona-questionnaire.d.ts +69 -1
- package/dist/persona-questionnaire.d.ts.map +1 -1
- package/dist/persona-questionnaire.js +177 -76
- package/dist/persona-questionnaire.js.map +1 -1
- package/dist/persona-scope.d.ts +20 -0
- package/dist/persona-scope.d.ts.map +1 -0
- package/dist/persona-scope.js +59 -0
- package/dist/persona-scope.js.map +1 -0
- package/dist/personas.d.ts +51 -17
- package/dist/personas.d.ts.map +1 -1
- package/dist/personas.js +947 -286
- package/dist/personas.js.map +1 -1
- package/dist/recording/capture-player.d.ts +68 -0
- package/dist/recording/capture-player.d.ts.map +1 -0
- package/dist/recording/capture-player.js +298 -0
- package/dist/recording/capture-player.js.map +1 -0
- package/dist/recording/engine.d.ts +52 -0
- package/dist/recording/engine.d.ts.map +1 -1
- package/dist/recording/engine.js +241 -3
- package/dist/recording/engine.js.map +1 -1
- package/dist/recording/inline-player.d.ts +39 -0
- package/dist/recording/inline-player.d.ts.map +1 -0
- package/dist/recording/inline-player.js +272 -0
- package/dist/recording/inline-player.js.map +1 -0
- package/dist/recording/saliency-overlay.d.ts +133 -0
- package/dist/recording/saliency-overlay.d.ts.map +1 -0
- package/dist/recording/saliency-overlay.js +360 -0
- package/dist/recording/saliency-overlay.js.map +1 -0
- package/dist/recording/types.d.ts +32 -0
- package/dist/recording/types.d.ts.map +1 -1
- package/dist/recording/types.js +46 -0
- package/dist/recording/types.js.map +1 -1
- package/dist/site-model/manager.d.ts +20 -0
- package/dist/site-model/manager.d.ts.map +1 -1
- package/dist/site-model/manager.js +52 -0
- package/dist/site-model/manager.js.map +1 -1
- package/dist/trait-reference.d.ts +26 -2
- package/dist/trait-reference.d.ts.map +1 -1
- package/dist/trait-reference.js +129 -19
- package/dist/trait-reference.js.map +1 -1
- package/dist/types.d.ts +105 -18
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/url-resolution.d.ts +58 -0
- package/dist/url-resolution.d.ts.map +1 -0
- package/dist/url-resolution.js +143 -0
- package/dist/url-resolution.js.map +1 -0
- package/dist/values/big-five-inference.d.ts +121 -0
- package/dist/values/big-five-inference.d.ts.map +1 -0
- package/dist/values/big-five-inference.js +241 -0
- package/dist/values/big-five-inference.js.map +1 -0
- package/dist/values/big-five-values.d.ts +76 -0
- package/dist/values/big-five-values.d.ts.map +1 -0
- package/dist/values/big-five-values.js +152 -0
- package/dist/values/big-five-values.js.map +1 -0
- package/dist/values/index.d.ts +1 -1
- package/dist/values/index.d.ts.map +1 -1
- package/dist/values/index.js +1 -1
- package/dist/values/index.js.map +1 -1
- package/dist/values/persona-completeness.d.ts +91 -0
- package/dist/values/persona-completeness.d.ts.map +1 -0
- package/dist/values/persona-completeness.js +114 -0
- package/dist/values/persona-completeness.js.map +1 -0
- package/dist/values/persona-diff.d.ts +50 -0
- package/dist/values/persona-diff.d.ts.map +1 -0
- package/dist/values/persona-diff.js +126 -0
- package/dist/values/persona-diff.js.map +1 -0
- package/dist/values/persona-values.d.ts +16 -0
- package/dist/values/persona-values.d.ts.map +1 -1
- package/dist/values/persona-values.js +33 -0
- package/dist/values/persona-values.js.map +1 -1
- package/dist/values/schwartz-values.d.ts +9 -1
- package/dist/values/schwartz-values.d.ts.map +1 -1
- package/dist/values/schwartz-values.js +10 -2
- package/dist/values/schwartz-values.js.map +1 -1
- package/dist/values/value-mappings.d.ts +41 -2
- package/dist/values/value-mappings.d.ts.map +1 -1
- package/dist/values/value-mappings.js +65 -8
- package/dist/values/value-mappings.js.map +1 -1
- package/dist/visual/attention-quality.d.ts +27 -0
- package/dist/visual/attention-quality.d.ts.map +1 -1
- package/dist/visual/attention-quality.js +164 -2
- package/dist/visual/attention-quality.js.map +1 -1
- package/dist/visual/attention-transport.d.ts +41 -2
- package/dist/visual/attention-transport.d.ts.map +1 -1
- package/dist/visual/attention-transport.js +98 -26
- package/dist/visual/attention-transport.js.map +1 -1
- package/dist/visual/barrier-overlay-html.d.ts +10 -0
- package/dist/visual/barrier-overlay-html.d.ts.map +1 -1
- package/dist/visual/barrier-overlay-html.js.map +1 -1
- package/dist/visual/cognitive-models.d.ts +109 -13
- package/dist/visual/cognitive-models.d.ts.map +1 -1
- package/dist/visual/cognitive-models.js +166 -3
- package/dist/visual/cognitive-models.js.map +1 -1
- package/dist/visual/cognitive-transport-chain.d.ts +149 -5
- package/dist/visual/cognitive-transport-chain.d.ts.map +1 -1
- package/dist/visual/cognitive-transport-chain.js +558 -30
- package/dist/visual/cognitive-transport-chain.js.map +1 -1
- package/dist/visual/cognitive-transport.d.ts +45 -3
- package/dist/visual/cognitive-transport.d.ts.map +1 -1
- package/dist/visual/cognitive-transport.js +126 -12
- package/dist/visual/cognitive-transport.js.map +1 -1
- package/dist/visual/fixation-corpus.d.ts +52 -0
- package/dist/visual/fixation-corpus.d.ts.map +1 -1
- package/dist/visual/fixation-corpus.js +95 -0
- package/dist/visual/fixation-corpus.js.map +1 -1
- package/dist/visual/llm-relevance.d.ts +193 -0
- package/dist/visual/llm-relevance.d.ts.map +1 -0
- package/dist/visual/llm-relevance.js +480 -0
- package/dist/visual/llm-relevance.js.map +1 -0
- package/dist/visual/perceptual-transport.d.ts +60 -0
- package/dist/visual/perceptual-transport.d.ts.map +1 -1
- package/dist/visual/perceptual-transport.js +228 -19
- package/dist/visual/perceptual-transport.js.map +1 -1
- package/dist/visual/persona-context.d.ts +23 -0
- package/dist/visual/persona-context.d.ts.map +1 -0
- package/dist/visual/persona-context.js +44 -0
- package/dist/visual/persona-context.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inferring Big Five scores from a free-text persona description.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS ROUTE EXISTS
|
|
5
|
+
*
|
|
6
|
+
* A persona's thirteen motivational values come from one of three routes, and
|
|
7
|
+
* they are not equally trustworthy: answers someone gave, then published Big
|
|
8
|
+
* Five correlations, then our own bridge from cognitive traits. The third route
|
|
9
|
+
* cannot reach four of the thirteen axes at all — hedonism, power, universalism
|
|
10
|
+
* and the relatedness need have no cognitive trait pointing at them — so a
|
|
11
|
+
* persona that falls to it gets four placeholders.
|
|
12
|
+
*
|
|
13
|
+
* In practice almost every persona falls to it, because personas are usually
|
|
14
|
+
* written as a sentence of description and nobody answers a questionnaire. The
|
|
15
|
+
* four unreachable axes are therefore not an edge case; they are the normal
|
|
16
|
+
* outcome.
|
|
17
|
+
*
|
|
18
|
+
* This route closes that, and it does so by moving the inference to where the
|
|
19
|
+
* evidence is better rather than by inventing links. A description like "a
|
|
20
|
+
* cautious retiree who double-checks everything before buying" is much closer to
|
|
21
|
+
* what a personality instrument actually measures than `patience: 0.4` is. Once
|
|
22
|
+
* a Big Five profile exists, all thirteen axes derive through correlations three
|
|
23
|
+
* independent bodies of research agree on.
|
|
24
|
+
*
|
|
25
|
+
* WHY IT IS LABELLED SEPARATELY, AND BELOW STATED BIG FIVE
|
|
26
|
+
*
|
|
27
|
+
* The estimate is a model reading prose. That is a real error source with no
|
|
28
|
+
* published calibration behind it, and it is NOT the same evidential object as
|
|
29
|
+
* five numbers a human supplied. Merging the two under one `big_five` label
|
|
30
|
+
* would hide exactly the distinction the route ordering exists to express — so
|
|
31
|
+
* this is its own route, `bigfive_inferred`, ranked below `big_five` and above
|
|
32
|
+
* `cognitive_traits`.
|
|
33
|
+
*
|
|
34
|
+
* The ranking is a claim about where the uncertainty sits, not about accuracy.
|
|
35
|
+
* Inferred Big Five has weak INPUTS and a strong BRIDGE (published correlations
|
|
36
|
+
* to values). The cognitive-trait route has stronger inputs — the persona's
|
|
37
|
+
* stated traits — and a weak bridge our own table invents. Those are different
|
|
38
|
+
* failure modes, and the honest reason to prefer this one is coverage: it
|
|
39
|
+
* reaches thirteen axes instead of nine, and it says out loud that it guessed.
|
|
40
|
+
*
|
|
41
|
+
* @since 2026-08-01
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* Anchors for each factor, written as OBSERVABLE BEHAVIOUR rather than as trait
|
|
45
|
+
* adjectives.
|
|
46
|
+
*
|
|
47
|
+
* Asking a model "how open is this person, 0 to 1?" invites it to pattern-match
|
|
48
|
+
* on the word rather than on the description, and the failure is invisible
|
|
49
|
+
* because any number in range looks like an answer. Anchoring each end in
|
|
50
|
+
* something a description could actually say makes the estimate checkable
|
|
51
|
+
* against the text.
|
|
52
|
+
*/
|
|
53
|
+
export const BIG_FIVE_INFERENCE_ANCHORS = {
|
|
54
|
+
openness: {
|
|
55
|
+
low: "Prefers the familiar; sticks to what already works; describes routine, tradition, or 'the way I have always done it'.",
|
|
56
|
+
high: "Seeks novelty and variety; curious about unfamiliar things; described as imaginative, exploratory, interested in ideas.",
|
|
57
|
+
doNotConfuse: "Not the same as intelligence or competence. A highly skilled person who dislikes change is LOW openness.",
|
|
58
|
+
},
|
|
59
|
+
conscientiousness: {
|
|
60
|
+
low: "Improvises, leaves things half-finished, decides quickly on partial information, describes themselves as disorganised or spontaneous.",
|
|
61
|
+
high: "Plans, checks, finishes; keeps lists; described as careful, thorough, reliable, detail-oriented.",
|
|
62
|
+
doNotConfuse: "Not the same as slow. Someone fast AND thorough is high conscientiousness with high processing speed.",
|
|
63
|
+
},
|
|
64
|
+
extraversion: {
|
|
65
|
+
low: "Drained by interaction; prefers solitary work; described as reserved, private, quiet.",
|
|
66
|
+
high: "Energised by people; seeks stimulation and social contact; described as outgoing, talkative, assertive.",
|
|
67
|
+
doNotConfuse: "Not the same as social skill or confidence. A capable, confident person who finds people tiring is LOW extraversion.",
|
|
68
|
+
},
|
|
69
|
+
agreeableness: {
|
|
70
|
+
low: "Blunt, sceptical of others' motives, competitive, willing to argue; described as demanding or hard to please.",
|
|
71
|
+
high: "Cooperative, trusting, accommodating; avoids conflict; described as warm, helpful, considerate.",
|
|
72
|
+
doNotConfuse: "Not the same as being nice under duress. Someone who complies to avoid conflict but resents it is not high agreeableness.",
|
|
73
|
+
},
|
|
74
|
+
neuroticism: {
|
|
75
|
+
low: "Even-tempered under pressure; recovers quickly from setbacks; described as calm, steady, unflappable.",
|
|
76
|
+
high: "Worries, anticipates problems, rattled by uncertainty; described as anxious, stressed, easily frustrated.",
|
|
77
|
+
doNotConfuse: "Not the same as being careful. A calm person who double-checks is conscientious, NOT neurotic.",
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Words that bear on each factor, used to ask whether a quote is about the
|
|
82
|
+
* thing it is cited for.
|
|
83
|
+
*
|
|
84
|
+
* The existence check ("is this phrase in the description?") closed the
|
|
85
|
+
* fabrication hole and left a second one open: a REAL phrase cited for the
|
|
86
|
+
* WRONG factor passes it completely. "power user" is in the description, so
|
|
87
|
+
* quoting it under extraversion satisfies every check — and it is a claim about
|
|
88
|
+
* expertise, not about whether people energise or drain this person.
|
|
89
|
+
*
|
|
90
|
+
* The lexicons are deliberately generous, because the cost of the two errors is
|
|
91
|
+
* not symmetric. Missing a real cue produces a warning on an honest quote;
|
|
92
|
+
* accepting an unrelated one produces a personality score with a citation that
|
|
93
|
+
* looks checked. So a miss is cheap and an over-tight list is not.
|
|
94
|
+
*
|
|
95
|
+
* What this CANNOT do is judge whether a related quote supports the DIRECTION
|
|
96
|
+
* of the score — "loves a crowded room" cited for extraversion 0.1 matches the
|
|
97
|
+
* lexicon and is still backwards. That needs a reader. This narrows the gap; it
|
|
98
|
+
* does not close it, and the response says so. (2026-08-01)
|
|
99
|
+
*/
|
|
100
|
+
export const BIG_FIVE_CUES = {
|
|
101
|
+
openness: ["curious", "curiosity", "explore", "explorat", "novel", "new ", "variety", "imagin", "creativ",
|
|
102
|
+
"idea", "experiment", "tries", "try ", "unfamiliar", "routine", "tradition", "familiar", "same way",
|
|
103
|
+
"always done", "set in", "adventur", "interest"],
|
|
104
|
+
conscientiousness: ["careful", "carefully", "thorough", "methodical", "organis", "organiz", "plan", "checks",
|
|
105
|
+
"double-check", "double check", "detail", "reliable", "diligent", "disciplin", "list", "systematic",
|
|
106
|
+
"sloppy", "disorgan", "spontaneous", "improvis", "half-finish", "rushes", "skips", "hasty", "meticulous"],
|
|
107
|
+
extraversion: ["outgoing", "talkative", "social", "sociable", "people", "group", "team", "assertive",
|
|
108
|
+
"energis", "energiz", "chatty", "gregarious", "reserved", "quiet", "private", "solitary", "alone",
|
|
109
|
+
"introvert", "extrovert", "shy", "withdraw", "keeps to"],
|
|
110
|
+
agreeableness: ["cooperat", "trusting", "trusts", "warm", "helpful", "considerate", "kind", "accommodat",
|
|
111
|
+
"polite", "agreeab", "conflict", "blunt", "argu", "sceptic", "skeptic", "competitive", "demanding",
|
|
112
|
+
"hard to please", "critical", "suspicious", "confront", "patient with", "generous"],
|
|
113
|
+
neuroticism: ["anxious", "anxiety", "worry", "worries", "stress", "nervous", "frustrat", "rattled",
|
|
114
|
+
"overwhelm", "panic", "tense", "upset", "fear", "afraid", "calm", "steady", "even-temper", "unflappable",
|
|
115
|
+
"relaxed", "composed", "resilient", "recovers", "self-doubt", "doubts"],
|
|
116
|
+
};
|
|
117
|
+
/** Does this quote contain any word that bears on this factor? */
|
|
118
|
+
export function quoteRelatesToFactor(factor, quote) {
|
|
119
|
+
const cues = BIG_FIVE_CUES[factor];
|
|
120
|
+
if (!cues)
|
|
121
|
+
return true;
|
|
122
|
+
const q = quote.toLowerCase();
|
|
123
|
+
return cues.some((c) => q.includes(c));
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Validate an inferred profile before it is stored.
|
|
127
|
+
*
|
|
128
|
+
* Two things are rejected, both because they are the shapes a guess takes when
|
|
129
|
+
* a model had nothing to go on:
|
|
130
|
+
*
|
|
131
|
+
* - A score with no supporting quote. The quote is the audit trail; without it
|
|
132
|
+
* nobody can tell an estimate grounded in the text from one produced to fill
|
|
133
|
+
* the field. A required quote is also the cheapest brake on inventing a
|
|
134
|
+
* number the description does not support.
|
|
135
|
+
* - All five landing at 0.5. That is the shape of "no signal" wearing the
|
|
136
|
+
* shape of "measured average", which is the same 0.5 ambiguity this whole
|
|
137
|
+
* values layer went to some length to remove elsewhere.
|
|
138
|
+
*/
|
|
139
|
+
export function validateInferredBigFive(scores, evidence,
|
|
140
|
+
/**
|
|
141
|
+
* The description the scores were inferred from.
|
|
142
|
+
*
|
|
143
|
+
* Without it the quote requirement is cosmetic: any string satisfies "a quote
|
|
144
|
+
* is present", including the string "NO SUPPORTING TEXT". Checked against the
|
|
145
|
+
* source, a quote is evidence; unchecked, it is a field someone filled in.
|
|
146
|
+
* (2026-08-01)
|
|
147
|
+
*/
|
|
148
|
+
description) {
|
|
149
|
+
const FACTORS = Object.keys(BIG_FIVE_INFERENCE_ANCHORS);
|
|
150
|
+
const missing = FACTORS.filter((f) => typeof scores[f] !== "number");
|
|
151
|
+
if (missing.length) {
|
|
152
|
+
return { ok: false, reason: `missing scores for ${missing.join(", ")} — all five factors are required, because deriving values from a partial profile silently leaves axes at baseline` };
|
|
153
|
+
}
|
|
154
|
+
const outOfRange = FACTORS.filter((f) => scores[f] < 0 || scores[f] > 1);
|
|
155
|
+
if (outOfRange.length) {
|
|
156
|
+
return { ok: false, reason: `out of range: ${outOfRange.join(", ")} (expected 0-1)` };
|
|
157
|
+
}
|
|
158
|
+
const quoted = new Set((evidence ?? []).filter((e) => e.quote?.trim()).map((e) => e.factor));
|
|
159
|
+
const unquoted = FACTORS.filter((f) => !quoted.has(f));
|
|
160
|
+
if (unquoted.length) {
|
|
161
|
+
return { ok: false, reason: `no supporting quote for ${unquoted.join(", ")} — every factor must cite the words in the description that justify its score, so a reader can check the estimate against the text rather than trusting it` };
|
|
162
|
+
}
|
|
163
|
+
// The quote must actually BE in the description.
|
|
164
|
+
//
|
|
165
|
+
// Comparison is on letters and digits only, so punctuation, case and
|
|
166
|
+
// whitespace differences do not reject an honest quote -- but a phrase that
|
|
167
|
+
// is not in the text at all cannot pass, which is the whole point. A quote
|
|
168
|
+
// reading "NO SUPPORTING TEXT" was accepted verbatim before this.
|
|
169
|
+
if (description) {
|
|
170
|
+
const norm = (t) => t.toLowerCase().replace(/[^a-z0-9]+/g, "");
|
|
171
|
+
const haystack = norm(description);
|
|
172
|
+
const fabricated = (evidence ?? [])
|
|
173
|
+
.filter((e) => e.quote?.trim() && !haystack.includes(norm(e.quote)))
|
|
174
|
+
.map((e) => `${e.factor} ("${e.quote.slice(0, 40)}")`);
|
|
175
|
+
if (fabricated.length) {
|
|
176
|
+
return { ok: false, reason: `these quotes do not appear in the description: ${fabricated.join("; ")}. A quote nobody can find in the source is not evidence. If the description does not speak to a factor, omit the whole profile rather than filling the field — see the note below.` };
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// One quote cited for several factors is the shape of a caller who found a
|
|
180
|
+
// single quotable sentence and used it everywhere. Two can be legitimate --
|
|
181
|
+
// "anxious about getting it wrong, so she checks twice" genuinely speaks to
|
|
182
|
+
// neuroticism AND conscientiousness. Three or more is one sentence doing the
|
|
183
|
+
// work of a personality profile.
|
|
184
|
+
const byQuote = new Map();
|
|
185
|
+
for (const e of evidence ?? []) {
|
|
186
|
+
if (!e.quote?.trim())
|
|
187
|
+
continue;
|
|
188
|
+
const k = e.quote.trim().toLowerCase();
|
|
189
|
+
byQuote.set(k, [...(byQuote.get(k) ?? []), e.factor]);
|
|
190
|
+
}
|
|
191
|
+
const overused = [...byQuote.entries()].filter(([, fs]) => fs.length >= 3);
|
|
192
|
+
if (overused.length) {
|
|
193
|
+
const [q, fs] = overused[0];
|
|
194
|
+
return { ok: false, reason: `the same quote ("${q.slice(0, 50)}") is cited for ${fs.length} factors (${fs.join(", ")}). One sentence is not evidence for most of a personality profile — quote the specific words behind each score, or omit the profile` };
|
|
195
|
+
}
|
|
196
|
+
// Does each quote have anything to do with the factor it is cited for?
|
|
197
|
+
//
|
|
198
|
+
// The existence check accepts a real phrase cited for the wrong factor:
|
|
199
|
+
// "power user" appears in the description, so quoting it under extraversion
|
|
200
|
+
// passed every gate while making a claim about expertise, not sociability.
|
|
201
|
+
const unrelated = (evidence ?? [])
|
|
202
|
+
.filter((e) => e.quote?.trim() && BIG_FIVE_CUES[e.factor] && !quoteRelatesToFactor(e.factor, e.quote))
|
|
203
|
+
.map((e) => `${e.factor} ("${e.quote.slice(0, 40)}")`);
|
|
204
|
+
// Every quote unrelated means the citations are decoration. Some unrelated is
|
|
205
|
+
// reported rather than rejected: the lexicons are heuristics, and rejecting an
|
|
206
|
+
// honest quote for missing a keyword would teach callers to pad quotes with
|
|
207
|
+
// cue words, which is worse than the problem.
|
|
208
|
+
if (unrelated.length >= FACTORS.length) {
|
|
209
|
+
return { ok: false, reason: `none of the quotes contain any word bearing on the factor they are cited for (${unrelated.join("; ")}). Quote the words that make the case for THAT factor` };
|
|
210
|
+
}
|
|
211
|
+
if (FACTORS.every((f) => scores[f] === 0.5)) {
|
|
212
|
+
return { ok: false, reason: "all five factors are exactly 0.5, which is what 'no signal' looks like wearing the shape of 'measured average'. If the description genuinely does not support an estimate, omit the profile and let the persona use the cognitive-trait route, which reports its own gaps" };
|
|
213
|
+
}
|
|
214
|
+
return unrelated.length ? { ok: true, unrelatedQuotes: unrelated } : { ok: true };
|
|
215
|
+
}
|
|
216
|
+
/** The block handed to the inferring model. Behavioural anchors, not adjectives. */
|
|
217
|
+
export function bigFiveInferenceReference() {
|
|
218
|
+
return {
|
|
219
|
+
instruction: "Estimate this persona's Big Five personality profile from the description, 0-1 per factor. "
|
|
220
|
+
+ "For EACH factor, quote the words in the description that justify the score — the quote is checked against the description and a phrase that is not in it is rejected. "
|
|
221
|
+
// The previous wording told callers to decline individual factors while
|
|
222
|
+
// the schema required all five, which are not both satisfiable. The
|
|
223
|
+
// profile is all-or-nothing on purpose: a partial one silently leaves
|
|
224
|
+
// axes at baseline, which is the ambiguity this whole layer exists to
|
|
225
|
+
// remove. So the honest out is omitting the profile, not part of it.
|
|
226
|
+
+ "It is ALL FIVE OR NONE: if the description does not support estimating every factor, omit bigFive entirely rather than filling the weak ones. "
|
|
227
|
+
+ "A persona with no Big Five profile derives its values from cognitive traits and reports its own gaps; a persona with an invented one does not.",
|
|
228
|
+
why: "Big Five scores unlock all thirteen motivational values through published correlations. "
|
|
229
|
+
+ "Without them the persona falls back to deriving values from cognitive traits, which cannot reach "
|
|
230
|
+
+ "hedonism, power, universalism or the relatedness need at all — those four stay at the 0.5 baseline.",
|
|
231
|
+
factors: BIG_FIVE_INFERENCE_ANCHORS,
|
|
232
|
+
output_shape: {
|
|
233
|
+
bigFive: { openness: 0.7, conscientiousness: 0.3, extraversion: 0.8, agreeableness: 0.6, neuroticism: 0.2 },
|
|
234
|
+
bigFiveEvidence: [
|
|
235
|
+
{ factor: "openness", score: 0.7, quote: "curious about unfamiliar tools" },
|
|
236
|
+
{ factor: "conscientiousness", score: 0.3, quote: "skims content, decides fast" },
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=big-five-inference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"big-five-inference.js","sourceRoot":"","sources":["../../src/values/big-five-inference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAWH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAwE;IAC7G,QAAQ,EAAE;QACR,GAAG,EAAE,uHAAuH;QAC5H,IAAI,EAAE,yHAAyH;QAC/H,YAAY,EAAE,0GAA0G;KACzH;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,uIAAuI;QAC5I,IAAI,EAAE,kGAAkG;QACxG,YAAY,EAAE,uGAAuG;KACtH;IACD,YAAY,E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
|
1
|
+
/**
|
|
2
|
+
* Big Five -> Schwartz values.
|
|
3
|
+
*
|
|
4
|
+
* Why this exists alongside the cognitive-trait correlations: the published
|
|
5
|
+
* literature relates VALUES to the Big Five, not to patience or satisficing or
|
|
6
|
+
* information foraging. Deriving a value from a cognitive trait therefore
|
|
7
|
+
* always crosses a gap the research does not cover -- the direction may be
|
|
8
|
+
* reasonable, but the bridge is ours. Deriving it from the Big Five does not
|
|
9
|
+
* cross that gap, because the Big Five is the construct the studies measured.
|
|
10
|
+
*
|
|
11
|
+
* This also fills the four axes no cognitive trait reaches. hedonism and power
|
|
12
|
+
* are Extraversion territory; universalism is Openness and Agreeableness;
|
|
13
|
+
* relatedness is the weakest of the four and is labelled accordingly.
|
|
14
|
+
*
|
|
15
|
+
* WHAT IS ESTABLISHED AND WHAT IS NOT
|
|
16
|
+
*
|
|
17
|
+
* The DIRECTION of each link below is reported consistently across Roccas,
|
|
18
|
+
* Sagiv, Schwartz & Knafo (2002, N=246), Fischer & Boer's three-level
|
|
19
|
+
* meta-analysis (2015, N=9,935 across 14 countries), and Parks-Leduc, Feldman
|
|
20
|
+
* & Bardi's meta-analysis of 60 studies. Those three agree on sign for every
|
|
21
|
+
* pairing used here.
|
|
22
|
+
*
|
|
23
|
+
* The MAGNITUDES are ours. The published correlations are modest -- the
|
|
24
|
+
* meta-analyses stress that traits and values are distinct constructs and the
|
|
25
|
+
* relationships "are not generally large" -- and none of the sources reachable
|
|
26
|
+
* for this work published a full r-value table. So every weight here is a
|
|
27
|
+
* modelling choice scaled to the reported relative strength, not a coefficient
|
|
28
|
+
* copied from a paper. `evidence` on each row says which half you are reading.
|
|
29
|
+
*
|
|
30
|
+
* Anyone recalibrating this should change the weights freely and the signs only
|
|
31
|
+
* with a citation.
|
|
32
|
+
*
|
|
33
|
+
* @since 2026-08-01
|
|
34
|
+
*/
|
|
35
|
+
export type BigFiveFactor = 'openness' | 'conscientiousness' | 'extraversion' | 'agreeableness' | 'neuroticism';
|
|
36
|
+
export interface BigFiveScores {
|
|
37
|
+
openness: number;
|
|
38
|
+
conscientiousness: number;
|
|
39
|
+
extraversion: number;
|
|
40
|
+
agreeableness: number;
|
|
41
|
+
neuroticism: number;
|
|
42
|
+
}
|
|
43
|
+
export interface BigFiveValueLink {
|
|
44
|
+
factor: BigFiveFactor;
|
|
45
|
+
value: string;
|
|
46
|
+
/** Ours. Scaled to reported relative strength, not a published coefficient. */
|
|
47
|
+
weight: number;
|
|
48
|
+
direction: 'positive' | 'negative';
|
|
49
|
+
/**
|
|
50
|
+
* `direction-established` — sign agreed by the three sources named above;
|
|
51
|
+
* weight is a modelling choice.
|
|
52
|
+
* `direction-inferred` — sign follows from theory or from a weaker/adjacent
|
|
53
|
+
* finding, and should be treated as a hypothesis.
|
|
54
|
+
*/
|
|
55
|
+
evidence: 'direction-established' | 'direction-inferred';
|
|
56
|
+
source: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const BIG_FIVE_VALUE_LINKS: BigFiveValueLink[];
|
|
59
|
+
/**
|
|
60
|
+
* Values from a Big Five profile, same squash as the trait derivation so the
|
|
61
|
+
* two paths produce comparable numbers.
|
|
62
|
+
*/
|
|
63
|
+
export declare function deriveValuesFromBigFive(scores: Partial<BigFiveScores>): {
|
|
64
|
+
values: Record<string, number>;
|
|
65
|
+
contributions: Array<{
|
|
66
|
+
factor: string;
|
|
67
|
+
value: string;
|
|
68
|
+
contribution: number;
|
|
69
|
+
evidence: string;
|
|
70
|
+
}>;
|
|
71
|
+
/** Axes with at least one link whose direction is a hypothesis, not a finding. */
|
|
72
|
+
hypothesisAxes: string[];
|
|
73
|
+
};
|
|
74
|
+
/** Axes this table can reach — all thirteen, which is the point of adding it. */
|
|
75
|
+
export declare function bigFiveReachableAxes(): string[];
|
|
76
|
+
//# sourceMappingURL=big-five-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"big-five-values.d.ts","sourceRoot":"","sources":["../../src/values/big-five-values.ts"],"names":[],"m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published
|
|
5
|
+
* literature relates VALUES to the Big Five, not to patience or satisficing or
|
|
6
|
+
* information foraging. Deriving a value from a cognitive trait therefore
|
|
7
|
+
* always crosses a gap the research does not cover -- the direction may be
|
|
8
|
+
* reasonable, but the bridge is ours. Deriving it from the Big Five does not
|
|
9
|
+
* cross that gap, because the Big Five is the construct the studies measured.
|
|
10
|
+
*
|
|
11
|
+
* This also fills the four axes no cognitive trait reaches. hedonism and power
|
|
12
|
+
* are Extraversion territory; universalism is Openness and Agreeableness;
|
|
13
|
+
* relatedness is the weakest of the four and is labelled accordingly.
|
|
14
|
+
*
|
|
15
|
+
* WHAT IS ESTABLISHED AND WHAT IS NOT
|
|
16
|
+
*
|
|
17
|
+
* The DIRECTION of each link below is reported consistently across Roccas,
|
|
18
|
+
* Sagiv, Schwartz & Knafo (2002, N=246), Fischer & Boer's three-level
|
|
19
|
+
* meta-analysis (2015, N=9,935 across 14 countries), and Parks-Leduc, Feldman
|
|
20
|
+
* & Bardi's meta-analysis of 60 studies. Those three agree on sign for every
|
|
21
|
+
* pairing used here.
|
|
22
|
+
*
|
|
23
|
+
* The MAGNITUDES are ours. The published correlations are modest -- the
|
|
24
|
+
* meta-analyses stress that traits and values are distinct constructs and the
|
|
25
|
+
* relationships "are not generally large" -- and none of the sources reachable
|
|
26
|
+
* for this work published a full r-value table. So every weight here is a
|
|
27
|
+
* modelling choice scaled to the reported relative strength, not a coefficient
|
|
28
|
+
* copied from a paper. `evidence` on each row says which half you are reading.
|
|
29
|
+
*
|
|
30
|
+
* Anyone recalibrating this should change the weights freely and the signs only
|
|
31
|
+
* with a citation.
|
|
32
|
+
*
|
|
33
|
+
* @since 2026-08-01
|
|
34
|
+
*/
|
|
35
|
+
export const BIG_FIVE_VALUE_LINKS = [
|
|
36
|
+
// ── Openness ──
|
|
37
|
+
{ factor: 'openness', value: 'selfDirection', weight: 0.7, direction: 'positive',
|
|
38
|
+
evidence: 'direction-established',
|
|
39
|
+
source: 'Roccas et al. (2002); Fischer & Boer (2015) — Openness is the strongest correlate of self-direction' },
|
|
40
|
+
{ factor: 'openness', value: 'universalism', weight: 0.6, direction: 'positive',
|
|
41
|
+
evidence: 'direction-established',
|
|
42
|
+
source: 'Roccas et al. (2002); Parks-Leduc et al. (2015) — Openness correlates with universalism' },
|
|
43
|
+
{ factor: 'openness', value: 'stimulation', weight: 0.6, direction: 'positive',
|
|
44
|
+
evidence: 'direction-established',
|
|
45
|
+
source: 'Roccas et al. (2002) — Openness associated with stimulation' },
|
|
46
|
+
{ factor: 'openness', value: 'tradition', weight: 0.5, direction: 'negative',
|
|
47
|
+
evidence: 'direction-established',
|
|
48
|
+
source: 'Fischer & Boer (2015) — Openness–Conservation is among the strongest reported relationships, negative' },
|
|
49
|
+
{ factor: 'openness', value: 'conformity', weight: 0.4, direction: 'negative',
|
|
50
|
+
evidence: 'direction-established',
|
|
51
|
+
source: 'Fischer & Boer (2015) — Openness opposes the Conservation dimension' },
|
|
52
|
+
// ── Extraversion ──
|
|
53
|
+
{ factor: 'extraversion', value: 'hedonism', weight: 0.6, direction: 'positive',
|
|
54
|
+
evidence: 'direction-established',
|
|
55
|
+
source: 'Roccas et al. (2002); Parks-Leduc et al. (2015) — Extraversion correlates positively with hedonism' },
|
|
56
|
+
{ factor: 'extraversion', value: 'power', weight: 0.5, direction: 'positive',
|
|
57
|
+
evidence: 'direction-established',
|
|
58
|
+
source: 'Parks-Leduc et al. (2015) — Extraversion correlates most positively with stimulation, hedonism, achievement and power' },
|
|
59
|
+
{ factor: 'extraversion', value: 'achievement', weight: 0.5, direction: 'positive',
|
|
60
|
+
evidence: 'direction-established',
|
|
61
|
+
source: 'Roccas et al. (2002) — Extraversion associated with achievement' },
|
|
62
|
+
{ factor: 'extraversion', value: 'stimulation', weight: 0.5, direction: 'positive',
|
|
63
|
+
evidence: 'direction-established',
|
|
64
|
+
source: 'Roccas et al. (2002) — Extraversion associated with stimulation' },
|
|
65
|
+
{ factor: 'extraversion', value: 'tradition', weight: 0.3, direction: 'negative',
|
|
66
|
+
evidence: 'direction-established',
|
|
67
|
+
source: 'Parks-Leduc et al. (2015) — Extraversion correlates most negatively with tradition' },
|
|
68
|
+
// ── Agreeableness ──
|
|
69
|
+
{ factor: 'agreeableness', value: 'benevolence', weight: 0.7, direction: 'positive',
|
|
70
|
+
evidence: 'direction-established',
|
|
71
|
+
source: 'Roccas et al. (2002); Fischer & Boer (2015) — Agreeableness–Transcendence is among the strongest reported' },
|
|
72
|
+
{ factor: 'agreeableness', value: 'universalism', weight: 0.5, direction: 'positive',
|
|
73
|
+
evidence: 'direction-established',
|
|
74
|
+
source: 'Parks-Leduc et al. (2015) — Agreeableness correlates positively with universalism' },
|
|
75
|
+
{ factor: 'agreeableness', value: 'conformity', weight: 0.4, direction: 'positive',
|
|
76
|
+
evidence: 'direction-established',
|
|
77
|
+
source: 'Roccas et al. (2002) — Agreeableness associated with conformity' },
|
|
78
|
+
{ factor: 'agreeableness', value: 'tradition', weight: 0.4, direction: 'positive',
|
|
79
|
+
evidence: 'direction-established',
|
|
80
|
+
source: 'Roccas et al. (2002) — Agreeableness associated with tradition' },
|
|
81
|
+
{ factor: 'agreeableness', value: 'power', weight: 0.5, direction: 'negative',
|
|
82
|
+
evidence: 'direction-established',
|
|
83
|
+
source: 'Parks-Leduc et al. (2015) — Agreeableness correlates most negatively with power and achievement' },
|
|
84
|
+
{ factor: 'agreeableness', value: 'achievement', weight: 0.3, direction: 'negative',
|
|
85
|
+
evidence: 'direction-established',
|
|
86
|
+
source: 'Parks-Leduc et al. (2015) — Agreeableness correlates negatively with achievement' },
|
|
87
|
+
// ── Conscientiousness ──
|
|
88
|
+
{ factor: 'conscientiousness', value: 'achievement', weight: 0.6, direction: 'positive',
|
|
89
|
+
evidence: 'direction-established',
|
|
90
|
+
source: 'Roccas et al. (2002) — Conscientiousness associated with achievement' },
|
|
91
|
+
{ factor: 'conscientiousness', value: 'conformity', weight: 0.5, direction: 'positive',
|
|
92
|
+
evidence: 'direction-established',
|
|
93
|
+
source: 'Roccas et al. (2002) — Conscientiousness associated with conformity' },
|
|
94
|
+
{ factor: 'conscientiousness', value: 'security', weight: 0.4, direction: 'positive',
|
|
95
|
+
evidence: 'direction-inferred',
|
|
96
|
+
source: 'HYPOTHESIS. Conscientiousness sits on the Conservation side of the circumplex with conformity, and security is the third Conservation value. No source reachable for this work reported the pairing directly.' },
|
|
97
|
+
{ factor: 'conscientiousness', value: 'hedonism', weight: 0.4, direction: 'negative',
|
|
98
|
+
evidence: 'direction-inferred',
|
|
99
|
+
source: 'HYPOTHESIS. Hedonism opposes Conservation on the circumplex, so a Conscientiousness–hedonism negative follows from the structure rather than from a reported coefficient.' },
|
|
100
|
+
// ── Neuroticism ──
|
|
101
|
+
{ factor: 'neuroticism', value: 'security', weight: 0.4, direction: 'positive',
|
|
102
|
+
evidence: 'direction-inferred',
|
|
103
|
+
source: 'HYPOTHESIS. Threat sensitivity plausibly raises the priority of safety and stability. Reported Neuroticism–value correlations are the weakest of the five factors, so this is the least confident row here.' },
|
|
104
|
+
// ── Relatedness need (SDT, not Schwartz) ──
|
|
105
|
+
{ factor: 'agreeableness', value: 'relatednessNeed', weight: 0.5, direction: 'positive',
|
|
106
|
+
evidence: 'direction-inferred',
|
|
107
|
+
source: 'HYPOTHESIS. Need-support research reports that people experiencing relatedness satisfaction tend to be more agreeable and extroverted, which is a correlate of satisfaction rather than of the need itself. Treated as the weakest link in this table.' },
|
|
108
|
+
{ factor: 'extraversion', value: 'relatednessNeed', weight: 0.4, direction: 'positive',
|
|
109
|
+
evidence: 'direction-inferred',
|
|
110
|
+
source: 'HYPOTHESIS. Same basis and same caveat as the Agreeableness link above.' },
|
|
111
|
+
// ── Autonomy and competence needs ──
|
|
112
|
+
{ factor: 'openness', value: 'autonomyNeed', weight: 0.4, direction: 'positive',
|
|
113
|
+
evidence: 'direction-inferred',
|
|
114
|
+
source: 'HYPOTHESIS. Openness predicts self-direction, and autonomy is the SDT construct nearest to it. An inference across two frameworks, not a reported pairing.' },
|
|
115
|
+
{ factor: 'conscientiousness', value: 'competenceNeed', weight: 0.4, direction: 'positive',
|
|
116
|
+
evidence: 'direction-inferred',
|
|
117
|
+
source: 'HYPOTHESIS. Conscientiousness predicts achievement, and competence is the SDT construct nearest to it. Same cross-framework caveat.' },
|
|
118
|
+
];
|
|
119
|
+
/**
|
|
120
|
+
* Values from a Big Five profile, same squash as the trait derivation so the
|
|
121
|
+
* two paths produce comparable numbers.
|
|
122
|
+
*/
|
|
123
|
+
export function deriveValuesFromBigFive(scores) {
|
|
124
|
+
const AXES = ['selfDirection', 'stimulation', 'hedonism', 'achievement', 'power', 'security',
|
|
125
|
+
'conformity', 'tradition', 'benevolence', 'universalism',
|
|
126
|
+
'autonomyNeed', 'competenceNeed', 'relatednessNeed'];
|
|
127
|
+
const raw = {};
|
|
128
|
+
AXES.forEach((a) => { raw[a] = 0; });
|
|
129
|
+
const contributions = [];
|
|
130
|
+
const hypothesis = new Set();
|
|
131
|
+
for (const link of BIG_FIVE_VALUE_LINKS) {
|
|
132
|
+
const s = scores[link.factor];
|
|
133
|
+
if (typeof s !== 'number')
|
|
134
|
+
continue;
|
|
135
|
+
const c = (s - 0.5) * link.weight * (link.direction === 'positive' ? 1 : -1);
|
|
136
|
+
raw[link.value] = (raw[link.value] ?? 0) + c;
|
|
137
|
+
if (Math.abs(c) > 0.02) {
|
|
138
|
+
contributions.push({ factor: link.factor, value: link.value,
|
|
139
|
+
contribution: Math.round(c * 100) / 100, evidence: link.evidence });
|
|
140
|
+
}
|
|
141
|
+
if (link.evidence === 'direction-inferred')
|
|
142
|
+
hypothesis.add(link.value);
|
|
143
|
+
}
|
|
144
|
+
const values = {};
|
|
145
|
+
AXES.forEach((a) => { values[a] = Math.round((0.5 + 0.5 * Math.tanh(raw[a])) * 100) / 100; });
|
|
146
|
+
return { values, contributions, hypothesisAxes: [...hypothesis] };
|
|
147
|
+
}
|
|
148
|
+
/** Axes this table can reach — all thirteen, which is the point of adding it. */
|
|
149
|
+
export function bigFiveReachableAxes() {
|
|
150
|
+
return [...new Set(BIG_FIVE_VALUE_LINKS.map((l) => l.value))];
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=big-five-values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"big-five-values.js","sourceRoot":"","sources":["../../src/values/big-five-values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA4BH,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACtD,iBAAiB;IACjB,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU;QAC9E,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,qGAAqG,EAAE;IACjH,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU;QAC7E,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,yFAAyF,EAAE;IACrG,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU;QAC5E,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,6DAA6D,EAAE;IACzE,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU;QAC1E,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,uGAAuG,EAAE;IACnH,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU;QAC3E,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,qEAAqE,EAAE;IAEjF,qBAAqB;IACrB,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM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,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9F,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;AACpE,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,oBAAoB;IAClC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
package/dist/values/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export { type SchwartzValues, type HigherOrderValues, type SDTNeeds, type MaslowLevel, type PersonaValues, type ValueTraitCorrelation, calculateHigherOrderValues, createPersonaValues, VALUE_TRAIT_CORRELATIONS, DEFAULT_VALUES, } from "./schwartz-values.js";
|
|
12
12
|
export { type ValueBehaviors, type InfluencePattern, type ValueProfilePattern, VALUE_BEHAVIORS, INFLUENCE_PATTERNS, VALUE_PROFILE_PATTERNS, calculatePatternSusceptibility, rankInfluencePatternsForProfile, } from "./value-mappings.js";
|
|
13
|
-
export { type PersonaValueProfile, PERSONA_VALUE_PROFILES, getPersonaValues, hasPersonaValues, resolvePersonaName, registerPersonaValues, } from "./persona-values.js";
|
|
13
|
+
export { type PersonaValueProfile, PERSONA_VALUE_PROFILES, getPersonaValues, resolveValuesForPersona, hasPersonaValues, resolvePersonaName, registerPersonaValues, } from "./persona-values.js";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/values/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/values/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
|
package/dist/values/index.js
CHANGED
|
@@ -13,5 +13,5 @@ export { calculateHigherOrderValues, createPersonaValues, VALUE_TRAIT_CORRELATIO
|
|
|
13
13
|
// Value-behavior mappings and influence patterns
|
|
14
14
|
export { VALUE_BEHAVIORS, INFLUENCE_PATTERNS, VALUE_PROFILE_PATTERNS, calculatePatternSusceptibility, rankInfluencePatternsForProfile, } from "./value-mappings.js";
|
|
15
15
|
// Persona value profiles
|
|
16
|
-
export { PERSONA_VALUE_PROFILES, getPersonaValues, hasPersonaValues, resolvePersonaName, registerPersonaValues, } from "./persona-values.js";
|
|
16
|
+
export { PERSONA_VALUE_PROFILES, getPersonaValues, resolveValuesForPersona, hasPersonaValues, resolvePersonaName, registerPersonaValues, } from "./persona-values.js";
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/dist/values/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/values/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,iCAAiC;AACjC,OAAO,EAOL,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,iDAAiD;AACjD,OAAO,EAIL,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAE7B,yBAAyB;AACzB,OAAO,EAEL,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/values/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,iCAAiC;AACjC,OAAO,EAOL,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,iDAAiD;AACjD,OAAO,EAIL,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAE7B,yBAAyB;AACzB,OAAO,EAEL,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a persona must account for before it can be submitted.
|
|
3
|
+
*
|
|
4
|
+
* THE PROBLEM
|
|
5
|
+
*
|
|
6
|
+
* `persona_create_submit_traits` accepted whatever it was given. A caller who
|
|
7
|
+
* named three traits got back a complete 26-trait persona, because
|
|
8
|
+
* `buildTraitsFromAnswers` fills every unsupplied one from a research baseline.
|
|
9
|
+
* The persona then looked finished from the outside — full trait vector, real
|
|
10
|
+
* numbers, no warning in the payload — while most of those numbers were
|
|
11
|
+
* population defaults nobody had considered for this person.
|
|
12
|
+
*
|
|
13
|
+
* Five personas on this install carry exactly that history: each is missing the
|
|
14
|
+
* same four traits (selfEfficacy, satisficing, trustCalibration,
|
|
15
|
+
* interruptRecovery), which means one creation session skipped them and nothing
|
|
16
|
+
* asked. Filling them afterwards is archaeology — reading the description months
|
|
17
|
+
* later and hoping it still supports a number.
|
|
18
|
+
*
|
|
19
|
+
* THE RULE
|
|
20
|
+
*
|
|
21
|
+
* Every trait must be ACCOUNTED FOR at submission: either given a value, or
|
|
22
|
+
* named explicitly as something the description does not support. Both are fine
|
|
23
|
+
* answers. Silence is not, because silence and "0.5 is genuinely right here"
|
|
24
|
+
* produce the same persona and nothing downstream can tell them apart.
|
|
25
|
+
*
|
|
26
|
+
* This is the same contract the Big Five inference already uses — supply it with
|
|
27
|
+
* evidence, or omit it deliberately and let the caller know what that costs.
|
|
28
|
+
*
|
|
29
|
+
* WHY REJECT RATHER THAN WARN
|
|
30
|
+
*
|
|
31
|
+
* A warning in a response is read once, by a model that has already moved on to
|
|
32
|
+
* the next tool call. The persona is written either way, and the gap is only
|
|
33
|
+
* discovered when someone audits months later. Refusing the write is the only
|
|
34
|
+
* version of this that changes what gets stored.
|
|
35
|
+
*
|
|
36
|
+
* @since 2026-08-01
|
|
37
|
+
*/
|
|
38
|
+
/** Traits a persona description can realistically speak to, and what to look for. */
|
|
39
|
+
export declare const TRAIT_INFERENCE_CRITERIA: Record<string, string>;
|
|
40
|
+
/**
|
|
41
|
+
* siteFamiliarity is deliberately NOT in the list above.
|
|
42
|
+
*
|
|
43
|
+
* It is a persona-SITE variable, not a disposition. The same person is familiar
|
|
44
|
+
* with one site and new to another, so no description can answer it: "prior
|
|
45
|
+
* experience with THIS site" has no value until a site is named. Requiring it
|
|
46
|
+
* per persona forced a number that was wrong for every site except whichever
|
|
47
|
+
* one the author happened to be thinking of, and the completeness contract made
|
|
48
|
+
* that mandatory rather than optional.
|
|
49
|
+
*
|
|
50
|
+
* It is supplied per run instead, on the tools that audit a specific site.
|
|
51
|
+
* A stored persona value, where one exists, is a fallback for callers that do
|
|
52
|
+
* not pass it. (2026-08-01)
|
|
53
|
+
*/
|
|
54
|
+
export declare const SITE_SCOPED_TRAITS: readonly ["siteFamiliarity"];
|
|
55
|
+
export declare const ALL_TRAITS: string[];
|
|
56
|
+
/**
|
|
57
|
+
* How a supplied trait value was arrived at.
|
|
58
|
+
*
|
|
59
|
+
* The contract enforced ACCOUNTING and reported it as if it were honesty. A
|
|
60
|
+
* caller who invented six values and supplied all 26 got back "26 of 26
|
|
61
|
+
* supplied; 0 filled from research baselines" -- which reads as a quality
|
|
62
|
+
* signal while six of those numbers were unfalsifiable inventions. The contract
|
|
63
|
+
* had no way to tell, and the output format erased the question.
|
|
64
|
+
*
|
|
65
|
+
* `supported` means the description says it. `asserted` means the caller
|
|
66
|
+
* decided it anyway -- a legitimate thing to do, and a different epistemic
|
|
67
|
+
* object. Naming which is which costs a word and restores the distinction the
|
|
68
|
+
* count destroyed. (2026-08-01)
|
|
69
|
+
*/
|
|
70
|
+
export type TraitProvenanceKind = "supported" | "asserted";
|
|
71
|
+
export interface CompletenessVerdict {
|
|
72
|
+
ok: boolean;
|
|
73
|
+
unaccounted: string[];
|
|
74
|
+
message?: string;
|
|
75
|
+
/** Traits the caller decided rather than read out of the description. */
|
|
76
|
+
asserted?: string[];
|
|
77
|
+
/** Traits supplied with no provenance stated — unknown, not supported. */
|
|
78
|
+
unlabelled?: string[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Every trait must be supplied or explicitly declared unsupported.
|
|
82
|
+
*
|
|
83
|
+
* `unsupported` is a first-class answer, not a failure: a description that says
|
|
84
|
+
* nothing about someone's response to scarcity should not be made to produce a
|
|
85
|
+
* number. What it must not do is stay silent, because the persona is built
|
|
86
|
+
* either way and a defaulted trait is indistinguishable from a considered one.
|
|
87
|
+
*/
|
|
88
|
+
export declare function assessTraitCompleteness(supplied: Record<string, number> | undefined, unsupported: string[] | undefined,
|
|
89
|
+
/** Per-trait: did the description support this, or did the caller assert it? */
|
|
90
|
+
provenance?: Record<string, TraitProvenanceKind>): CompletenessVerdict;
|
|
91
|
+
//# sourceMappingURL=persona-completeness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona-completeness.d.ts","sourceRoot":"","sources":["../../src/values/persona-completeness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,qFAAqF;AACrF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA0B3D,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,8BAA+B,CAAC;AAE/D,eAAO,MAAM,UAAU,UAAwC,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,UAAU,CAAC;AAE3D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC5C,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS;AACjC,gFAAgF;AAChF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAC/C,mBAAmB,CAsBrB"}
|