@hanzo/persona 1.0.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/README.md +68 -0
- package/index.js +36 -0
- package/package.json +40 -0
- package/schemas/persona_schema.yaml +295 -0
- package/schemas/personality.schema.json +228 -0
- package/scripts/add-personality.js +220 -0
- package/scripts/build.js +345 -0
- package/scripts/enhance-scientists.js +215 -0
- package/scripts/enhance_all_personalities.py +926 -0
- package/scripts/migrate.js +384 -0
- package/scripts/parallel-validate.js +322 -0
- package/scripts/split-personalities.js +95 -0
- package/scripts/validate.js +306 -0
- package/tools/unix_tools.yaml +349 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const PROFILES_DIR = path.join(__dirname, '../profiles');
|
|
11
|
+
|
|
12
|
+
// Enhanced scientist template with additional fields
|
|
13
|
+
const scientistEnhancements = {
|
|
14
|
+
einstein: {
|
|
15
|
+
description: "Revolutionary physicist who transformed our understanding of space, time, and energy",
|
|
16
|
+
philosophy: "Imagination is more important than knowledge. The important thing is not to stop questioning.",
|
|
17
|
+
tools: {
|
|
18
|
+
essential: ["mathematics", "theoretical_physics", "thought_experiments"],
|
|
19
|
+
preferred: ["relativity_theory", "quantum_mechanics"],
|
|
20
|
+
domains: ["physics", "cosmology", "philosophy_of_science"]
|
|
21
|
+
},
|
|
22
|
+
contributions: ["Theory of Relativity", "E=mc²", "Photoelectric Effect", "Brownian Motion"],
|
|
23
|
+
quotes: [
|
|
24
|
+
"God does not play dice with the universe",
|
|
25
|
+
"Try not to become a man of success, but rather try to become a man of value"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
curie: {
|
|
29
|
+
description: "Pioneer in radioactivity research and first woman to win a Nobel Prize",
|
|
30
|
+
philosophy: "Nothing in life is to be feared, it is only to be understood.",
|
|
31
|
+
tools: {
|
|
32
|
+
essential: ["chemistry", "physics", "laboratory_experiments"],
|
|
33
|
+
preferred: ["radioactivity_research", "element_isolation"],
|
|
34
|
+
domains: ["radioactivity", "chemistry", "physics"]
|
|
35
|
+
},
|
|
36
|
+
contributions: ["Discovery of Polonium and Radium", "Radioactivity Research", "Mobile X-ray Units"],
|
|
37
|
+
quotes: [
|
|
38
|
+
"Be less curious about people and more curious about ideas",
|
|
39
|
+
"Life is not easy for any of us, but what of that?"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
darwin: {
|
|
43
|
+
description: "Naturalist who revolutionized biology with the theory of evolution",
|
|
44
|
+
philosophy: "It is not the strongest of the species that survives, but the most adaptable to change.",
|
|
45
|
+
tools: {
|
|
46
|
+
essential: ["observation", "specimen_collection", "comparative_analysis"],
|
|
47
|
+
preferred: ["field_research", "taxonomy", "geology"],
|
|
48
|
+
domains: ["biology", "evolution", "natural_history"]
|
|
49
|
+
},
|
|
50
|
+
contributions: ["Theory of Evolution", "Natural Selection", "The Origin of Species"],
|
|
51
|
+
quotes: [
|
|
52
|
+
"A man who dares to waste one hour of time has not discovered the value of life",
|
|
53
|
+
"The love for all living creatures is the most noble attribute of man"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
newton: {
|
|
57
|
+
description: "Mathematical genius who laid the foundations of classical physics",
|
|
58
|
+
philosophy: "Truth is ever to be found in simplicity, and not in the multiplicity and confusion of things.",
|
|
59
|
+
tools: {
|
|
60
|
+
essential: ["mathematics", "calculus", "optics"],
|
|
61
|
+
preferred: ["mechanics", "astronomy", "alchemy"],
|
|
62
|
+
domains: ["physics", "mathematics", "astronomy"]
|
|
63
|
+
},
|
|
64
|
+
contributions: ["Laws of Motion", "Universal Gravitation", "Calculus", "Optics"],
|
|
65
|
+
quotes: [
|
|
66
|
+
"If I have seen further, it is by standing on the shoulders of giants",
|
|
67
|
+
"I can calculate the motion of heavenly bodies but not the madness of people"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
galileo: {
|
|
71
|
+
description: "Father of modern observational astronomy and experimental physics",
|
|
72
|
+
philosophy: "Measure what is measurable, and make measurable what is not so.",
|
|
73
|
+
tools: {
|
|
74
|
+
essential: ["telescope", "mathematics", "experimental_method"],
|
|
75
|
+
preferred: ["astronomy", "mechanics", "geometry"],
|
|
76
|
+
domains: ["astronomy", "physics", "mathematics"]
|
|
77
|
+
},
|
|
78
|
+
contributions: ["Heliocentrism Support", "Telescope Improvements", "Laws of Motion", "Jupiter's Moons Discovery"],
|
|
79
|
+
quotes: [
|
|
80
|
+
"And yet it moves",
|
|
81
|
+
"Mathematics is the language in which God has written the universe"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
tesla: {
|
|
85
|
+
description: "Visionary inventor who pioneered alternating current and wireless technology",
|
|
86
|
+
philosophy: "The present is theirs; the future, for which I really worked, is mine.",
|
|
87
|
+
tools: {
|
|
88
|
+
essential: ["electrical_engineering", "electromagnetic_theory", "invention"],
|
|
89
|
+
preferred: ["alternating_current", "wireless_transmission", "visualization"],
|
|
90
|
+
domains: ["electrical_engineering", "physics", "invention"]
|
|
91
|
+
},
|
|
92
|
+
contributions: ["AC Motor", "Tesla Coil", "Wireless Technology", "Radio Control"],
|
|
93
|
+
quotes: [
|
|
94
|
+
"If you want to find the secrets of the universe, think in terms of energy, frequency and vibration",
|
|
95
|
+
"The scientists of today think deeply instead of clearly"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
hawking: {
|
|
99
|
+
description: "Theoretical physicist who advanced our understanding of black holes and cosmology",
|
|
100
|
+
philosophy: "Intelligence is the ability to adapt to change.",
|
|
101
|
+
tools: {
|
|
102
|
+
essential: ["theoretical_physics", "mathematics", "cosmology"],
|
|
103
|
+
preferred: ["black_hole_theory", "quantum_mechanics", "relativity"],
|
|
104
|
+
domains: ["cosmology", "theoretical_physics", "astrophysics"]
|
|
105
|
+
},
|
|
106
|
+
contributions: ["Hawking Radiation", "Black Hole Thermodynamics", "A Brief History of Time"],
|
|
107
|
+
quotes: [
|
|
108
|
+
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge",
|
|
109
|
+
"We are just an advanced breed of monkeys on a minor planet"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
feynman: {
|
|
113
|
+
description: "Nobel Prize-winning physicist known for quantum mechanics and teaching excellence",
|
|
114
|
+
philosophy: "Study hard what interests you the most in the most undisciplined, irreverent and original manner possible.",
|
|
115
|
+
tools: {
|
|
116
|
+
essential: ["quantum_mechanics", "particle_physics", "feynman_diagrams"],
|
|
117
|
+
preferred: ["teaching", "bongo_drums", "safe_cracking"],
|
|
118
|
+
domains: ["quantum_physics", "particle_physics", "education"]
|
|
119
|
+
},
|
|
120
|
+
contributions: ["Quantum Electrodynamics", "Feynman Diagrams", "Path Integral Formulation"],
|
|
121
|
+
quotes: [
|
|
122
|
+
"I would rather have questions that can't be answered than answers that can't be questioned",
|
|
123
|
+
"Nobody ever figures out what life is all about"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
sagan: {
|
|
127
|
+
description: "Astronomer and science communicator who brought the cosmos to millions",
|
|
128
|
+
philosophy: "Somewhere, something incredible is waiting to be known.",
|
|
129
|
+
tools: {
|
|
130
|
+
essential: ["astronomy", "planetary_science", "science_communication"],
|
|
131
|
+
preferred: ["exobiology", "seti", "writing"],
|
|
132
|
+
domains: ["astronomy", "astrobiology", "science_communication"]
|
|
133
|
+
},
|
|
134
|
+
contributions: ["Cosmos TV Series", "Voyager Golden Record", "Planetary Science Research"],
|
|
135
|
+
quotes: [
|
|
136
|
+
"We are made of star stuff",
|
|
137
|
+
"Extraordinary claims require extraordinary evidence"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
turing: {
|
|
141
|
+
description: "Father of computer science and artificial intelligence",
|
|
142
|
+
philosophy: "We can only see a short distance ahead, but we can see plenty there that needs to be done.",
|
|
143
|
+
tools: {
|
|
144
|
+
essential: ["mathematics", "logic", "computation_theory"],
|
|
145
|
+
preferred: ["cryptanalysis", "machine_design", "algorithms"],
|
|
146
|
+
domains: ["computer_science", "mathematics", "cryptography"]
|
|
147
|
+
},
|
|
148
|
+
contributions: ["Turing Machine", "Turing Test", "Enigma Code Breaking", "ACE Computer"],
|
|
149
|
+
quotes: [
|
|
150
|
+
"A computer would deserve to be called intelligent if it could deceive a human",
|
|
151
|
+
"Sometimes it is the people no one expects anything from who do the things no one can imagine"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
// Get all scientist files
|
|
157
|
+
function getScientistFiles() {
|
|
158
|
+
const files = fs.readdirSync(PROFILES_DIR)
|
|
159
|
+
.filter(f => f.endsWith('.json'))
|
|
160
|
+
.map(f => {
|
|
161
|
+
const content = JSON.parse(fs.readFileSync(path.join(PROFILES_DIR, f), 'utf8'));
|
|
162
|
+
return { filename: f, data: content };
|
|
163
|
+
})
|
|
164
|
+
.filter(f => f.data.category === 'scientist');
|
|
165
|
+
|
|
166
|
+
return files;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Enhance scientist profiles
|
|
170
|
+
function enhanceScientists() {
|
|
171
|
+
console.log('🔬 Enhancing scientist profiles...\n');
|
|
172
|
+
|
|
173
|
+
const scientists = getScientistFiles();
|
|
174
|
+
let enhancedCount = 0;
|
|
175
|
+
let needsEnhancement = [];
|
|
176
|
+
|
|
177
|
+
scientists.forEach(({ filename, data }) => {
|
|
178
|
+
const id = data.id;
|
|
179
|
+
const enhancement = scientistEnhancements[id];
|
|
180
|
+
|
|
181
|
+
if (enhancement) {
|
|
182
|
+
// Apply enhancements
|
|
183
|
+
const enhancedData = {
|
|
184
|
+
...data,
|
|
185
|
+
...enhancement,
|
|
186
|
+
ocean: data.ocean // Preserve existing OCEAN scores
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// Write enhanced profile
|
|
190
|
+
fs.writeFileSync(
|
|
191
|
+
path.join(PROFILES_DIR, filename),
|
|
192
|
+
JSON.stringify(enhancedData, null, 2)
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
console.log(`✅ Enhanced: ${data.name}`);
|
|
196
|
+
enhancedCount++;
|
|
197
|
+
} else if (!data.description || !data.philosophy || !data.tools) {
|
|
198
|
+
needsEnhancement.push(data.name);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
console.log(`\n📊 Results:`);
|
|
203
|
+
console.log(` Enhanced: ${enhancedCount}`);
|
|
204
|
+
console.log(` Total scientists: ${scientists.length}`);
|
|
205
|
+
|
|
206
|
+
if (needsEnhancement.length > 0) {
|
|
207
|
+
console.log(`\n⚠️ Needs enhancement (${needsEnhancement.length}):`);
|
|
208
|
+
needsEnhancement.forEach(name => console.log(` - ${name}`));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Run enhancement
|
|
213
|
+
enhanceScientists();
|
|
214
|
+
|
|
215
|
+
export { enhanceScientists };
|