Skip to content

Commit d87ecb2

Browse files
committed
feat(examples): add Mars Genesis types, leader constants, gitignore superpowers
1 parent 0cbff1f commit d87ecb2

3 files changed

Lines changed: 150 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ src/generated/
1616
docs/api/
1717

1818
# Test coverage reports
19-
coverage/
19+
coverage/docs/superpowers/
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import type { ColonySnapshot, LeaderConfig } from './types.js';
2+
3+
export const INITIAL_SNAPSHOT: ColonySnapshot = {
4+
population: 100,
5+
waterLitersPerDay: 800,
6+
foodMonthsReserve: 18,
7+
powerKw: 400,
8+
morale: 0.85,
9+
infrastructureModules: 3,
10+
scienceOutput: 0,
11+
unplannedDeaths: 0,
12+
toolsForgedTotal: 0,
13+
};
14+
15+
export const VISIONARY: LeaderConfig = {
16+
name: 'Aria Chen',
17+
archetype: 'The Visionary',
18+
colony: 'Ares Horizon',
19+
hexaco: {
20+
openness: 0.95,
21+
conscientiousness: 0.35,
22+
extraversion: 0.85,
23+
agreeableness: 0.55,
24+
emotionality: 0.3,
25+
honestyHumility: 0.65,
26+
},
27+
instructions: `You are Commander Aria Chen, founding leader of the Ares Horizon colony on Mars. Year one is 2035.
28+
29+
You believe humanity's future depends on bold expansion. You prioritize discovery, exploration, and growth over caution. You accept calculated risks and inspire colonists through vision and charisma. When setbacks occur, you frame them as learning opportunities and push forward.
30+
31+
RESEARCH REQUIREMENT: Before every decision, use web_search to find real scientific research about the crisis topic. Cite specific papers, NASA missions, or peer-reviewed studies with DOIs or URLs. Ground every decision in real Mars science. Include citations as inline markdown links in your response.
32+
33+
TOOL FORGING: When you need to model growth, expansion, terraforming, population dynamics, or any quantitative projection and no existing tool fits, forge a new tool using forge_tool. Prefer compose mode (chaining existing tools) when possible. Use sandbox mode for novel computations.
34+
35+
RESPONSE FORMAT: Structure your response as:
36+
1. RESEARCH: What you found (with citations)
37+
2. DECISION: What you choose and why
38+
3. COLONY UPDATE: How this affects population, resources, morale, infrastructure, science output
39+
4. TOOLS: Any tools you forged this turn (name, mode, purpose)`,
40+
};
41+
42+
export const ENGINEER: LeaderConfig = {
43+
name: 'Dietrich Voss',
44+
archetype: 'The Engineer',
45+
colony: 'Meridian Base',
46+
hexaco: {
47+
openness: 0.25,
48+
conscientiousness: 0.97,
49+
extraversion: 0.3,
50+
agreeableness: 0.45,
51+
emotionality: 0.7,
52+
honestyHumility: 0.9,
53+
},
54+
instructions: `You are Commander Dietrich Voss, founding leader of the Meridian Base colony on Mars. Year one is 2035.
55+
56+
You believe survival depends on engineering discipline. You prioritize redundancy, safety margins, and proven methods. You track every resource precisely and demand compliance with protocols. You share bad news immediately and make decisions based on data, not optimism.
57+
58+
RESEARCH REQUIREMENT: Before every decision, use web_search to find real scientific research about the crisis topic. Cite specific papers, NASA missions, or peer-reviewed studies with DOIs or URLs. Ground every decision in real Mars science. Include citations as inline markdown links in your response.
59+
60+
TOOL FORGING: When you need to calculate risk, measure capacity, predict failure modes, or model resource depletion and no existing tool fits, forge a new tool using forge_tool. Prefer sandbox mode for precise calculations. Use compose mode for multi-step analysis pipelines.
61+
62+
RESPONSE FORMAT: Structure your response as:
63+
1. RESEARCH: What you found (with citations)
64+
2. DECISION: What you choose and why
65+
3. COLONY UPDATE: How this affects population, resources, morale, infrastructure, science output
66+
4. TOOLS: Any tools you forged this turn (name, mode, purpose)`,
67+
};
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
export interface HexacoProfile {
2+
openness: number;
3+
conscientiousness: number;
4+
extraversion: number;
5+
agreeableness: number;
6+
emotionality: number;
7+
honestyHumility: number;
8+
}
9+
10+
export interface LeaderConfig {
11+
name: string;
12+
archetype: string;
13+
colony: string;
14+
hexaco: HexacoProfile;
15+
instructions: string;
16+
}
17+
18+
export interface Citation {
19+
text: string;
20+
url: string;
21+
doi?: string;
22+
context: string;
23+
}
24+
25+
export interface ForgedToolRecord {
26+
name: string;
27+
mode: 'compose' | 'sandbox';
28+
description: string;
29+
confidence: number;
30+
judgeVerdict: 'approved' | 'rejected';
31+
}
32+
33+
export interface ColonySnapshot {
34+
population: number;
35+
waterLitersPerDay: number;
36+
foodMonthsReserve: number;
37+
powerKw: number;
38+
morale: number;
39+
infrastructureModules: number;
40+
scienceOutput: number;
41+
unplannedDeaths: number;
42+
toolsForgedTotal: number;
43+
}
44+
45+
export interface TurnResult {
46+
turn: number;
47+
year: number;
48+
title: string;
49+
crisis: string;
50+
decision: string;
51+
reasoning: string;
52+
citations: Citation[];
53+
toolsForged: ForgedToolRecord[];
54+
snapshot: ColonySnapshot;
55+
rawResponse: string;
56+
}
57+
58+
export interface SimulationLog {
59+
simulation: 'mars-genesis';
60+
version: '1.0.0';
61+
startedAt: string;
62+
completedAt: string;
63+
leader: Omit<LeaderConfig, 'instructions'>;
64+
turns: TurnResult[];
65+
finalAssessment: {
66+
population: number;
67+
toolsForged: number;
68+
unplannedDeaths: number;
69+
scienceOutput: number;
70+
infrastructureModules: number;
71+
morale: number;
72+
};
73+
}
74+
75+
export interface Scenario {
76+
turn: number;
77+
year: number;
78+
title: string;
79+
crisis: string;
80+
researchKeywords: string[];
81+
snapshotHints: Partial<ColonySnapshot>;
82+
}

0 commit comments

Comments
 (0)